Compare commits

..

3 Commits

Author SHA1 Message Date
Stranck c7159cf3b4 Default for room renaming 2024-01-08 23:07:59 +01:00
Stranck fd3b0e727c Fixes 2024-01-08 23:05:35 +01:00
Stranck bebc7011cf Fixed python version support - propic 2024-01-08 23:04:34 +01:00
5 changed files with 8 additions and 6 deletions

View File

@ -18,7 +18,8 @@ async def resetDefaultPropic(request, order: Order, isFursuiter, sendAnswer=True
data = f.read()
f.close()
os.remove(f"res/propic/{order.ans(f'propic{s}')}") # converted file
os.remove(f"res/propic/{order.ans(f'propic{s}').split(".jpg")[0]}_original.jpg") # original file
filenameNoExt = order.ans(f'propic{s}').split(".jpg")[0]
os.remove(f"res/propic/{filenameNoExt}_original.jpg") # original file
await order.edit_answer_fileUpload(f'propic{s}_file', f'propic{s}_file_{order.code}_default.png', 'image/png', data)
if(sendAnswer):
await order.send_answers()

View File

@ -18,6 +18,7 @@ function confirmAction (intent, sender) {
intentEditPanel.style.display = 'block';
intentEdit.setAttribute('required', true)
intentFormAction.setAttribute('method', 'POST')
document.getElementById("intentRename").value = sender.parentElement.parentElement.querySelector("span").innerText;
break
case 'unconfirm':
break

View File

@ -54,7 +54,7 @@
<form method="POST" action="/manage/room/rename">
<label for="name"></label>
<input type="text" name="name" required minlength="4" maxlength="64" />
<input type="text" name="name" required minlength="4" maxlength="64" value="{{order.ans('room_name')}}"/>
<input type="submit" value="Rename room" />
</form>
</article>

View File

@ -15,7 +15,7 @@
<div class="grid people" style="padding-bottom:1em;">
{% endif %}
<div style="margin-bottom: 1em;">
{% with order=person, imgSrc='/res/propic/' + (person.ans('propic_fursuiter') or 'default.png'), effects = false, flag = true %}
{% with order=person, imgSrc='/res/propic/' + (person.ans('propic_fursuiter') or 'default.png'), effects = true, flag = true %}
{% include 'blocks/propic.html' %}
{% endwith %}
<h5>{{person.ans('fursona_name')}}</h5>

View File

@ -2,7 +2,7 @@
{% block title %}Furizon 2024 Nosecount{% endblock %}
{% block main %}
<main class="container">
{% if order.isAdmin() %}
{% if order and order.isAdmin() %}
<script src="/res/scripts/roomManager.js"></script>
{% endif %}
<header>
@ -16,7 +16,7 @@
{% if o.code == o.room_id and o.room_confirmed %}
<h4 style="margin-top:1em;">
<span>{{o.room_name}}</span>
{% if order.isAdmin() %}
{% if order and order.isAdmin() %}
<div class="room-actions">
<a onclick="confirmAction('rename', this)" action="/manage/admin/room/rename/{{o.code}}"><img src="/res/icons/pencil.svg" class="icon" /><span>Rename</span></a>
<a onclick="confirmAction('unconfirm', this)" action="/manage/admin/room/unconfirm/{{o.code}}"><img src="/res/icons/door_open.svg" class="icon" /><span>Unconfirm</span></a>
@ -49,7 +49,7 @@
<h3>
<span>{{o.room_name}}</span>
{% if o.room_person_no - len(o.room_members) > 0 %} <span class="nsc-room-counter"> - Remaining slots: {{o.room_person_no - len(o.room_members)}}</span> {% endif %}
{% if order.isAdmin() %}
{% if order and order.isAdmin() %}
<div class="room-actions">
<a onclick="confirmAction('rename', this)" action="/manage/admin/room/rename/{{o.code}}"><img src="/res/icons/pencil.svg" class="icon" /><span>Rename</span></a>
<a class="act-del" onclick="confirmAction('delete', this)" action="/manage/admin/room/delete/{{o.code}}"><img src="/res/icons/delete.svg" class="icon" /><span>Delete</span></a>