Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port minor fixes to the codebase from PR #61 | Part 16 #81

Merged
merged 2 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions language/en/buildings.lang
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ $_Lang['Queue_Mode_Destroy_1+'] = 'Tear down';
$_Lang['Queue_Mode_Build_1+'] = 'Upgrade';
$_Lang['Queue_Mode_Destroy_1'] = 'Tearing down';
$_Lang['Queue_Mode_Build_1'] = 'Upgrading';
$_Lang['Queue_Mode_Research_1'] = 'Upgrading';
$_Lang['Queue_CantCancel_Premium'] = 'You cannot cancel construction which required Dark Energy!';
$_Lang['Queue_ConfirmCancel'] = 'Are you sure you want to cancel this task?';
$_Lang['Queue_Cancel_CantCancel'] = 'Cannot be cancelled';
Expand Down
1 change: 1 addition & 0 deletions language/pl/buildings.lang
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ $_Lang['Queue_Mode_Destroy_1+'] = 'Wyburz';
$_Lang['Queue_Mode_Build_1+'] = 'Buduj';
$_Lang['Queue_Mode_Destroy_1'] = 'Wyburzanie';
$_Lang['Queue_Mode_Build_1'] = 'Budowa';
$_Lang['Queue_Mode_Research_1'] = 'Badanie';
$_Lang['Queue_CantCancel_Premium'] = 'Nie można przerwać budowy, która wymagała Ciemnej Energii!';
$_Lang['Queue_ConfirmCancel'] = 'Czy jesteś pewien, że chcesz anulować zadanie?';
$_Lang['Queue_Cancel_CantCancel'] = 'Nie można przerwać';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,12 @@ function render ($props) {
$elementLevel += 1;
}

$elementCancellableClass = (
!Elements\isCancellableOnceInProgress($elementID) ?
'premblock' :
''
);

$hideIsDowngradeLabelClass = (
$isUpgrading ?
'hide' :
''
);
$elementCancellableClass = classNames([
'premblock' => !Elements\isCancellableOnceInProgress($elementID),
]);
$hideIsDowngradeLabelClass = classNames([
'hide' => $isUpgrading,
]);

$elementChronoAppletScript = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,27 @@ function render ($props) {
$elementLevel += 1;
}

$elementCancellableClass = (
!Elements\isCancellableOnceInProgress($elementID) ?
'premblock' :
''
);
$elementCancellableClass = classNames([
'premblock' => !Elements\isCancellableOnceInProgress($elementID),
]);

$elementModeLabelText = (
$isUpgrading ?
$_Lang['Queue_Mode_Build_1'] :
$_Lang['Queue_Mode_Destroy_1']
);
$elementModeLabelColorClass = (
$isUpgrading ?
'lime' :
'red'
Elements\isStructure($elementID) ?
(
$isUpgrading ?
$_Lang['Queue_Mode_Build_1'] :
$_Lang['Queue_Mode_Destroy_1']
) :
(
Elements\isTechnology($elementID) ?
$_Lang['Queue_Mode_Research_1'] :
''
)
);
$elementModeLabelColorClass = classNames([
'lime' => $isUpgrading,
'red' => !$isUpgrading,
]);
$elementCancelButtonText = (
$isFirstQueueElement ?
(
Expand Down