same as last commit

master
Aevann 2023-08-07 14:32:02 +03:00
parent e39d67f3f8
commit 2ebba2de49
1 changed files with 37 additions and 61 deletions

View File

@ -5,94 +5,70 @@
{% if error %}{{macros.alert(error, true)}}{% endif %}
{% if msg %}{{macros.alert(msg, false)}}{% endif %}
<div class="title w-lg-25 mt-5">
<div class="title mt-5">
<label class="text-lg" for="stealth">Stealth Mode</label>
</div>
<div class="body w-lg-100">
<div class="d-inline-block w-lg-100">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if sub.stealth %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this,'/h/{{sub}}/stealth');">
<label class="custom-control-label" for="stealth"></label>
</div>
<span class="text-small text-muted">Make this hole blocked by default (users can visit it to unblock it).</span>
<span class="text-small text-muted">
Make this hole blocked by default (users can visit it to unblock it).
</span>
</div>
<h5 class="mt-5">Marsey</h5>
<div class="settings-section rounded">
<div class="d-flex">
<div class="title w-lg-25 text-md-center">
<img loading="lazy" alt="sub marsey picture" src="{{sub.marsey_url}}" style="max-width:100px">
</div>
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/h/{{sub}}/marsey_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
<img loading="lazy" alt="sub marsey picture" src="{{sub.marsey_url}}" style="max-width:100px">
<form class="d-inline-block" action="/h/{{sub}}/marsey_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</div>
<h5 class=" mt-5">Sidebar Picture</h5>
<div class="settings-section rounded">
<div class="d-flex">
<div class="title text-md-center">
<img loading="lazy" alt="sub sidebar picture" src="{{sub.sidebar_url}}" style="max-width:300px">
</div>
<div class="body w-lg-100 my-auto ml-3">
<div class="d-flex">
<div>
<form action="/h/{{sub}}/sidebar_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
<img class="mr-3" loading="lazy" alt="sub sidebar picture" src="{{sub.sidebar_url}}" style="max-width:min(300px,100%)">
<form class="d-inline-block mt-2" action="/h/{{sub}}/sidebar_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</div>
<h5 class="mt-5">Banners</h5>
<div class="settings-section rounded sub-banner-update-section">
{% for banner in sub.banner_urls %}
<section id="sub-banner-update-{{loop.index - 1}}" class="d-flex sub-settings-subsection">
<div class="title w-lg-75">
<img loading="lazy" alt="/h/{{sub.name}} banner" src="{{banner}}" class="banner-pic sub-banner-preview sub-banner-{{sub.name}}">
</div>
<div class="body w-lg-100 my-auto ml-3">
<div class="d-flex">
<button class="btn btn-danger sub-banner-delete-button" id="sub-banner-delete-{{loop.index}}" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{sub.name}}/settings/banners/{{loop.index - 1}}', 'DELETE');">Delete</button>
</div>
</div>
<section id="sub-banner-update-{{loop.index - 1}}" class="d-inline-block sub-settings-subsection">
<img class="mr-3" loading="lazy" alt="/h/{{sub.name}} banner" src="{{banner}}" style="max-height:300px;max-width:100%">
<button class="btn btn-danger sub-banner-delete-button mt-2" id="sub-banner-delete-{{loop.index}}" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{sub.name}}/settings/banners/{{loop.index - 1}}', 'DELETE');">Delete</button>
</section>
{% else %}
<section id="sub-banner-no-banners" class="d-flex sub-settings-subsection">
<section id="sub-banner-no-banners" class="d-inline-block sub-settings-subsection">
{{macros.ghost_box("No banners uploaded", "", 2, "flex:1;")}}
</section>
{% endfor %}
{% if not g.is_tor %}
<section id="sub-banner-upload-new" class="d-flex sub-settings-subsection">
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/h/{{sub.name}}/settings/banners/" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
<button type="button" class="btn btn-danger sub-banner-delete-button" id="sub-banner-delete-all" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{sub.name}}/settings/banners/', 'DELETE');">Delete All Banners</button>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
<section id="sub-banner-upload-new" class="sub-settings-subsection">
<form class="d-inline-block" action="/h/{{sub.name}}/settings/banners/" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0 mt-3">
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
<button type="button" class="btn btn-danger sub-banner-delete-button mt-3" id="sub-banner-delete-all" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{sub.name}}/settings/banners/', 'DELETE');">Delete All Banners</button>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</section>
{% endif %}