mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Add "Instance" section to footer
This commit is contained in:
parent
76c2bab6c0
commit
2a85afe93f
@ -428,11 +428,39 @@ jobs:
|
||||
##
|
||||
## Email to contact the instance maintainer; used in a mailto: link within the footer.
|
||||
##
|
||||
## Accepted values: Email
|
||||
## Accepted values: string
|
||||
## Default: <none>
|
||||
##
|
||||
# instance_maintainer_email:
|
||||
|
||||
##
|
||||
## Link to the terms of service of the instance (if any)
|
||||
##
|
||||
## Displayed within the instance section of the footer
|
||||
##
|
||||
## Accepted values: String (link)
|
||||
## Default: <none>
|
||||
##
|
||||
# footer_instance_tos_link:
|
||||
|
||||
##
|
||||
## Link to the privacy-policy of the instance (if any)
|
||||
##
|
||||
## Displayed within the instance section of the footer
|
||||
##
|
||||
## Accepted values: String (link)
|
||||
## Default: <none>
|
||||
##
|
||||
# footer_instance_privacy_policy_link:
|
||||
|
||||
##
|
||||
## Custom fields to be displayed within the footer's instance section
|
||||
##
|
||||
## Accepted values: A nested array mapping field name and links together.
|
||||
## IE: [ ["field1", "https://example.com/1"], ["field2", "https://example.com/2"] ]
|
||||
## Default: <none>
|
||||
##
|
||||
# footer_instance_section_custom_fields: []
|
||||
|
||||
# -----------------------------
|
||||
# Miscellaneous
|
||||
|
@ -461,7 +461,6 @@
|
||||
"next_steps_error_message": "After which you should try to: ",
|
||||
"next_steps_error_message_refresh": "Refresh",
|
||||
"next_steps_error_message_go_to_youtube": "Go to YouTube",
|
||||
|
||||
"default_invidious_footer_text": "A free and open source frontend for Youtube that that respects your privacy! Now you can watch videos (ad-free), subscribe to channels, create playlist and much more all without the prying eyes of Google!",
|
||||
"footer_navigation_section_header": "Navigation",
|
||||
"footer_home_link": "Home",
|
||||
@ -473,13 +472,16 @@
|
||||
"footer_donate_link": "Donate",
|
||||
"footer_matrix_link": "Matrix",
|
||||
"footer_support_section_header": "Support",
|
||||
"footer_contact_link": "Contact instance maintainer",
|
||||
"footer_contact_link": "Contact Instance Maintainer",
|
||||
"footer_report_bug_link": "Report a bug",
|
||||
"footer_faq_link": "FAQ",
|
||||
"footer_legal_section_header": "Legal",
|
||||
"footer_instance_section_header": "Instance",
|
||||
"footer_instance_section_header_modified_source": "Instance (Modified)",
|
||||
"footer_instance_section_modified_source_code": "Instance Source Code",
|
||||
"footer_instance_section_tos": "Terms of Service",
|
||||
"footer_instance_section_privacy_policy": "Privacy Policy",
|
||||
"footer_licences_link": "Licences",
|
||||
"footer_privacy_policy_link": "Privacy",
|
||||
|
||||
"adminprefs_modified_source_code_url_label": "URL to modified source code repository",
|
||||
"none": "none",
|
||||
"videoinfo_started_streaming_x_ago": "Started streaming `x` ago",
|
||||
|
@ -104,10 +104,6 @@ class Config
|
||||
property check_tables : Bool = false
|
||||
# Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards
|
||||
property cache_annotations : Bool = false
|
||||
# Optional banner to be displayed along top of page for announcements, etc.
|
||||
property banner : String? = nil
|
||||
# Optional footer text to be displayed within Invidious' footer. Can be used for maintainer contact info, etc.
|
||||
property footer : String? = nil
|
||||
# Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely
|
||||
property hsts : Bool? = true
|
||||
# Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local'
|
||||
@ -115,9 +111,21 @@ class Config
|
||||
# Enable the user notifications for all users
|
||||
property enable_user_notifications : Bool = true
|
||||
|
||||
# Optional banner to be displayed along top of page for announcements, etc.
|
||||
property banner : String? = nil
|
||||
# Optional footer text to be displayed within Invidious' footer. Can be used for maintainer contact info, etc.
|
||||
property footer : String? = nil
|
||||
# Email to contact the instance maintainer. This is used within the footer as an mailto link.
|
||||
property instance_maintainer_email : String? = nil
|
||||
# URL to the modified source code to be easily AGPL compliant
|
||||
# Will display in the footer, next to the main source code link
|
||||
# Will display in the footer
|
||||
property modified_source_code_url : String? = nil
|
||||
# Link to the terms of service of the instance (if any). Will be displayed in the footer.
|
||||
property footer_instance_tos_link : String? = nil
|
||||
# Link to the privacy policy of the instance (if any). Will be displayed in the footer.
|
||||
property footer_instance_privacy_policy_link : String? = nil
|
||||
# Custom fields to be displayed within the footer's instance section
|
||||
property footer_instance_section_custom_fields : Array(Array(String)) = [] of Array(String)
|
||||
|
||||
# Connect to YouTube over 'ipv6', 'ipv4'. Will sometimes resolve fix issues with rate-limiting (see https://github.com/ytdl-org/youtube-dl/issues/21729)
|
||||
@[YAML::Field(converter: Preferences::FamilyConverter)]
|
||||
@ -139,9 +147,6 @@ class Config
|
||||
# Playlist length limit
|
||||
property playlist_length_limit : Int32 = 500
|
||||
|
||||
# Email to contact the instance maintainer. This is used within the footer as an mailto link.
|
||||
property instance_maintainer_email : String? = nil
|
||||
|
||||
def disabled?(option)
|
||||
case disabled = CONFIG.disable_proxy
|
||||
when Bool
|
||||
|
@ -233,15 +233,59 @@
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<% if CONFIG.instance_maintainer_email || CONFIG.modified_source_code_url || CONFIG.footer_instance_tos_link || CONFIG.footer_instance_privacy_policy_link %>
|
||||
<div class="footer-section">
|
||||
<b class="footer-section-header">
|
||||
<% if CONFIG.modified_source_code_url %>
|
||||
<%= translate(locale, "footer_instance_section_header_modified_source")%>
|
||||
<% else %>
|
||||
<%= translate(locale, "footer_instance_section_header")%>
|
||||
<% end %>
|
||||
</b>
|
||||
<ul class="pure-menu-list footer-section-list">
|
||||
<% if CONFIG.instance_maintainer_email %>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="<%=HTML.escape("mailto:#{CONFIG.instance_maintainer_email.not_nil!}")%>" title="<%= translate(locale, "footer_contact_link")%>">
|
||||
<%= translate(locale, "footer_contact_link") %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if CONFIG.modified_source_code_url %>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="<%=HTML.escape(CONFIG.modified_source_code_url.not_nil!)%>" title="<%= translate(locale, "footer_instance_section_modified_source_code")%>">
|
||||
<%= translate(locale, "footer_instance_section_modified_source_code") %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if CONFIG.footer_instance_tos_link %>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="<%=HTML.escape(CONFIG.footer_instance_tos_link.not_nil!)%>" title="<%= translate(locale, "footer_instance_section_tos")%>">
|
||||
<%= translate(locale, "footer_instance_section_tos") %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if CONFIG.footer_instance_privacy_policy_link %>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="<%=HTML.escape(CONFIG.footer_instance_privacy_policy_link.not_nil!)%>" title="<%= translate(locale, "footer_instance_section_privacy_policy")%>">
|
||||
<%= translate(locale, "footer_instance_section_privacy_policy") %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% CONFIG.footer_instance_section_custom_fields.each do | field | %>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="<%=HTML.escape(field[1])%>" title="<%= HTML.escape(field[0]) %>">
|
||||
<%= HTML.escape(field[0]) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="footer-section">
|
||||
<b class="footer-section-header"><%= translate(locale, "footer_support_section_header")%></b>
|
||||
<ul class="pure-menu-list footer-section-list">
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<% link = CONFIG.instance_maintainer_email ? "mailto:#{CONFIG.instance_maintainer_email}" : "#"%>
|
||||
<a href=<%=link%> title="<%= translate(locale, "footer_contact_link")%>">
|
||||
<%= translate(locale, "footer_contact_link") %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="pure-menu-item footer-section-item">
|
||||
<a href="https://github.com/iv-org/invidious/issues/new" title="<%= translate(locale, "footer_report_bug_link")%>">
|
||||
<%= translate(locale, "footer_report_bug_link") %>
|
||||
|
Loading…
Reference in New Issue
Block a user