Skip to content

Commit

Permalink
settings: Show current user's role in Your Account.
Browse files Browse the repository at this point in the history
This makes it easier to figure out what's going on if you're a guest.

Fixes: zulip#10969.
  • Loading branch information
akashnimare authored and timabbott committed Dec 7, 2018
1 parent 78e20c8 commit e827e36
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/styles/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,10 @@ input[type=checkbox].inline-block {
width: auto;
}

#account-settings .user-role button {
cursor: default;
}

#account-settings .custom_user_field .field_hint {
color: hsl(0, 0%, 67%);
}
Expand Down
13 changes: 13 additions & 0 deletions static/templates/settings/account-settings.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@
</div>
</form>

<div class="user-role input-group grid">
<label for="user_role" class="inline-block title">{{t "Role" }}</label>
<button class="button small rounded">
{{#if page_params.is_admin}}
{{t "Administrator" }}
{{else if page_params.is_guest}}
{{t "Guest" }}
{{else}}
{{t "Member" }}
{{/if}}
</button>
</div>

<form class="deactivate_account grid">
<div class="input-group">
<button type="submit" class="button rounded btn-danger" id="user_deactivate_account_button">
Expand Down

0 comments on commit e827e36

Please sign in to comment.