From 4f04421cb3091fa6302ada179e02aadad0533607 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 24 Oct 2021 04:03:07 +0900 Subject: [PATCH] refactor clinet --- src/client/components/global/header.vue | 9 +- .../components/global/sticky-container.vue | 74 ++++ src/client/components/index.ts | 2 + src/client/components/modal-page-window.vue | 9 +- src/client/components/page-window.vue | 5 +- src/client/pages/admin/ads.vue | 82 ++--- src/client/pages/admin/announcements.vue | 45 +-- src/client/pages/admin/emojis.vue | 9 +- src/client/pages/admin/index.vue | 16 +- src/client/pages/admin/overview.vue | 124 ++++--- src/client/pages/admin/users.vue | 9 +- src/client/pages/announcements.vue | 34 +- src/client/pages/emojis.vue | 12 +- src/client/pages/explore.vue | 11 +- src/client/pages/favorites.vue | 14 +- src/client/pages/featured.vue | 12 +- src/client/pages/federation.vue | 186 +++++----- src/client/pages/mentions.vue | 12 +- src/client/pages/messages.vue | 10 +- src/client/pages/messaging/index.vue | 77 ++--- src/client/pages/my-lists/index.vue | 26 +- src/client/pages/my-lists/list.vue | 55 ++- src/client/pages/notifications.vue | 24 +- src/client/pages/page-editor/page-editor.vue | 134 ++++---- src/client/pages/page.vue | 110 +++--- src/client/pages/pages.vue | 63 ++-- src/client/pages/search.vue | 13 +- src/client/pages/settings/index.vue | 1 + src/client/pages/timeline.vue | 36 +- src/client/pages/user/index.vue | 323 +++++++++--------- src/client/ui/deck/main-column.vue | 17 +- src/client/ui/default.vue | 17 +- src/client/ui/universal.vue | 17 +- 33 files changed, 745 insertions(+), 843 deletions(-) create mode 100644 src/client/components/global/sticky-container.vue diff --git a/src/client/components/global/header.vue b/src/client/components/global/header.vue index 2bf490c98..526db07fd 100644 --- a/src/client/components/global/header.vue +++ b/src/client/components/global/header.vue @@ -2,8 +2,8 @@
- + + + +
diff --git a/src/client/pages/admin/ads.vue b/src/client/pages/admin/ads.vue index e776f99a4..4d39bb4e4 100644 --- a/src/client/pages/admin/ads.vue +++ b/src/client/pages/admin/ads.vue @@ -1,45 +1,42 @@ @@ -68,11 +65,6 @@ export default defineComponent({ title: this.$ts.ads, icon: 'fas fa-audio-description', bg: 'var(--bg)', - }, - header: { - title: this.$ts.ads, - icon: 'fas fa-audio-description', - bg: 'var(--bg)', actions: [{ asFullButton: true, icon: 'fas fa-plus', diff --git a/src/client/pages/admin/announcements.vue b/src/client/pages/admin/announcements.vue index 78637c095..4ace515b0 100644 --- a/src/client/pages/admin/announcements.vue +++ b/src/client/pages/admin/announcements.vue @@ -1,27 +1,23 @@ @@ -48,11 +44,6 @@ export default defineComponent({ title: this.$ts.announcements, icon: 'fas fa-broadcast-tower', bg: 'var(--bg)', - }, - header: { - title: this.$ts.announcements, - icon: 'fas fa-broadcast-tower', - bg: 'var(--bg)', actions: [{ asFullButton: true, icon: 'fas fa-plus', diff --git a/src/client/pages/admin/emojis.vue b/src/client/pages/admin/emojis.vue index 4cd34b046..80e0e00ba 100644 --- a/src/client/pages/admin/emojis.vue +++ b/src/client/pages/admin/emojis.vue @@ -1,7 +1,5 @@ @@ -41,6 +44,10 @@ export default defineComponent({ MkInfo, }, + provide: { + shouldOmitHeaderTitle: false, + }, + props: { initialPage: { type: String, @@ -50,17 +57,19 @@ export default defineComponent({ setup(props, context) { const indexInfo = { - title: i18n.locale.instance, + title: i18n.locale.controlPanel, icon: 'fas fa-cog', bg: 'var(--bg)', + hideHeader: true, }; const INFO = ref(indexInfo); + const childInfo = ref(null); const page = ref(props.initialPage); const narrow = ref(false); const view = ref(null); const el = ref(null); const onInfo = (viewInfo) => { - INFO.value = viewInfo; + childInfo.value = viewInfo; }; const pageProps = ref({}); @@ -315,6 +324,7 @@ export default defineComponent({ view, el, onInfo, + childInfo, pageProps, component, invite, diff --git a/src/client/pages/admin/overview.vue b/src/client/pages/admin/overview.vue index 4e761f021..ced200351 100644 --- a/src/client/pages/admin/overview.vue +++ b/src/client/pages/admin/overview.vue @@ -1,71 +1,67 @@ @@ -107,10 +103,6 @@ export default defineComponent({ icon: 'fas fa-tachometer-alt', bg: 'var(--bg)', }, - header: { - title: this.$ts.dashboard, - icon: 'fas fa-tachometer-alt', - }, version, vueVersion, url, diff --git a/src/client/pages/admin/users.vue b/src/client/pages/admin/users.vue index f7f9306b7..37a54d2de 100644 --- a/src/client/pages/admin/users.vue +++ b/src/client/pages/admin/users.vue @@ -1,7 +1,5 @@