From 246693b8484b72048cb515b76aa5f094f5fdeb56 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 22 Apr 2021 22:29:33 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E4=BD=9C=E3=82=8A?= =?UTF-8?q?=E7=9B=B4=E3=81=97=20(#7473)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * wip * wip * wip --- locales/ja-JP.yml | 13 +- package.json | 2 +- src/client/components/captcha.vue | 4 +- src/client/components/form/base.vue | 2 + src/client/components/form/form.scss | 4 +- src/client/components/form/key-value-view.vue | 2 +- src/client/components/form/object-view.vue | 2 +- src/client/components/form/radios.vue | 3 + src/client/components/form/suspense.vue | 9 +- src/client/components/instance-stats.vue | 252 +------- src/client/components/signup.vue | 2 +- src/client/components/tab.vue | 1 + src/client/components/ui/pagination.vue | 34 +- src/client/pages/instance/abuses.vue | 12 +- src/client/pages/instance/announcements.vue | 52 +- src/client/pages/instance/bot-protection.vue | 138 ++++ src/client/pages/instance/database.vue | 60 ++ src/client/pages/instance/email-settings.vue | 127 ++++ src/client/pages/instance/emojis.vue | 213 +++--- src/client/pages/instance/federation.vue | 115 ++-- src/client/pages/instance/file-dialog.vue | 4 +- src/client/pages/instance/files-settings.vue | 92 +++ src/client/pages/instance/files.vue | 8 + src/client/pages/instance/index.vue | 362 ++++++----- src/client/pages/instance/instance-block.vue | 71 ++ .../pages/instance/integrations-discord.vue | 85 +++ .../pages/instance/integrations-github.vue | 85 +++ .../pages/instance/integrations-twitter.vue | 85 +++ src/client/pages/instance/integrations.vue | 73 +++ .../{index.metrics.vue => metrics.vue} | 243 ++----- src/client/pages/instance/object-storage.vue | 154 +++++ src/client/pages/instance/other-settings.vue | 68 ++ src/client/pages/instance/overview.vue | 131 ++++ src/client/pages/instance/proxy-account.vue | 86 +++ src/client/pages/instance/queue.chart.vue | 66 +- src/client/pages/instance/queue.vue | 24 +- src/client/pages/instance/relays.vue | 50 +- src/client/pages/instance/security.vue | 77 +++ src/client/pages/instance/service-worker.vue | 84 +++ src/client/pages/instance/settings.vue | 607 +++--------------- src/client/pages/instance/user-dialog.vue | 230 ------- src/client/pages/instance/user.vue | 229 +++++++ src/client/pages/instance/users.vue | 259 ++++---- src/client/pages/user-info.vue | 70 +- src/client/pages/user/index.vue | 2 +- src/client/router.ts | 12 +- src/client/scripts/get-user-menu.ts | 8 +- src/client/scripts/lookup-user.ts | 37 ++ src/client/ui/_common_/sidebar.vue | 63 +- src/client/ui/default.sidebar.vue | 63 +- 50 files changed, 2588 insertions(+), 1887 deletions(-) create mode 100644 src/client/pages/instance/bot-protection.vue create mode 100644 src/client/pages/instance/database.vue create mode 100644 src/client/pages/instance/email-settings.vue create mode 100644 src/client/pages/instance/files-settings.vue create mode 100644 src/client/pages/instance/instance-block.vue create mode 100644 src/client/pages/instance/integrations-discord.vue create mode 100644 src/client/pages/instance/integrations-github.vue create mode 100644 src/client/pages/instance/integrations-twitter.vue create mode 100644 src/client/pages/instance/integrations.vue rename src/client/pages/instance/{index.metrics.vue => metrics.vue} (60%) create mode 100644 src/client/pages/instance/object-storage.vue create mode 100644 src/client/pages/instance/other-settings.vue create mode 100644 src/client/pages/instance/overview.vue create mode 100644 src/client/pages/instance/proxy-account.vue create mode 100644 src/client/pages/instance/security.vue create mode 100644 src/client/pages/instance/service-worker.vue delete mode 100644 src/client/pages/instance/user-dialog.vue create mode 100644 src/client/pages/instance/user.vue create mode 100644 src/client/scripts/lookup-user.ts diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 989edcda2..b557f8643 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -183,7 +183,7 @@ clearQueueConfirmTitle: "キューをクリアしますか?" clearQueueConfirmText: "未配達の投稿は配送されなくなります。通常この操作を行う必要はありません。" clearCachedFiles: "キャッシュをクリア" clearCachedFilesConfirm: "キャッシュされたリモートファイルをすべて削除しますか?" -blockedInstances: "インスタンスブロック" +blockedInstances: "ブロックしたインスタンス" blockedInstancesDescription: "ブロックしたいインスタンスのホストを改行で区切って設定します。ブロックされたインスタンスは、このインスタンスとやり取りできなくなります。" muteAndBlock: "ミュートとブロック" mutedUsers: "ミュートしたユーザー" @@ -349,7 +349,6 @@ antennaExcludeKeywords: "除外キーワード" antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります" notifyAntenna: "新しいノートを通知する" withFileAntenna: "ファイルが添付されたノートのみ" -serviceworker: "ServiceWorker" enableServiceworker: "ServiceWorkerを有効にする" antennaUsersDescription: "ユーザー名を改行で区切って指定します" caseSensitive: "大文字小文字を区別する" @@ -568,7 +567,7 @@ pluginTokenRequestedDescription: "このプラグインはここで設定した notificationType: "通知の種類" edit: "編集" useStarForReactionFallback: "リアクション絵文字が不明な場合、代わりに★を使う" -emailConfig: "メールサーバー設定" +emailServer: "メールサーバー" enableEmail: "メール配信機能を有効化する" emailConfigInfo: "メールアドレスの確認やパスワードリセットの際に使います" email: "メール" @@ -728,6 +727,14 @@ hideOnlineStatusDescription: "オンライン状態を隠すと、検索など online: "オンライン" active: "アクティブ" offline: "オフライン" +notRecommended: "非推奨" +botProtection: "Bot防御" +instanceBlocking: "インスタンスブロック" +selectAccount: "アカウントを選択" +enabled: "有効" +disabled: "無効" +quickAction: "クイックアクション" +user: "ユーザー" _email: _follow: diff --git a/package.json b/package.json index 26aacae49..c6fd1a022 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "12.78.0-beta.2", + "version": "12.78.0-beta.3", "codename": "indigo", "repository": { "type": "git", diff --git a/src/client/components/captcha.vue b/src/client/components/captcha.vue index 710fcd616..26215df09 100644 --- a/src/client/components/captcha.vue +++ b/src/client/components/captcha.vue @@ -18,7 +18,7 @@ type Captcha = { getResponse(id: string): string; }; -type CaptchaProvider = 'hcaptcha' | 'grecaptcha'; +type CaptchaProvider = 'hcaptcha' | 'recaptcha'; type CaptchaContainer = { readonly [_ in CaptchaProvider]?: Captcha; @@ -57,7 +57,7 @@ export default defineComponent({ src() { const endpoint = ({ hcaptcha: 'https://hcaptcha.com/1', - grecaptcha: 'https://www.recaptcha.net/recaptcha', + recaptcha: 'https://www.recaptcha.net/recaptcha', } as Record)[this.provider]; return `${typeof endpoint == 'string' ? endpoint : 'about:invalid'}/api.js?render=explicit`; diff --git a/src/client/components/form/base.vue b/src/client/components/form/base.vue index 34deb3946..132942d52 100644 --- a/src/client/components/form/base.vue +++ b/src/client/components/form/base.vue @@ -24,6 +24,8 @@ export default defineComponent({ --formXPadding: 32px; --formYPadding: 32px; + --formContentHMargin: 16px; + font-size: 95%; line-height: 1.3em; background: var(--bg); diff --git a/src/client/components/form/form.scss b/src/client/components/form/form.scss index 8c01fad72..05994ae65 100644 --- a/src/client/components/form/form.scss +++ b/src/client/components/form/form.scss @@ -30,7 +30,7 @@ top: var(--stickyTop, 0px); z-index: 2; margin: -8px calc(var(--formXPadding) * -1) 0 calc(var(--formXPadding) * -1); - padding: 8px calc(16px + var(--formXPadding)) 8px calc(16px + var(--formXPadding)); + padding: 8px calc(var(--formContentHMargin) + var(--formXPadding)) 8px calc(var(--formContentHMargin) + var(--formXPadding)); background: var(--X17); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); @@ -42,7 +42,7 @@ } ._formCaption { - padding: 8px 16px 0 16px; + padding: 8px var(--formContentHMargin) 0 var(--formContentHMargin); } ._formItem { diff --git a/src/client/components/form/key-value-view.vue b/src/client/components/form/key-value-view.vue index 85f4febef..ca4c09867 100644 --- a/src/client/components/form/key-value-view.vue +++ b/src/client/components/form/key-value-view.vue @@ -20,7 +20,7 @@ export default defineComponent({ .anocepby { display: flex; align-items: center; - padding: 14px 16px; + padding: 14px var(--formContentHMargin); > .key { margin-right: 12px; diff --git a/src/client/components/form/object-view.vue b/src/client/components/form/object-view.vue index cbd4186e5..59fb62b5e 100644 --- a/src/client/components/form/object-view.vue +++ b/src/client/components/form/object-view.vue @@ -75,7 +75,7 @@ export default defineComponent({ max-width: 100%; min-height: 130px; margin: 0; - padding: 16px; + padding: 16px var(--formContentHMargin); box-sizing: border-box; font: inherit; font-weight: normal; diff --git a/src/client/components/form/radios.vue b/src/client/components/form/radios.vue index 3daa7e5bb..4cfb7c247 100644 --- a/src/client/components/form/radios.vue +++ b/src/client/components/form/radios.vue @@ -18,6 +18,9 @@ export default defineComponent({ } }, watch: { + modelValue() { + this.value = this.modelValue; + }, value() { this.$emit('update:modelValue', this.value); } diff --git a/src/client/components/form/suspense.vue b/src/client/components/form/suspense.vue index 6a8282733..2a48faccb 100644 --- a/src/client/components/form/suspense.vue +++ b/src/client/components/form/suspense.vue @@ -5,9 +5,9 @@ - +
- +
error! @@ -20,13 +20,8 @@ diff --git a/src/client/pages/instance/bot-protection.vue b/src/client/pages/instance/bot-protection.vue new file mode 100644 index 000000000..449b8a233 --- /dev/null +++ b/src/client/pages/instance/bot-protection.vue @@ -0,0 +1,138 @@ + + + diff --git a/src/client/pages/instance/database.vue b/src/client/pages/instance/database.vue new file mode 100644 index 000000000..a41d61ce2 --- /dev/null +++ b/src/client/pages/instance/database.vue @@ -0,0 +1,60 @@ + + + diff --git a/src/client/pages/instance/email-settings.vue b/src/client/pages/instance/email-settings.vue new file mode 100644 index 000000000..9965a1420 --- /dev/null +++ b/src/client/pages/instance/email-settings.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/client/pages/instance/emojis.vue b/src/client/pages/instance/emojis.vue index 88bebb40e..fd641703c 100644 --- a/src/client/pages/instance/emojis.vue +++ b/src/client/pages/instance/emojis.vue @@ -1,50 +1,46 @@ @@ -67,6 +63,8 @@ export default defineComponent({ MkPagination, }, + emits: ['info'], + data() { return { [symbols.PAGE_INFO]: { @@ -99,6 +97,10 @@ export default defineComponent({ } }, + async mounted() { + this.$emit('info', this[symbols.PAGE_INFO]); + }, + methods: { async add(e) { const files = await selectFile(e.currentTarget || e.target, null, true); @@ -150,85 +152,86 @@ export default defineComponent({ diff --git a/src/client/pages/instance/instance-block.vue b/src/client/pages/instance/instance-block.vue new file mode 100644 index 000000000..ed5740f33 --- /dev/null +++ b/src/client/pages/instance/instance-block.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/client/pages/instance/integrations-discord.vue b/src/client/pages/instance/integrations-discord.vue new file mode 100644 index 000000000..c7508918f --- /dev/null +++ b/src/client/pages/instance/integrations-discord.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/client/pages/instance/integrations-github.vue b/src/client/pages/instance/integrations-github.vue new file mode 100644 index 000000000..16586b15b --- /dev/null +++ b/src/client/pages/instance/integrations-github.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/client/pages/instance/integrations-twitter.vue b/src/client/pages/instance/integrations-twitter.vue new file mode 100644 index 000000000..b08b7f40a --- /dev/null +++ b/src/client/pages/instance/integrations-twitter.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/client/pages/instance/integrations.vue b/src/client/pages/instance/integrations.vue new file mode 100644 index 000000000..7debedc36 --- /dev/null +++ b/src/client/pages/instance/integrations.vue @@ -0,0 +1,73 @@ + + + diff --git a/src/client/pages/instance/index.metrics.vue b/src/client/pages/instance/metrics.vue similarity index 60% rename from src/client/pages/instance/index.metrics.vue rename to src/client/pages/instance/metrics.vue index 9dd115240..18cfe5eee 100644 --- a/src/client/pages/instance/index.metrics.vue +++ b/src/client/pages/instance/metrics.vue @@ -1,101 +1,52 @@ @@ -188,9 +139,11 @@ export default defineComponent({ }, beforeUnmount() { - this.connection.off('stats', this.onStats); - this.connection.off('statsLog', this.onStatsLog); - this.connection.dispose(); + if (this.connection) { + this.connection.off('stats', this.onStats); + this.connection.off('statsLog', this.onStatsLog); + this.connection.dispose(); + } this.queueConnection.dispose(); }, @@ -232,9 +185,9 @@ export default defineComponent({ aspectRatio: 3, layout: { padding: { - left: 0, - right: 0, - top: 8, + left: 16, + right: 16, + top: 16, bottom: 0 } }, @@ -304,9 +257,9 @@ export default defineComponent({ aspectRatio: 3, layout: { padding: { - left: 0, - right: 0, - top: 8, + left: 16, + right: 16, + top: 16, bottom: 0 } }, @@ -375,9 +328,9 @@ export default defineComponent({ aspectRatio: 3, layout: { padding: { - left: 0, - right: 0, - top: 8, + left: 16, + right: 16, + top: 16, bottom: 0 } }, @@ -494,81 +447,9 @@ export default defineComponent({ diff --git a/src/client/pages/instance/object-storage.vue b/src/client/pages/instance/object-storage.vue new file mode 100644 index 000000000..814aeb6e4 --- /dev/null +++ b/src/client/pages/instance/object-storage.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/client/pages/instance/other-settings.vue b/src/client/pages/instance/other-settings.vue new file mode 100644 index 000000000..b3954149a --- /dev/null +++ b/src/client/pages/instance/other-settings.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/client/pages/instance/overview.vue b/src/client/pages/instance/overview.vue new file mode 100644 index 000000000..651ace08f --- /dev/null +++ b/src/client/pages/instance/overview.vue @@ -0,0 +1,131 @@ + + + diff --git a/src/client/pages/instance/proxy-account.vue b/src/client/pages/instance/proxy-account.vue new file mode 100644 index 000000000..3e2df8dcb --- /dev/null +++ b/src/client/pages/instance/proxy-account.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/client/pages/instance/queue.chart.vue b/src/client/pages/instance/queue.chart.vue index 0eb70debf..446c97920 100644 --- a/src/client/pages/instance/queue.chart.vue +++ b/src/client/pages/instance/queue.chart.vue @@ -1,27 +1,29 @@ + + diff --git a/src/client/pages/instance/queue.vue b/src/client/pages/instance/queue.vue index 0c1e0e51b..2dccf48d3 100644 --- a/src/client/pages/instance/queue.vue +++ b/src/client/pages/instance/queue.vue @@ -1,43 +1,47 @@ diff --git a/src/client/pages/instance/security.vue b/src/client/pages/instance/security.vue new file mode 100644 index 000000000..e3397a113 --- /dev/null +++ b/src/client/pages/instance/security.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/client/pages/instance/service-worker.vue b/src/client/pages/instance/service-worker.vue new file mode 100644 index 000000000..a52932bb7 --- /dev/null +++ b/src/client/pages/instance/service-worker.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/client/pages/instance/settings.vue b/src/client/pages/instance/settings.vue index b827a7764..66f01c42c 100644 --- a/src/client/pages/instance/settings.vue +++ b/src/client/pages/instance/settings.vue @@ -1,581 +1,132 @@ - - diff --git a/src/client/pages/instance/user.vue b/src/client/pages/instance/user.vue new file mode 100644 index 000000000..fbc10a367 --- /dev/null +++ b/src/client/pages/instance/user.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/src/client/pages/instance/users.vue b/src/client/pages/instance/users.vue index 4db965588..452886abd 100644 --- a/src/client/pages/instance/users.vue +++ b/src/client/pages/instance/users.vue @@ -1,86 +1,71 @@