diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 7 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.vue | 37 |
2 files changed, 43 insertions, 1 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 2418450c..ae36e5e8 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -55,7 +55,8 @@ const UserSettings = { changePasswordInputs: [ '', '', '' ], changedPassword: false, changePasswordError: false, - activeTab: 'profile' + activeTab: 'profile', + notificationSettings: this.$store.state.users.currentUser.notification_settings } }, created () { @@ -128,6 +129,10 @@ const UserSettings = { this.$store.commit('setCurrentUser', user) }) }, + updateNotificationSettings () { + this.$store.state.api.backendInteractor + .updateNotificationSettings({ settings: this.notificationSettings }) + }, changeVis (visibility) { this.newDefaultScope = visibility }, diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 2cb8b37a..20b10979 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -167,6 +167,43 @@ </div> </div> + <div :label="$t('settings.notifications')" v-if="pleromaBackend"> + <div class="setting-item"> + <div class="select-multiple"> + <span class="label">{{$t('settings.notification_setting')}}</span> + <ul class="option-list"> + <li> + <input type="checkbox" id="notification-setting-follows" v-model="notificationSettings.follows"> + <label for="notification-setting-follows"> + {{$t('settings.notification_setting_follows')}} + </label> + </li> + <li> + <input type="checkbox" id="notification-setting-followers" v-model="notificationSettings.followers"> + <label for="notification-setting-followers"> + {{$t('settings.notification_setting_followers')}} + </label> + </li> + <li> + <input type="checkbox" id="notification-setting-non-follows" v-model="notificationSettings.non_follows"> + <label for="notification-setting-non-follows"> + {{$t('settings.notification_setting_non_follows')}} + </label> + </li> + <li> + <input type="checkbox" id="notification-setting-non-followers" v-model="notificationSettings.non_followers"> + <label for="notification-setting-non-followers"> + {{$t('settings.notification_setting_non_followers')}} + </label> + </li> + </ul> + </div> + <p>{{$t('settings.notification_mutes')}}</p> + <p>{{$t('settings.notification_blocks')}}</p> + <button class="btn btn-default" @click="updateNotificationSettings">{{$t('general.submit')}}</button> + </div> + </div> + <div :label="$t('settings.data_import_export_tab')" v-if="pleromaBackend"> <div class="setting-item"> <h2>{{$t('settings.follow_import')}}</h2> |
