forked from rDrama/rDrama
for consistency's sake, don't use {sub.name} inside strings anymore
parent
eb69b039a0
commit
2e31b52366
|
@ -30,7 +30,7 @@ def exile_post(v, pid):
|
||||||
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{p.title}]({p.shortlink})")
|
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{p.title}]({p.shortlink})")
|
||||||
|
|
||||||
|
|
||||||
return {"message": f"@{u.username} has been exiled from /h/{sub.name} successfully!"}
|
return {"message": f"@{u.username} has been exiled from /h/{sub} successfully!"}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ def exile_comment(v, cid):
|
||||||
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{c.permalink}]({c.shortlink})")
|
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{c.permalink}]({c.shortlink})")
|
||||||
|
|
||||||
|
|
||||||
return {"message": f"@{u.username} has been exiled from /h/{sub.name} successfully!"}
|
return {"message": f"@{u.username} has been exiled from /h/{sub} successfully!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/h/<sub>/unexile/<uid>")
|
@app.post("/h/<sub>/unexile/<uid>")
|
||||||
|
@ -76,7 +76,7 @@ def unexile(v, sub, uid):
|
||||||
|
|
||||||
|
|
||||||
if request.headers.get("Authorization") or request.headers.get("xhr"):
|
if request.headers.get("Authorization") or request.headers.get("xhr"):
|
||||||
return {"message": f"@{u.username} has been unexiled from /h/{sub.name} successfully!"}
|
return {"message": f"@{u.username} has been unexiled from /h/{sub} successfully!"}
|
||||||
|
|
||||||
|
|
||||||
return redirect(f'/h/{sub}/exilees')
|
return redirect(f'/h/{sub}/exilees')
|
||||||
|
@ -101,7 +101,7 @@ def block_sub(v, sub):
|
||||||
g.db.add(block)
|
g.db.add(block)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} blocked successfully!"}
|
return {"message": f"/h/{sub} blocked successfully!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/h/<sub>/unblock")
|
@app.post("/h/<sub>/unblock")
|
||||||
|
@ -117,7 +117,7 @@ def unblock_sub(v, sub):
|
||||||
g.db.delete(block)
|
g.db.delete(block)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} unblocked successfully!"}
|
return {"message": f"/h/{sub} unblocked successfully!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/h/<sub>/subscribe")
|
@app.post("/h/<sub>/subscribe")
|
||||||
|
@ -134,7 +134,7 @@ def subscribe_sub(v, sub):
|
||||||
g.db.add(subscribe)
|
g.db.add(subscribe)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} unblocked successfully!"}
|
return {"message": f"/h/{sub} unblocked successfully!"}
|
||||||
|
|
||||||
@app.post("/h/<sub>/unsubscribe")
|
@app.post("/h/<sub>/unsubscribe")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -149,7 +149,7 @@ def unsubscribe_sub(v, sub):
|
||||||
g.db.delete(subscribe)
|
g.db.delete(subscribe)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} blocked successfully!"}
|
return {"message": f"/h/{sub} blocked successfully!"}
|
||||||
|
|
||||||
@app.post("/h/<sub>/follow")
|
@app.post("/h/<sub>/follow")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -164,7 +164,7 @@ def follow_sub(v, sub):
|
||||||
g.db.add(subscription)
|
g.db.add(subscription)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} followed successfully!"}
|
return {"message": f"/h/{sub} followed successfully!"}
|
||||||
|
|
||||||
@app.post("/h/<sub>/unfollow")
|
@app.post("/h/<sub>/unfollow")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -178,7 +178,7 @@ def unfollow_sub(v, sub):
|
||||||
g.db.delete(subscription)
|
g.db.delete(subscription)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return {"message": f"/h/{sub.name} unfollowed successfully!"}
|
return {"message": f"/h/{sub} unfollowed successfully!"}
|
||||||
|
|
||||||
@app.get("/h/<sub>/mods")
|
@app.get("/h/<sub>/mods")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -333,9 +333,9 @@ def create_sub2(v):
|
||||||
|
|
||||||
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 1, User.id != v.id).all()]
|
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 1, User.id != v.id).all()]
|
||||||
for admin in admins:
|
for admin in admins:
|
||||||
send_repeatable_notification(admin, f":!marseyparty: /h/{sub.name} has been created by @{v.username} :marseyparty:")
|
send_repeatable_notification(admin, f":!marseyparty: /h/{sub} has been created by @{v.username} :marseyparty:")
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}')
|
return redirect(f'/h/{sub}')
|
||||||
|
|
||||||
@app.post("/kick/<pid>")
|
@app.post("/kick/<pid>")
|
||||||
@is_not_permabanned
|
@is_not_permabanned
|
||||||
|
@ -384,7 +384,7 @@ def post_sub_sidebar(v, sub):
|
||||||
g.db.add(sub)
|
g.db.add(sub)
|
||||||
|
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}/settings')
|
return redirect(f'/h/{sub}/settings')
|
||||||
|
|
||||||
|
|
||||||
@app.post('/h/<sub>/css')
|
@app.post('/h/<sub>/css')
|
||||||
|
@ -409,7 +409,7 @@ def post_sub_css(v, sub):
|
||||||
sub.css = css
|
sub.css = css
|
||||||
g.db.add(sub)
|
g.db.add(sub)
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}/settings')
|
return redirect(f'/h/{sub}/settings')
|
||||||
|
|
||||||
|
|
||||||
@app.get("/h/<sub>/css")
|
@app.get("/h/<sub>/css")
|
||||||
|
@ -446,7 +446,7 @@ def sub_banner(v, sub):
|
||||||
sub.bannerurl = bannerurl
|
sub.bannerurl = bannerurl
|
||||||
g.db.add(sub)
|
g.db.add(sub)
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}/settings')
|
return redirect(f'/h/{sub}/settings')
|
||||||
|
|
||||||
@app.post("/h/<sub>/sidebar_image")
|
@app.post("/h/<sub>/sidebar_image")
|
||||||
@limiter.limit("1/second;10/day")
|
@limiter.limit("1/second;10/day")
|
||||||
|
@ -472,7 +472,7 @@ def sub_sidebar(v, sub):
|
||||||
sub.sidebarurl = sidebarurl
|
sub.sidebarurl = sidebarurl
|
||||||
g.db.add(sub)
|
g.db.add(sub)
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}/settings')
|
return redirect(f'/h/{sub}/settings')
|
||||||
|
|
||||||
@app.post("/h/<sub>/marsey_image")
|
@app.post("/h/<sub>/marsey_image")
|
||||||
@limiter.limit("1/second;10/day")
|
@limiter.limit("1/second;10/day")
|
||||||
|
@ -498,7 +498,7 @@ def sub_marsey(v, sub):
|
||||||
sub.marseyurl = marseyurl
|
sub.marseyurl = marseyurl
|
||||||
g.db.add(sub)
|
g.db.add(sub)
|
||||||
|
|
||||||
return redirect(f'/h/{sub.name}/settings')
|
return redirect(f'/h/{sub}/settings')
|
||||||
|
|
||||||
@app.get("/holes")
|
@app.get("/holes")
|
||||||
@auth_desired_with_logingate
|
@auth_desired_with_logingate
|
||||||
|
@ -558,6 +558,6 @@ def sub_stealth(v, sub):
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
if sub.stealth:
|
if sub.stealth:
|
||||||
return {"message": f"Stealth mode has been enabled for /h/{sub.name} successfully!"}
|
return {"message": f"Stealth mode has been enabled for /h/{sub} successfully!"}
|
||||||
else:
|
else:
|
||||||
return {"message": f"Stealth mode has been disabled for /h/{sub.name} successfully!"}
|
return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"}
|
|
@ -52,7 +52,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if sub and sub.css and not request.path.endswith('settings') and not request.values.get('nocss') %}
|
{% if sub and sub.css and not request.path.endswith('settings') and not request.values.get('nocss') %}
|
||||||
<link rel="stylesheet" href="/h/{{sub.name}}/css" type="text/css">
|
<link rel="stylesheet" href="/h/{{sub}}/css" type="text/css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.themecolor == '30409f' %}
|
{% if v and v.themecolor == '30409f' %}
|
||||||
|
@ -268,7 +268,7 @@
|
||||||
{% if '@' not in request.path %}
|
{% if '@' not in request.path %}
|
||||||
{% if sub and SITE_NAME != 'WPD' %}
|
{% if sub and SITE_NAME != 'WPD' %}
|
||||||
<a href="{{sub.banner_url}}">
|
<a href="{{sub.banner_url}}">
|
||||||
<img alt="/h/{{sub.name}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
|
<img alt="/h/{{sub}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
|
||||||
</a>
|
</a>
|
||||||
{% elif SITE_NAME == 'rDrama' %}
|
{% elif SITE_NAME == 'rDrama' %}
|
||||||
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
|
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if sub %}
|
{% if sub %}
|
||||||
<a id="sub-name" href="/h/{{sub.name}}" class="font-weight-bold ml-2 flex-grow-1 mt-1" style="font-size:max(14px,1.2vw)">{% if not HOLE_STYLE_FLAIR %}/h/{% endif %}{{sub.name}}</a>
|
<a id="sub-name" href="/h/{{sub}}" class="font-weight-bold ml-2 flex-grow-1 mt-1" style="font-size:max(14px,1.2vw)">{% if not HOLE_STYLE_FLAIR %}/h/{% endif %}{{sub}}</a>
|
||||||
{% elif has_logo %}
|
{% elif has_logo %}
|
||||||
<style>
|
<style>
|
||||||
{% if g.webview %}
|
{% if g.webview %}
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
||||||
<a class="nav-link" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create Post"><i class="fas fa-feather-alt"></i></a>
|
<a class="nav-link" href="{% if sub %}/h/{{sub}}{% endif %}/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create Post"><i class="fas fa-feather-alt"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if FEATURES['CHAT'] -%}
|
{% if FEATURES['CHAT'] -%}
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
{% set preview = sub.banner_url %}
|
{% set preview = sub.banner_url %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<title>/h/{{sub.name}}</title>
|
<title>/h/{{sub}}</title>
|
||||||
|
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
<meta property="og:title" content="/h/{{sub.name}}">
|
<meta property="og:title" content="/h/{{sub}}">
|
||||||
<meta property="og:site_name" content="{{SITE}}">
|
<meta property="og:site_name" content="{{SITE}}">
|
||||||
<meta property="og:image" content="{{preview}}">
|
<meta property="og:image" content="{{preview}}">
|
||||||
<meta property="og:url" content="{{request.full_path}}">
|
<meta property="og:url" content="{{request.full_path}}">
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:site" content="{{SITE_FULL}}">
|
<meta name="twitter:site" content="{{SITE_FULL}}">
|
||||||
<meta name="twitter:title" content="/h/{{sub.name}}">
|
<meta name="twitter:title" content="/h/{{sub}}">
|
||||||
<meta name="twitter:creator" content="{{SITE_FULL}}">
|
<meta name="twitter:creator" content="{{SITE_FULL}}">
|
||||||
<meta name="twitter:image" content="{{preview}}">
|
<meta name="twitter:image" content="{{preview}}">
|
||||||
<meta name="twitter:url" content="{{request.full_path}}">
|
<meta name="twitter:url" content="{{request.full_path}}">
|
||||||
|
@ -40,25 +40,25 @@
|
||||||
|
|
||||||
<div class="row" style="overflow: visible;padding-top:5px;">
|
<div class="row" style="overflow: visible;padding-top:5px;">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<a class="btn btn-primary btn-block mt-3" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post</a>
|
<a class="btn btn-primary btn-block mt-3" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post</a>
|
||||||
|
|
||||||
{% if sub %}
|
{% if sub %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{%- set hole_prefix = '/h/' if not HOLE_STYLE_FLAIR else '' -%}
|
{%- set hole_prefix = '/h/' if not HOLE_STYLE_FLAIR else '' -%}
|
||||||
|
|
||||||
{% if sub.stealth %}
|
{% if sub.stealth %}
|
||||||
<a id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub.name}}</a>
|
<a id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub}}</a>
|
||||||
<a id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
|
<a id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
|
<a id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
|
||||||
<a id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub.name}}</a>
|
<a id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub.name}}</a>
|
<a id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
|
||||||
<a id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow {{hole_prefix}}{{sub.name}}</a>
|
<a id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow {{hole_prefix}}{{sub}}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
|
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
|
||||||
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub.name}}</a>
|
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if v and v.mods(sub.name) %}
|
{% if v and v.mods(sub.name) %}
|
||||||
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
|
<a class="btn btn-primary btn-block" href="/h/{{sub}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/mods">{{HOLE_NAME|upper}} MODS</a>
|
<a class="btn btn-primary btn-block" href="/h/{{sub}}/mods">{{HOLE_NAME|upper}} MODS</a>
|
||||||
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
|
<a class="btn btn-primary btn-block" href="/h/{{sub}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.can_create_hole -%}
|
{% if v and v.can_create_hole -%}
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE {{HOLE_NAME|upper}}</a>
|
<a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE {{HOLE_NAME|upper}}</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/mods">{{HOLE_NAME|upper}} MODS</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/mods">{{HOLE_NAME|upper}} MODS</a>
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a id="sidebar--directory--btn" class="btn btn-primary btn-block mb-3" href="/directory">
|
<a id="sidebar--directory--btn" class="btn btn-primary btn-block mb-3" href="/directory">
|
||||||
<span id="sidebar--directory--head">DIRECTORY</span>
|
<span id="sidebar--directory--head">DIRECTORY</span>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<h5>Users {{verb}} /h/{{sub.name}}</h5>
|
<h5>Users {{verb}} /h/{{sub}}</h5>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||||
<thead class="bg-primary text-white">
|
<thead class="bg-primary text-white">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<h5>Users exiled from /h/{{sub.name}}</h5>
|
<h5>Users exiled from /h/{{sub}}</h5>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||||
<thead class="bg-primary text-white">
|
<thead class="bg-primary text-white">
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<form action="/h/{{sub.name}}/unexile/{{user.id}}" method="post">
|
<form action="/h/{{sub}}/unexile/{{user.id}}" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Unexile">
|
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Unexile">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<h5>/h/{{sub.name}} Mods</h5>
|
<h5>/h/{{sub}} Mods</h5>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||||
<thead class="bg-primary text-white">
|
<thead class="bg-primary text-white">
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<td data-time="{{mod.created_utc}}"></td>
|
<td data-time="{{mod.created_utc}}"></td>
|
||||||
<td>
|
<td>
|
||||||
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
|
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
|
||||||
<form action="/h/{{sub.name}}/remove_mod" method="post">
|
<form action="/h/{{sub}}/remove_mod" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input type="hidden" name="uid" value="{{user.id}}">
|
<input type="hidden" name="uid" value="{{user.id}}">
|
||||||
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
|
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<form action="/h/{{sub.name}}/add_mod" method="post">
|
<form action="/h/{{sub}}/add_mod" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
|
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
|
||||||
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add Mod">
|
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add Mod">
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if sub.stealth %}checked{% endif %} onchange="post_toast(this,'/h/{{sub.name}}/stealth');">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if sub.stealth %}checked{% endif %} onchange="post_toast(this,'/h/{{sub}}/stealth');">
|
||||||
<label class="custom-control-label" for="stealth"></label>
|
<label class="custom-control-label" for="stealth"></label>
|
||||||
</div>
|
</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>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<form action="/h/{{sub.name}}/marsey_image" method="post" enctype="multipart/form-data">
|
<form action="/h/{{sub}}/marsey_image" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
||||||
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="marsey" onchange="form.submit()">
|
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="marsey" onchange="form.submit()">
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<form action="/h/{{sub.name}}/sidebar_image" method="post" enctype="multipart/form-data">
|
<form action="/h/{{sub}}/sidebar_image" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
||||||
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="sidebar" onchange="form.submit()">
|
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="sidebar" onchange="form.submit()">
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<form action="/h/{{sub.name}}/banner" method="post" enctype="multipart/form-data">
|
<form action="/h/{{sub}}/banner" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
||||||
Update<input autocomplete="off" type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" hidden name="banner" onchange="form.submit()">
|
Update<input autocomplete="off" type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" hidden name="banner" onchange="form.submit()">
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="body d-lg-flex">
|
<div class="body d-lg-flex">
|
||||||
<div class="w-lg-100">
|
<div class="w-lg-100">
|
||||||
<form id="sidebar" action="/h/{{sub.name}}/sidebar" method="post">
|
<form id="sidebar" action="/h/{{sub}}/sidebar" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if sub.sidebar %}{{sub.sidebar}}{% endif %}</textarea>
|
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if sub.sidebar %}{{sub.sidebar}}{% endif %}</textarea>
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="body d-lg-flex">
|
<div class="body d-lg-flex">
|
||||||
<div class="w-lg-100">
|
<div class="w-lg-100">
|
||||||
<form id="css" action="/h/{{sub.name}}/css" method="post">
|
<form id="css" action="/h/{{sub}}/css" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<textarea autocomplete="off" maxlength="6000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter css here..." rows="10" name="css" form="css">{% if sub.css %}{{sub.css}}{% endif %}</textarea>
|
<textarea autocomplete="off" maxlength="6000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter css here..." rows="10" name="css" form="css">{% if sub.css %}{{sub.css}}{% endif %}</textarea>
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
{% for sub, count in subs %}
|
{% for sub, count in subs %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{loop.index}}</td>
|
<td>{{loop.index}}</td>
|
||||||
<td><a href="/h/{{sub.name}}">{{sub.name}} {% if sub.name in v.all_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
|
<td><a href="/h/{{sub}}">{{sub}} {% if sub.name in v.all_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
|
||||||
<td><a href="/h/{{sub.name}}" >{{count}}</a></td>
|
<td><a href="/h/{{sub}}" >{{count}}</a></td>
|
||||||
<td><a href="/h/{{sub.name}}/followers">{{sub.follow_num}}</a></td>
|
<td><a href="/h/{{sub}}/followers">{{sub.follow_num}}</a></td>
|
||||||
<td><a href="/h/{{sub.name}}/blockers">{{sub.block_num}}</a></td>
|
<td><a href="/h/{{sub}}/blockers">{{sub.block_num}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<h5>Users subscribed to /h/{{sub.name}}</h5>
|
<h5>Users subscribed to /h/{{sub}}</h5>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||||
<thead class="bg-primary text-white">
|
<thead class="bg-primary text-white">
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="submit-grid-view">
|
<div class="submit-grid-view">
|
||||||
<form id="submitform" action="{% if sub %}/h/{{sub.name}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
<form id="submitform" action="{% if sub %}/h/{{sub}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
{%- set hole_placeholder = 'Required' if HOLE_REQUIRED else 'Optional' -%}
|
{%- set hole_placeholder = 'Required' if HOLE_REQUIRED else 'Optional' -%}
|
||||||
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()" onchange="updateCategories()" {% if sub %}value="{{sub.name}}"{% endif %} placeholder="{{hole_placeholder}}">
|
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()" onchange="updateCategories()" {% if sub %}value="{{sub}}"{% endif %} placeholder="{{hole_placeholder}}">
|
||||||
<datalist id="subs">
|
<datalist id="subs">
|
||||||
{% for s in SUBS %}
|
{% for s in SUBS %}
|
||||||
<option value="{{s}}"></option>
|
<option value="{{s}}"></option>
|
||||||
|
|
Loading…
Reference in New Issue