2020-08-31 13:22:16 +00:00
|
|
|
extends includes/layout.pug
|
|
|
|
|
|
|
|
mixin fieldset(name)
|
|
|
|
fieldset
|
|
|
|
legend= name
|
|
|
|
.fieldset-contents
|
|
|
|
block
|
|
|
|
|
2020-09-25 13:03:20 +00:00
|
|
|
mixin input(id, description, type, placeholder, disabled, list)
|
2020-08-31 13:22:16 +00:00
|
|
|
.field-row
|
|
|
|
label.description(for=id)= description
|
2020-09-25 13:03:20 +00:00
|
|
|
input(type=type id=id name=id value=settings[id] placeholder=placeholder disabled=disabled list=`${id}-list`).border-look
|
2020-08-31 13:22:16 +00:00
|
|
|
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")
|
|
|
|
|
2020-09-25 13:03:20 +00:00
|
|
|
+input("instance", "Instance", "url", constants.user_settings.instance.default, false, [
|
2020-08-31 13:22:16 +00:00
|
|
|
"https://invidious.snopyta.org",
|
|
|
|
"https://invidious.13ad.de",
|
|
|
|
"https://watch.nettohikari.com",
|
|
|
|
"https://invidious.fdn.fr"
|
|
|
|
])
|
|
|
|
|
|
|
|
+select("save_history", "Watch history", false, [
|
|
|
|
{value: "", text: "Don't save"},
|
|
|
|
{value: "yes", text: "Save"}
|
|
|
|
])
|
|
|
|
|
|
|
|
.save-settings
|
|
|
|
button.border-look Save
|