mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Make 'modified_source_code_url' editable from admin preferences
This commit is contained in:
parent
aada4603a8
commit
0936a307d0
@ -428,5 +428,6 @@
|
||||
"footer_documentation": "Documentation",
|
||||
"footer_source_code": "Source code",
|
||||
"footer_original_source_code": "Original source code",
|
||||
"footer_modfied_source_code": "Modified Source code"
|
||||
"footer_modfied_source_code": "Modified Source code",
|
||||
"adminprefs_modified_source_code_url_label": "URL to modified source code repository"
|
||||
}
|
||||
|
@ -198,6 +198,8 @@ module Invidious::Routes::PreferencesRoute
|
||||
statistics_enabled ||= "off"
|
||||
CONFIG.statistics_enabled = statistics_enabled == "on"
|
||||
|
||||
CONFIG.modified_source_code_url = env.params.body["modified_source_code_url"]?.try &.as(String)
|
||||
|
||||
File.write("config/config.yml", CONFIG.to_yaml)
|
||||
end
|
||||
else
|
||||
|
@ -286,6 +286,11 @@
|
||||
<label for="statistics_enabled"><%= translate(locale, "Report statistics: ") %></label>
|
||||
<input name="statistics_enabled" id="statistics_enabled" type="checkbox" <% if CONFIG.statistics_enabled %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="modified_source_code_url"><%= translate(locale, "adminprefs_modified_source_code_url_label") %></label>
|
||||
<input name="modified_source_code_url" id="modified_source_code_url" type="input" <% if CONFIG.modified_source_code_url %>checked<% end %>>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if env.get? "user" %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user