diff --git a/komga-webui/package-lock.json b/komga-webui/package-lock.json index 9aa05758f..53bd2625e 100644 --- a/komga-webui/package-lock.json +++ b/komga-webui/package-lock.json @@ -16,6 +16,7 @@ "language-tags": "^1.0.5", "lodash": "^4.17.19", "qs": "^6.10.1", + "screenfull": "^5.1.0", "vue": "^2.6.14", "vue-i18n": "^8.24.4", "vue-line-clamp": "^1.3.2", @@ -17172,6 +17173,17 @@ "node": ">= 8.9.0" } }, + "node_modules/screenfull": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.1.0.tgz", + "integrity": "sha512-dYaNuOdzr+kc6J6CFcBrzkLCfyGcMg+gWkJ8us93IQ7y1cevhQAugFsaCdMHb6lw8KV3xPzSxzH7zM1dQap9mA==", + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -35323,6 +35335,11 @@ "ajv-keywords": "^3.4.1" } }, + "screenfull": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.1.0.tgz", + "integrity": "sha512-dYaNuOdzr+kc6J6CFcBrzkLCfyGcMg+gWkJ8us93IQ7y1cevhQAugFsaCdMHb6lw8KV3xPzSxzH7zM1dQap9mA==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", diff --git a/komga-webui/package.json b/komga-webui/package.json index 56ec54bca..b8e933921 100644 --- a/komga-webui/package.json +++ b/komga-webui/package.json @@ -19,6 +19,7 @@ "language-tags": "^1.0.5", "lodash": "^4.17.19", "qs": "^6.10.1", + "screenfull": "^5.1.0", "vue": "^2.6.14", "vue-i18n": "^8.24.4", "vue-line-clamp": "^1.3.2", diff --git a/komga-webui/src/components/SettingsSwitch.vue b/komga-webui/src/components/SettingsSwitch.vue index c9c136f3a..03fd27ffd 100644 --- a/komga-webui/src/components/SettingsSwitch.vue +++ b/komga-webui/src/components/SettingsSwitch.vue @@ -11,6 +11,7 @@ @input="updateInput" @change="updateInput" class="float-right" + :disabled="disabled" > @@ -32,6 +33,10 @@ export default Vue.extend({ status: { type: String, }, + disabled: { + type: Boolean, + default: false, + }, }, data () { return { diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index de20c676c..fbe8f6606 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -100,6 +100,7 @@ "width": "Fit width" }, "settings": { + "always_fullscreen": "Always Full Screen", "animate_page_transitions": "Animate page transitions", "background_color": "Background color", "background_colors": { @@ -375,8 +376,6 @@ "dialog_title_single": "Edit {series}", "field_age_rating": "Age Rating", "field_age_rating_error": "Age rating must be 0 or more", - "field_total_book_count": "Total Book Count", - "field_total_book_count_error": "Total book count must be 1 or more", "field_genres": "Genres", "field_language": "Language", "field_language_hint": "IETF BCP 47 language tag", @@ -387,6 +386,8 @@ "field_summary": "Summary", "field_tags": "Tags", "field_title": "Title", + "field_total_book_count": "Total Book Count", + "field_total_book_count_error": "Total book count must be 1 or more", "mixed": "MIXED", "tab_general": "General", "tab_tags": "Tags", diff --git a/komga-webui/src/plugins/persisted-state.ts b/komga-webui/src/plugins/persisted-state.ts index c43a4a489..ae0654660 100644 --- a/komga-webui/src/plugins/persisted-state.ts +++ b/komga-webui/src/plugins/persisted-state.ts @@ -16,6 +16,7 @@ export const persistedModule: Module = { }, readingDirection: '', swipe: false, + alwaysFullscreen: false, animations: true, background: '', }, @@ -75,6 +76,9 @@ export const persistedModule: Module = { setWebreaderSwipe(state, val) { state.webreader.swipe = val }, + setWebreaderAlwaysFullscreen(state, val) { + state.webreader.alwaysFullscreen = val + }, setWebreaderAnimations(state, val) { state.webreader.animations = val }, diff --git a/komga-webui/src/views/BookReader.vue b/komga-webui/src/views/BookReader.vue index 9894ee3cb..4c057de30 100644 --- a/komga-webui/src/views/BookReader.vue +++ b/komga-webui/src/views/BookReader.vue @@ -27,6 +27,13 @@ {{ $t('bookreader.tooltip_incognito') }} + + {{ fullscreenIcon }} + + @@ -168,11 +175,15 @@ + :label="$t('bookreader.settings.animate_page_transitions')"/> - + + + + + {{ $t('bookreader.settings.display') }} @@ -181,8 +192,7 @@ :items="backgroundColors" v-model="backgroundColor" :label="$t('bookreader.settings.background_color')" - > - + />