From 58ebe2ed0558a5c1ffdc3c69727196456032eb62 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Jul 2022 14:40:02 +0900 Subject: [PATCH] feat(client): status bar (experimental) --- locales/ja-JP.yml | 2 + .../components/global/sticky-container.vue | 8 +- packages/client/src/pages/settings/index.vue | 6 + .../pages/settings/statusbars.statusbar.vue | 122 ++++++++++++++++++ .../client/src/pages/settings/statusbars.vue | 61 +++++++++ packages/client/src/store.ts | 13 ++ .../src/ui/_common_/statusbar-federation.vue | 103 +++++++++++++++ .../client/src/ui/_common_/statusbar-rss.vue | 88 +++++++++++++ .../src/ui/_common_/statusbar-user-list.vue | 104 +++++++++++++++ .../client/src/ui/_common_/statusbars.vue | 75 +++++++++++ packages/client/src/ui/deck.vue | 86 +++++++----- packages/client/src/ui/universal.vue | 41 +++--- 12 files changed, 658 insertions(+), 51 deletions(-) create mode 100644 packages/client/src/pages/settings/statusbars.statusbar.vue create mode 100644 packages/client/src/pages/settings/statusbars.vue create mode 100644 packages/client/src/ui/_common_/statusbar-federation.vue create mode 100644 packages/client/src/ui/_common_/statusbar-rss.vue create mode 100644 packages/client/src/ui/_common_/statusbar-user-list.vue create mode 100644 packages/client/src/ui/_common_/statusbars.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d333ac29d..01d001688 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -864,6 +864,8 @@ numberOfPageCache: "ページキャッシュ数" numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。" logoutConfirm: "ログアウトしますか?" lastActiveDate: "最終利用日時" +statusbar: "ステータスバー" +pleaseSelect: "選択してください" _emailUnavailable: used: "既に使用されています" diff --git a/packages/client/src/components/global/sticky-container.vue b/packages/client/src/components/global/sticky-container.vue index 2603fac55..44f4f065a 100644 --- a/packages/client/src/components/global/sticky-container.vue +++ b/packages/client/src/components/global/sticky-container.vue @@ -9,11 +9,15 @@ + + diff --git a/packages/client/src/pages/settings/statusbars.vue b/packages/client/src/pages/settings/statusbars.vue new file mode 100644 index 000000000..dea5e0ffd --- /dev/null +++ b/packages/client/src/pages/settings/statusbars.vue @@ -0,0 +1,61 @@ + + + diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index 94d9d9138..cde907017 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -88,6 +88,19 @@ export const defaultStore = markRaw(new Storage('base', { where: 'deviceAccount', default: false, }, + statusbars: { + where: 'deviceAccount', + default: [] as { + name: string; + id: string; + type: string; + props: Record; + }[], + }, + statusbarSize: { + where: 'deviceAccount', + default: 'medium', + }, widgets: { where: 'deviceAccount', default: [] as { diff --git a/packages/client/src/ui/_common_/statusbar-federation.vue b/packages/client/src/ui/_common_/statusbar-federation.vue new file mode 100644 index 000000000..87b954b90 --- /dev/null +++ b/packages/client/src/ui/_common_/statusbar-federation.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/packages/client/src/ui/_common_/statusbar-rss.vue b/packages/client/src/ui/_common_/statusbar-rss.vue new file mode 100644 index 000000000..ddfc6faaa --- /dev/null +++ b/packages/client/src/ui/_common_/statusbar-rss.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/packages/client/src/ui/_common_/statusbar-user-list.vue b/packages/client/src/ui/_common_/statusbar-user-list.vue new file mode 100644 index 000000000..01240dc6b --- /dev/null +++ b/packages/client/src/ui/_common_/statusbar-user-list.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/packages/client/src/ui/_common_/statusbars.vue b/packages/client/src/ui/_common_/statusbars.vue new file mode 100644 index 000000000..86d2812f5 --- /dev/null +++ b/packages/client/src/ui/_common_/statusbars.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index b3b9ddd55..111cf8022 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -5,26 +5,31 @@ > - +
+ +
+ +
+
@@ -51,7 +56,7 @@