From 7f0ab5fde3119abff1b0ba88b6e958a0c5645369 Mon Sep 17 00:00:00 2001 From: primetoxinz Date: Mon, 2 Mar 2020 22:27:08 -0500 Subject: [PATCH] feat(webui): redesign reader to follow material design closes #74 --- komga-webui/src/components/SettingsSelect.vue | 75 ++ komga-webui/src/components/SettingsSwitch.vue | 55 ++ .../components/ThumbnailExplorerDialog.vue | 100 +++ komga-webui/src/plugins/vuetify.ts | 9 +- komga-webui/src/types/common.ts | 5 + komga-webui/src/views/BookReader.vue | 648 +++++++++--------- 6 files changed, 566 insertions(+), 326 deletions(-) create mode 100644 komga-webui/src/components/SettingsSelect.vue create mode 100644 komga-webui/src/components/SettingsSwitch.vue create mode 100644 komga-webui/src/components/ThumbnailExplorerDialog.vue diff --git a/komga-webui/src/components/SettingsSelect.vue b/komga-webui/src/components/SettingsSelect.vue new file mode 100644 index 000000000..71b1f7a78 --- /dev/null +++ b/komga-webui/src/components/SettingsSelect.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/komga-webui/src/components/SettingsSwitch.vue b/komga-webui/src/components/SettingsSwitch.vue new file mode 100644 index 000000000..fbc257cf4 --- /dev/null +++ b/komga-webui/src/components/SettingsSwitch.vue @@ -0,0 +1,55 @@ + + + diff --git a/komga-webui/src/components/ThumbnailExplorerDialog.vue b/komga-webui/src/components/ThumbnailExplorerDialog.vue new file mode 100644 index 000000000..c883256e6 --- /dev/null +++ b/komga-webui/src/components/ThumbnailExplorerDialog.vue @@ -0,0 +1,100 @@ + + + diff --git a/komga-webui/src/plugins/vuetify.ts b/komga-webui/src/plugins/vuetify.ts index 8850f6235..d10c64806 100644 --- a/komga-webui/src/plugins/vuetify.ts +++ b/komga-webui/src/plugins/vuetify.ts @@ -3,12 +3,19 @@ import 'typeface-roboto/index.css' import Vue from 'vue' import Vuetify from 'vuetify/lib' -Vue.use(Vuetify) +import { Touch } from 'vuetify/lib/directives' + +Vue.use(Vuetify, { + directives: { + Touch + } +}) export default new Vuetify({ icons: { iconfont: 'mdi' }, + theme: { options: { customProperties: true diff --git a/komga-webui/src/types/common.ts b/komga-webui/src/types/common.ts index 05f9a0377..6dd682eec 100644 --- a/komga-webui/src/types/common.ts +++ b/komga-webui/src/types/common.ts @@ -10,6 +10,11 @@ export enum ImageFit { ORIGINAL = 'original' } +export enum ReadingDirection { + LeftToRight = 'ltl', + RightToLeft = 'rtl' +} + export enum MediaStatus { READY = 'READY', UNKNOWN = 'UNKNOWN', diff --git a/komga-webui/src/views/BookReader.vue b/komga-webui/src/views/BookReader.vue index 30a451c93..88660e5fe 100644 --- a/komga-webui/src/views/BookReader.vue +++ b/komga-webui/src/views/BookReader.vue @@ -1,284 +1,223 @@