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

fix(efb): fix checklists not turning green if completed but not in the relevant flight phase #8785

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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 .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
1. [A380X/ENGINES] Corrected ENG4 throttle variable typo - @rthom91 (Randy Thom)
1. [ND] Fixed track line not visible in GA TRK, RWY TRK and RWY modes - @ta-dzik (ta_dzik)
1. [A380X/FMS] Added SURV Status & Switching page with TCAS fault indication - @Frenkii (Moritz)
1. [EFB] Fix checklists not turning green if completed but not in the relevant flight phase - @Fabi-02 (Fabi)

## 0.12.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,25 @@ export const Checklists = () => {
const isMarkedCompleted = checklists[index].markedCompleted;
const isSelected = index === selectedChecklistIndex;
const isIndexRelevant = relevantChecklistIndices.includes(index);
if (isSelected && isChecklistCompleted && isIndexRelevant) {
if (isSelected && isChecklistCompleted) {
return isMarkedCompleted
? 'bg-utility-green font-bold text-theme-body'
: 'bg-utility-amber font-bold text-theme-body';
}
if (isSelected) {
return 'bg-theme-highlight font-bold text-theme-body';
}
if (isChecklistCompleted && isIndexRelevant) {
if (isChecklistCompleted) {
return isMarkedCompleted
? 'bg-theme-body border-2 border-utility-green font-bold text-utility-green ' +
'hover:text-theme-body hover:bg-utility-green'
: 'bg-theme-body border-2 border-utility-amber ' +
'font-bold text-utility-amber hover:text-theme-body hover:bg-utility-amber';
}
return 'bg-theme-accent border-2 border-theme-accent font-bold text-theme-text hover:bg-theme-highlight hover:text-theme-body';
return (
'bg-theme-accent border-2 border-theme-accent font-bold text-theme-text hover:bg-theme-highlight hover:text-theme-body' +
(!isIndexRelevant ? ' opacity-50 hover:opacity-100' : '')
);
};

/**
Expand Down