1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-14 04:17:29 +00:00
cloudtube/pug/settings.pug
Cadence Ember ac3de4b4e6
Implement preferred quality selection
The list is subject to change as I collect more feedback. I just want
to get this initial change out for everyone to use and appreciate.
2021-04-04 16:51:39 +12:00

85 lines
3.0 KiB
Plaintext

extends includes/layout.pug
mixin fieldset(name)
fieldset
legend= name
.fieldset-contents
block
mixin input(id, description, type, placeholder, disabled, list)
.field-row
label.description(for=id)= description
input(type=type id=id name=id value=settings[id] placeholder=placeholder disabled=disabled list=`${id}-list`).border-look
if list
datalist(id=`${id}-list`)
each item in list
option(value=item)
mixin select(id, description, disabled, options)
.field-row
label.description(for=id)= description
select(id=id name=id disabled=disabled).border-look
each option in options
option(value=option.value selected=(option.value == settings[id]))= option.text
block head
title Settings - CloudTube
block content
main.settings-page
form(method="post" action="/settings")
+fieldset("Settings")
+input("instance", "Instance", "url", constants.user_settings.instance.default, false, instances)
+select("quality", "Preferred qualities", false, [
{value: "0", text: "Best combined"},
{value: "1", text: "Best DASH"},
{value: "2", text: "Best <=1080p"},
{value: "3", text: "Best low-fps"},
{value: "4", text: "360p"}
])
+select("save_history", "Watched videos history", false, [
{value: "0", text: "Don't store"},
{value: "1", text: "Store on server"}
])
+select("local", "Fetch videos", false, [
{value: "0", text: "Remote instance"},
{value: "1", text: "Locally"}
])
.save-settings
button.border-look Save
if user.token
details.data-management
summary Sync data
p Open this link elsewhere to import your current CloudTube session there.
p.
If you clear your cookies often, you can bookmark this link and open it
to restore your data, or if you have multiple devices, you can send this
link to them to import your session and automatically keep everything
in sync.
- let url = `/formapi/importsession/${user.token}`
a(href=url)= url
details.data-management.delete-details
summary Delete data
p Press this button to erase all your data from CloudTube.
p.
Just the current session will be removed. If you lost access to a
previous session, you cannot touch it.
p.
You will lose your subscriptions, watch history, settings, and anything
else you stored on the server. The server will keep no record that they
ever existed.
p Deletion is instant and #[em cannot be undone.]
input(type="checkbox" id="delete-confirm")
.delete-confirm-container
label(for="delete-confirm").delete-confirm-label I understand the consequences
form(method="post" action="/formapi/erase")
input(type="hidden" name="token" value=user.token)
button.border-look#delete-button Permanently erase my data