Skip to content

Commit

Permalink
⬆️ improvement (CHASE Frontend): Warning dialog to advance to next sp…
Browse files Browse the repository at this point in the history
…eaker now shows the type of list, so that it is not easily confused (#107)

branch: 105-better-independent-descriptions-for-next-speaker-prompts
  • Loading branch information
Strehk authored Mar 5, 2024
1 parent a0ece1c commit 006d2b9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
12 changes: 9 additions & 3 deletions chase/frontend/components/speakers_list/speech_buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,20 @@ export function ChairSpeechButtons({
visible={nextSpeakerWarningVisible}
onHide={() => setNextSpeakerWarningVisible(false)}
message={LL.chairs.speakersList.confirm.NEXT_SPEAKER_MESSAGE()}
header={LL.chairs.speakersList.confirm.NEXT_SPEAKER_HEADER()}
header={LL.chairs.speakersList.confirm.NEXT_SPEAKER_HEADER({
list: listTypeMap[typeOfList as $Enums.SpeakersListCategory],
})}
defaultFocus="accept"
icon={
<FontAwesomeIcon
icon={faExclamationTriangle}
beatFade
size={"3x"}
className="text-red-500"
className={
typeOfList === $Enums.SpeakersListCategory.SPEAKERS_LIST
? "text-red-500"
: "text-yellow-500"
}
/>
}
accept={() => {
Expand Down Expand Up @@ -447,7 +453,7 @@ export function ChairSpeechButtons({
</Dialog>
<Dialog
header={LL.chairs.speakersList.changeSpeechTimeOverlay.HEADLINE(
typeOfList,
listTypeMap[typeOfList],
)}
visible={changeSpeechTimeOverlayVisible}
onHide={() => setChangeSpeechTimeOverlayVisible(false)}
Expand Down
2 changes: 1 addition & 1 deletion chase/frontend/i18n/de/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ const de = {
confirm: {
NEXT_SPEAKER_MESSAGE:
"Willst du wirklich den nächsten Redner aufrufen?",
NEXT_SPEAKER_HEADER: "Nächste Rede",
NEXT_SPEAKER_HEADER: "Nächste Rede: {list}",
NEXT_SPEAKER_ACCEPT: "Ja",
NEXT_SPEAKER_REJECT: "Nein",
},
Expand Down
2 changes: 1 addition & 1 deletion chase/frontend/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ const en = {
confirm: {
NEXT_SPEAKER_MESSAGE:
"Do you really want to remove the current speaker and advance to the next?",
NEXT_SPEAKER_HEADER: "Next Speaker",
NEXT_SPEAKER_HEADER: "Next Speaker at {list:string}",
NEXT_SPEAKER_ACCEPT: "Yes",
NEXT_SPEAKER_REJECT: "No",
},
Expand Down
9 changes: 5 additions & 4 deletions chase/frontend/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1695,9 +1695,10 @@ type RootTranslation = {
*/
NEXT_SPEAKER_MESSAGE: string
/**
* N​e​x​t​ ​S​p​e​a​k​e​r
* N​e​x​t​ ​S​p​e​a​k​e​r​ ​a​t​ ​{​l​i​s​t​}
* @param {string} list
*/
NEXT_SPEAKER_HEADER: string
NEXT_SPEAKER_HEADER: RequiredParams<'list'>
/**
* Y​e​s
*/
Expand Down Expand Up @@ -3526,9 +3527,9 @@ export type TranslationFunctions = {
*/
NEXT_SPEAKER_MESSAGE: () => LocalizedString
/**
* Next Speaker
* Next Speaker at {list}
*/
NEXT_SPEAKER_HEADER: () => LocalizedString
NEXT_SPEAKER_HEADER: (arg: { list: string }) => LocalizedString
/**
* Yes
*/
Expand Down

0 comments on commit 006d2b9

Please sign in to comment.