Add History feed menu
This commit is contained in:
parent
03bf4592ce
commit
d1051efd6e
7 changed files with 14 additions and 4 deletions
|
@ -163,6 +163,7 @@
|
|||
"unsubscribe": "unsubscribe",
|
||||
"revoke": "revoke",
|
||||
"Subscriptions": "Subscriptions",
|
||||
"History": "History",
|
||||
"subscriptions_unseen_notifs_count": "{{count}} unseen notification",
|
||||
"subscriptions_unseen_notifs_count_plural": "{{count}} unseen notifications",
|
||||
"search": "search",
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
"unsubscribe": "desuscribirse",
|
||||
"revoke": "revocar",
|
||||
"Subscriptions": "Suscripciones",
|
||||
"History": "Historial",
|
||||
"search": "buscar",
|
||||
"Log out": "Cerrar la sesión",
|
||||
"Released under the AGPLv3 on Github.": "Publicado bajo la AGPLv3 en GitHub.",
|
||||
|
|
|
@ -30,7 +30,7 @@ struct ConfigPreferences
|
|||
property quality : String = "hd720"
|
||||
property quality_dash : String = "auto"
|
||||
property default_home : String? = "Popular"
|
||||
property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists"]
|
||||
property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists", "History"]
|
||||
property automatic_instance_redirect : Bool = false
|
||||
property region : String = "US"
|
||||
property related_videos : Bool = true
|
||||
|
|
|
@ -23,6 +23,12 @@ module Invidious::Routes::Misc
|
|||
else
|
||||
env.redirect "/feed/popular"
|
||||
end
|
||||
when "History"
|
||||
if user
|
||||
env.redirect "/feed/history"
|
||||
else
|
||||
env.redirect "/feed/popular"
|
||||
end
|
||||
else
|
||||
templated "search_homepage", navbar_search: false
|
||||
end
|
||||
|
|
|
@ -99,7 +99,7 @@ module Invidious::Routes::PreferencesRoute
|
|||
default_home = env.params.body["default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
|
||||
|
||||
feed_menu = [] of String
|
||||
4.times do |index|
|
||||
5.times do |index|
|
||||
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
|
||||
if !option.empty?
|
||||
feed_menu << option
|
||||
|
@ -186,7 +186,7 @@ module Invidious::Routes::PreferencesRoute
|
|||
CONFIG.default_user_preferences.default_home = env.params.body["admin_default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
|
||||
|
||||
admin_feed_menu = [] of String
|
||||
4.times do |index|
|
||||
5.times do |index|
|
||||
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
|
||||
if !option.empty?
|
||||
admin_feed_menu << option
|
||||
|
|
|
@ -68,6 +68,8 @@
|
|||
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
||||
</button>
|
||||
<% end %>
|
||||
<p>Please, do not use your E-mail address!. If you lost your password there is no way to recover it using a Password Recovery E-mail. If you lose your password, your should <a href="https://nadeko.net/contact">contact the admin</a> instead or just create a new account (If you don't care about your subscriptions, history and playlists.)</p>
|
||||
<p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<% end %>
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
</div>
|
||||
|
||||
<% if env.get?("user") %>
|
||||
<% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists"} %>
|
||||
<% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists", "History"} %>
|
||||
<% else %>
|
||||
<% feed_options = {"", "Popular", "Trending"} %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue