summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-23 03:19:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-23 03:19:57 +0900
commit8ba178f795c771fd84739f4ff5ce65f135ca69ca (patch)
tree4976df1d0dd755021bb44e7943c595c13d1b10b9 /src/client/app
parentAdd control panel link in nav (diff)
downloadsharkey-8ba178f795c771fd84739f4ff5ce65f135ca69ca.tar.gz
sharkey-8ba178f795c771fd84739f4ff5ce65f135ca69ca.tar.bz2
sharkey-8ba178f795c771fd84739f4ff5ce65f135ca69ca.zip
コントロールパネルから招待制のオンオフを切り替えられるように
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.dashboard.vue14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
index 3567585cb8..e0d23331b8 100644
--- a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
@@ -11,6 +11,10 @@
<x-cpu-memory :connection="connection"/>
</div>
<div>
+ <label>
+ <input type="checkbox" v-model="disableRegistration" @change="updateMeta">
+ <span>disableRegistration</span>
+ </label>
<button class="ui" @click="invite">%i18n:@invite%</button>
<p v-if="inviteCode">Code: <code>{{ inviteCode }}</code></p>
</div>
@@ -28,6 +32,7 @@ export default Vue.extend({
data() {
return {
stats: null,
+ disableRegistration: false,
inviteCode: null,
connection: null,
connectionId: null
@@ -37,6 +42,10 @@ export default Vue.extend({
this.connection = (this as any).os.streams.serverStatsStream.getConnection();
this.connectionId = (this as any).os.streams.serverStatsStream.use();
+ (this as any).os.getMeta().then(meta => {
+ this.disableRegistration = meta.disableRegistration;
+ });
+
(this as any).api('stats').then(stats => {
this.stats = stats;
});
@@ -49,6 +58,11 @@ export default Vue.extend({
(this as any).api('admin/invite').then(x => {
this.inviteCode = x.code;
});
+ },
+ updateMeta() {
+ (this as any).api('admin/update-meta', {
+ disableRegistration: this.disableRegistration
+ });
}
}
});