diff options
| author | HJ <spam@hjkos.com> | 2019-02-07 22:45:08 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2019-02-07 22:45:08 +0000 |
| commit | 62b3b9b8d4a71912d9e55e812f537f057698e323 (patch) | |
| tree | fbe98f5f1e86183e256a0e4214eefddae99f8c9d /src/components/user_settings | |
| parent | 9b49fa3c0c103ff7c62b5792e3b1f5c21d1f40e1 (diff) | |
| parent | 19dbdd24b41122ebcda71bcdf91ea61abfc123dd (diff) | |
Merge branch 'add-admin-and-moderator-fields-to-user-card-view' into 'develop'
Add admin and moderator indicators to the user profile
See merge request pleroma/pleroma-fe!519
Diffstat (limited to 'src/components/user_settings')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 7 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.vue | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index a2a23c6f..d20bf308 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -14,6 +14,8 @@ const UserSettings = { newDefaultScope: this.$store.state.users.currentUser.default_scope, hideFollows: this.$store.state.users.currentUser.hide_follows, hideFollowers: this.$store.state.users.currentUser.hide_followers, + showRole: this.$store.state.users.currentUser.show_role, + role: this.$store.state.users.currentUser.role, followList: null, followImportError: false, followsImported: false, @@ -71,6 +73,8 @@ const UserSettings = { const no_rich_text = this.newNoRichText const hide_follows = this.hideFollows const hide_followers = this.hideFollowers + const show_role = this.showRole + /* eslint-enable camelcase */ this.$store.state.api.backendInteractor .updateProfile({ @@ -83,7 +87,8 @@ const UserSettings = { default_scope, no_rich_text, hide_follows, - hide_followers + hide_followers, + show_role /* eslint-enable camelcase */ }}).then((user) => { if (!user.error) { diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 19b7bdbd..ea5b3de5 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -37,6 +37,11 @@ <input type="checkbox" v-model="hideFollowers" id="account-hide-followers"> <label for="account-hide-followers">{{$t('settings.hide_followers_description')}}</label> </p> + <p> + <input type="checkbox" v-model="showRole" id="account-show-role"> + <label for="account-show-role" v-if="role === 'admin'">{{$t('settings.show_admin_badge')}}</label> + <label for="account-show-role" v-if="role === 'moderator'">{{$t('settings.show_moderator_badge')}}</label> + </p> <button :disabled='newName && newName.length === 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button> </div> <div class="setting-item"> |
