Add History feed menu
This commit is contained in:
parent
c92603246e
commit
baba8f8010
7 changed files with 14 additions and 4 deletions
|
@ -163,6 +163,7 @@
|
||||||
"unsubscribe": "unsubscribe",
|
"unsubscribe": "unsubscribe",
|
||||||
"revoke": "revoke",
|
"revoke": "revoke",
|
||||||
"Subscriptions": "Subscriptions",
|
"Subscriptions": "Subscriptions",
|
||||||
|
"History": "History",
|
||||||
"subscriptions_unseen_notifs_count": "{{count}} unseen notification",
|
"subscriptions_unseen_notifs_count": "{{count}} unseen notification",
|
||||||
"subscriptions_unseen_notifs_count_plural": "{{count}} unseen notifications",
|
"subscriptions_unseen_notifs_count_plural": "{{count}} unseen notifications",
|
||||||
"search": "search",
|
"search": "search",
|
||||||
|
|
|
@ -116,6 +116,7 @@
|
||||||
"unsubscribe": "desuscribirse",
|
"unsubscribe": "desuscribirse",
|
||||||
"revoke": "revocar",
|
"revoke": "revocar",
|
||||||
"Subscriptions": "Suscripciones",
|
"Subscriptions": "Suscripciones",
|
||||||
|
"History": "Historial",
|
||||||
"search": "buscar",
|
"search": "buscar",
|
||||||
"Log out": "Cerrar la sesión",
|
"Log out": "Cerrar la sesión",
|
||||||
"Released under the AGPLv3 on Github.": "Publicado bajo la AGPLv3 en GitHub.",
|
"Released under the AGPLv3 on Github.": "Publicado bajo la AGPLv3 en GitHub.",
|
||||||
|
|
|
@ -30,7 +30,7 @@ struct ConfigPreferences
|
||||||
property quality : String = "hd720"
|
property quality : String = "hd720"
|
||||||
property quality_dash : String = "auto"
|
property quality_dash : String = "auto"
|
||||||
property default_home : String? = "Popular"
|
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 automatic_instance_redirect : Bool = false
|
||||||
property region : String = "US"
|
property region : String = "US"
|
||||||
property related_videos : Bool = true
|
property related_videos : Bool = true
|
||||||
|
|
|
@ -23,6 +23,12 @@ module Invidious::Routes::Misc
|
||||||
else
|
else
|
||||||
env.redirect "/feed/popular"
|
env.redirect "/feed/popular"
|
||||||
end
|
end
|
||||||
|
when "History"
|
||||||
|
if user
|
||||||
|
env.redirect "/feed/history"
|
||||||
|
else
|
||||||
|
env.redirect "/feed/popular"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
templated "search_homepage", navbar_search: false
|
templated "search_homepage", navbar_search: false
|
||||||
end
|
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
|
default_home = env.params.body["default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
|
||||||
|
|
||||||
feed_menu = [] of String
|
feed_menu = [] of String
|
||||||
4.times do |index|
|
5.times do |index|
|
||||||
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
|
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
|
||||||
if !option.empty?
|
if !option.empty?
|
||||||
feed_menu << option
|
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
|
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
|
admin_feed_menu = [] of String
|
||||||
4.times do |index|
|
5.times do |index|
|
||||||
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
|
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
|
||||||
if !option.empty?
|
if !option.empty?
|
||||||
admin_feed_menu << option
|
admin_feed_menu << option
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
<% 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>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if env.get?("user") %>
|
<% if env.get?("user") %>
|
||||||
<% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists"} %>
|
<% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists", "History"} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% feed_options = {"", "Popular", "Trending"} %>
|
<% feed_options = {"", "Popular", "Trending"} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue