From 8f3ca867d2e03f8ee376d1f4fa9b1cc241af8376 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 23:18:05 +0900 Subject: [PATCH] enhance(client): tweak ui --- locales/ja-JP.yml | 1 + packages/client/src/account.ts | 17 +++--- packages/client/src/components/ui/button.vue | 2 +- .../client/src/components/ui/context-menu.vue | 4 +- .../ui/{child-menu.vue => menu.child.vue} | 8 +-- packages/client/src/components/ui/menu.vue | 4 +- .../client/src/pages/settings/profile.vue | 4 +- packages/client/src/ui/deck/column.vue | 53 ++++++++++--------- 8 files changed, 50 insertions(+), 43 deletions(-) rename packages/client/src/components/ui/{child-menu.vue => menu.child.vue} (85%) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 21615a093..e071b4bda 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -890,6 +890,7 @@ activeEmailValidationDescription: "ユーザーのメールアドレスのバリ navbar: "ナビゲーションバー" shuffle: "シャッフル" account: "アカウント" +move: "移動" _sensitiveMediaDetection: description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てることができます。サーバーの負荷が少し増えます。" diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 38f2ee4b3..243aea68c 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -206,17 +206,16 @@ export async function openAccountMenu(opts: { to: `/@${ $i.username }`, avatar: $i, }, null, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, { + type: 'parent', icon: 'fas fa-plus', text: i18n.ts.addAccount, - action: () => { - popupMenu([{ - text: i18n.ts.existingAccount, - action: () => { showSigninDialog(); }, - }, { - text: i18n.ts.createAccount, - action: () => { createAccount(); }, - }], ev.currentTarget ?? ev.target); - }, + children: [{ + text: i18n.ts.existingAccount, + action: () => { showSigninDialog(); }, + }, { + text: i18n.ts.createAccount, + action: () => { createAccount(); }, + }], }, { type: 'link', icon: 'fas fa-users', diff --git a/packages/client/src/components/ui/button.vue b/packages/client/src/components/ui/button.vue index 5f5d6d42e..d3a4b5ea9 100644 --- a/packages/client/src/components/ui/button.vue +++ b/packages/client/src/components/ui/button.vue @@ -46,7 +46,7 @@ export default defineComponent({ rounded: { type: Boolean, required: false, - default: false, + default: true, }, inline: { type: Boolean, diff --git a/packages/client/src/components/ui/context-menu.vue b/packages/client/src/components/ui/context-menu.vue index e637d361c..165c3db46 100644 --- a/packages/client/src/components/ui/context-menu.vue +++ b/packages/client/src/components/ui/context-menu.vue @@ -1,16 +1,16 @@