From 99d770be643d36fe40fbb8ac54a5fa5f692aebf0 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 6 Feb 2022 21:51:02 +0100 Subject: Move user pages (ECR files) to subfolder --- src/invidious/routes/account.cr | 12 +- src/invidious/routes/api/v1/authenticated.cr | 2 +- src/invidious/routes/login.cr | 8 +- src/invidious/routes/preferences.cr | 4 +- src/invidious/routes/subscriptions.cr | 2 +- src/invidious/views/authorize_token.ecr | 78 ----- src/invidious/views/change_password.ecr | 32 -- src/invidious/views/clear_watch_history.ecr | 24 -- src/invidious/views/data_control.ecr | 58 ---- src/invidious/views/delete_account.ecr | 24 -- src/invidious/views/login.ecr | 113 ------- src/invidious/views/preferences.ecr | 351 ---------------------- src/invidious/views/subscription_manager.ecr | 54 ---- src/invidious/views/token_manager.ecr | 46 --- src/invidious/views/user/authorize_token.ecr | 78 +++++ src/invidious/views/user/change_password.ecr | 32 ++ src/invidious/views/user/clear_watch_history.ecr | 24 ++ src/invidious/views/user/data_control.ecr | 58 ++++ src/invidious/views/user/delete_account.ecr | 24 ++ src/invidious/views/user/login.ecr | 113 +++++++ src/invidious/views/user/preferences.ecr | 351 ++++++++++++++++++++++ src/invidious/views/user/subscription_manager.ecr | 54 ++++ src/invidious/views/user/token_manager.ecr | 46 +++ 23 files changed, 794 insertions(+), 794 deletions(-) delete mode 100644 src/invidious/views/authorize_token.ecr delete mode 100644 src/invidious/views/change_password.ecr delete mode 100644 src/invidious/views/clear_watch_history.ecr delete mode 100644 src/invidious/views/data_control.ecr delete mode 100644 src/invidious/views/delete_account.ecr delete mode 100644 src/invidious/views/login.ecr delete mode 100644 src/invidious/views/preferences.ecr delete mode 100644 src/invidious/views/subscription_manager.ecr delete mode 100644 src/invidious/views/token_manager.ecr create mode 100644 src/invidious/views/user/authorize_token.ecr create mode 100644 src/invidious/views/user/change_password.ecr create mode 100644 src/invidious/views/user/clear_watch_history.ecr create mode 100644 src/invidious/views/user/data_control.ecr create mode 100644 src/invidious/views/user/delete_account.ecr create mode 100644 src/invidious/views/user/login.ecr create mode 100644 src/invidious/views/user/preferences.ecr create mode 100644 src/invidious/views/user/subscription_manager.ecr create mode 100644 src/invidious/views/user/token_manager.ecr (limited to 'src') diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr index 2be0de37..9bb73136 100644 --- a/src/invidious/routes/account.cr +++ b/src/invidious/routes/account.cr @@ -23,7 +23,7 @@ module Invidious::Routes::Account sid = sid.as(String) csrf_token = generate_response(sid, {":change_password"}, HMAC_KEY) - templated "change_password" + templated "user/change_password" end # Handle the password change (POST request) @@ -103,7 +103,7 @@ module Invidious::Routes::Account sid = sid.as(String) csrf_token = generate_response(sid, {":delete_account"}, HMAC_KEY) - templated "delete_account" + templated "user/delete_account" end # Handle the account deletion (POST request) @@ -161,7 +161,7 @@ module Invidious::Routes::Account sid = sid.as(String) csrf_token = generate_response(sid, {":clear_watch_history"}, HMAC_KEY) - templated "clear_watch_history" + templated "user/clear_watch_history" end # Handle the watch history clearing (POST request) @@ -220,7 +220,7 @@ module Invidious::Routes::Account expire = env.params.query["expire"]?.try &.to_i? - templated "authorize_token" + templated "user/authorize_token" end # Handle token authorization (POST request) @@ -268,7 +268,7 @@ module Invidious::Routes::Account else csrf_token = "" env.set "access_token", access_token - templated "authorize_token" + templated "user/authorize_token" end end @@ -291,7 +291,7 @@ module Invidious::Routes::Account user = user.as(User) tokens = Invidious::Database::SessionIDs.select_all(user.email) - templated "token_manager" + templated "user/token_manager" end # ------------------- diff --git a/src/invidious/routes/api/v1/authenticated.cr b/src/invidious/routes/api/v1/authenticated.cr index 4e9fc801..c27853ca 100644 --- a/src/invidious/routes/api/v1/authenticated.cr +++ b/src/invidious/routes/api/v1/authenticated.cr @@ -343,7 +343,7 @@ module Invidious::Routes::API::V1::Authenticated env.response.content_type = "text/html" csrf_token = generate_response(sid, {":authorize_token"}, HMAC_KEY, use_nonce: true) - return templated "authorize_token" + return templated "user/authorize_token" else env.response.content_type = "application/json" diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr index 8767ec22..65b337d1 100644 --- a/src/invidious/routes/login.cr +++ b/src/invidious/routes/login.cr @@ -27,7 +27,7 @@ module Invidious::Routes::Login tfa = env.params.query["tfa"]? prompt = nil - templated "login" + templated "user/login" end def self.login(env) @@ -133,7 +133,7 @@ module Invidious::Routes::Login tfa = tfa_code captcha = {tokens: [token], question: ""} - return templated "login" + return templated "user/login" end if challenge_results[0][-1]?.try &.[5] == "INCORRECT_ANSWER_ENTERED" @@ -190,7 +190,7 @@ module Invidious::Routes::Login tfa = nil captcha = nil - return templated "login" + return templated "user/login" end tl = challenge_results[1][2] @@ -376,7 +376,7 @@ module Invidious::Routes::Login captcha = Invidious::User::Captcha.generate_text(HMAC_KEY) end - return templated "login" + return templated "user/login" end tokens = env.params.body.select { |k, _| k.match(/^token\[\d+\]$/) }.map { |_, v| v } diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 294932eb..68d61fd1 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -8,7 +8,7 @@ module Invidious::Routes::PreferencesRoute preferences = env.get("preferences").as(Preferences) - templated "preferences" + templated "user/preferences" end def self.update(env) @@ -272,7 +272,7 @@ module Invidious::Routes::PreferencesRoute user = user.as(User) - templated "data_control" + templated "user/data_control" end def self.update_data_control(env) diff --git a/src/invidious/routes/subscriptions.cr b/src/invidious/routes/subscriptions.cr index ec8fe67b..7b1fa876 100644 --- a/src/invidious/routes/subscriptions.cr +++ b/src/invidious/routes/subscriptions.cr @@ -163,6 +163,6 @@ module Invidious::Routes::Subscriptions end end - templated "subscription_manager" + templated "user/subscription_manager" end end diff --git a/src/invidious/views/authorize_token.ecr b/src/invidious/views/authorize_token.ecr deleted file mode 100644 index 725f392e..00000000 --- a/src/invidious/views/authorize_token.ecr +++ /dev/null @@ -1,78 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Token") %> - Invidious -<% end %> - -<% if env.get? "access_token" %> -
-
-

- <%= translate(locale, "Token") %> -

-
- - -
- -
-

- <%= env.get "access_token" %> -

-
-<% else %> -
-
- <% if callback_url %> - <%= translate(locale, "Authorize token for `x`?", "#{callback_url.scheme}://#{callback_url.host}") %> - <% else %> - <%= translate(locale, "Authorize token?") %> - <% end %> - -
-
-
    - <% scopes.each do |scope| %> -
  • <%= HTML.escape(scope) %>
  • - <% end %> -
-
-
- -
-
- -
- -
- - <% scopes.each_with_index do |scope, i| %> - - <% end %> - <% if callback_url %> - - <% end %> - <% if expire %> - - <% end %> - - -
-
-<% end %> diff --git a/src/invidious/views/change_password.ecr b/src/invidious/views/change_password.ecr deleted file mode 100644 index 1b9eb82e..00000000 --- a/src/invidious/views/change_password.ecr +++ /dev/null @@ -1,32 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Change password") %> - Invidious -<% end %> - -
-
-
-
-
- <%= translate(locale, "Change password") %> - -
- - "> - - - "> - - - "> - - - - -
-
-
-
-
-
diff --git a/src/invidious/views/clear_watch_history.ecr b/src/invidious/views/clear_watch_history.ecr deleted file mode 100644 index c9acbe44..00000000 --- a/src/invidious/views/clear_watch_history.ecr +++ /dev/null @@ -1,24 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Clear watch history") %> - Invidious -<% end %> - -
-
- <%= translate(locale, "Clear watch history?") %> - -
-
- -
- -
- - -
-
diff --git a/src/invidious/views/data_control.ecr b/src/invidious/views/data_control.ecr deleted file mode 100644 index 74ccc06c..00000000 --- a/src/invidious/views/data_control.ecr +++ /dev/null @@ -1,58 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Import and Export Data") %> - Invidious -<% end %> - -
-
-
- <%= translate(locale, "Import") %> - -
- - -
- - - -
- - -
- -
- - -
- -
- - -
- -
- -
- - <%= translate(locale, "Export") %> - - - - - - -
-
-
diff --git a/src/invidious/views/delete_account.ecr b/src/invidious/views/delete_account.ecr deleted file mode 100644 index 67351bbf..00000000 --- a/src/invidious/views/delete_account.ecr +++ /dev/null @@ -1,24 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Delete account") %> - Invidious -<% end %> - -
-
- <%= translate(locale, "Delete account?") %> - -
-
- -
- -
- - -
-
diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr deleted file mode 100644 index 01d7a210..00000000 --- a/src/invidious/views/login.ecr +++ /dev/null @@ -1,113 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Log in") %> - Invidious -<% end %> - -
-
-
-
- <% case account_type when %> - <% when "google" %> -
-
- <% if email %> - - <% else %> - - "> - <% end %> - - <% if password %> - - <% else %> - - "> - <% end %> - - <% if prompt %> - - - <% end %> - - <% if tfa %> - - <% end %> - - <% if captcha %> - - - - "> - <% end %> - - -
-
- <% else # "invidious" %> -
-
- <% if email %> - - <% else %> - - "> - <% end %> - - <% if password %> - - <% else %> - - "> - <% end %> - - <% if captcha %> - <% case captcha_type when %> - <% when "image" %> - <% captcha = captcha.not_nil! %> - - <% captcha[:tokens].each_with_index do |token, i| %> - - <% end %> - - - - <% else # "text" %> - <% captcha = captcha.not_nil! %> - <% captcha[:tokens].each_with_index do |token, i| %> - - <% end %> - - - "> - <% end %> - - - - <% case captcha_type when %> - <% when "image" %> - - <% else # "text" %> - - <% end %> - <% else %> - - <% end %> -
-
- <% end %> -
-
-
-
diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr deleted file mode 100644 index 3606d140..00000000 --- a/src/invidious/views/preferences.ecr +++ /dev/null @@ -1,351 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Preferences") %> - Invidious -<% end %> - -
-
-
- <%= translate(locale, "preferences_category_player") %> - -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>> -
- -
- - checked<% end %>> -
- -
- - -
- -
- - -
- - <% if !CONFIG.disabled?("dash") %> -
- - -
- <% end %> - -
- - - <%= preferences.volume %> -
- -
- - <% preferences.comments.each_with_index do |comments, index| %> - - <% end %> -
- -
- - <% preferences.captions.each_with_index do |caption, index| %> - - <% end %> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- - <%= translate(locale, "preferences_category_visual") %> - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - checked<% end %>> -
- - <% if env.get?("user") %> - <% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists"} %> - <% else %> - <% feed_options = {"", "Popular", "Trending"} %> - <% end %> - -
- - -
- -
- - <% (feed_options.size - 1).times do |index| %> - - <% end %> -
- <% if env.get? "user" %> -
- - checked<% end %>> -
- <% end %> - - <%= translate(locale, "preferences_category_misc") %> - -
- - checked<% end %>> -
- - <% if env.get? "user" %> - <%= translate(locale, "preferences_category_subscription") %> - -
- - checked<% end %>> -
- -
- - -
- -
- - -
- -
- <% if preferences.unseen_only %> - - <% else %> - - <% end %> - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- - <% # Web notifications are only supported over HTTPS %> - <% if Kemal.config.ssl || CONFIG.https_only %> - - <% end %> - <% end %> - - <% if env.get?("user") && CONFIG.admins.includes? env.get?("user").as(Invidious::User).email %> - <%= translate(locale, "preferences_category_admin") %> - -
- - -
- -
- - <% (feed_options.size - 1).times do |index| %> - - <% end %> -
- -
- - checked<% end %>> -
- - -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- -
- - checked<% end %>> -
- <% end %> - - <% if env.get? "user" %> - <%= translate(locale, "preferences_category_data") %> - - - - - - - - - - - - - - - - - <% end %> - -
- -
-
-
-
diff --git a/src/invidious/views/subscription_manager.ecr b/src/invidious/views/subscription_manager.ecr deleted file mode 100644 index c2a89ca2..00000000 --- a/src/invidious/views/subscription_manager.ecr +++ /dev/null @@ -1,54 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Subscription manager") %> - Invidious -<% end %> - -
- - - -
- -<% subscriptions.each do |channel| %> -
-
- -
-
-

-
" method="post"> - "> - - "> - -
-

-
-
- - <% if subscriptions[-1].author != channel.author %> -
- <% end %> -
-<% end %> diff --git a/src/invidious/views/token_manager.ecr b/src/invidious/views/token_manager.ecr deleted file mode 100644 index 79f905a1..00000000 --- a/src/invidious/views/token_manager.ecr +++ /dev/null @@ -1,46 +0,0 @@ -<% content_for "header" do %> -<%= translate(locale, "Token manager") %> - Invidious -<% end %> - -
-
-

- <%= translate_count(locale, "tokens_count", tokens.size, NumberFormatting::HtmlSpan) %> -

-
-
- -
- -<% tokens.each do |token| %> -
-
-
-

- <%= token[:session] %> -

-
-
-

<%= translate(locale, "`x` ago", recode_date(token[:issued], locale)) %>

-
-
-

-
" method="post"> - "> - - "> - -
-

-
-
- - <% if tokens[-1].try &.[:session]? != token[:session] %> -
- <% end %> -
-<% end %> diff --git a/src/invidious/views/user/authorize_token.ecr b/src/invidious/views/user/authorize_token.ecr new file mode 100644 index 00000000..725f392e --- /dev/null +++ b/src/invidious/views/user/authorize_token.ecr @@ -0,0 +1,78 @@ +<% content_for "header" do %> +<%= translate(locale, "Token") %> - Invidious +<% end %> + +<% if env.get? "access_token" %> +
+
+

+ <%= translate(locale, "Token") %> +

+
+ + +
+ +
+

+ <%= env.get "access_token" %> +

+
+<% else %> +
+
+ <% if callback_url %> + <%= translate(locale, "Authorize token for `x`?", "#{callback_url.scheme}://#{callback_url.host}") %> + <% else %> + <%= translate(locale, "Authorize token?") %> + <% end %> + +
+
+
    + <% scopes.each do |scope| %> +
  • <%= HTML.escape(scope) %>
  • + <% end %> +
+
+
+ +
+
+ +
+ +
+ + <% scopes.each_with_index do |scope, i| %> + + <% end %> + <% if callback_url %> + + <% end %> + <% if expire %> + + <% end %> + + +
+
+<% end %> diff --git a/src/invidious/views/user/change_password.ecr b/src/invidious/views/user/change_password.ecr new file mode 100644 index 00000000..1b9eb82e --- /dev/null +++ b/src/invidious/views/user/change_password.ecr @@ -0,0 +1,32 @@ +<% content_for "header" do %> +<%= translate(locale, "Change password") %> - Invidious +<% end %> + +
+
+
+
+
+ <%= translate(locale, "Change password") %> + +
+ + "> + + + "> + + + "> + + + + +
+
+
+
+
+
diff --git a/src/invidious/views/user/clear_watch_history.ecr b/src/invidious/views/user/clear_watch_history.ecr new file mode 100644 index 00000000..c9acbe44 --- /dev/null +++ b/src/invidious/views/user/clear_watch_history.ecr @@ -0,0 +1,24 @@ +<% content_for "header" do %> +<%= translate(locale, "Clear watch history") %> - Invidious +<% end %> + +
+
+ <%= translate(locale, "Clear watch history?") %> + +
+
+ +
+ +
+ + +
+
diff --git a/src/invidious/views/user/data_control.ecr b/src/invidious/views/user/data_control.ecr new file mode 100644 index 00000000..74ccc06c --- /dev/null +++ b/src/invidious/views/user/data_control.ecr @@ -0,0 +1,58 @@ +<% content_for "header" do %> +<%= translate(locale, "Import and Export Data") %> - Invidious +<% end %> + +
+
+
+ <%= translate(locale, "Import") %> + +
+ + +
+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + <%= translate(locale, "Export") %> + + + + + + +
+
+
diff --git a/src/invidious/views/user/delete_account.ecr b/src/invidious/views/user/delete_account.ecr new file mode 100644 index 00000000..67351bbf --- /dev/null +++ b/src/invidious/views/user/delete_account.ecr @@ -0,0 +1,24 @@ +<% content_for "header" do %> +<%= translate(locale, "Delete account") %> - Invidious +<% end %> + +
+
+ <%= translate(locale, "Delete account?") %> + +
+
+ +
+ +
+ + +
+
diff --git a/src/invidious/views/user/login.ecr b/src/invidious/views/user/login.ecr new file mode 100644 index 00000000..01d7a210 --- /dev/null +++ b/src/invidious/views/user/login.ecr @@ -0,0 +1,113 @@ +<% content_for "header" do %> +<%= translate(locale, "Log in") %> - Invidious +<% end %> + +
+
+
+
+ <% case account_type when %> + <% when "google" %> +
+
+ <% if email %> + + <% else %> + + "> + <% end %> + + <% if password %> + + <% else %> + + "> + <% end %> + + <% if prompt %> + + + <% end %> + + <% if tfa %> + + <% end %> + + <% if captcha %> + + + + "> + <% end %> + + +
+
+ <% else # "invidious" %> +
+
+ <% if email %> + + <% else %> + + "> + <% end %> + + <% if password %> + + <% else %> + + "> + <% end %> + + <% if captcha %> + <% case captcha_type when %> + <% when "image" %> + <% captcha = captcha.not_nil! %> + + <% captcha[:tokens].each_with_index do |token, i| %> + + <% end %> + + + + <% else # "text" %> + <% captcha = captcha.not_nil! %> + <% captcha[:tokens].each_with_index do |token, i| %> + + <% end %> + + + "> + <% end %> + + + + <% case captcha_type when %> + <% when "image" %> + + <% else # "text" %> + + <% end %> + <% else %> + + <% end %> +
+
+ <% end %> +
+
+
+
diff --git a/src/invidious/views/user/preferences.ecr b/src/invidious/views/user/preferences.ecr new file mode 100644 index 00000000..3606d140 --- /dev/null +++ b/src/invidious/views/user/preferences.ecr @@ -0,0 +1,351 @@ +<% content_for "header" do %> +<%= translate(locale, "Preferences") %> - Invidious +<% end %> + +
+
+
+ <%= translate(locale, "preferences_category_player") %> + +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + +
+ +
+ + +
+ + <% if !CONFIG.disabled?("dash") %> +
+ + +
+ <% end %> + +
+ + + <%= preferences.volume %> +
+ +
+ + <% preferences.comments.each_with_index do |comments, index| %> + + <% end %> +
+ +
+ + <% preferences.captions.each_with_index do |caption, index| %> + + <% end %> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ + <%= translate(locale, "preferences_category_visual") %> + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + checked<% end %>> +
+ + <% if env.get?("user") %> + <% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists"} %> + <% else %> + <% feed_options = {"", "Popular", "Trending"} %> + <% end %> + +
+ + +
+ +
+ + <% (feed_options.size - 1).times do |index| %> + + <% end %> +
+ <% if env.get? "user" %> +
+ + checked<% end %>> +
+ <% end %> + + <%= translate(locale, "preferences_category_misc") %> + +
+ + checked<% end %>> +
+ + <% if env.get? "user" %> + <%= translate(locale, "preferences_category_subscription") %> + +
+ + checked<% end %>> +
+ +
+ + +
+ +
+ + +
+ +
+ <% if preferences.unseen_only %> + + <% else %> + + <% end %> + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ + <% # Web notifications are only supported over HTTPS %> + <% if Kemal.config.ssl || CONFIG.https_only %> + + <% end %> + <% end %> + + <% if env.get?("user") && CONFIG.admins.includes? env.get?("user").as(Invidious::User).email %> + <%= translate(locale, "preferences_category_admin") %> + +
+ + +
+ +
+ + <% (feed_options.size - 1).times do |index| %> + + <% end %> +
+ +
+ + checked<% end %>> +
+ + +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ +
+ + checked<% end %>> +
+ <% end %> + + <% if env.get? "user" %> + <%= translate(locale, "preferences_category_data") %> + + + + + + + + + + + + + + + + + <% end %> + +
+ +
+
+
+
diff --git a/src/invidious/views/user/subscription_manager.ecr b/src/invidious/views/user/subscription_manager.ecr new file mode 100644 index 00000000..c2a89ca2 --- /dev/null +++ b/src/invidious/views/user/subscription_manager.ecr @@ -0,0 +1,54 @@ +<% content_for "header" do %> +<%= translate(locale, "Subscription manager") %> - Invidious +<% end %> + +
+ + + +
+ +<% subscriptions.each do |channel| %> +
+
+ +
+
+

+
" method="post"> + "> + + "> + +
+

+
+
+ + <% if subscriptions[-1].author != channel.author %> +
+ <% end %> +
+<% end %> diff --git a/src/invidious/views/user/token_manager.ecr b/src/invidious/views/user/token_manager.ecr new file mode 100644 index 00000000..79f905a1 --- /dev/null +++ b/src/invidious/views/user/token_manager.ecr @@ -0,0 +1,46 @@ +<% content_for "header" do %> +<%= translate(locale, "Token manager") %> - Invidious +<% end %> + +
+
+

+ <%= translate_count(locale, "tokens_count", tokens.size, NumberFormatting::HtmlSpan) %> +

+
+
+ +
+ +<% tokens.each do |token| %> +
+
+
+

+ <%= token[:session] %> +

+
+
+

<%= translate(locale, "`x` ago", recode_date(token[:issued], locale)) %>

+
+
+

+
" method="post"> + "> + + "> + +
+

+
+
+ + <% if tokens[-1].try &.[:session]? != token[:session] %> +
+ <% end %> +
+<% end %> -- cgit v1.2.3