From 5bf724b2a29236c939f1bcb43e7cabccd4f337ed Mon Sep 17 00:00:00 2001 From: NickSkier Date: Sun, 9 Mar 2025 18:08:10 +0300 Subject: [PATCH] Add:Black/oled theme for epub reader --- components/readers/EpubReader.vue | 14 +++++++++----- components/readers/Reader.vue | 6 +++++- strings/en-us.json | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/components/readers/EpubReader.vue b/components/readers/EpubReader.vue index 813b64e7..beef42c2 100644 --- a/components/readers/EpubReader.vue +++ b/components/readers/EpubReader.vue @@ -2,7 +2,7 @@
-
+

Location {{ currentLocationNum }} of {{ totalLocations }}

{{ progress }}%

@@ -105,17 +105,21 @@ export default { isLightTheme() { return this.ereaderSettings.theme === 'light' }, + isDarkTheme() { + return this.ereaderSettings.theme === 'dark' + }, themeRules() { const isDark = this.ereaderSettings.theme === 'dark' - const fontColor = isDark ? '#fff' : '#000' - const backgroundColor = isDark ? 'rgb(35 35 35)' : 'rgb(255, 255, 255)' + const isBlack = this.ereaderSettings.theme === 'black' + const fontColor = isDark ? '#fff' : isBlack ? '#fff' : '#000' + const backgroundColor = isDark ? 'rgb(35 35 35)' : isBlack ? 'rgb(0 0 0)' : 'rgb(255, 255, 255)' return { '*': { color: `${fontColor}!important`, 'background-color': `${backgroundColor}!important`, 'line-height': this.ereaderSettings.lineSpacing + '%!important', - '-webkit-text-stroke': this.ereaderSettings.textStroke/100 + 'px ' + fontColor + '!important' + '-webkit-text-stroke': this.ereaderSettings.textStroke / 100 + 'px ' + fontColor + '!important' }, a: { color: `${fontColor}!important` @@ -427,7 +431,7 @@ export default { document.removeEventListener('orientationchange', this.screenOrientationChange) } window.removeEventListener('resize', this.screenOrientationChange) - }, + } } diff --git a/components/readers/Reader.vue b/components/readers/Reader.vue index 371beab8..08edb805 100644 --- a/components/readers/Reader.vue +++ b/components/readers/Reader.vue @@ -1,5 +1,5 @@