mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
Display username in header
This commit is contained in:
committed by
syeopite
parent
00425670d7
commit
90c907710c
@@ -175,6 +175,12 @@
|
||||
</select>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if env.get? "user" %>
|
||||
<div class="pure-control-group">
|
||||
<label for="show_nick"><%= translate(locale, "Show nickname on top: ") %></label>
|
||||
<input name="show_nick" id="show_nick" type="checkbox" <% if preferences.show_nick %>checked<% end %>>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<legend><%= translate(locale, "Miscellaneous preferences") %></legend>
|
||||
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
<i class="icon ion-ios-cog"></i>
|
||||
</a>
|
||||
</div>
|
||||
<% if env.get("preferences").as(Preferences).show_nick %>
|
||||
<div class="pure-u-1-4">
|
||||
<span id="user_name"><%= translate(locale, "Welcome, `x`", env.get("user").as(User).email) %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pure-u-1-4">
|
||||
<form action="/signout?referer=<%= env.get?("current_page") %>" method="post">
|
||||
<input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
|
||||
|
||||
Reference in New Issue
Block a user