marsey UI stuff

master
Aevann1 2022-09-09 11:39:03 +02:00
parent 500c1ba3c1
commit 5076859817
2 changed files with 12 additions and 6 deletions

View File

@ -4,7 +4,7 @@ from random import choice, choices
valid_username_chars = 'a-zA-Z0-9_\-'
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,30})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
valid_password_regex = re.compile("^.{8,100}$", flags=re.A)
@ -40,7 +40,7 @@ sub_regex = re.compile('(^|\s|<p>)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)'
strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}', flags=re.A)
mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,25}) ([0-9]+)", flags=re.A|re.I)
mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I)
emoji_regex = re.compile(f"<p>\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A)
emoji_regex2 = re.compile(f'(?<!"):([!#@{valid_username_chars}]{{1,36}}?):', flags=re.A)

View File

@ -6,6 +6,12 @@
{% endblock %}
{% block content %}
<style>
input {
text-transform: lowercase;
}
</style>
<div class="mx-4">
<h2 class="mt-5">Submit Marsey</h2>
<div class="settings-section rounded">
@ -25,13 +31,13 @@
</div>
<label class="mt-3" for="name">Name</label>
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" required>
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" pattern='[a-z0-9]{1,30}' required>
<label class="mt-3" for="author">Author</label>
<input autocomplete="off" type="text" id="author" class="form-control" name="author" value="{{v.username}}" maxlength="30" required>
<input autocomplete="off" type="text" id="author" class="form-control" name="author" value="{{v.username}}" maxlength="30" pattern='[a-z0-9_\-]{3,30}' required>
<label class="mt-3" for="tags">Tags</label>
<input autocomplete="off" type="text" id="tags" class="form-control" name="tags" maxlength="200" required>
<label class="mt-3" for="tags">Tags (must be separated by spaces)</label>
<input autocomplete="off" type="text" id="tags" class="form-control" name="tags" maxlength="200" pattern='[a-z0-9: ]{1,200}' required>
<div class="footer mt-5">
<div class="d-flex">