From 8e6da3a0d9f2f6dbd8f1009e1accdb4e4ebae169 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
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 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'src/client/app/admin/views/instance.vue')

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 @@
 		</section>
 	</ui-card>
 
+	<ui-card>
+		<template #title>{{ $t('pinned-users') }}</template>
+		<section>
+			<ui-textarea v-model="pinnedUsers"></ui-textarea>
+			<ui-button @click="updateMeta">{{ $t('save') }}</ui-button>
+		</section>
+	</ui-card>
+
 	<ui-card>
 		<template #title>{{ $t('invite') }}</template>
 		<section>
@@ -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',
-- 
cgit v1.2.3-freya

