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

@@ -68,6 +68,10 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute
vr_mode ||= "off"
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
2.times do |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,
extend_desc: extend_desc,
vr_mode: vr_mode,
show_nick: show_nick,
}.to_json).to_json
if user = env.get? "user"