remotes/1693045480750635534/spooky-22
Aevann1 2021-09-03 16:35:32 +02:00
parent 5e89ccb9bc
commit 0aa8353031
27 changed files with 149 additions and 125 deletions

View File

@ -96,6 +96,26 @@ def settings_profile_post(v):
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF|9999))', bio, re.MULTILINE): bio = bio.replace(i.group(1), f'![]({i.group(1)})')
bio = bio.replace("\n", "\n\n").replace("\n\n\n\n\n\n", "\n\n").replace("\n\n\n\n", "\n\n").replace("\n\n\n", "\n\n")
# check for uploaded image
if request.files.get('file') and request.headers.get("cf-ipcountry") != "T1":
#check file size
if request.content_length > 16 * 1024 * 1024:
g.db.rollback()
abort(413)
file = request.files['file']
if not file.content_type.startswith('image/'):
if request.headers.get("Authorization"): return {"error": f"Image files only"}, 400
else: return render_template("settings_profile.html", v=v, error=f"Image files only."), 400
if 'pcm' in request.host: url = upload_ibb(file)
else: url = upload_imgur(file)
bio += f"\n\n![]({url})"
with CustomRenderer() as renderer: bio_html = renderer.render(mistletoe.Document(bio))
bio_html = sanitize(bio_html)
# Run safety filter

View File

@ -26,10 +26,10 @@
<p>
<span class="font-weight-bold">Step 2:</span> Enter the six-digit code generated in the authenticator app and your {{'SITE_NAME' | app_config}} account password.
</p>
<label for="2fa_input">6-digit code</label>
<label>6-digit code</label>
<input type="text" class="form-control mb-2" id="2fa_input" name="2fa_token" placeholder="# # # # # #" required>
<label for="2fa_input_password">Password</label>
<label>Password</label>
<input type="password" autocomplete="new-password" class="form-control mb-2" id="2fa_input_password" name="password" oninput="document.getElementById('enable2faButton').disabled=false" autocomplete="off" required>
</div>
<div class="modal-footer">
@ -50,10 +50,10 @@
To disable two-step login, please enter your {{'SITE_NAME' | app_config}} account password and the 6-digit code generated in your authentication app. If you no longer have your two-step device, <a href="/lost_2fa">click here</a>.
</div>
<label for="2fa_input_password">Password</label>
<label>Password</label>
<input type="password" autocomplete="new-password" class="form-control mb-2" id="2fa_input_password" name="password" autocomplete="off" required>
<label for="2fa_input">6-digit code</label>
<label>6-digit code</label>
<input type="text" class="form-control mb-2" id="2fa_input" name="2fa_remove" placeholder="# # # # # #" oninput="document.getElementById('disable2faButton').disabled=false" required>
</div>
<div class="modal-footer">

View File

@ -31,7 +31,7 @@
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post('/admin/disablesignups');">
<label class="custom-control-label" for="disablesignups">Disable signups</label>
<label class="custom-control-label">Disable signups</label>
</div>
{% endblock %}

View File

@ -14,7 +14,7 @@
<h5>Vote Info</h5>
<form action="/admin/alt_votes" method="get" class="mb-6">
<label for="link-input">Usernames</label>
<label>Usernames</label>
<input id="link-input" type="text" class="form-control mb-2" name="u1" value="{{u1.username if u1 else ''}}" placeholder="User 1">
<input id="link-input" type="text" class="form-control mb-2" name="u2" value="{{u2.username if u2 else ''}}" placeholder="User 2">
<input type="submit" value="Submit" class="btn btn-primary">

View File

@ -14,19 +14,19 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18">{{app.app_name}}</label>
<label>{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
<label class="mb-0 w-lg-25">User</label>
<input id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<label class="mb-0 w-lg-25">App Name</label>
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<label class="mb-0 w-lg-25">Redirect URI</label>
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<label class="mb-0 w-lg-25">Description</label>
<textarea form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
</div>
</div>

View File

@ -14,24 +14,24 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18"><a href="{{app.permalink}}" target="_blank">{{app.app_name}}</a></label>
<label><a href="{{app.permalink}}" target="_blank">{{app.app_name}}</a></label>
</div>
<div class="body w-lg-100">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
<label class="mb-0 w-lg-25">User</label>
<input id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<label class="mb-0 w-lg-25">App Name</label>
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<label class="mb-0 w-lg-25">Client ID</label>
<input id="edit-{{app.id}}-client-id" class="form-control" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<label class="mb-0 w-lg-25">Redirect URI</label>
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<label class="mb-0 w-lg-25">Description</label>
<textarea form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
</div>
</div>

View File

@ -39,7 +39,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="input-username">Username</label><br>
<label>Username</label><br>
<input id="input-username" class="form-control" type="text" name="username" required>
<table class="table table-striped">
@ -55,17 +55,17 @@
{% for badge in badge_types %}
<tr>
<td><input type="radio" id="badge-{{badge.id}}" name="badge_id" value="{{badge.id}}"></td>
<td><label for="badge-{{badge.id}}"><img loading="lazy" class="d-block" src="{{badge.path}}" width="70px" height="70px"></label></td>
<td><label><img loading="lazy" class="d-block" src="{{badge.path}}" width="70px" height="70px"></label></td>
<td>{{badge.name}}</td>
<td>{{badge.description}}</td>
</tr>
{% endfor %}
</table>
<label for="input-url">URL</label><br>
<label>URL</label><br>
<input id="input-url" class="form-control" type="text" name="url" placeholder="Optional">
<label for="input-description">Custom description</label><br>
<label>Custom description</label><br>
<input id="input-description" class="form-control" type="text" name="description" placeholder="Leave blank for badge default">
<input class="btn btn-primary" type="submit">

View File

@ -23,16 +23,16 @@
<form action="/admin/image_ban" method="post" class="mb-6" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="img-input">Image Upload</label>
<label>Image Upload</label>
<input id="img-input" type="file" class="form-control-file mb-2" name="file">
<label for="img-input" class="mt-3">Ban Reason</label>
<label class="mt-3">Ban Reason</label>
<select name="ban_reason" class="form-control" id="ban_reason">
<option disabled selected>Select Ban Reason</option>
<option value="Bestiality">Bestiality</option>
<option value="Child Sexual Abuse Material">CSAM</option>
<option value="Involuntary Pornography">Involuntary Pornography</option>
</select>
<label for="time-input" class="mt-3">Penalty</label>
<label class="mt-3">Penalty</label>
<small>Enter the number of days to ban a user who attempts to upload this image</small>
<input id="time-input" class="form-control" type="text" name="ban_length" placeholder="Enter 0 for permanent ban" required>
<input type="submit" value="Ban Image" class="btn btn-primary mt-3">

View File

@ -10,7 +10,7 @@
<p>Paste an image link here to remove it from imgur and from cloudflare cache. You need to enter the full url of the image like this "https://i.imgur.com/63OclpM_d.png?maxwidth=9999"</p>
<form action="/admin/image_purge" method="post" class="mb-6">
<label for="link-input">Image Link</label>
<label>Image Link</label>
<input id="link-input" type="text" class="form-control mb-2" name="url">
<input type="submit" value="Delete Image" class="btn btn-primary">
</form>

View File

@ -39,7 +39,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="input-username">Username</label><br>
<label>Username</label><br>
<input id="input-username" class="form-control mb-3" type="text" name="username" required>
<table class="table table-striped">

View File

@ -30,7 +30,7 @@
<span class="text-muted">[[ pickedAward.description ]]</span>
</div>
</div>
<label for="note" class="pt-4">Note (optional):</label>
<label class="pt-4">Note (optional):</label>
<textarea id="note" name="note" v-model="note" class="form-control" placeholder="Note to include in award notification"></textarea>
</div>
</form>

View File

@ -175,11 +175,11 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.id}}" aria-label="With textarea" rows="3"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0">
<span id="gif-reply-btn-{{c.id}}" class="font-weight-bolder text-uppercase" onclick="commentForm('reply-form-body-{{c.id}}');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0">
<i id="emoji-reply-btn-{{c.id}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.id}}')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i>
</label>
&nbsp;
@ -207,7 +207,7 @@
<small class="btn btn-secondary format d-inline-block m-0"><i class="fas fa-smile-beam" aria-hidden="true" onclick="loadEmojis('comment-edit-body-{{c.id}}')" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i></small>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0">
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
</label>
@ -369,15 +369,15 @@
<input id="reply-form-submission-{{c.fullname}}" type="hidden" name="submission" value="{{c.post.id}}">
<textarea name="body" form="reply-to-t3_{{c.id}}" class="comment-box form-control rounded" id="reply-form-body-{{c.fullname}}" aria-label="With textarea" placeholder="Add your comment..." rows="3"></textarea>
<div class="comment-format" id="comment-format-bar-{{c.id}}">
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.fullname}}">
<label class="btn btn-secondary format d-inline-block m-0">
<span id="gif-reply-btn-{{c.fullname}}" class="font-weight-bolder text-uppercase" onclick="commentForm('reply-form-body-{{c.fullname}}');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{c.fullname}}">
<label class="btn btn-secondary format d-inline-block m-0">
<i id="emoji-reply-btn-{{c.fullname}}" class="fas fa-smile-beam" onclick="loadEmojis('reply-form-body-{{c.fullname}}')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></i>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
<label class="btn btn-secondary format d-inline-block m-0">
<div id="filename-show-reply-{{c.id}}"><i class="far fa-image"></i></div>
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.id}}').innerHTML='image';" hidden>
</label>

View File

@ -41,7 +41,7 @@
<form id="contactform" action="/contact" method="post">
<label for="input-message" class="mt-3">Your message</label>
<label class="mt-3">Your message</label>
<textarea id="input-message" form="contactform" name="message" class="form-control" required></textarea>
<input type="submit" value="Submit" class="btn btn-primary mt-3">

View File

@ -12,12 +12,12 @@
<form action="/forgot" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label>
<label class="mt-3">Username</label>
<input class="form-control" id="username" aria-describedby="usernameHelp"
type="text" name="username" required="">
<label for="email" class="mt-3">Email</label>
<label class="mt-3">Email</label>
<input class="form-control" id="password" aria-describedby="passwordHelp"
type="email" name="email" required="">

View File

@ -82,13 +82,13 @@
<form action="/login" method="post" class="mt-md-3" id="login">
<label for="username" class="mt-3">Username or Email Address</label>
<label class="mt-3">Username or Email Address</label>
<input class="form-control" id="username" aria-describedby="usernameHelp"
type="text" name="username" required="">
<input type="hidden" name="redirect" value="{{redirect}}">
<label for="password" class="mt-3">Password</label>
<label class="mt-3">Password</label>
<input class="form-control" id="password" aria-describedby="passwordHelp"
type="password" name="password" required="">

View File

@ -81,7 +81,7 @@
<input type="hidden" name="time" value="{{time}}">
<input type="hidden" name="hash" value="{{hash}}">
<label for="2fa_token" class="mt-3">Your verification code</label>
<label class="mt-3">Your verification code</label>
<input class="form-control" id="2fa_token" name="2fa_token" type="text" placeholder="6-digit code">

View File

@ -12,17 +12,17 @@
<form action="/request_2fa_disable" method="post" class="mt-3" autocomplete="off">
<label for="username" class="mt-3">Username</label>
<label class="mt-3">Username</label>
<input class="form-control" id="username" aria-describedby="usernameHelp"
type="text" name="username" required=""{% if v %} value="{{v.username}}" disabled{% endif %}>
<label for="email" class="mt-3">Password</label>
<label class="mt-3">Password</label>
<input class="form-control" id="password" aria-describedby="passwordHelp" autocomplete="off"
type="password" name="password" required="">
<label for="email" class="mt-3">Email</label>
<label class="mt-3">Email</label>
<input class="form-control" id="password"
type="text" name="email" required=""{% if v %} value="{{v.email}}" disabled{% endif %}>

View File

@ -14,12 +14,12 @@
<input type="hidden" name="user_id" value="{{v.id}}">
<input type="hidden" name="token" value="{{token}}">
<label for="passentry" class="mt-3">New Password</label>
<label class="mt-3">New Password</label>
<input class="form-control" id="passentry" aria-describedby="usernameHelp"
type="password" name="password" required="">
<label for="confentry" class="mt-3">Confirm New Password</label>
<label class="mt-3">Confirm New Password</label>
<input class="form-control" id="confentry" aria-describedby="passwordHelp"
type="password" name="confirm_password" required="">

View File

@ -23,23 +23,23 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18">{{app.app_name}}</label>
<label>{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<label class="mb-0 w-lg-25">App Name</label>
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<label class="mb-0 w-lg-25">Client ID</label>
<input id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" role="button" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<label class="mb-0 w-lg-25">Redirect URI</label>
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<label class="mb-0 w-lg-25">Description</label>
<textarea form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256">{{app.description}}</textarea>
</div>
</div>
@ -64,21 +64,21 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18">{{app.app_name}}</label>
<label>{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<label class="mb-0 w-lg-25">App Name</label>
<input id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<label class="mb-0 w-lg-25">Client ID</label>
<input id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" role="button" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<label class="mb-0 w-lg-25">Redirect URI</label>
<input id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<label class="mb-0 w-lg-25">Description</label>
<textarea form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256">{{app.description}}</textarea>
</div>
</div>
@ -101,7 +101,7 @@
<div id="auth-{{auth.id}}" class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18">{{auth.application.app_name}}</label>
<label>{{auth.application.app_name}}</label>
</div>
<div class="body w-lg-100">
<input type="hidden" name="formkey" value="{{v.formkey}}">
@ -126,13 +126,13 @@
<div class="d-lg-flex">
<div class="body w-lg-100">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="form-username">Username</label>
<label>Username</label>
<input type="text" id="form-username" class="form-control" name="username" value="{{v.username}}" readonly>
<label for="form-appname">Application Name</label>
<label>Application Name</label>
<input type="text" id="form-appname" class="form-control" name="name" required>
<label for="form-redirect">Redirect URI</label>
<label>Redirect URI</label>
<input type="text" id="form-redirect" class="form-control" name="redirect_uri" placeholder="Custom URI scheme can be used. Separate multiple options with comma." required>
<label for="form-username">Description</label>
<label>Description</label>
<textarea form="api-key-request-form" id="form-desc" class="form-control" name="description" maxlength="256" required></textarea>
</div>
</div>

View File

@ -17,7 +17,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsortingcomments">Default Sorting for Comments</label>
<label>Default Sorting for Comments</label>
</div>
<div class="body w-lg-100">
@ -36,7 +36,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsorting">Default Sorting for Posts</label>
<label>Default Sorting for Posts</label>
</div>
<div class="body w-lg-100">
@ -55,7 +55,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaulttime">Default Time Filter for Posts</label>
<label>Default Time Filter for Posts</label>
</div>
<div class="body w-lg-100">
@ -81,14 +81,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="newtab">Open Threads In New Tabs</label>
<label>Open Threads In New Tabs</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="newtab" name="newtab"{% if v.newtab %} checked{% endif %} onchange="post_toast('/settings/profile?newtab='+document.getElementById('newtab').checked);">
<label class="custom-control-label" for="newtab"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically open threads in new tabs.</span>
@ -101,14 +101,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="newtabexternal">Open External Links In New Tabs</label>
<label>Open External Links In New Tabs</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="newtabexternal" name="newtabexternal"{% if v.newtabexternal %} checked{% endif %} onchange="post_toast('/settings/profile?newtabexternal='+document.getElementById('newtabexternal').checked);">
<label class="custom-control-label" for="newtabexternal"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically open external links in new tabs.</span>
@ -129,14 +129,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="oldreddit">Use Old Reddit</label>
<label>Use Old Reddit</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="oldreddit" name="oldreddit"{% if v.oldreddit %} checked{% endif %} onchange="post_toast('/settings/profile?oldreddit='+document.getElementById('oldreddit').checked);">
<label class="custom-control-label" for="oldreddit"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically convert reddit.com links to old.reddit.com links.</span>
@ -148,14 +148,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="controversial">Sort by Controversial</label>
<label>Sort by Controversial</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="controversial" name="controversial"{% if v.controversial %} checked{% endif %} onchange="post_toast('/settings/profile?controversial='+document.getElementById('controversial').checked);">
<label class="custom-control-label" for="controversial"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically sort reddit.com links by controversial.</span>
@ -173,14 +173,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="slurreplacer">Disable +18 Warnings</label>
<label>Disable +18 Warnings</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="over18" name="over18"{% if v.over_18 %} checked{% endif %} onchange="post_toast('/settings/profile?over18='+document.getElementById('over18').checked);document.getElementById('filter-nsfw-option').classList.toggle('d-none')">
<label class="custom-control-label" for="over18"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to not get a warning before viewing +18 content.</span>
@ -194,14 +194,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="slurreplacer">Slur Replacer</label>
<label>Slur Replacer</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="slurreplacer" name="slurreplacer"{% if v.slurreplacer %} checked{% endif %} onchange="post_toast('/settings/profile?slurreplacer='+document.getElementById('slurreplacer').checked);">
<label class="custom-control-label" for="slurreplacer"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically replace slurs.</span>
@ -214,14 +214,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="hidevotedon">Hide Posts Voted On</label>
<label>Hide Posts Voted On</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="hidevotedon" name="hidevotedon"{% if v.hidevotedon %} checked{% endif %} onchange="post_toast('/settings/profile?hidevotedon='+document.getElementById('hidevotedon').checked);">
<label class="custom-control-label" for="hidevotedon"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically hide posts you have voted on from your frontpage.</span>
@ -233,7 +233,7 @@
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="filters-text">Custom Filters</label>
<label>Custom Filters</label>
</div>
<div class="body w-lg-100">

View File

@ -20,7 +20,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="quadrant">Quadrant</label>
<label>Quadrant</label>
</div>
<div class="body w-lg-100">
@ -47,7 +47,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Theme</label>
<label>Website Theme</label>
</div>
<div class="body w-lg-100">
@ -82,7 +82,7 @@
{% for themecolor in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
<input type="radio" name="themecolor" id="themecolor-{{themecolor}}" value="{{themecolor}}" {% if v.themecolor == themecolor %}checked{% endif %} onclick="document.getElementById('themecolor-form').submit()"/>
<label class="color-radio" for="themecolor-{{themecolor}}">
<label class="color-radio">
<span style="background-color: #{{themecolor}}">
{% if v.themecolor.lower() == themecolor %}
<i class="fas fa-check text-white"></i>
@ -105,7 +105,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" type="text" name="themecolor" id="color-code" value="{% if v.themecolor %}{{v.themecolor}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" onclick="form.submit()" hidden=""></label>
</form>
</div> -->
@ -113,7 +113,7 @@
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Backgrounds</label>
<label>Website Backgrounds</label>
</div>
<div class="body w-lg-100">
<script>
@ -305,7 +305,7 @@
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="referral_code">Referral code</label>
<label>Referral code</label>
</div>
<div class="body w-lg-100">
@ -438,7 +438,7 @@
{% for color in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
<input type="radio" name="color" id="color-{{color}}" value="{{color}}" {% if v.namecolor == color %}checked{% endif %} onclick="document.getElementById('color-form').submit()"/>
<label class="color-radio" for="color-{{color}}">
<label class="color-radio">
<span style="background-color: #{{color}}">
{% if v.namecolor.lower() == color %}
<i class="fas fa-check text-white"></i>
@ -461,7 +461,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" type="text" name="color" id="color-code" value="{% if v.namecolor %}{{v.namecolor}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" onclick="form.submit()" hidden=""></label>
</form>
</div>
@ -501,7 +501,7 @@
{% for titlecolor in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
<input type="radio" name="titlecolor" id="titlecolor-{{titlecolor}}" value="{{titlecolor}}" {% if v.titlecolor == titlecolor %}checked{% endif %} onclick="document.getElementById('titlecolor-form').submit()"/>
<label class="color-radio" for="titlecolor-{{titlecolor}}">
<label class="color-radio">
<span style="background-color: #{{titlecolor}}">
{% if v.titlecolor.lower() == titlecolor %}
<i class="fas fa-check text-white"></i>
@ -524,7 +524,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" type="text" name="titlecolor" id="color-code" value="{% if v.titlecolor %}{{v.titlecolor}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" onclick="form.submit()" hidden=""></label>
</form>
</div>
@ -554,6 +554,10 @@
&nbsp;
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('bio-text')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></pre>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0">
<div id="filename-show"><i class="far fa-image"></i></div>
<input id="file-upload" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show').innerHTML='image';" hidden>
</label>
</div>
<pre></pre>
@ -583,14 +587,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="privateswitch">Private Mode</label>
<label>Private Mode</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="privateswitch" name="private"{% if v.is_private%} checked{% endif %} onchange="post_toast('/settings/profile?private='+document.getElementById('privateswitch').checked)">
<label class="custom-control-label" for="privateswitch"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">This will hide your post and comment history from others. We will also ask search engines to not index your profile page. (Your content will still be accessible via direct link.)</span>
@ -601,14 +605,14 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="nofollowswitch">Disable Subscriptions</label>
<label>Disable Subscriptions</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="nofollowswitch" name="nofollow"{% if v.is_nofollow%} checked{% endif %} onchange="post_toast('/settings/profile?nofollow='+document.getElementById('nofollowswitch').checked)">
<label class="custom-control-label" for="nofollowswitch"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">Prevent other users from following you.</span>

View File

@ -24,7 +24,7 @@
<div class="d-lg-flex">
<label for="new_password" class="mb-0 w-lg-25">New Password</label>
<label class="mb-0 w-lg-25">New Password</label>
<input class="form-control w-lg-100" id="new_password"
aria-describedby="new_password" type="password" name="new_password" autocomplete="off"
@ -43,7 +43,7 @@
<div class="d-lg-flex mt-3">
<label for="cnf_password" class="mb-0 w-lg-25">Confirm New Password</label>
<label class="mb-0 w-lg-25">Confirm New Password</label>
<input class="form-control w-lg-100" id="cnf_password"
aria-describedby="cnf_password" type="password" name="cnf_password" autocomplete="off"
@ -60,7 +60,7 @@
<div class="d-lg-flex mt-5">
<label for="old_password" class="mb-0 w-lg-25">Old Password</label>
<label class="mb-0 w-lg-25">Old Password</label>
<input class="form-control mb-2 w-lg-100" id="old_password" autocomplete="off"
aria-describedby="old_password" type="password" name="old_password"
@ -101,7 +101,7 @@
<div class="d-lg-flex">
<label for="new-email" class="w-lg-25">Email</label>
<label class="w-lg-25">Email</label>
<div class="w-lg-100">
@ -119,7 +119,7 @@
<div class="d-lg-flex mt-3">
<label for="email-password" class="w-lg-25 d-none" id="email-password-label">Password</label>
<label class="w-lg-25 d-none" id="email-password-label">Password</label>
<div class="w-lg-100">
@ -165,14 +165,14 @@
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="2faToggle">Use 2-step login</label>
<label>Use 2-step login</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="2faToggle" name="2faToggle" onchange="$('#2faModal').modal('toggle')" {% if not mfa_secret %}checked=""{% endif %}>
<label class="custom-control-label" for="2faToggle"></label>
<label class="custom-control-label"></label>
</div>
<span class="text-small-extra text-muted">This requires entering a randomly-generated, 6-digit code and your password to login. See <a href="#">Google Authenticator</a> or <a href="#">Authy</a> for more details.</span>
@ -196,7 +196,7 @@
<div class="d-lg-flex">
<label for="forcelog-password" class="w-lg-25" id="email-password-label">Password</label>
<label class="w-lg-25" id="email-password-label">Password</label>
<div class="w-lg-100">
@ -253,7 +253,7 @@
<div class="d-lg-flex">
<label for="delete-password" class="w-lg-25" id="email-password-label">Password</label>
<label class="w-lg-25" id="email-password-label">Password</label>
<div class="w-lg-100">
@ -266,7 +266,7 @@
{% if v.mfa_secret %}
<div class="d-lg-flex mt-3">
<label for="delete-mfa" class="w-lg-25" id="email-password-label">Two-Factor Code</label>
<label class="w-lg-25" id="email-password-label">Two-Factor Code</label>
<div class="w-lg-100">
@ -279,7 +279,7 @@
<div class="d-lg-flex mt-3">
<label for="delete-reason" class="w-lg-25" id="email-password-label">Feedback</label>
<label class="w-lg-25" id="email-password-label">Feedback</label>
<div class="w-lg-100">

View File

@ -153,20 +153,20 @@
{% if ref_user %}
<input type="hidden" name="referred_by" value="{{ref_user.id}}">{% endif %}
<label for="username-register" class="mt-3">Username</label>
<label class="mt-3">Username</label>
<input class="form-control" id="username-register"
aria-describedby="usernameHelpRegister" type="text" name="username" pattern="[a-zA-Z0-9_\-]{3,25}" required="">
<small id="usernameHelpRegister"></small>
<label for="email-register" class="mt-3">Email Address</label>
<label class="mt-3">Email Address</label>
<small class="d-inline-block text-muted ml-1">(optional)</small>
<input class="form-control" id="email-register"
aria-describedby="emailHelpRegister" type="text" name="email">
<label for="password-register" class="mt-3">Password</label>
<label class="mt-3">Password</label>
<input class="form-control" id="password-register"
aria-describedby="passwordHelpReigster" type="password" name="password" required="">
@ -176,7 +176,7 @@
<small id="passwordHelpSuccess" class="form-text font-weight-bold text-success d-none mt-1">Your password meets the requirements.
</small>
<label for="password_confirm" class="mt-3">Confirm Password</label>
<label class="mt-3">Confirm Password</label>
<input class="form-control" id="password_confirm"
aria-describedby="passwordConfirmHelp" type="password" name="password_confirm"
@ -184,7 +184,7 @@
<div class="custom-control custom-checkbox mt-4">
<input type="checkbox" class="custom-control-input" id="termsCheck" required>
<label class="custom-control-label terms" for="termsCheck">I accept the <a
<label class="custom-control-label terms">I accept the <a
href="/post/1xq/posting-guidelines-policies-legal-shit" target="_blank">terms and conditions</a></label>
</div>

View File

@ -594,21 +594,21 @@
&nbsp;
<a class="btn btn-secondary format d-inline-block m-0" href="javascript:void(0)"><i class="fas fa-quote-right" onclick="makeQuote('reply-form-body-{{p.fullname}}')" data-toggle="tooltip" data-placement="bottom" title="Quote"></i></a>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="gif-reply-btn-{{p.fullname}}">
<label class="btn btn-secondary format d-inline-block m-0">
<span id="gif-reply-btn-{{p.fullname}}" class="font-weight-bolder text-uppercase" onclick="commentForm('reply-form-body-{{p.fullname}}');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span>
</label>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="emoji-reply-btn-{{p.fullname}}">
<label class="btn btn-secondary format d-inline-block m-0">
<div id="emoji-reply-btn-{{p.fullname}}" onclick="loadEmojis('reply-form-body-{{p.fullname}}')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
</label>
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}">
<div id="filename-show-reply-{{p.id}}"><i class="far fa-image"></i></div>
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{p.id}}').innerHTML='image';" hidden>
</label>
<!-- &nbsp;&nbsp;
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="nsfwCheck-{{p.fullname}}" name="over_18" form="reply-to-{{p.fullname}}">
<label class="custom-control-label" for="nsfwCheck">+18</label>
<label class="custom-control-label">+18</label>
</div>
--> <a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto" onclick="post_comment('{{p.fullname}}')">Comment</a>
</div>

View File

@ -314,13 +314,13 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label for="title">Post Title</label>
<label>Post Title</label>
<input v-model="post_title" class="form-control" id="post-title" aria-describedby="titleHelpRegister" type="text" name="title" placeholder="Required" value="{{title}}" minlength="1" maxlength="500" required oninput="checkForRequired()">
<div id="urlblock">
<label for="URL" class="mt-3">URL</label>
<label class="mt-3">URL</label>
<input class="form-control" id="post-URL" aria-describedby="URLHelp" type="url" name="url" placeholder="Optional if you have text." value="{{request.args.get('url','')}}" required oninput="checkForRequired();autoSuggestTitle();hide_image()">
<small class="form-text text-muted">To post an image, use a direct image link such as i.imgur.com</small>
</div>
@ -330,7 +330,7 @@
<img loading="lazy" id="image-preview" class="w-100 d-block">
<label class="btn btn-secondary m-0" for="file-upload">
<label class="btn btn-secondary m-0">
<div id="filename-show">Select Image</div>
<input id="file-upload" type="file" name="file" accept="image/*" hidden>
</label>
@ -339,7 +339,7 @@
</div>
</div>
<label for="body" class="mt-3">Text<i class="fas fa-info-circle text-gray-400 ml-1" data-toggle="tooltip" data-placement="top" title="Uses markdown. Limited to 10000 characters."></i></label>
<label class="mt-3">Text<i class="fas fa-info-circle text-gray-400 ml-1" data-toggle="tooltip" data-placement="top" title="Uses markdown. Limited to 10000 characters."></i></label>
<div class="input-group">
@ -369,7 +369,7 @@
&nbsp;
<small class="btn btn-secondary format d-inline-block m-0"><span class="font-weight-bolder text-uppercase" aria-hidden="true" onclick="getGif();commentForm('post-text')" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</span></small>
&nbsp;
<label class="btn btn-secondary format d-inline-block m-0" for="emoji-reply-btn">
<label class="btn btn-secondary format d-inline-block m-0">
<div id="emoji-reply-btn" onclick="loadEmojis('post-text')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></div>
</label>
@ -383,12 +383,12 @@
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="nsfwCheck" name="over_18">
<label class="custom-control-label" for="nsfwCheck">+18</label>
<label class="custom-control-label">+18</label>
</div>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="privateCheck" name="private">
<label class="custom-control-label" for="privateCheck">Draft</label>
<label class="custom-control-label">Draft</label>
</div>
<pre>

View File

@ -245,7 +245,7 @@
&nbsp;&nbsp;&nbsp;
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="locked" name="locked" {% if u.flairchanged %}checked{% endif %}>
<label class="custom-control-label" for="locked">locked</label>
<label class="custom-control-label">locked</label>
</div>
&nbsp;&nbsp;&nbsp;
<input class="btn btn-primary ml-auto" type="submit" value="Change Flair">
@ -260,7 +260,7 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<div class="custom-control custom-checkbox">
<input type="checkbox" id="alts-1-desktop" class="custom-control-input" name="alts" value="1">
<label class="custom-control-label" for="alts-1-desktop">Include alts</label>
<label class="custom-control-label">Include alts</label>
</div>
<input type="submit" class="btn btn-success" value="Unban user">
</form>
@ -271,7 +271,7 @@
<input style="font-size:11px;" type="number" class="form-control" name="days" placeholder="Days (blank = permanent)">
<div class="custom-control custom-checkbox">
<input type="checkbox" id="alts-2-desktop" class="custom-control-input" name="alts" value="1">
<label class="custom-control-label" for="alts-2-desktop">Include alts</label>
<label class="custom-control-label">Include alts</label>
</div>
<input id="user-ban-submit" type="submit" class="btn btn-danger" value="Ban user" disabled>
</form>
@ -472,7 +472,7 @@
&nbsp;&nbsp;&nbsp;
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="locked-mobile" name="locked" {% if u.flairchanged %}checked{% endif %}>
<label class="custom-control-label" for="locked-mobile">locked</label>
<label class="custom-control-label">locked</label>
</div>
&nbsp;&nbsp;&nbsp;
<input class="btn btn-primary ml-auto" type="submit" value="Change Flair">
@ -488,7 +488,7 @@
<br />
<div class="custom-control custom-checkbox">
<input type="checkbox" id="alts-1-mobile" class="custom-control-input" name="alts" value="1">
<label class="custom-control-label" for="alts-1-mobile">Include alts</label>
<label class="custom-control-label">Include alts</label>
</div>
<br />
<input type="submit" class="btn btn-success" value="Unban user">
@ -501,7 +501,7 @@
<br />
<div class="custom-control custom-checkbox">
<input type="checkbox" id="alts-2-mobile" class="custom-control-input" name="alts" value="1">
<label class="custom-control-label" for="alts-2-mobile">Include alts</label>
<label class="custom-control-label">Include alts</label>
</div>
<br />
<input id="user-ban-submit2" type="submit" class="btn btn-danger" value="Ban user" disabled>

View File

@ -9,7 +9,7 @@
<h1>Vote Info</h1>
<form action="votes" method="get" class="mb-6">
<label for="link-input">Paste permalink</label>
<label>Paste permalink</label>
<input id="link-input" type="text" class="form-control mb-2" name="link" value="{{thing.permalink if thing else ''}}">
<input type="submit" value="Submit" class="btn btn-primary">
</form>