Skip to content

Commit

Permalink
Merge pull request #3040 from BimBimSalaBim/master
Browse files Browse the repository at this point in the history
E-Reader Font Boldness Slider #3020
  • Loading branch information
advplyr authored Jun 7, 2024
2 parents c8892c3 + 9c7569f commit 5da4861
Show file tree
Hide file tree
Showing 28 changed files with 72 additions and 29 deletions.
8 changes: 6 additions & 2 deletions client/components/readers/EpubReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default {
font: 'serif',
fontScale: 100,
lineSpacing: 115,
spread: 'auto'
spread: 'auto',
textStroke: 0
}
}
},
Expand Down Expand Up @@ -109,11 +110,14 @@ export default {
const fontScale = this.ereaderSettings.fontScale / 100
const textStroke = this.ereaderSettings.textStroke / 100
return {
'*': {
color: `${fontColor}!important`,
'background-color': `${backgroundColor}!important`,
'line-height': lineSpacing * fontScale + 'rem!important'
'line-height': lineSpacing * fontScale + 'rem!important',
'-webkit-text-stroke': textStroke + 'px ' + fontColor + '!important'
},
a: {
color: `${fontColor}!important`
Expand Down
19 changes: 16 additions & 3 deletions client/components/readers/Reader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@
</div>
<ui-range-input v-model="ereaderSettings.lineSpacing" :min="100" :max="300" :step="5" @input="settingsUpdated" />
</div>
<div class="flex items-center mb-4">
<div class="w-40">
<p class="text-lg">{{ $strings.LabelFontBoldness }}:</p>
</div>
<ui-range-input v-model="ereaderSettings.textStroke" :min="0" :max="300" :step="5" @input="settingsUpdated" />
</div>
<div class="flex items-center">
<div class="w-40">
<p class="text-lg">{{ $strings.LabelLayout }}:</p>
Expand Down Expand Up @@ -130,7 +136,9 @@ export default {
font: 'serif',
fontScale: 100,
lineSpacing: 115,
spread: 'auto'
fontBoldness: 100,
spread: 'auto',
textStroke: 0
}
}
},
Expand Down Expand Up @@ -378,7 +386,12 @@ export default {
try {
const settings = localStorage.getItem('ereaderSettings')
if (settings) {
this.ereaderSettings = JSON.parse(settings)
const _ereaderSettings = JSON.parse(settings)
for (const key in this.ereaderSettings) {
if (_ereaderSettings[key] !== undefined) {
this.ereaderSettings[key] = _ereaderSettings[key]
}
}
this.settingsUpdated()
}
} catch (error) {
Expand Down Expand Up @@ -416,4 +429,4 @@ export default {
height: 100%;
}
}
</style>
</style>
3 changes: 2 additions & 1 deletion client/strings/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Папка",
"LabelFolders": "Папки",
"LabelFontBold": "Получерно",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Шрифт",
"LabelFontItalic": "Курсив",
"LabelFontScale": "Мащаб на Шрифта",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Неуспешно изтриване на потребител",
"ToastUserDeleteSuccess": "Потребителят е изтрит"
}
}
3 changes: 2 additions & 1 deletion client/strings/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "ফোল্ডার",
"LabelFolders": "ফোল্ডারগুলো",
"LabelFontBold": "বোল্ড",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "ফন্ট পরিবার",
"LabelFontItalic": "ইটালিক",
"LabelFontScale": "ফন্ট স্কেল",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "ব্যবহারকারী মুছতে ব্যর্থ",
"ToastUserDeleteSuccess": "ব্যবহারকারী মুছে ফেলা হয়েছে"
}
}
3 changes: 2 additions & 1 deletion client/strings/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Složka",
"LabelFolders": "Složky",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Rodina písem",
"LabelFontItalic": "Italic",
"LabelFontScale": "Měřítko písma",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Nepodařilo se smazat uživatele",
"ToastUserDeleteSuccess": "Uživatel smazán"
}
}
3 changes: 2 additions & 1 deletion client/strings/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Mappe",
"LabelFolders": "Mapper",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Fontfamilie",
"LabelFontItalic": "Italic",
"LabelFontScale": "Skriftstørrelse",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Mislykkedes sletning af bruger",
"ToastUserDeleteSuccess": "Bruger slettet"
}
}
3 changes: 2 additions & 1 deletion client/strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Ordner",
"LabelFolders": "Verzeichnisse",
"LabelFontBold": "Fett",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Schriftfamilie",
"LabelFontItalic": "Kursiv",
"LabelFontScale": "Schriftgröße",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Die Sortier-Prefixe wirden geupdated ({0} Einträge)",
"ToastUserDeleteFailed": "Benutzer konnte nicht gelöscht werden",
"ToastUserDeleteSuccess": "Benutzer gelöscht"
}
}
1 change: 1 addition & 0 deletions client/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Font family",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
Expand Down
3 changes: 2 additions & 1 deletion client/strings/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Carpeta",
"LabelFolders": "Carpetas",
"LabelFontBold": "Negrilla",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Familia tipográfica",
"LabelFontItalic": "Itálica",
"LabelFontScale": "Tamaño de Fuente",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Prefijos de ordenar actualizaron ({0} items)",
"ToastUserDeleteFailed": "Error al eliminar el usuario",
"ToastUserDeleteSuccess": "Usuario eliminado"
}
}
3 changes: 2 additions & 1 deletion client/strings/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Kaust",
"LabelFolders": "Kataloogid",
"LabelFontBold": "Paks",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Fondi pere",
"LabelFontItalic": "Kaldkiri",
"LabelFontScale": "Fondi suurus",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Kasutaja kustutamine ebaõnnestus",
"ToastUserDeleteSuccess": "Kasutaja kustutatud"
}
}
1 change: 1 addition & 0 deletions client/strings/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Dossier",
"LabelFolders": "Dossiers",
"LabelFontBold": "Gras",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Polices de caractères",
"LabelFontItalic": "Italique",
"LabelFontScale": "Taille de la police de caractère",
Expand Down
3 changes: 2 additions & 1 deletion client/strings/gu.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "ફોન્ટ કુટુંબ",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Failed to delete user",
"ToastUserDeleteSuccess": "User deleted"
}
}
3 changes: 2 additions & 1 deletion client/strings/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "תיקייה",
"LabelFolders": "תיקיות",
"LabelFontBold": "מודגש",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "משפחת הפונטים",
"LabelFontItalic": "נטוי",
"LabelFontScale": "קנה מידה של הפונט",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "מחיקת המשתמש נכשלה",
"ToastUserDeleteSuccess": "המשתמש נמחק בהצלחה"
}
}
3 changes: 2 additions & 1 deletion client/strings/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Folder",
"LabelFolders": "Folders",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "फुहारा परिवार",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Failed to delete user",
"ToastUserDeleteSuccess": "User deleted"
}
}
3 changes: 2 additions & 1 deletion client/strings/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Folder",
"LabelFolders": "Folderi",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Font family",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Neuspješno brisanje korisnika",
"ToastUserDeleteSuccess": "Korisnik obrisan"
}
}
3 changes: 2 additions & 1 deletion client/strings/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Mappa",
"LabelFolders": "Mappák",
"LabelFontBold": "Félkövér",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Betűtípus család",
"LabelFontItalic": "Dőlt",
"LabelFontScale": "Betűméret skála",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Felhasználó törlése sikertelen",
"ToastUserDeleteSuccess": "Felhasználó törölve"
}
}
3 changes: 2 additions & 1 deletion client/strings/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Cartella",
"LabelFolders": "Cartelle",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Font family",
"LabelFontItalic": "Italic",
"LabelFontScale": "Dimensione Font",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Errore eliminazione utente",
"ToastUserDeleteSuccess": "Utente eliminato"
}
}
3 changes: 2 additions & 1 deletion client/strings/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Aplankas",
"LabelFolders": "Aplankai",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Famiglia di font",
"LabelFontItalic": "Italic",
"LabelFontScale": "Šrifto mastelis",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Nepavyko ištrinti naudotojo",
"ToastUserDeleteSuccess": "Naudotojas ištrintas"
}
}
3 changes: 2 additions & 1 deletion client/strings/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Map",
"LabelFolders": "Mappen",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Lettertypefamilie",
"LabelFontItalic": "Italic",
"LabelFontScale": "Lettertype schaal",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Verwijderen gebruiker mislukt",
"ToastUserDeleteSuccess": "Gebruiker verwijderd"
}
}
3 changes: 2 additions & 1 deletion client/strings/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Mappe",
"LabelFolders": "Mapper",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Fontfamilie",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font størrelse",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Misslykkes å slette bruker",
"ToastUserDeleteSuccess": "Bruker slettet"
}
}
3 changes: 2 additions & 1 deletion client/strings/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Folder",
"LabelFolders": "Foldery",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Rodzina czcionek",
"LabelFontItalic": "Italic",
"LabelFontScale": "Font scale",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Nie udało się usunąć użytkownika",
"ToastUserDeleteSuccess": "Użytkownik usunięty"
}
}
3 changes: 2 additions & 1 deletion client/strings/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Pasta",
"LabelFolders": "Pastas",
"LabelFontBold": "Negrito",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Família de fonte",
"LabelFontItalic": "Itálico",
"LabelFontScale": "Escala de fonte",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Prefixos de ordenação atualizados ({0} item(ns))",
"ToastUserDeleteFailed": "Falha ao apagar usuário",
"ToastUserDeleteSuccess": "Usuário apagado"
}
}
3 changes: 2 additions & 1 deletion client/strings/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Папка",
"LabelFolders": "Папки",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Семейство шрифтов",
"LabelFontItalic": "Italic",
"LabelFontScale": "Масштаб шрифта",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Не удалось удалить пользователя",
"ToastUserDeleteSuccess": "Пользователь удален"
}
}
3 changes: 2 additions & 1 deletion client/strings/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"LabelFolder": "Mapp",
"LabelFolders": "Mappar",
"LabelFontBold": "Bold",
"LabelFontBoldness": "Font Boldness",
"LabelFontFamily": "Teckensnittsfamilj",
"LabelFontItalic": "Italic",
"LabelFontScale": "Teckensnittsskala",
Expand Down Expand Up @@ -817,4 +818,4 @@
"ToastSortingPrefixesUpdateSuccess": "Sorting prefixes updated ({0} items)",
"ToastUserDeleteFailed": "Misslyckades med att ta bort användaren",
"ToastUserDeleteSuccess": "Användaren borttagen"
}
}
Loading

0 comments on commit 5da4861

Please sign in to comment.