From 7e0d6a4a4870aa33adfb5a6ab94f176c5e3d8e44 Mon Sep 17 00:00:00 2001 From: fs5m8 Date: Thu, 5 Jan 2023 23:30:19 +0900 Subject: [PATCH] Fix: settings - hide API token by default --- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + src/client/app/common/views/components/settings/api.vue | 9 ++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 69654815da..ef9839a1c7 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1157,6 +1157,7 @@ common/views/components/media-image.vue: sensitive: "NSFW" click-to-show: "Click to show" common/views/components/api-settings.vue: + show-token: "Show API Token" intro: "To access the API, set this token as the key 'i' of request parameters." caution: "Do not enter this token to any apps nor tell this token to others otherwise your account may get compromised." regeneration-of-token: "If your token gets leaked, you can regenerate it." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index de66844e0d..b0d06313b5 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1269,6 +1269,7 @@ common/views/components/media-image.vue: click-to-show: "クリックして表示" common/views/components/api-settings.vue: + show-token: "APIトークンを表示" intro: "API を利用するには、上記のトークンを i というキーでパラメータに付加してリクエストします。" caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。" regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合は、トークンを再生成できます。" diff --git a/src/client/app/common/views/components/settings/api.vue b/src/client/app/common/views/components/settings/api.vue index 47e9fc8a6d..58512ab615 100644 --- a/src/client/app/common/views/components/settings/api.vue +++ b/src/client/app/common/views/components/settings/api.vue @@ -3,9 +3,12 @@
- - {{ $t('token') }} - +
+ {{ $t('show-token') }} + + {{ $t('token') }} + +

{{ $t('intro') }}

{{ $t('caution') }}

{{ $t('regeneration-of-token') }}