2020-11-17 21:44:32 +01:00
doctype html
html
head
title preferences - teddit
2022-06-10 16:08:58 +02:00
meta(property='og:title', content='preferences - teddit')
include includes/meta_default.pug
include includes/meta_description.pug
2020-11-17 21:44:32 +01:00
include includes/head.pug
2021-01-27 17:39:12 +01:00
body(class=""+ (user_preferences.theme === 'auto' ? 'dark' : user_preferences.theme) + "")
2020-11-17 21:44:32 +01:00
include includes/topbar.pug
.container
.content
h1 Preferences
2020-11-21 13:50:12 +01:00
form(action="/saveprefs", method="POST")
2021-03-21 21:14:11 +01:00
legend Privacy
.setting
2023-04-10 11:14:56 +02:00
label(for="domain_twitter") Replace Twitter links with <a href="https://github.com/zedeus/nitter">Nitter</a> (blank to disable):
2021-03-21 21:14:11 +01:00
if(user_preferences.domain_twitter != '' && typeof(user_preferences.domain_twitter) != 'undefined')
input(type="text", name="domain_twitter", id="domain_twitter", value="" + user_preferences.domain_twitter + "", placeholder="e.g. nitter.net")
else
input(type="text", name="domain_twitter", id="domain_twitter", placeholder="e.g. nitter.net")
.setting
2023-04-10 11:14:56 +02:00
label(for="domain_youtube") Replace YouTube links with <a href="https://github.com/iv-org/invidious">Invidious</a>/<a href="https://github.com/TeamPiped/Piped">Piped</a> (blank to disable):
2021-03-21 21:14:11 +01:00
if(user_preferences.domain_youtube != '' && typeof(user_preferences.domain_youtube) != 'undefined')
input(type="text", name="domain_youtube", id="domain_youtube", value="" + user_preferences.domain_youtube + "", placeholder="e.g. invidious.site")
else
input(type="text", name="domain_youtube", id="domain_youtube", placeholder="e.g. invidious.site")
2022-10-15 06:23:48 +02:00
.setting
2023-04-10 11:14:56 +02:00
label(for="domain_quora") Replace Quora links with <a href="https://codeberg.org/zyachel/quetre">Quetre</a> (blank to disable):
2022-10-15 06:23:48 +02:00
if(user_preferences.domain_quora != '' && typeof(user_preferences.domain_quora) != 'undefined')
input(type="text", name="domain_quora", id="domain_quora", value="" + user_preferences.domain_quora + "", placeholder="e.g. quetre.iket.me")
else
input(type="text", name="domain_quora", id="domain_quora", placeholder="e.g. quetre.iket.me")
2022-11-12 14:47:08 +01:00
.setting
2023-04-10 11:14:56 +02:00
label(for="domain_imgur") Replace Imgur links with <a href="https://codeberg.org/video-prize-ranch/rimgo">Rimgo</a> (blank to disable):
2022-11-12 14:47:08 +01:00
if(user_preferences.domain_imgur != '' && typeof(user_preferences.domain_imgur) != 'undefined')
input(type="text", name="domain_imgur", id="domain_imgur", value="" + user_preferences.domain_imgur + "", placeholder="e.g. rimgo.bcow.xyz")
else
input(type="text", name="domain_imgur", id="domain_imgur", placeholder="e.g. rimgo.bcow.xyz")
2020-11-21 13:50:12 +01:00
legend Display
2020-12-24 22:13:08 +01:00
.setting
label(for="theme") Theme:
select(id="theme", name="theme")
2021-03-23 16:32:39 +01:00
if(!user_preferences.theme || user_preferences.theme === 'auto')
option(value="auto", selected="selected") Auto
2021-07-20 19:17:05 +02:00
option(value="white") White
2021-03-23 16:32:39 +01:00
option(value="dark") Dark
option(value="sepia") Sepia
2022-07-07 22:42:01 +02:00
option(value="nord") Nord
2022-11-08 07:59:04 +01:00
else if(user_preferences.theme == 'white')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2021-07-20 19:17:05 +02:00
option(value="white", selected="selected") White
2020-12-24 22:13:08 +01:00
option(value="dark") Dark
2021-01-19 21:49:03 +01:00
option(value="sepia") Sepia
2022-07-07 22:42:01 +02:00
option(value="nord") Nord
2022-11-08 07:59:04 +01:00
else if(user_preferences.theme === 'dark')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2021-07-20 19:17:05 +02:00
option(value="white") White
2020-12-24 22:13:08 +01:00
option(value="dark", selected="selected") Dark
2021-01-19 21:49:03 +01:00
option(value="sepia") Sepia
2022-07-07 22:42:01 +02:00
option(value="nord") Nord
2022-11-08 07:59:04 +01:00
else if(user_preferences.theme === 'sepia')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2021-07-20 19:17:05 +02:00
option(value="white") White
2021-01-19 21:49:03 +01:00
option(value="dark") Dark
option(value="sepia", selected="selected") Sepia
2022-07-07 22:42:01 +02:00
option(value="nord") Nord
2022-11-08 07:59:04 +01:00
else if(user_preferences.theme === 'nord')
2022-07-07 22:42:01 +02:00
option(value="auto") Auto
option(value="white") White
option(value="dark") Dark
option(value="sepia") Sepia
option(value="nord", selected="selected") Nord
2022-11-08 07:59:04 +01:00
else
option(value="auto") Auto
option(value="white") White
option(value="dark") Dark
option(value="sepia") Sepia
option(value="nord") Nord
2020-12-24 22:13:08 +01:00
.setting
label(for="flairs") Show flairs:
if(!user_preferences.flairs || user_preferences.flairs == 'true')
input(type="checkbox", name="flairs", id="flairs", checked="checked")
else
input(type="checkbox", name="flairs", id="flairs")
2021-01-04 22:50:47 +01:00
.setting
label(for="highlight_controversial") Show a dagger (†) on comments voted controversial:
if(!user_preferences.highlight_controversial || user_preferences.highlight_controversial == 'true')
input(type="checkbox", name="highlight_controversial", id="highlight_controversial", checked="checked")
else
input(type="checkbox", name="highlight_controversial", id="highlight_controversial")
2020-12-27 23:25:39 +01:00
.setting
label(for="nsfw_enabled") Show NSFW content:
if (instance_config.nsfw_enabled === false && user_preferences.nsfw_enabled != 'true') || user_preferences.nsfw_enabled === 'false'
input(type="checkbox", name="nsfw_enabled", id="nsfw_enabled")
else
input(type="checkbox", name="nsfw_enabled", id="nsfw_enabled", checked="checked")
2021-03-01 19:01:02 +01:00
.setting
label(for="post_media_max_height") Media size in posts:
select(id="post_media_max_height", name="post_media_max_height")
-
let max_heights_html = ''
let user_key = user_preferences.post_media_max_height
if(!user_key || user_key == '')
user_key = 'medium'
for(let key in instance_config.post_media_max_heights) {
if(instance_config.post_media_max_heights.hasOwnProperty(key))
2023-04-27 16:48:27 +02:00
max_heights_html += `<option value="${key}" ${(user_key == key ? "selected" : "")}>${key}</option>`
2021-03-01 19:01:02 +01:00
}
!= max_heights_html
2021-03-16 18:07:27 +01:00
.setting
label(for="collapse_child_comments") Collapse child comments automatically:
if(user_preferences.collapse_child_comments == 'true')
input(type="checkbox", name="collapse_child_comments", id="collapse_child_comments", checked="checked")
else
input(type="checkbox", name="collapse_child_comments", id="collapse_child_comments")
2021-03-18 18:31:41 +01:00
.setting
label(for="show_upvoted_percentage") Show upvote ratio percentage in posts:
if(user_preferences.show_upvoted_percentage == 'true')
input(type="checkbox", name="show_upvoted_percentage", id="show_upvoted_percentage", checked="checked")
else
input(type="checkbox", name="show_upvoted_percentage", id="show_upvoted_percentage")
2022-01-31 15:31:00 +01:00
.setting
label(for="show_upvotes") Show upvotes:
2022-01-31 19:21:13 +01:00
if(!user_preferences.show_upvotes || user_preferences.show_upvotes == 'true')
2022-01-31 15:31:00 +01:00
input(type="checkbox", name="show_upvotes", id="show_upvotes", checked="checked")
else
2022-06-11 13:42:19 +02:00
input(type="checkbox", name="show_upvotes", id="show_upvotes")
2022-06-11 13:45:15 +02:00
.setting
label(for="prefer_frontpage") Prefer reddit-style frontpage as homepage:
if ((!instance_config.clean_homepage && !user_preferences.prefer_frontpage) || user_preferences.prefer_frontpage == 'true')
input(type="checkbox", name="prefer_frontpage", id="prefer_frontpage", checked="checked")
else
input(type="checkbox", name="prefer_frontpage", id="prefer_frontpage")
2022-06-11 21:40:12 +02:00
.setting
label(for="default_comment_sort") Default comment sorting:
select(id="default_comment_sort", name="default_comment_sort")
-
let default_comment_sort_html = ''
let user_default_sort = user_preferences.default_comment_sort || 'best'
for(let key of comment_sort_values) {
default_comment_sort_html += `<option value="${key}" ${(user_default_sort == key ? "selected" : "")}>${key == 'qa' ? 'Q&A' : key}</option>`
}
!= default_comment_sort_html
2021-06-01 23:17:06 +02:00
legend Media
.setting
label(for="videos_muted") Mute videos by default:
-
let videos_muted = false
if(instance_config.videos_muted === true || user_preferences.videos_muted === 'true') {
videos_muted = true
}
if(user_preferences.videos_muted === 'false') {
videos_muted = false
}
if(videos_muted)
input(type="checkbox", name="videos_muted", id="videos_muted", checked="checked")
else
input(type="checkbox", name="videos_muted", id="videos_muted")
2022-06-11 21:04:55 +02:00
.setting
label(for="show_large_gallery_images") Show large gallery images with captions:
if (user_preferences.show_large_gallery_images == 'true')
input(type="checkbox", name="show_large_gallery_images", id="show_large_gallery_images", checked="checked")
else
input(type="checkbox", name="show_large_gallery_images", id="show_large_gallery_images")
2021-03-21 21:14:11 +01:00
small(class="notice") Preferences are stored client-side using cookies without any personal information.
br
input(type="submit", value="Save preferences")
a(href="/resetprefs", class="btn") Reset preferences
.bottom-prefs
2021-01-08 21:39:46 +01:00
.setting
details
summary
span Show subscribed subreddits
if user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits)
ul.subreddit-listing
each subreddit in user_preferences.subbed_subreddits
li
a(href="/unsubscribe/" + subreddit + "/?b=/preferences", class="sub-to-subreddit gray", title="subscriptions are saved in your browser's cookies") unsubscribe
a(href="/r/" + subreddit) #{subreddit}
else
small no subscribed subreddits
2021-03-21 21:14:11 +01:00
form(action="/export_prefs", method="POST", class="export-import-form")
if preferences_key
details(open)
summary
span Export preferences
.setting
small By exporting your preferences you can transfer your subscribed subreddits and preferences to another device. Or you could create a bookmark if you tend to delete your cookies frequently.
br
label(for="export_saved") Export saved posts:
input(type="checkbox", name="export_saved", id="export_saved")
br
input(type="submit", value="Export preferences")
if preferences_key
- var protocol = 'http'
if instance_config.https_enabled === true
- var protocol = 'https'
p Visit this URL to import your preferences:
a(href=`${protocol}://${instance_config.domain}/import_prefs/${preferences_key}`) #{protocol}://#{instance_config.domain}/import_prefs/#{preferences_key}
else
details
summary
span Export preferences
.setting
small By exporting your preferences you can transfer your subscribed subreddits and preferences to another device. Or you could create a bookmark if you tend to delete your cookies frequently.
br
small If you are exporting to a file, please save your preferences first!
br
label(for="export_saved") Export saved posts:
input(type="checkbox", name="export_saved", id="export_saved")
br
label(for="export_to_file") Export preferences to a JSON file:
input(type="checkbox", name="export_to_file", id="export_to_file")
br
input(type="submit", value="Export preferences")
form(action="/import_prefs", method="POST", class="export-import-form", enctype="multipart/form-data")
2021-01-30 22:16:56 +01:00
details
summary
2021-03-21 21:14:11 +01:00
span Import JSON preferences file
2021-01-30 22:16:56 +01:00
.setting
2021-03-21 21:14:11 +01:00
small All your current preferences and saved posts will be reseted and the settings from the JSON file will be used instead.
2021-02-13 13:29:47 +01:00
br
2021-03-21 21:14:11 +01:00
input(type="file", name="file", id="file")
2021-03-19 20:40:24 +01:00
br
2021-03-21 21:14:11 +01:00
input(type="submit", value="Import preferences")
2020-12-28 21:45:17 +01:00
include includes/footer.pug