mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-24 12:02:39 +00:00
Add Compilation symbols until "Compilations" appears in feeds menu
This commit is contained in:
parent
5fb47c5e9e
commit
d0a3c994f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
|||||||
/invidious
|
/invidious
|
||||||
/sentry
|
/sentry
|
||||||
/config/config.yml
|
/config/config.yml
|
||||||
|
.DS_Store
|
@ -629,9 +629,9 @@ default_user_preferences:
|
|||||||
## Each entry can be one of: "Popular", "Trending",
|
## Each entry can be one of: "Popular", "Trending",
|
||||||
## "Subscriptions", "Playlists", "Compilations"
|
## "Subscriptions", "Playlists", "Compilations"
|
||||||
##
|
##
|
||||||
## Default: ["Popular", "Trending", "Subscriptions", "Playlists","Compilations"] (show all feeds)
|
## Default: ["Popular", "Trending", "Subscriptions", "Playlists", "Compilations"] (show all feeds)
|
||||||
##
|
##
|
||||||
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists","Compilations"]
|
feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists", "Compilations"]
|
||||||
|
|
||||||
##
|
##
|
||||||
## Default feed to display on the home page.
|
## Default feed to display on the home page.
|
||||||
|
2
src/invidious/routes/compilations.cr
Normal file
2
src/invidious/routes/compilations.cr
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module Invidious::Routes::Compilations
|
||||||
|
end
|
@ -6,6 +6,8 @@ module Invidious::Routes::Feeds
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.compilations(env)
|
def self.compilations(env)
|
||||||
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
|
|
||||||
templated "feeds/compilations"
|
templated "feeds/compilations"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
<% title = HTML.escape(compilation.title) %>
|
||||||
|
<% author = HTML.escape(compilation.author) %>
|
||||||
|
|
||||||
|
<% content_for "header" do %>
|
||||||
|
<title><%= title %> - Invidious</title>
|
||||||
|
<% end %>
|
@ -2,3 +2,5 @@
|
|||||||
<title><%= translate(locale, "Compilations") %> - Invidious</title>
|
<title><%= translate(locale, "Compilations") %> - Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= rendered "components/feed_menu" %>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user