fix js and html

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-11-06 19:46:53 -06:00
parent cac2ef3160
commit ddd748b98b
4 changed files with 10 additions and 10 deletions

View File

@ -78,7 +78,7 @@ function updatebgselection(){
let bgsDir = backgrounds[bgselector.selectedIndex].folder;
for (i=0; i < bgsToDisplay.length; i++) {
let onclickPost = bgsDir + "/" + bgsToDisplay[i];
str += `<button class="btn btn-secondary bg-button"><img class='bg-image' src="/i/backgrounds/${bgsDir}/${bgsToDisplay[i]}?v=2000" alt="${bgsToDisplay[i]}-background" onclick="post('/settings/profile?background=${onclickPost}')"></button>`;
str += `<button class="btn btn-secondary bg-button"><img class='bg-image' src="/i/backgrounds/${bgsDir}/${bgsToDisplay[i]}?v=2000" alt="${bgsToDisplay[i]}-background" onclick="post('/settings/personal?background=${onclickPost}')"></button>`;
}
bgContainer.innerHTML = str;
}

View File

@ -15,7 +15,7 @@
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="poor" name="poor"{% if v.poor %} checked{% endif %} onchange="postToastSwitch(this,'/settings/profile?poor='+document.getElementById('poor').checked);">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="poor" name="poor"{% if v.poor %} checked{% endif %} onchange="postToastSwitch(this,'/settings/personal?poor='+document.getElementById('poor').checked);">
<label class="custom-control-label" for="poor"></label>
</div>
<span class="text-small text-muted">Makes the site faster for low-end devices:</span>
@ -39,7 +39,7 @@
<div class="body w-lg-100">
<p>Change how many posts appear on every page.</p>
<div class="input-group mb2">
<select autocomplete="off" id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="postToastSwitch(this,'/settings/profile?frontsize='+document.getElementById('frontsize').value)">
<select autocomplete="off" id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="postToastSwitch(this,'/settings/personal?frontsize='+document.getElementById('frontsize').value)">
{% for entry in PAGE_SIZES %}
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
{% endfor %}
@ -54,7 +54,7 @@
<div class="body w-lg-100">
<p>Change the default sorting for comments.</p>
<div class="input-group mb2">
<select autocomplete="off" id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="postToastSwitch(this,'/settings/profile?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
<select autocomplete="off" id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="postToastSwitch(this,'/settings/personal?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
{% for entry in COMMENT_SORTS %}
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
{% endfor %}
@ -69,7 +69,7 @@
<div class="body w-lg-100">
<p>Change the default sorting for posts.</p>
<div class="input-group mb2">
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="postToastSwitch(this,'/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="postToastSwitch(this,'/settings/personal?defaultsorting='+document.getElementById('defaultsorting').value)">
{% for entry in SORTS %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
{% endfor %}
@ -84,7 +84,7 @@
<div class="body w-lg-100">
<p>Change the default time filter for posts.</p>
<div class="input-group mb2">
<select autocomplete="off" id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="postToastSwitch(this,'/settings/profile?defaulttime='+document.getElementById('defaulttime').value)">
<select autocomplete="off" id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="postToastSwitch(this,'/settings/personal?defaulttime='+document.getElementById('defaulttime').value)">
{% for entry in TIME_FILTERS %}
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
{% endfor %}
@ -113,7 +113,7 @@
<div class="body w-lg-100">
<p>Change the domain you would like to view reddit posts in.</p>
<div class="input-group mb2">
<select autocomplete="off" id='reddit' class="form-control" form="profile-settings" name="reddit" onchange="postToastSwitch(this,'/settings/profile?reddit='+document.getElementById('reddit').value)">
<select autocomplete="off" id='reddit' class="form-control" form="profile-settings" name="reddit" onchange="postToastSwitch(this,'/settings/personal?reddit='+document.getElementById('reddit').value)">
{% for entry in ['old.reddit.com', 'reddit.com', 'i.reddit.com', 'unddit.com', 'teddit.net', 'libredd.it'] %}
<option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
{% endfor %}

View File

@ -27,7 +27,7 @@
<p class="text-small text-muted">Edit your profile CSS</p>
<div class="body d-lg-flex border-bottom">
<div class="w-lg-100">
<form id="profile-settings" action="/settings/profilecss" method="post">
<form id="profile-settings" action="/settings/personalcss" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Custom profile CSS" rows="50" name="profilecss" form="profile-settings" maxlength="4000">{% if v.profilecss %}{{v.profilecss}}{% endif %}</textarea>
<small>Limit of 4000 characters</small>

View File

@ -209,7 +209,7 @@
<div class="actionbtns">
{% if v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary">Edit profile</a>
<a href="/settings/personal" class="btn btn-secondary">Edit profile</a>
<a href="/views" class="btn btn-secondary">Profile views</a>
{% endif %}
@ -404,7 +404,7 @@
<div class="actionbtns">
{% if v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary ">Edit profile</a>
<a href="/settings/personal" class="btn btn-secondary ">Edit profile</a>
<a href="/views" class="btn btn-secondary">Profile views</a>
{% endif %}