From 42d293ee60c671ba424671d49072fc6c880d44b0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 19 Jul 2021 11:36:35 +0900 Subject: Classic UI --- src/client/ui/_common_/sidebar.vue | 8 +- src/client/ui/chat/index.vue | 4 +- src/client/ui/deck.vue | 4 +- src/client/ui/default.header.vue | 274 +++++++++++++++++++++++++++++++++++++ src/client/ui/default.sidebar.vue | 8 +- src/client/ui/default.vue | 55 ++++++-- src/client/ui/default.widgets.vue | 16 ++- src/client/ui/desktop.vue | 4 +- src/client/ui/universal.vue | 4 +- 9 files changed, 345 insertions(+), 32 deletions(-) create mode 100644 src/client/ui/default.header.vue (limited to 'src/client/ui') diff --git a/src/client/ui/_common_/sidebar.vue b/src/client/ui/_common_/sidebar.vue index df11877147..073907cde9 100644 --- a/src/client/ui/_common_/sidebar.vue +++ b/src/client/ui/_common_/sidebar.vue @@ -49,7 +49,7 @@ import { defineComponent } from 'vue'; import { host } from '@client/config'; import { search } from '@client/scripts/search'; import * as os from '@client/os'; -import { sidebarDef } from '@client/sidebar'; +import { menuDef } from '@client/menu'; import { getAccounts, addAccount, login } from '@client/account'; export default defineComponent({ @@ -67,7 +67,7 @@ export default defineComponent({ showing: false, accounts: [], connection: null, - menuDef: sidebarDef, + menuDef: menuDef, iconOnly: false, hidden: this.defaultHidden, }; @@ -92,7 +92,7 @@ export default defineComponent({ this.showing = false; }, - '$store.reactiveState.sidebarDisplay.value'() { + '$store.reactiveState.menuDisplay.value'() { this.calcViewState(); }, @@ -116,7 +116,7 @@ export default defineComponent({ methods: { calcViewState() { - this.iconOnly = (window.innerWidth <= 1279) || (this.$store.state.sidebarDisplay === 'icon'); + this.iconOnly = (window.innerWidth <= 1279) || (this.$store.state.menuDisplay === 'sideIcon'); if (!this.defaultHidden) { this.hidden = (window.innerWidth <= 650); } diff --git a/src/client/ui/chat/index.vue b/src/client/ui/chat/index.vue index c28436ed5c..d45369e8b0 100644 --- a/src/client/ui/chat/index.vue +++ b/src/client/ui/chat/index.vue @@ -142,7 +142,7 @@ import XTimeline from './timeline.vue'; import XHeaderClock from './header-clock.vue'; import * as os from '@client/os'; import { router } from '@client/router'; -import { sidebarDef } from '@client/sidebar'; +import { menuDef } from '@client/menu'; import { search } from '@client/scripts/search'; import copyToClipboard from '@client/scripts/copy-to-clipboard'; import { store } from './store'; @@ -190,7 +190,7 @@ export default defineComponent({ followedChannels: null, featuredChannels: null, currentChannel: null, - menuDef: sidebarDef, + menuDef: menuDef, sideViewOpening: false, instanceName, }; diff --git a/src/client/ui/deck.vue b/src/client/ui/deck.vue index 935445a54d..4b0189ba77 100644 --- a/src/client/ui/deck.vue +++ b/src/client/ui/deck.vue @@ -37,7 +37,7 @@ import DeckColumnCore from '@client/ui/deck/column-core.vue'; import XSidebar from '@client/ui/_common_/sidebar.vue'; import { getScrollContainer } from '@client/scripts/scroll'; import * as os from '@client/os'; -import { sidebarDef } from '@client/sidebar'; +import { menuDef } from '@client/menu'; import XCommon from './_common_/common.vue'; import { deckStore, addColumn, loadDeck } from './deck/deck-store'; @@ -60,7 +60,7 @@ export default defineComponent({ return { deckStore, host: host, - menuDef: sidebarDef, + menuDef: menuDef, wallpaper: localStorage.getItem('wallpaper') != null, }; }, diff --git a/src/client/ui/default.header.vue b/src/client/ui/default.header.vue new file mode 100644 index 0000000000..a67883020f --- /dev/null +++ b/src/client/ui/default.header.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/src/client/ui/default.sidebar.vue b/src/client/ui/default.sidebar.vue index c7e2d30c7a..2e0336878d 100644 --- a/src/client/ui/default.sidebar.vue +++ b/src/client/ui/default.sidebar.vue @@ -45,7 +45,7 @@ import { defineComponent } from 'vue'; import { host } from '@client/config'; import { search } from '@client/scripts/search'; import * as os from '@client/os'; -import { sidebarDef } from '@client/sidebar'; +import { menuDef } from '@client/menu'; import { getAccounts, addAccount, login } from '@client/account'; import MkButton from '@client/components/ui/button.vue'; import { StickySidebar } from '@client/scripts/sticky-sidebar'; @@ -62,7 +62,7 @@ export default defineComponent({ host: host, accounts: [], connection: null, - menuDef: sidebarDef, + menuDef: menuDef, iconOnly: false, settingsWindowed: false, }; @@ -83,7 +83,7 @@ export default defineComponent({ }, watch: { - '$store.reactiveState.sidebarDisplay.value'() { + '$store.reactiveState.menuDisplay.value'() { this.calcViewState(); }, @@ -108,7 +108,7 @@ export default defineComponent({ methods: { calcViewState() { - this.iconOnly = (window.innerWidth <= 1400) || (this.$store.state.sidebarDisplay === 'icon'); + this.iconOnly = (window.innerWidth <= 1400) || (this.$store.state.menuDisplay === 'sideIcon'); this.settingsWindowed = (window.innerWidth > 1400); }, diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 3c87bf7ab4..f18685d78c 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -1,9 +1,16 @@