Skip to content

Add progress marker toggle in EPUB reader #1915

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion komga-webui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,8 @@
"click": "Click / Tap"
},
"page_margins": "Page margins",
"viewing_theme": "Viewing theme"
"viewing_theme": "Viewing theme",
"progress_markers": "Progress markers"
},
"shortcuts": {
"cycle_pagination": "Cycle column count",
Expand Down
22 changes: 19 additions & 3 deletions komga-webui/src/views/EpubReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,15 @@
v-if="!verticalScroll"
>
<v-row>
<v-col cols="10" class="text-truncate">
<v-col cols="10" class="text-truncate" v-if="progressMarkers">
{{ $t('epubreader.page_of', {page: progressionPage, count: progressionPageCount}) }}
({{ progressionTitle || $t('epubreader.current_chapter') }})
({{ progressionTitle || $t('epubreader.current_chapter')}})
</v-col>
<v-col cols="10" class="text-truncate" v-else-if="progressionTitle">
{{ progressionTitle || $t('epubreader.current_chapter') }}
</v-col>
<v-spacer/>
<v-col cols="auto">{{ progressionTotalPercentage }}</v-col>
<v-col cols="auto" v-if="progressMarkers">{{ progressionTotalPercentage }}</v-col>
</v-row>
</v-container>

Expand Down Expand Up @@ -250,6 +253,9 @@
<v-btn v-for="(c, i) in columnCounts" :key="i" :value="c.value">{{ c.text }}</v-btn>
</v-btn-toggle>
</v-list-item>
<v-list-item>
<settings-switch v-model="progressMarkers" :label="$t('epubreader.settings.progress_markers')"/>
</v-list-item>

<v-list-item class="justify-center">
<v-btn depressed @click="fontSize-=10">
Expand Down Expand Up @@ -412,6 +418,7 @@ export default Vue.extend({
alwaysFullscreen: false,
navigationClick: true,
navigationButtons: true,
progressMarkers: true,
},
navigationOptions: [
{text: this.$t('epubreader.settings.navigation_options.buttons').toString(), value: 'button'},
Expand Down Expand Up @@ -617,6 +624,15 @@ export default Vue.extend({
else screenfull.isEnabled && screenfull.exit()
},
},
progressMarkers: {
get: function (): boolean {
return this.settings.progressMarkers
},
set: function (value: boolean): void {
this.settings.progressMarkers = value
this.$store.commit('setEpubreaderSettings', this.settings)
},
},
navigationMode: {
get: function (): string {
let r = this.settings.navigationButtons ? 'button' : ''
Expand Down