Skip to content

Commit

Permalink
Merge pull request #81 from mdziekon/mdziekon/63/port-minor-modificat…
Browse files Browse the repository at this point in the history
…ions-part16

Port minor fixes to the codebase from PR #61 | Part 16
  • Loading branch information
mdziekon committed Mar 5, 2020
2 parents d1e0b7e + 15275e5 commit 324b104
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
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

0 comments on commit 324b104

Please sign in to comment.