diff --git a/src/client/components/avatar.vue b/src/client/components/avatar.vue index 627818a8e7..d90607bb8a 100644 --- a/src/client/components/avatar.vue +++ b/src/client/components/avatar.vue @@ -2,9 +2,9 @@ - + - + diff --git a/src/client/components/ui/context-menu.vue b/src/client/components/ui/context-menu.vue index 98586cf3fe..3a11589e8a 100644 --- a/src/client/components/ui/context-menu.vue +++ b/src/client/components/ui/context-menu.vue @@ -1,5 +1,5 @@ - + {}"> diff --git a/src/client/components/ui/menu.vue b/src/client/components/ui/menu.vue index 5e74828c20..9e4e319c8a 100644 --- a/src/client/components/ui/menu.vue +++ b/src/client/components/ui/menu.vue @@ -12,12 +12,12 @@ - + {{ item.text }} - + {{ item.text }} diff --git a/src/client/components/ui/radio.vue b/src/client/components/ui/radio.vue index 8f2b843ee6..890ff08751 100644 --- a/src/client/components/ui/radio.vue +++ b/src/client/components/ui/radio.vue @@ -51,7 +51,7 @@ export default defineComponent({ .novjtctn { position: relative; display: inline-block; - margin: 0 32px 0 0; + margin: 16px 32px 0 0; cursor: pointer; transition: all 0.3s; diff --git a/src/client/components/ui/window.vue b/src/client/components/ui/window.vue index d545ac4827..4c90ab9c8d 100644 --- a/src/client/components/ui/window.vue +++ b/src/client/components/ui/window.vue @@ -2,14 +2,16 @@ - - + + + + - - - + + + @@ -85,6 +87,15 @@ export default defineComponent({ required: false, default: false, }, + closeRight: { + type: Boolean, + required: false, + default: false, + }, + contextmenu: { + type: Array, + required: false, + } }, emits: ['closed'], @@ -129,6 +140,12 @@ export default defineComponent({ } }, + onContextmenu(e) { + if (this.contextmenu) { + os.contextMenu(this.contextmenu, e); + } + }, + // 最前面へ移動 top() { let z = 0; diff --git a/src/client/components/url-preview.vue b/src/client/components/url-preview.vue index df02698b5d..55872113be 100644 --- a/src/client/components/url-preview.vue +++ b/src/client/components/url-preview.vue @@ -8,7 +8,7 @@ - + diff --git a/src/client/components/url.vue b/src/client/components/url.vue index 649ce5fa24..ceb0381f87 100644 --- a/src/client/components/url.vue +++ b/src/client/components/url.vue @@ -1,5 +1,5 @@ - diff --git a/src/client/components/user-info.vue b/src/client/components/user-info.vue index 893747b7c4..09736b1a2c 100644 --- a/src/client/components/user-info.vue +++ b/src/client/components/user-info.vue @@ -3,7 +3,7 @@ - + diff --git a/src/client/components/user-preview.vue b/src/client/components/user-preview.vue index d1a11dc790..d258489860 100644 --- a/src/client/components/user-preview.vue +++ b/src/client/components/user-preview.vue @@ -5,7 +5,7 @@ - + diff --git a/src/client/components/users-dialog.vue b/src/client/components/users-dialog.vue index c8ca93703d..f2e8ec480e 100644 --- a/src/client/components/users-dialog.vue +++ b/src/client/components/users-dialog.vue @@ -6,13 +6,13 @@ - + - + {{ $t('loadMore') }} diff --git a/src/client/init.ts b/src/client/init.ts index 4a08f09997..86991b69e3 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -4,14 +4,13 @@ import '@/style.scss'; -import { createApp } from 'vue'; +import { createApp, defineAsyncComponent } from 'vue'; import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; -import Root from './root.vue'; import widgets from './widgets'; import directives from './directives'; import components from '@/components'; -import { version, apiUrl } from '@/config'; +import { version, apiUrl, deckmode } from '@/config'; import { store } from './store'; import { router } from './router'; import { applyTheme } from '@/scripts/theme'; @@ -152,7 +151,12 @@ store.dispatch('instance/fetch').then(() => { stream.init(store.state.i); -const app = createApp(Root); +const app = createApp(await ( + window.location.search === '?zen' ? import('@/ui/zen.vue') : + !store.getters.isSignedIn ? import('@/ui/visitor.vue') : + deckmode ? import('@/ui/deck.vue') : + import('@/ui/default.vue') +).then(x => x.default)); if (_DEV_) { app.config.performance = true; diff --git a/src/client/os.ts b/src/client/os.ts index 3241f82e5d..daff26efa2 100644 --- a/src/client/os.ts +++ b/src/client/os.ts @@ -5,6 +5,7 @@ import { store } from '@/store'; import { apiUrl } from '@/config'; import MkPostFormDialog from '@/components/post-form-dialog.vue'; import MkWaitingDialog from '@/components/waiting-dialog.vue'; +import { resolve } from '@/router'; const ua = navigator.userAgent.toLowerCase(); export const isMobile = /mobile|iphone|ipad|android/.test(ua); @@ -162,7 +163,8 @@ export function popup(component: Component | typeof import('*.vue'), props: Reco }; } -export function pageWindow(url: string, component: Component | typeof import('*.vue'), props: Record) { +export function pageWindow(url: string) { + const { component, props } = resolve(url); popup(defineAsyncComponent(() => import('@/components/page-window.vue')), { initialUrl: url, initialComponent: markRaw(component), diff --git a/src/client/pages/docs.vue b/src/client/pages/docs.vue index ea3e16df95..245dff6b57 100644 --- a/src/client/pages/docs.vue +++ b/src/client/pages/docs.vue @@ -4,7 +4,7 @@ - {{ doc.title }} + {{ doc.title }} diff --git a/src/client/pages/explore.vue b/src/client/pages/explore.vue index cf191a7481..c7378e0ddc 100644 --- a/src/client/pages/explore.vue +++ b/src/client/pages/explore.vue @@ -38,8 +38,8 @@ {{ $t('popularTags') }} - {{ tag.tag }} - {{ tag.tag }} + {{ tag.tag }} + {{ tag.tag }} diff --git a/src/client/pages/follow-requests.vue b/src/client/pages/follow-requests.vue index 86e409ebbd..9f67a8a9e5 100644 --- a/src/client/pages/follow-requests.vue +++ b/src/client/pages/follow-requests.vue @@ -12,7 +12,7 @@ - + @{{ acct(req.follower) }} diff --git a/src/client/pages/messaging/index.vue b/src/client/pages/messaging/index.vue index 07b1cbab83..f62a33b866 100644 --- a/src/client/pages/messaging/index.vue +++ b/src/client/pages/messaging/index.vue @@ -4,13 +4,12 @@ {{ $t('startMessaging') }} - @@ -27,7 +26,7 @@ {{ $t('you') }}:{{ message.text }} - + @@ -90,18 +89,6 @@ export default defineComponent({ }, methods: { - go(message) { - const url = message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(this.isMe(message) ? message.recipient : message.user)}`; - if (this.navHook) { - this.navHook(url, defineAsyncComponent(() => import('@/pages/messaging/messaging-room.vue')), { - userAcct: message.groupId ? null : getAcct(this.isMe(message) ? message.recipient : message.user), - groupId: message.groupId - }); - } else { - this.$router.push(url); - } - }, - getAcct, isMe(message) { diff --git a/src/client/pages/messaging/messaging-room.vue b/src/client/pages/messaging/messaging-room.vue index 4210b8cf89..4aca8bdabf 100644 --- a/src/client/pages/messaging/messaging-room.vue +++ b/src/client/pages/messaging/messaging-room.vue @@ -317,7 +317,7 @@ const Component = defineComponent({ text: this.$t('openInWindow'), icon: faWindowMaximize, action: () => { - os.pageWindow(url, Component, this.$props); + os.pageWindow(url); this.$router.back(); }, }, this.inWindow ? undefined : { diff --git a/src/client/pages/my-groups/index.vue b/src/client/pages/my-groups/index.vue index f05226faaf..e384dfc363 100644 --- a/src/client/pages/my-groups/index.vue +++ b/src/client/pages/my-groups/index.vue @@ -10,7 +10,7 @@ - {{ group.name }} + {{ group.name }} diff --git a/src/client/pages/my-lists/index.vue b/src/client/pages/my-lists/index.vue index 5e29436ede..9d0e192286 100644 --- a/src/client/pages/my-lists/index.vue +++ b/src/client/pages/my-lists/index.vue @@ -4,7 +4,7 @@ - {{ list.name }} + {{ list.name }} diff --git a/src/client/pages/note.vue b/src/client/pages/note.vue index cd31ccc338..a458d6c063 100644 --- a/src/client/pages/note.vue +++ b/src/client/pages/note.vue @@ -42,6 +42,12 @@ export default defineComponent({ MkRemoteCaution, MkButton, }, + props: { + noteId: { + type: String, + required: true + } + }, data() { return { INFO: computed(() => this.note ? { @@ -77,7 +83,7 @@ export default defineComponent({ }; }, watch: { - $route: 'fetch' + noteId: 'fetch' }, created() { this.fetch(); @@ -86,7 +92,7 @@ export default defineComponent({ fetch() { Progress.start(); os.api('notes/show', { - noteId: this.$route.params.note + noteId: this.noteId }).then(note => { Promise.all([ os.api('users/notes', { diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue index 363f46c34b..cd033219f0 100644 --- a/src/client/pages/page-editor/page-editor.vue +++ b/src/client/pages/page-editor/page-editor.vue @@ -12,7 +12,7 @@ - {{ $t('_pages.viewPage') }} + {{ $t('_pages.viewPage') }} {{ $t('_pages.title') }} diff --git a/src/client/pages/page.vue b/src/client/pages/page.vue index eb470fdc19..e8a8a6bdfd 100644 --- a/src/client/pages/page.vue +++ b/src/client/pages/page.vue @@ -20,9 +20,9 @@ - {{ $t('_pages.viewSource') }} + {{ $t('_pages.viewSource') }} - {{ $t('_pages.editThisPage') }} + {{ $t('_pages.editThisPage') }} {{ $t('unpin') }} {{ $t('pin') }} diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue index 80152c5e6a..d61d8620e7 100644 --- a/src/client/pages/settings/general.vue +++ b/src/client/pages/settings/general.vue @@ -2,6 +2,10 @@ {{ $t('general') }} + + {{ $t('defaultNavigationBehaviour') }} + {{ $t('openInSideView') }} + {{ $t('whenServerDisconnected') }} {{ $t('_serverDisconnectedBehavior.reload') }} @@ -51,6 +55,10 @@ {{ $t('deck') }} + + {{ $t('defaultNavigationBehaviour') }} + {{ $t('openInWindow') }} + {{ $t('_deck.alwaysShowMainColumn') }} @@ -146,6 +154,16 @@ export default defineComponent({ set(value) { this.$store.commit('device/set', { key: 'showFixedPostForm', value }); } }, + defaultSideView: { + get() { return this.$store.state.device.defaultSideView; }, + set(value) { this.$store.commit('device/set', { key: 'defaultSideView', value }); } + }, + + deckNavWindow: { + get() { return this.$store.state.device.deckNavWindow; }, + set(value) { this.$store.commit('device/set', { key: 'deckNavWindow', value }); } + }, + chatOpenBehavior: { get() { return this.$store.state.device.chatOpenBehavior; }, set(value) { this.$store.commit('device/set', { key: 'chatOpenBehavior', value }); } diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index 4ca30ee686..1bffa9c0af 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -1,52 +1,57 @@ - + {{ $t('basicSettings') }} - {{ $t('profile') }} - {{ $t('privacy') }} - {{ $t('reaction') }} - {{ $t('notifications') }} - {{ $t('integration') }} - {{ $t('security') }} + {{ $t('profile') }} + {{ $t('privacy') }} + {{ $t('reaction') }} + {{ $t('notifications') }} + {{ $t('integration') }} + {{ $t('security') }} {{ $t('clientSettings') }} - {{ $t('general') }} - {{ $t('theme') }} - {{ $t('sidebar') }} - {{ $t('sounds') }} - {{ $t('plugins') }} + {{ $t('general') }} + {{ $t('theme') }} + {{ $t('sidebar') }} + {{ $t('sounds') }} + {{ $t('plugins') }} {{ $t('otherSettings') }} - {{ $t('muteAndBlock') }} - {{ $t('wordMute') }} - API - {{ $t('other') }} + {{ $t('muteAndBlock') }} + {{ $t('wordMute') }} + API + {{ $t('other') }} {{ $t('logout') }} - - - - - + + + + + + diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 754ed72c8d..b674186dbe 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -20,6 +20,8 @@ + + @@ -47,19 +49,21 @@ - +
@{{ acct(req.follower) }}
{{ $t('you') }}:{{ message.text }}