Display username in header

This commit is contained in:
Mateusz Makowski
2020-02-23 13:23:25 +01:00
committed by syeopite
parent 00425670d7
commit 90c907710c
32 changed files with 72 additions and 0 deletions

View File

@@ -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) || "") %>">