From 8e6da3a0d9f2f6dbd8f1009e1accdb4e4ebae169 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 10 May 2019 17:30:28 +0900 Subject: インスタンス運営者がピン留めユーザーを設定できるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related #4892 --- src/client/app/admin/views/instance.vue | 13 ++++++++++- src/client/app/common/views/pages/explore.vue | 4 ++++ src/models/entities/meta.ts | 5 ++++ src/server/api/endpoints/admin/update-meta.ts | 11 +++++++++ src/server/api/endpoints/meta.ts | 1 + src/server/api/endpoints/pinned-users.ts | 33 +++++++++++++++++++++++++++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 src/server/api/endpoints/pinned-users.ts (limited to 'src') diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index cca4e5f669..d81edc8fe6 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -82,6 +82,14 @@ + + +
+ + {{ $t('save') }} +
+
+
@@ -190,6 +198,7 @@ export default Vue.extend({ enableServiceWorker: false, swPublicKey: null, swPrivateKey: null, + pinnedUsers: [], faHeadset, faShieldAlt, faGhost, faUserPlus, farEnvelope, faBolt }; }, @@ -239,6 +248,7 @@ export default Vue.extend({ this.enableServiceWorker = meta.enableServiceWorker; this.swPublicKey = meta.swPublickey; this.swPrivateKey = meta.swPrivateKey; + this.pinnedUsers = meta.pinnedUsers.join('\n'); }); }, @@ -297,7 +307,8 @@ export default Vue.extend({ smtpPass: this.smtpAuth ? this.smtpPass : '', enableServiceWorker: this.enableServiceWorker, swPublicKey: this.swPublicKey, - swPrivateKey: this.swPrivateKey + swPrivateKey: this.swPrivateKey, + pinnedUsers: this.pinnedUsers.split('\n') }).then(() => { this.$root.dialog({ type: 'success', diff --git a/src/client/app/common/views/pages/explore.vue b/src/client/app/common/views/pages/explore.vue index 107603d69e..d0e98035f8 100644 --- a/src/client/app/common/views/pages/explore.vue +++ b/src/client/app/common/views/pages/explore.vue @@ -26,6 +26,9 @@