Compare commits

..

No commits in common. "04e7bd30055d384359b82eb3127546f157c1abee" and "95525d28a2e26432913093472a391c166931daa0" have entirely different histories.

5 changed files with 11 additions and 24 deletions

View File

@ -17,16 +17,9 @@ async def resetDefaultPropic(request, order: Order, isFursuiter, sendAnswer=True
with open("res/propic/default.png", "rb") as f:
data = f.read()
f.close()
convertedFilename = order.ans(f'propic{s}')
if convertedFilename is not None:
convertedFilename = f"res/propic/{convertedFilename}"
if os.path.exists(convertedFilename):
os.remove(convertedFilename) # converted file
originalFilename = f"res/propic/propic{s}_{order.code}_original"
if os.path.exists(originalFilename):
os.remove(originalFilename) # original file
os.remove(f"res/propic/{order.ans(f'propic{s}')}") # converted 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()
@ -42,11 +35,11 @@ async def upload_propic(request, order: Order):
raise exceptions.BadRequest("The deadline has passed. You cannot modify the badges at this moment.")
if request.form.get('submit') == 'Delete main image':
await order.edit_answer('propic', None)
await resetDefaultPropic(request, order, False, sendAnswer=False)
await order.edit_answer('propic', None) #This MUST come after the reset default propic!
elif request.form.get('submit') == 'Delete fursuit image':
await order.edit_answer('propic_fursuiter', None)
await resetDefaultPropic(request, order, True, sendAnswer=False)
await order.edit_answer('propic_fursuiter', None) #This MUST come after the reset default propic!
else:
for fn, body in request.files.items():
if fn not in ['propic', 'propic_fursuiter']:
@ -73,7 +66,7 @@ async def upload_propic(request, order: Order):
raise exceptions.BadRequest(errorDetails)
with open(f"res/propic/{fn}_{order.code}_original", "wb") as f:
with open(f"res/propic/{fn}_{order.code}_original.jpg", "wb") as f:
f.write(body[0].body)
aspect_ratio = width/height

View File

@ -58,12 +58,12 @@ svg.propic-border-filter {
.propic-border.propic-animated-super .propic-border-animation {
background: linear-gradient(90deg, #FA5E00 20%, #FAAA00 40%, #FB8C00 60%, #FA3200 80%, #FAC800 100%);
animation: border-animation 2.5s linear 0ms infinite;
animation: border-animation 1s linear 0ms infinite;
}
.propic-border.propic-animated-normal .propic-border-animation {
background: linear-gradient(90deg, #6124AB 20%, #AB248F 40%, #8E24AA 60%, #3524AB 80%, #AB243E 100%);
animation: border-animation 2.5s linear 0ms infinite;
animation: border-animation 1s linear 0ms infinite;
}
@keyframes border-animation {

View File

@ -11,10 +11,4 @@ span.nsc-room-counter {
div.room-actions a>span {
display: none;
}
}
#room a[role=button] {
display: inline-flex;
justify-content: center;
align-items: center;
}

View File

@ -8,7 +8,7 @@
</div>
{% endif %}
<img alt="Your own profile picture" src="{{imgSrc}}" class="absolute propic {{(('propic-' + order.sponsorship) if not effects else '') if order.sponsorship else 'propic-base'}}"/>
<svg alt="" class="propic-filler {{(('propic-' + order.sponsorship) if not effects else '') if order.sponsorship else 'propic-base'}}" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"></svg>
<img alt="" src="/res/propic/default.png" class="propic-filler {{(('propic-' + order.sponsorship) if not effects else '') if order.sponsorship else 'propic-base'}}"/>
{% if flag %}
<img alt="flag" class="absolute propic-flag" src="/res/flags/{{order.country.lower()}}.svg"/>
{% endif %}

View File

@ -85,9 +85,9 @@
{% endif %}
{# <a role="button" {% if not room.forbidden and quota.get_left(len(room_members)) > 0 %}href="javascript:document.getElementById('modal-roomconfirm').setAttribute('open', 'true');"{% endif %}>Confirm <strong>{{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}}</strong> room</a> #}
<a role="button" {% if not room.forbidden and len(room_members) == order.room_person_no %}href="javascript:document.getElementById('modal-roomconfirm').setAttribute('open', 'true');"{% endif %}>Confirm {{[None,'single','double','triple','quadruple','quintuple'][order.room_person_no]}} room</a>
<a role="button" {% if not room.forbidden and len(room_members) == order.room_person_no %}href="javascript:document.getElementById('modal-roomconfirm').setAttribute('open', 'true');"{% endif %}>Confirm <strong>{{[None,'single','double','triple','quadruple','quintuple'][order.room_person_no]}}</strong> room</a>
<a role="button" href="javascript:document.getElementById('modal-roomrename').setAttribute('open', 'true');">Rename room</a>
<a role="button" href="javascript:document.getElementById('modal-roomrename').setAttribute('open', 'true');">Rename room {{[None,'single','double','triple','quadruple','quintuple'][order.room_person_no]}} room</a>
{% endif %}
{% else %}
{% if order.room_id and not order.room_confirmed %}