Skip to content

Commit

Permalink
fix(reader): preset settings UI (PR #2610)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Leroux <[email protected]>
  • Loading branch information
arthur-lemeur and panaC authored Oct 21, 2024
1 parent 510b4c2 commit 6c4b08a
Show file tree
Hide file tree
Showing 31 changed files with 322 additions and 186 deletions.
21 changes: 21 additions & 0 deletions src/renderer/assets/styles/components/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,27 @@ div[data-radix-popper-content-wrapper] {
}
}

.preset_settings_container {
> div {
button {
margin-bottom: 10px;
}

&:nth-child(-n + 2) {
margin-bottom: 20px;
}

&:last-child {
position: absolute;
bottom: 0;

@media screen and (height <= 600px) {
position: relative;
}
}
}
}

.CSS_END_components_settings {
display: none;
}
1 change: 1 addition & 0 deletions src/renderer/assets/styles/components/settings.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export declare const off: string;
export declare const on: string;
export declare const popover_dialog_reader: string;
export declare const position: string;
export declare const preset_settings_container: string;
export declare const range_inactive: string;
export declare const reset_button: string;
export declare const scale_button: string;
Expand Down
282 changes: 153 additions & 129 deletions src/renderer/reader/components/ReaderSettings.tsx

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/resources/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "معاينة تمهيدية",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Previsualització",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "Anvend mit foretrukne læsetema som nuværende læse-indstillinger",
"applyDetails": "",
"reset": "Nulstil mit foretrukne læsetema til standard indstillingerne",
"resetDetails": "",
"save": "Gem de nuværende læse-indstillinger som mit foretrukne læsetema",
"saveDetails": "",
"title": "Læsetema"
},
"preview": "Forhåndsvisning",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Vorschau",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Προεπισκόπηση",
Expand Down
9 changes: 6 additions & 3 deletions src/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,12 @@
"title": "Zoom"
},
"preset": {
"apply": "Apply the preferred reading settings preset to the current reading settings",
"reset": "Reset preferred reading settings preset to the initial state",
"save": "Save the current reading settings to the preferred reading settings preset",
"apply": "Apply the preferred reading parameters",
"applyDetails": "Apply the preferred reading settings preset to the current book.",
"reset": "Reset preferred reading settings",
"resetDetails": "Reset the preferred reading parameters and apply these default paremeters to the current book.",
"save": "Save the preferred reading parameters",
"saveDetails": "Save the customized text parameters, so that they might be applied to other books, once open, by clicking on the button below.",
"title": "Preset"
},
"preview": "Preview",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Previsualizar",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Aurrebista",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Esikatselu",
Expand Down
5 changes: 4 additions & 1 deletion src/resources/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "Appliquer les paramètres de lecture préférés",
"reset": "Réinitialiser les paramètres de lecture préférés à l'état initial",
"applyDetails": "Appliquer au livre courant les paramètres de lecture précédemment enregistrés.",
"reset": "Réinitialiser les paramètres de lecture préférés",
"resetDetails": "Effacer les paramètres de lecture précédemment appliqués, et revenir à la mise en forme et aux choix d'affichage par défaut",
"save": "Enregistrer les paramètres de lecture préférés",
"saveDetails": "Sauvegarder les modifications appliquées à la mise en forme du livre courant et les choix d'affichage du logiciel. Ces paramètres pourront être appliqués à d'autres livres, une fois ouverts, en cliquant sur le bouton ci-dessous.",
"title": "Préréglage"
},
"preview": "Aperçu",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Previsualizar",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Anteprima",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "プレビュー",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/ka.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Peržiūrėti",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Voorbeeld",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "pré-visualização",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/pt-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "Aplicar a predefinição preferida de configurações de leitura às configurações de leitura atuais",
"applyDetails": "",
"reset": "Redefinir a predefinição das configurações preferidas de leitura para o estado inicial",
"resetDetails": "",
"save": "Guardar as configurações de leitura atuais na predefinição preferida de configurações de leitura",
"saveDetails": "",
"title": "Predefinição"
},
"preview": "Pré-visualização",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Предпросмотр ",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Predogled",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "Förhandsvisning",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "预览",
Expand Down
3 changes: 3 additions & 0 deletions src/resources/locales/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,11 @@
},
"preset": {
"apply": "",
"applyDetails": "",
"reset": "",
"resetDetails": "",
"save": "",
"saveDetails": "",
"title": ""
},
"preview": "預覽",
Expand Down
Loading

0 comments on commit 6c4b08a

Please sign in to comment.