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
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
32 changed files with 72 additions and 0 deletions

View File

@ -117,6 +117,8 @@
"Administrator preferences": "إعدادات المدير", "Administrator preferences": "إعدادات المدير",
"Default homepage: ": "الصفحة الرئيسية الافتراضية ", "Default homepage: ": "الصفحة الرئيسية الافتراضية ",
"Feed menu: ": "قائمة التدفقات: ", "Feed menu: ": "قائمة التدفقات: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "تفعيل 'الأفضل' ؟ ", "Top enabled: ": "تفعيل 'الأفضل' ؟ ",
"CAPTCHA enabled: ": "تفعيل الكابتشا: ", "CAPTCHA enabled: ": "تفعيل الكابتشا: ",
"Login enabled: ": "تفعيل الولوج: ", "Login enabled: ": "تفعيل الولوج: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Administrator-Einstellungen", "Administrator preferences": "Administrator-Einstellungen",
"Default homepage: ": "Standard-Startseite: ", "Default homepage: ": "Standard-Startseite: ",
"Feed menu: ": "Feed-Menü: ", "Feed menu: ": "Feed-Menü: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top aktiviert? ", "Top enabled: ": "Top aktiviert? ",
"CAPTCHA enabled: ": "CAPTCHA aktiviert? ", "CAPTCHA enabled: ": "CAPTCHA aktiviert? ",
"Login enabled: ": "Anmeldung aktiviert: ", "Login enabled: ": "Anmeldung aktiviert: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Προτιμήσεις διαχειριστή", "Administrator preferences": "Προτιμήσεις διαχειριστή",
"Default homepage: ": "Προεπιλεγμένη αρχική: ", "Default homepage: ": "Προεπιλεγμένη αρχική: ",
"Feed menu: ": "Μενού ροής συνδρομών: ", "Feed menu: ": "Μενού ροής συνδρομών: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Ενεργοποίηση κορυφαίων; ", "Top enabled: ": "Ενεργοποίηση κορυφαίων; ",
"CAPTCHA enabled: ": "Ενεργοποίηση CAPTCHA; ", "CAPTCHA enabled: ": "Ενεργοποίηση CAPTCHA; ",
"Login enabled: ": "Ενεργοποίηση σύνδεσης; ", "Login enabled: ": "Ενεργοποίηση σύνδεσης; ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Administrator preferences", "Administrator preferences": "Administrator preferences",
"Default homepage: ": "Default homepage: ", "Default homepage: ": "Default homepage: ",
"Feed menu: ": "Feed menu: ", "Feed menu: ": "Feed menu: ",
"Show nickname on top: ": "Show nickname on top: ",
"Welcome, `x`": "Welcome, `x`",
"Top enabled: ": "Top enabled: ", "Top enabled: ": "Top enabled: ",
"CAPTCHA enabled: ": "CAPTCHA enabled: ", "CAPTCHA enabled: ": "CAPTCHA enabled: ",
"Login enabled: ": "Login enabled: ", "Login enabled: ": "Login enabled: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Agordoj de administranto", "Administrator preferences": "Agordoj de administranto",
"Default homepage: ": "Defaŭlta hejmpaĝo: ", "Default homepage: ": "Defaŭlta hejmpaĝo: ",
"Feed menu: ": "Flua menuo: ", "Feed menu: ": "Flua menuo: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Ĉu pli bonaj ŝaltitaj? ", "Top enabled: ": "Ĉu pli bonaj ŝaltitaj? ",
"CAPTCHA enabled: ": "Ĉu CAPTCHA ŝaltita? ", "CAPTCHA enabled: ": "Ĉu CAPTCHA ŝaltita? ",
"Login enabled: ": "Ĉu ensaluto aktivita? ", "Login enabled: ": "Ĉu ensaluto aktivita? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferencias de administrador", "Administrator preferences": "Preferencias de administrador",
"Default homepage: ": "Página de inicio por defecto: ", "Default homepage: ": "Página de inicio por defecto: ",
"Feed menu: ": "Menú de fuentes: ", "Feed menu: ": "Menú de fuentes: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "¿Habilitar los destacados? ", "Top enabled: ": "¿Habilitar los destacados? ",
"CAPTCHA enabled: ": "¿Habilitar los CAPTCHA? ", "CAPTCHA enabled: ": "¿Habilitar los CAPTCHA? ",
"Login enabled: ": "¿Habilitar el inicio de sesión? ", "Login enabled: ": "¿Habilitar el inicio de sesión? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "ترجیحات مدیریت", "Administrator preferences": "ترجیحات مدیریت",
"Default homepage: ": "صفحه خانه پیشفرض ", "Default homepage: ": "صفحه خانه پیشفرض ",
"Feed menu: ": "منو خوراک: ", "Feed menu: ": "منو خوراک: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "بالا فعال شده: ", "Top enabled: ": "بالا فعال شده: ",
"CAPTCHA enabled: ": "CAPTCHA فعال شده: ", "CAPTCHA enabled: ": "CAPTCHA فعال شده: ",
"Login enabled: ": "ورود فعال شده: ", "Login enabled: ": "ورود فعال شده: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Järjestelmänvalvojan asetukset", "Administrator preferences": "Järjestelmänvalvojan asetukset",
"Default homepage: ": "Oletuskotisivu: ", "Default homepage: ": "Oletuskotisivu: ",
"Feed menu: ": "Syötevalikko: ", "Feed menu: ": "Syötevalikko: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Yläosa käytössä: ", "Top enabled: ": "Yläosa käytössä: ",
"CAPTCHA enabled: ": "CAPTCHA käytössä: ", "CAPTCHA enabled: ": "CAPTCHA käytössä: ",
"Login enabled: ": "Kirjautuminen käytössä: ", "Login enabled: ": "Kirjautuminen käytössä: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Préferences d'Administration", "Administrator preferences": "Préferences d'Administration",
"Default homepage: ": "Page d'accueil par défaut : ", "Default homepage: ": "Page d'accueil par défaut : ",
"Feed menu: ": "Préferences des abonnements : ", "Feed menu: ": "Préferences des abonnements : ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top activé : ", "Top enabled: ": "Top activé : ",
"CAPTCHA enabled: ": "CAPTCHA activé : ", "CAPTCHA enabled: ": "CAPTCHA activé : ",
"Login enabled: ": "Autoriser l'ouverture de sessions utilisateur : ", "Login enabled: ": "Autoriser l'ouverture de sessions utilisateur : ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "הגדרות ניהול מערכת", "Administrator preferences": "הגדרות ניהול מערכת",
"Default homepage: ": "Default homepage: ", "Default homepage: ": "Default homepage: ",
"Feed menu: ": "תפריט ההזנה: ", "Feed menu: ": "תפריט ההזנה: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "", "Top enabled: ": "",
"CAPTCHA enabled: ": "", "CAPTCHA enabled: ": "",
"Login enabled: ": "", "Login enabled: ": "",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Postavke administratora", "Administrator preferences": "Postavke administratora",
"Default homepage: ": "Standardna početna stranica: ", "Default homepage: ": "Standardna početna stranica: ",
"Feed menu: ": "Izbornik za feedove: ", "Feed menu: ": "Izbornik za feedove: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Najbolji aktivirani: ", "Top enabled: ": "Najbolji aktivirani: ",
"CAPTCHA enabled: ": "Aktivirani CAPTCHA: ", "CAPTCHA enabled: ": "Aktivirani CAPTCHA: ",
"Login enabled: ": "Prijava aktivirana: ", "Login enabled: ": "Prijava aktivirana: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferensi administrator", "Administrator preferences": "Preferensi administrator",
"Default homepage: ": "Laman beranda default: ", "Default homepage: ": "Laman beranda default: ",
"Feed menu: ": "Menu umpan: ", "Feed menu: ": "Menu umpan: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Teratas diaktifkan: ", "Top enabled: ": "Teratas diaktifkan: ",
"CAPTCHA enabled: ": "CAPTCHA diaktifkan: ", "CAPTCHA enabled: ": "CAPTCHA diaktifkan: ",
"Login enabled: ": "Masuk diaktifkan: ", "Login enabled: ": "Masuk diaktifkan: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Kjörstillingar stjórnanda", "Administrator preferences": "Kjörstillingar stjórnanda",
"Default homepage: ": "Sjálfgefin heimasíða: ", "Default homepage: ": "Sjálfgefin heimasíða: ",
"Feed menu: ": "Straum valmynd: ", "Feed menu: ": "Straum valmynd: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Toppur virkur? ", "Top enabled: ": "Toppur virkur? ",
"CAPTCHA enabled: ": "CAPTCHA virk? ", "CAPTCHA enabled: ": "CAPTCHA virk? ",
"Login enabled: ": "Innskráning virk? ", "Login enabled: ": "Innskráning virk? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferenze amministratore", "Administrator preferences": "Preferenze amministratore",
"Default homepage: ": "Pagina principale predefinita: ", "Default homepage: ": "Pagina principale predefinita: ",
"Feed menu: ": "Menu iscrizioni: ", "Feed menu: ": "Menu iscrizioni: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top abilitato: ", "Top enabled: ": "Top abilitato: ",
"CAPTCHA enabled: ": "CAPTCHA attivati: ", "CAPTCHA enabled: ": "CAPTCHA attivati: ",
"Login enabled: ": "Accesso attivato: ", "Login enabled: ": "Accesso attivato: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "管理者設定", "Administrator preferences": "管理者設定",
"Default homepage: ": "デフォルトのホーム: ", "Default homepage: ": "デフォルトのホーム: ",
"Feed menu: ": "フィードメニュー: ", "Feed menu: ": "フィードメニュー: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "トップページを有効化: ", "Top enabled: ": "トップページを有効化: ",
"CAPTCHA enabled: ": "CAPTCHA を有効化: ", "CAPTCHA enabled: ": "CAPTCHA を有効化: ",
"Login enabled: ": "ログインを有効化: ", "Login enabled: ": "ログインを有効化: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Administratorinnstillinger", "Administrator preferences": "Administratorinnstillinger",
"Default homepage: ": "Forvalgt hjemmeside: ", "Default homepage: ": "Forvalgt hjemmeside: ",
"Feed menu: ": "Kilde-meny: ", "Feed menu: ": "Kilde-meny: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Topp påskrudd? ", "Top enabled: ": "Topp påskrudd? ",
"CAPTCHA enabled: ": "CAPTCHA påskrudd? ", "CAPTCHA enabled: ": "CAPTCHA påskrudd? ",
"Login enabled: ": "Innlogging påskrudd? ", "Login enabled: ": "Innlogging påskrudd? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Beheerdersinstellingen", "Administrator preferences": "Beheerdersinstellingen",
"Default homepage: ": "Standaard startpagina: ", "Default homepage: ": "Standaard startpagina: ",
"Feed menu: ": "Feedmenu: ", "Feed menu: ": "Feedmenu: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Bovenkant inschakelen? ", "Top enabled: ": "Bovenkant inschakelen? ",
"CAPTCHA enabled: ": "CAPTCHA gebruiken? ", "CAPTCHA enabled: ": "CAPTCHA gebruiken? ",
"Login enabled: ": "Inloggen toestaan? ", "Login enabled: ": "Inloggen toestaan? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferencje administratora", "Administrator preferences": "Preferencje administratora",
"Default homepage: ": "Domyślna strona główna: ", "Default homepage: ": "Domyślna strona główna: ",
"Feed menu: ": "Menu aktualności: ", "Feed menu: ": "Menu aktualności: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "\"Top\" aktywne: ", "Top enabled: ": "\"Top\" aktywne: ",
"CAPTCHA enabled: ": "CAPTCHA aktywna? ", "CAPTCHA enabled: ": "CAPTCHA aktywna? ",
"Login enabled: ": "Logowanie włączone? ", "Login enabled: ": "Logowanie włączone? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferências de administrador", "Administrator preferences": "Preferências de administrador",
"Default homepage: ": "Página de início padrão: ", "Default homepage: ": "Página de início padrão: ",
"Feed menu: ": "Menu do feed: ", "Feed menu: ": "Menu do feed: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Habilitar destaques: ", "Top enabled: ": "Habilitar destaques: ",
"CAPTCHA enabled: ": "Habilitar CAPTCHA: ", "CAPTCHA enabled: ": "Habilitar CAPTCHA: ",
"Login enabled: ": "Habilitar login: ", "Login enabled: ": "Habilitar login: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferências de administrador", "Administrator preferences": "Preferências de administrador",
"Default homepage: ": "Página inicial predefinida: ", "Default homepage: ": "Página inicial predefinida: ",
"Feed menu: ": "Menu de subscrições: ", "Feed menu: ": "Menu de subscrições: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top ativado: ", "Top enabled: ": "Top ativado: ",
"CAPTCHA enabled: ": "CAPTCHA ativado: ", "CAPTCHA enabled: ": "CAPTCHA ativado: ",
"Login enabled: ": "Iniciar sessão ativado: ", "Login enabled: ": "Iniciar sessão ativado: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Preferințele Administratorului", "Administrator preferences": "Preferințele Administratorului",
"Default homepage: ": "Pagina principală implicită: ", "Default homepage: ": "Pagina principală implicită: ",
"Feed menu: ": "Preferințe legate de pagina de abonamente: ", "Feed menu: ": "Preferințe legate de pagina de abonamente: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top activat: ", "Top enabled: ": "Top activat: ",
"CAPTCHA enabled: ": "CAPTCHA activat : ", "CAPTCHA enabled: ": "CAPTCHA activat : ",
"Login enabled: ": "Autentificare activată : ", "Login enabled: ": "Autentificare activată : ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Администраторские настройки", "Administrator preferences": "Администраторские настройки",
"Default homepage: ": "Главная страница по умолчанию: ", "Default homepage: ": "Главная страница по умолчанию: ",
"Feed menu: ": "Меню ленты видео: ", "Feed menu: ": "Меню ленты видео: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Включить топ видео? ", "Top enabled: ": "Включить топ видео? ",
"CAPTCHA enabled: ": "Включить капчу? ", "CAPTCHA enabled: ": "Включить капчу? ",
"Login enabled: ": "Включить авторизацию? ", "Login enabled: ": "Включить авторизацию? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Administratörsinställningar", "Administrator preferences": "Administratörsinställningar",
"Default homepage: ": "Förvald hemsida: ", "Default homepage: ": "Förvald hemsida: ",
"Feed menu: ": "Flödesmeny: ", "Feed menu: ": "Flödesmeny: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Topp påslaget? ", "Top enabled: ": "Topp påslaget? ",
"CAPTCHA enabled: ": "CAPTCHA påslaget? ", "CAPTCHA enabled: ": "CAPTCHA påslaget? ",
"Login enabled: ": "Inloggning påslaget? ", "Login enabled: ": "Inloggning påslaget? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Yönetici tercihleri", "Administrator preferences": "Yönetici tercihleri",
"Default homepage: ": "Öntanımlı ana sayfa: ", "Default homepage: ": "Öntanımlı ana sayfa: ",
"Feed menu: ": "Akış menüsü: ", "Feed menu: ": "Akış menüsü: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Top etkin: ", "Top enabled: ": "Top etkin: ",
"CAPTCHA enabled: ": "CAPTCHA etkin: ", "CAPTCHA enabled: ": "CAPTCHA etkin: ",
"Login enabled: ": "Oturum açma etkin: ", "Login enabled: ": "Oturum açma etkin: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "Адміністраторські налаштування", "Administrator preferences": "Адміністраторські налаштування",
"Default homepage: ": "Усталена домашня сторінка: ", "Default homepage: ": "Усталена домашня сторінка: ",
"Feed menu: ": "Меню потоку з відео: ", "Feed menu: ": "Меню потоку з відео: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "Увімкнути топ відео? ", "Top enabled: ": "Увімкнути топ відео? ",
"CAPTCHA enabled: ": "Увімкнути капчу? ", "CAPTCHA enabled: ": "Увімкнути капчу? ",
"Login enabled: ": "Увімкнути авторизацію? ", "Login enabled: ": "Увімкнути авторизацію? ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "管理员选项", "Administrator preferences": "管理员选项",
"Default homepage: ": "默认主页: ", "Default homepage: ": "默认主页: ",
"Feed menu: ": "Feed 菜单: ", "Feed menu: ": "Feed 菜单: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "是否启用“热门视频”页: ", "Top enabled: ": "是否启用“热门视频”页: ",
"CAPTCHA enabled: ": "是否启用验证码: ", "CAPTCHA enabled: ": "是否启用验证码: ",
"Login enabled: ": "是否启用登录: ", "Login enabled: ": "是否启用登录: ",

View File

@ -117,6 +117,8 @@
"Administrator preferences": "管理員偏好設定", "Administrator preferences": "管理員偏好設定",
"Default homepage: ": "預設首頁: ", "Default homepage: ": "預設首頁: ",
"Feed menu: ": "Feed 選單: ", "Feed menu: ": "Feed 選單: ",
"Show nickname on top: ": "",
"Welcome, `x`": "",
"Top enabled: ": "頂部啟用: ", "Top enabled: ": "頂部啟用: ",
"CAPTCHA enabled: ": "CAPTCHA 啟用: ", "CAPTCHA enabled: ": "CAPTCHA 啟用: ",
"Login enabled: ": "啟用登入: ", "Login enabled: ": "啟用登入: ",

View File

@ -54,6 +54,7 @@ struct ConfigPreferences
property extend_desc : Bool = false property extend_desc : Bool = false
property volume : Int32 = 100 property volume : Int32 = 100
property vr_mode : Bool = true property vr_mode : Bool = true
property show_nick : Bool = true
def to_tuple def to_tuple
{% begin %} {% begin %}

View File

@ -68,6 +68,10 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute
vr_mode ||= "off" vr_mode ||= "off"
vr_mode = vr_mode == "on" vr_mode = vr_mode == "on"
show_nick = env.params.body["show_nick"]?.try &.as(String)
show_nick ||= "off"
show_nick = show_nick == "on"
comments = [] of String comments = [] of String
2.times do |i| 2.times do |i|
comments << (env.params.body["comments[#{i}]"]?.try &.as(String) || CONFIG.default_user_preferences.comments[i]) comments << (env.params.body["comments[#{i}]"]?.try &.as(String) || CONFIG.default_user_preferences.comments[i])
@ -155,6 +159,7 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute
volume: volume, volume: volume,
extend_desc: extend_desc, extend_desc: extend_desc,
vr_mode: vr_mode, vr_mode: vr_mode,
show_nick: show_nick,
}.to_json).to_json }.to_json).to_json
if user = env.get? "user" if user = env.get? "user"

View File

@ -55,6 +55,7 @@ struct Preferences
property listen : Bool = CONFIG.default_user_preferences.listen property listen : Bool = CONFIG.default_user_preferences.listen
property local : Bool = CONFIG.default_user_preferences.local property local : Bool = CONFIG.default_user_preferences.local
property vr_mode : Bool = CONFIG.default_user_preferences.vr_mode property vr_mode : Bool = CONFIG.default_user_preferences.vr_mode
property show_nick : Bool = CONFIG.default_user_preferences.show_nick
@[JSON::Field(converter: Preferences::ProcessString)] @[JSON::Field(converter: Preferences::ProcessString)]
property locale : String = CONFIG.default_user_preferences.locale property locale : String = CONFIG.default_user_preferences.locale

View File

@ -175,6 +175,12 @@
</select> </select>
<% end %> <% end %>
</div> </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> <legend><%= translate(locale, "Miscellaneous preferences") %></legend>

View File

@ -67,6 +67,11 @@
<i class="icon ion-ios-cog"></i> <i class="icon ion-ios-cog"></i>
</a> </a>
</div> </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"> <div class="pure-u-1-4">
<form action="/signout?referer=<%= env.get?("current_page") %>" method="post"> <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) || "") %>"> <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">