2020-11-17 21:44:32 +01:00
doctype html
html
head
title preferences - teddit
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")
legend Display
2020-12-24 22:13:08 +01:00
.setting
label(for="theme") Theme:
select(id="theme", name="theme")
if(!user_preferences.theme || user_preferences.theme == '')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2020-12-24 22:13:08 +01:00
option(value="", selected="selected") White
option(value="dark") Dark
2021-01-19 21:49:03 +01:00
option(value="sepia") Sepia
2020-12-24 22:13:08 +01:00
if(user_preferences.theme === 'dark')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2020-12-24 22:13:08 +01:00
option(value="") White
option(value="dark", selected="selected") Dark
2021-01-19 21:49:03 +01:00
option(value="sepia") Sepia
if(user_preferences.theme === 'sepia')
2021-01-27 17:39:12 +01:00
option(value="auto") Auto
2021-01-19 21:49:03 +01:00
option(value="") White
option(value="dark") Dark
option(value="sepia", selected="selected") Sepia
2021-01-27 17:39:12 +01:00
if(user_preferences.theme === 'auto')
option(value="auto", selected="selected") Auto
option(value="") White
option(value="dark") Dark
option(value="sepia") Sepia
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))
max_heights_html += `<option value="${key}" ${(user_key == key ? "selected" : "")}>${key}</option>`
}
!= max_heights_html
2021-01-08 21:39:46 +01:00
legend Subscribed subreddits
.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
2020-12-27 23:25:39 +01:00
small(class="notice") Preferences are stored client-side using cookies without any personal information.
2020-11-21 13:50:12 +01:00
input(type="submit", value="Save preferences")
a(href="/resetprefs", class="btn") Reset preferences
2021-01-30 22:16:56 +01:00
form(action="/export_prefs", method="POST", id="export-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
2021-02-13 13:29:47 +01:00
label(for="export_saved") Export saved posts:
input(type="checkbox", name="export_saved", id="export_saved")
br
2021-01-30 22:16:56 +01:00
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
2021-02-13 13:29:47 +01:00
label(for="export_saved") Export saved posts:
input(type="checkbox", name="export_saved", id="export_saved")
br
2021-01-30 22:16:56 +01:00
input(type="submit", value="Export preferences")
2020-12-28 21:45:17 +01:00
include includes/footer.pug