summaryrefslogtreecommitdiffstats
path: root/src/views
diff options
context:
space:
mode:
authorJakob Röhrl <jakob.roehrl@web.de>2020-01-28 15:03:28 +0100
committerJoas Schilling <coding@schilljs.com>2020-02-07 11:15:34 +0100
commitc63d0b905f63f4b4a96bcd2f321c313a05532ecf (patch)
tree5931c03548a49822ad08ce628e616e910d85a46b /src/views
parentc309625b6f342981475a553e406feec2b38a4869 (diff)
1st try default group notification setting
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Diffstat (limited to 'src/views')
-rw-r--r--src/views/AdminSettings/GeneralSettings.vue30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/views/AdminSettings/GeneralSettings.vue b/src/views/AdminSettings/GeneralSettings.vue
index da3432989..a59f673ac 100644
--- a/src/views/AdminSettings/GeneralSettings.vue
+++ b/src/views/AdminSettings/GeneralSettings.vue
@@ -39,6 +39,18 @@
<em>{{ t('spreed', 'When a call has started, everyone with access to the conversation can join the call.') }}</em>
</p>
+ <p>
+ <label for="default_group_notification">{{ t('spreed', 'Default group notification') }}</label>
+ <Multiselect id="default_group_notification"
+ v-model="defaultGroupNotification"
+ :options="defaultGroupNotificationOptions"
+ :placeholder="t('spreed', 'Default group notification for new groups')"
+ label="label"
+ track-by="value"
+ :disabled="loading || loadingStartCalls"
+ @input="saveDefaultGroupNotification" />
+ </p>
+
<h3>{{ t('spreed', 'Integration into other apps') }}</h3>
<p>
@@ -73,6 +85,12 @@ const startCallOptions = [
{ value: 1, label: t('spreed', 'Users and moderators') },
{ value: 2, label: t('spreed', 'Moderators only') },
]
+
+const defaultGroupNotificationOptions = [
+ { value: 0, label: t('spreed', 'All messages') },
+ { value: 1, label: t('spreed', '@-mentions only') },
+ { value: 2, label: t('spreed', 'Off') },
+]
export default {
name: 'GeneralSettings',
@@ -89,6 +107,9 @@ export default {
startCallOptions,
startCalls: startCallOptions[0],
+ defaultGroupNotificationOptions,
+ defaultGroupNotification: defaultGroupNotificationOptions[0],
+
conversationsFiles: true,
conversationsFilesPublicShares: true,
}
@@ -112,6 +133,15 @@ export default {
}.bind(this),
})
},
+ saveDefaultGroupNotification() {
+ this.loadingStartCalls = true
+
+ OCP.AppConfig.setValue('spreed', 'default_group_notification', this.startCalls.value, {
+ success: function() {
+ this.loadingStartCalls = false
+ }.bind(this),
+ })
+ },
saveConversationsFiles() {
this.loadingConversationsFiles = true