From 8b92feac7174558ea2e4d2e0c69dffa69c6aac5d Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 18 Apr 2019 21:29:19 +0900 Subject: [PATCH] Resolve #4732 --- .../app/common/views/components/settings/api.vue | 12 ++++++++++-- .../app/common/views/components/ui/input.vue | 12 +++++++++++- src/server/api/endpoints/endpoints.ts | 15 +++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 src/server/api/endpoints/endpoints.ts diff --git a/src/client/app/common/views/components/settings/api.vue b/src/client/app/common/views/components/settings/api.vue index 4f1b755857..74e3eb0661 100644 --- a/src/client/app/common/views/components/settings/api.vue +++ b/src/client/app/common/views/components/settings/api.vue @@ -14,7 +14,7 @@
{{ $t('console.title') }}
- + {{ $t('console.endpoint') }} @@ -39,15 +39,23 @@ import * as JSON5 from 'json5'; export default Vue.extend({ i18n: i18n('common/views/components/api-settings.vue'), + data() { return { endpoint: '', body: '{}', res: null, - sending: false + sending: false, + endpoints: [] }; }, + created() { + this.$root.api('endpoints').then(endpoints => { + this.endpoints = endpoints; + }); + }, + methods: { regenerateToken() { this.$root.dialog({ diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue index ae9ce249de..bcb87398ba 100644 --- a/src/client/app/common/views/components/ui/input.vue +++ b/src/client/app/common/views/components/ui/input.vue @@ -23,6 +23,7 @@ @focus="focused = true" @blur="focused = false" @keydown="$emit('keydown', $event)" + :list="id" > + +