aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-01-09 18:22:57 +0100
committertechknowlogick <hello@techknowlogick.com>2019-01-09 12:22:57 -0500
commit8d2c24f7f9b9bce3a806e4748623bd3b2742025b (patch)
tree2010e6ffaf542d0828c496c31afa56f816c069d5 /templates/user
parentea518681d95c9ef8ae5ed71d6d8cd7cfb6994a50 (diff)
downloadgitea-8d2c24f7f9b9bce3a806e4748623bd3b2742025b.tar.gz
gitea-8d2c24f7f9b9bce3a806e4748623bd3b2742025b.zip
Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/account.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl
index 56c3df7f84..778103e44d 100644
--- a/templates/user/settings/account.tmpl
+++ b/templates/user/settings/account.tmpl
@@ -85,6 +85,44 @@
</form>
</div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.manage_themes"}}
+ </h4>
+ <div class="ui attached segment">
+ <div class="ui email list">
+ <div class="item">
+ {{.i18n.Tr "settings.theme_desc"}}
+ </div>
+
+ <form class="ui form" action="{{.Link}}/theme" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="field">
+ <label for="ui">{{.i18n.Tr "settings.ui"}}</label>
+ <div class="ui selection dropdown" id="ui">
+ <input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
+ <i class="dropdown icon"></i>
+ <div class="text">
+ {{range $i,$a := .AllThemes}}
+ {{if eq $.SignedUser.Theme $a}}{{$a}}{{end}}
+ {{end}}
+ </div>
+
+ <div class="menu">
+ {{range $i,$a := .AllThemes}}
+ <div class="item{{if eq $.SignedUser.Theme $a}} active selected{{end}}" data-value="{{$a}}">
+ {{$a}}
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.update_theme"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
<h4 class="ui top attached warning header">
{{.i18n.Tr "settings.delete_account"}}
</h4>