fd
This commit is contained in:
parent
378b38cc60
commit
bfd3332454
18 changed files with 146 additions and 120 deletions
|
@ -2028,6 +2028,9 @@ a.bg-light:hover, a.bg-light:focus, button.bg-light:hover, button.bg-light:focus
|
||||||
.d-md-flex {
|
.d-md-flex {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
.d-md-inline {
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.d-lg-none {
|
.d-lg-none {
|
||||||
|
|
|
@ -17,3 +17,4 @@ from files.__main__ import app
|
||||||
from .mod_logs import *
|
from .mod_logs import *
|
||||||
from .award import *
|
from .award import *
|
||||||
from .marsey import *
|
from .marsey import *
|
||||||
|
from .sub_block import *
|
12
files/classes/sub_block.py
Normal file
12
files/classes/sub_block.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
from sqlalchemy import *
|
||||||
|
from sqlalchemy.orm import relationship
|
||||||
|
from files.__main__ import Base
|
||||||
|
|
||||||
|
class SubBlock(Base):
|
||||||
|
|
||||||
|
__tablename__ = "sub_blocks"
|
||||||
|
user_id = Column(Integer, ForeignKey("users.id"), primary_key=True)
|
||||||
|
sub = Column(String, ForeignKey("subs.name"), primary_key=True)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return f"<SubBlock(user_id={self.user_id}, sub={self.sub})>"
|
|
@ -4,7 +4,7 @@ from files.helpers.wrappers import *
|
||||||
from files.classes import *
|
from files.classes import *
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
|
|
||||||
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,20}$")
|
||||||
|
|
||||||
@app.get("/s/<sub>/mods")
|
@app.get("/s/<sub>/mods")
|
||||||
@is_not_permabanned
|
@is_not_permabanned
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -490,62 +490,66 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level and v.id==c.author_id %}
|
{% if v %}
|
||||||
<button id="undistinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></button>
|
||||||
<button id="distinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</button>
|
<ul class="dropdown-menu">
|
||||||
{% endif %}
|
{% if v.admin_level and v.id==c.author_id %}
|
||||||
|
<button id="undistinguish-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>
|
||||||
|
<button id="distinguish-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.id != c.author_id and not c.ghost %}
|
{% if v.id != c.author_id and not c.ghost %}
|
||||||
<button id="unblock-{{c.id}}" class="nobackground text-success {% if c.is_blocking %}d-md-inline-block{% endif %} d-none" onclick="post_toast3(this,'/settings/unblock?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-success"></i>Unblock user</button>
|
<a id="unblock-{{c.id}}" class="dropdown-item text-success list-inline-item {% if not p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||||
|
|
||||||
<button id="prompt-{{c.id}}" class="blockuser d-none text-danger nobackground" onclick="post_toast3(this,'/settings/block?username={{c.author_name}}','prompt-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</button>
|
<a id="block-{{c.id}}" class="dropdown-item list-inline-item text-danger {% if p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<button id="block-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_blocking %}d-md-inline-block{% endif %} d-none text-danger" onclick="document.getElementById('block-{{c.id}}').classList.toggle('d-md-inline-block');document.getElementById('prompt-{{c.id}}').classList.toggle('d-md-inline-block');"><i class="fas fa-eye-slash fa-fw text-danger"></i>Block user</button>
|
{% if c.post %}
|
||||||
{% endif %}
|
{% set url = "" %}
|
||||||
|
|
||||||
{% if v and c.post %}
|
{% if v.admin_level > 1%}
|
||||||
{% set url = "" %}
|
|
||||||
|
|
||||||
{% if v.admin_level > 1%}
|
|
||||||
{% set url = "sticky_comment" %}
|
{% set url = "sticky_comment" %}
|
||||||
{% elif v.id == c.post.author_id %}
|
{% elif v.id == c.post.author_id %}
|
||||||
{% set url = "pin_comment" %}
|
{% set url = "pin_comment" %}
|
||||||
{% elif c.post.sub and v.mods(c.post.sub) %}
|
{% elif c.post.sub and v.mods(c.post.sub) %}
|
||||||
{% set url = "mod_pin" %}
|
{% set url = "mod_pin" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if url != "" %}
|
{% if url != "" %}
|
||||||
<button id="unpin-{{c.id}}" class="btn caction py-0 nobackground {% if c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/un{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
|
<button id="unpin-{{c.id}}" class="dropdown-item list-inline-item {% if c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/un{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
|
||||||
|
|
||||||
<button id="pin-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
|
<button id="pin-{{c.id}}" class="dropdown-item list-inline-item {% if not c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if v and v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted text-success" onclick="approveComment('{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
|
<button class="dropdown-item list-inline-item text-muted text-success" onclick="approveComment('{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted text-danger" onclick="removeComment('{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
|
<button class="dropdown-item list-inline-item text-muted text-danger" onclick="removeComment('{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button id="approve-{{c.id}}" class="btn caction py-0 nobackground px-1 text-success d-none {% if c.is_banned %}d-md-inline-block{% endif %} text-success" onclick="approveComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
|
<button id="approve-{{c.id}}" class="dropdown-item list-inline-item text-success d-none {% if c.is_banned %}d-md-inline-block{% endif %} text-success" onclick="approveComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
|
||||||
<button id="remove-{{c.id}}" class="btn caction py-0 nobackground px-1 text-danger d-none {% if not c.is_banned %}d-md-inline-block{% endif %} text-danger" onclick="removeComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
|
<button id="remove-{{c.id}}" class="dropdown-item list-inline-item text-danger d-none {% if not c.is_banned %}d-md-inline-block{% endif %} text-danger" onclick="removeComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 1) %}
|
{% if c.parent_submission and (c.author_id==v.id or v.admin_level > 1) %}
|
||||||
<button id="unmark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark +18</button>
|
<button id="unmark-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark +18</button>
|
||||||
<button id="mark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark +18</button>
|
<button id="mark-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark +18</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level > 1 and v.id != c.author_id %}
|
{% if v.admin_level > 1 and v.id != c.author_id %}
|
||||||
<button id="unban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %} text-success" id="unexile-comment-{{c.id}}" onclick="post_toast3(this,'/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</button>
|
<button id="unban-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %} text-success" id="unexile-comment-{{c.id}}" onclick="post_toast3(this,'/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</button>
|
||||||
<button id="ban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %} text-danger" id="exile-comment-{{c.id}}" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</button>
|
<button id="ban-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %} text-danger" id="exile-comment-{{c.id}}" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level > 1 and c.oauth_app %}
|
{% if v.admin_level > 1 and c.oauth_app %}
|
||||||
<a class=" text-muted" href="{{c.oauth_app.permalink}}/comments"><i class="fas fa-code fa-fw"></i>API App</a>
|
<a class=" text-muted" href="{{c.oauth_app.permalink}}/comments"><i class="fas fa-code fa-fw"></i>API App</a>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li></ul>
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<script src="/static/assets/js/bootstrap.js?a=240"></script>
|
<script src="/static/assets/js/bootstrap.js?a=240"></script>
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if sub and sub.css and not request.path.endswith('settings') %}
|
{% if sub and sub.css and not request.path.endswith('settings') %}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<title>2-Step Login - {{SITE_NAME}}</title>
|
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
0
files/templates/sidebar_Ruqqu.html
Normal file
0
files/templates/sidebar_Ruqqu.html
Normal file
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<label for="title">Sub Name</label>
|
<label for="title">Sub Name</label>
|
||||||
|
|
||||||
<input class="form-control" id="title-register" aria-describedby="titleHelpRegister" type="text" name="name" required>
|
<input class="form-control" id="title-register" aria-describedby="titleHelpRegister" type="text" name="name" required>
|
||||||
<small class="form-text text-muted">Names must be 3-25 characters</small>
|
<small class="form-text text-muted">Names must be 3-20 characters</small>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -691,12 +691,14 @@
|
||||||
<a class="list-inline-item text-muted d-none d-md-inline-block" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift fa-fw"></i>Give Award</a>
|
<a class="list-inline-item text-muted d-none d-md-inline-block" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift fa-fw"></i>Give Award</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a class="list-inline-item copy-link" role="button" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
<a class="list-inline-item copy-link" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
||||||
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v %}
|
||||||
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
||||||
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
||||||
|
|
||||||
|
@ -715,58 +717,62 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
|
<a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false" ><i class="fas fa-ellipsis-h fa-fw"></i></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
{% if v.admin_level %}
|
{% if v.admin_level %}
|
||||||
<a id="distinguish-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
<a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
||||||
<a id="undistinguish-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
<a id="undistinguish-{{p.id}}" class="dropdown-item {% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
<a id="pin-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
<a id="pin-{{p.id}}" class="dropdown-item {% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
||||||
<a id="unpin-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
<a id="unpin-{{p.id}}" class="dropdown-item {% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
||||||
<a id="club-{{p.id}}" class="{% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
<a id="club-{{p.id}}" class="dropdown-item {% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
||||||
<a id="unclub-{{p.id}}" class="{% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
<a id="unclub-{{p.id}}" class="dropdown-item {% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
{% if v.id != p.author.id %}<a class="list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a class="list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a class="dropdown-item list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="dropdown-item {% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a id="approve-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a id="approve-{{p.id}}" class="dropdown-item {% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if p.oauth_app %}
|
||||||
|
<a class="dropdown-item list-inline-item" href="{{p.oauth_app.permalink}}" ><i class="fas fa-code"></i>API App</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.id == p.author_id or v.admin_level > 1 %}
|
|
||||||
<a id="mark-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
|
||||||
<a id="unmark-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v.admin_level > 1 and p.oauth_app %}
|
|
||||||
<a class="list-inline-item" href="{{p.oauth_app.permalink}}" ><i class="fas fa-code"></i>API App</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v.id != p.author_id and not p.ghost %}
|
{% if v.id != p.author_id and not p.ghost %}
|
||||||
<a id="unblock-{{p.id}}" class="text-success list-inline-item {% if not p.is_blocking %} d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
<a id="unblock-{{p.id}}" class="dropdown-item text-success list-inline-item {% if not p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||||
|
|
||||||
<a id="prompt-{{p.id}}" class="text-danger blockuser list-inline-item d-none" role="button" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','prompt-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Are you sure?</a>
|
<a id="block-{{p.id}}" class="dropdown-item list-inline-item text-danger {% if p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
||||||
|
|
||||||
<a id="block-{{p.id}}" class="text-danger blockuser list-inline-item {% if p.is_blocking %} d-none{% endif %}" role="button" onclick="document.getElementById('block-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if p.sub and v.mods(p.sub) %}
|
{% if p.sub and v.mods(p.sub) %}
|
||||||
<a class="list-inline-item text-danger" role="button" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 and v.id!=p.author_id %}
|
|
||||||
<a id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
{% if v.id==p.author_id or v.admin_level > 1 %}
|
||||||
<a id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
<a id="mark-{{p.id}}" class="dropdown-item {% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
||||||
|
<a id="unmark-{{p.id}}" class="dropdown-item {% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v.admin_level > 1 and v.id != p.author_id %}
|
||||||
|
<a id="ban-{{p.id}}" class="dropdown-item {% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="exile-comment-{{p.id}}" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
||||||
|
<a id="unban-{{p.id}}" class="dropdown-item {% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=21">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=125">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=126">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=21">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue