diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index c3933a417..a073d789a 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -533,6 +533,8 @@ generateAccessToken: "アクセストークンの発行"
permission: "権限"
enableAll: "全て有効にする"
disableAll: "全て無効にする"
+tokenRequested: "アカウントへのアクセス許可"
+pluginTokenRequestedDescription: "このプラグインはここで設定した権限を行使できるようになります。"
_theme:
explore: "テーマを探す"
diff --git a/src/client/components/token-generate-window.vue b/src/client/components/token-generate-window.vue
index 5486ae92e..e58dcbda7 100644
--- a/src/client/components/token-generate-window.vue
+++ b/src/client/components/token-generate-window.vue
@@ -2,6 +2,9 @@
{ $emit('closed'); destroyDom(); }" :with-ok-button="true" :ok-button-disabled="false" @ok="ok()" :can-close="false">
{{ title || $t('generateAccessToken') }}
+
+ {{ information }}
+
{{ $t('name') }}
@@ -9,7 +12,7 @@
{{ $t('permission') }}
{{ $t('disableAll') }}
{{ $t('enableAll') }}
-
{{ $t(`_permissions.${kind}`) }}
+
{{ $t(`_permissions.${kind}`) }}
@@ -23,6 +26,7 @@ import MkInput from './ui/input.vue';
import MkTextarea from './ui/textarea.vue';
import MkSwitch from './ui/switch.vue';
import MkButton from './ui/button.vue';
+import MkInfo from './ui/info.vue';
export default Vue.extend({
components: {
@@ -31,6 +35,7 @@ export default Vue.extend({
MkTextarea,
MkSwitch,
MkButton,
+ MkInfo,
},
props: {
@@ -38,20 +43,41 @@ export default Vue.extend({
type: String,
required: false,
default: null
+ },
+ information: {
+ type: String,
+ required: false,
+ default: null
+ },
+ initialName: {
+ type: String,
+ required: false,
+ default: null
+ },
+ initialPermissions: {
+ type: Array,
+ required: false,
+ default: null
}
},
data() {
return {
- name: null,
+ name: this.initialName,
permissions: {},
kinds
};
},
created() {
- for (const kind of this.kinds) {
- Vue.set(this.permissions, kind, false);
+ if (this.initialPermissions) {
+ for (const kind of this.initialPermissions) {
+ Vue.set(this.permissions, kind, true);
+ }
+ } else {
+ for (const kind of this.kinds) {
+ Vue.set(this.permissions, kind, false);
+ }
}
},
diff --git a/src/client/pages/preferences/plugins.vue b/src/client/pages/preferences/plugins.vue
index afe7c8caf..ee0ac3652 100644
--- a/src/client/pages/preferences/plugins.vue
+++ b/src/client/pages/preferences/plugins.vue
@@ -30,7 +30,10 @@
{{ $t('description') }}:
{{ selectedPlugin.description }}
- {{ $t('uninstall') }}
+
+ {{ $t('settings') }}
+ {{ $t('uninstall') }}
+
@@ -39,7 +42,7 @@