forked from rDrama/rDrama
add orgy icon
parent
13e83143fd
commit
60580cc6fa
|
@ -213,6 +213,7 @@
|
|||
.fa-at:before{content:"\40"}
|
||||
.fa-ankh:before{content:"\f644"}
|
||||
.fa-quotes:before{content:"\e234"}
|
||||
.fa-tv:before{content:"\f26c"}
|
||||
|
||||
/* do not remove - fixes hand, talking, marsey-love components
|
||||
from breaking out of the comment box
|
||||
|
|
|
@ -71,7 +71,6 @@ if SITE == 'staging.rdrama.net':
|
|||
|
||||
LOGGED_IN_CACHE_KEY = "loggedin"
|
||||
LOGGED_OUT_CACHE_KEY = "loggedout"
|
||||
CHAT_ONLINE_CACHE_KEY = "online"
|
||||
|
||||
CASINO_RELEASE_DAY = 1662825600
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ online = {
|
|||
f'{SITE_FULL}/orgy': [],
|
||||
}
|
||||
|
||||
cache.set(CHAT_ONLINE_CACHE_KEY, len(online[f'{SITE_FULL}/chat']), timeout=0)
|
||||
cache.set('loggedin_chat', len(online[f'{SITE_FULL}/chat']), timeout=0)
|
||||
cache.set('loggedin_orgy', len(online[f'{SITE_FULL}/orgy']), timeout=0)
|
||||
|
||||
def auth_required_socketio(f):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
@ -72,10 +73,6 @@ def chat(v):
|
|||
if not v.allowed_in_chat:
|
||||
abort(403, CHAT_ERROR_MESSAGE)
|
||||
|
||||
orgy = get_orgy()
|
||||
if orgy:
|
||||
return redirect('/orgy')
|
||||
|
||||
displayed_messages = {k: val for k, val in messages[f"{SITE_FULL}/chat"].items() if val["user_id"] not in v.userblocks}
|
||||
|
||||
return render_template("chat.html", v=v, messages=displayed_messages)
|
||||
|
@ -200,12 +197,8 @@ def speak(data, v):
|
|||
def refresh_online():
|
||||
emit("online", [online[request.referrer], muted], room=request.referrer, broadcast=True)
|
||||
|
||||
if get_orgy():
|
||||
key = f'{SITE_FULL}/orgy'
|
||||
else:
|
||||
key = f'{SITE_FULL}/chat'
|
||||
|
||||
cache.set(CHAT_ONLINE_CACHE_KEY, len(online[key]), timeout=0)
|
||||
cache.set('loggedin_chat', len(online[f'{SITE_FULL}/chat']), timeout=0)
|
||||
cache.set('loggedin_orgy', len(online[f'{SITE_FULL}/orgy']), timeout=0)
|
||||
|
||||
@socketio.on('connect')
|
||||
@auth_required_socketio
|
||||
|
|
|
@ -7,6 +7,7 @@ from jinja2 import pass_context
|
|||
from PIL import ImageColor
|
||||
|
||||
from files.classes.user import User
|
||||
from files.classes.orgy import get_orgy
|
||||
from files.helpers.assetcache import assetcache_path
|
||||
from files.helpers.config.const import *
|
||||
from files.helpers.regex import *
|
||||
|
@ -129,5 +130,5 @@ def inject_constants():
|
|||
"CHUD_PHRASES":CHUD_PHRASES, "hasattr":hasattr, "calc_users":calc_users, "HOLE_INACTIVITY_DELETION":HOLE_INACTIVITY_DELETION,
|
||||
"MAX_IMAGE_AUDIO_SIZE_MB":MAX_IMAGE_AUDIO_SIZE_MB, "MAX_IMAGE_AUDIO_SIZE_MB_PATRON":MAX_IMAGE_AUDIO_SIZE_MB_PATRON,
|
||||
"MAX_VIDEO_SIZE_MB":MAX_VIDEO_SIZE_MB, "MAX_VIDEO_SIZE_MB_PATRON":MAX_VIDEO_SIZE_MB_PATRON,
|
||||
"CURSORMARSEY_DEFAULT":CURSORMARSEY_DEFAULT, "SNAPPY_ID":SNAPPY_ID,
|
||||
"CURSORMARSEY_DEFAULT":CURSORMARSEY_DEFAULT, "SNAPPY_ID":SNAPPY_ID, "get_orgy":get_orgy, "TRUESCORE_CC_CHAT_MINIMUM":TRUESCORE_CC_CHAT_MINIMUM,
|
||||
}
|
||||
|
|
|
@ -31,11 +31,14 @@ def calc_users():
|
|||
g.loggedin_counter = 0
|
||||
g.loggedout_counter = 0
|
||||
g.loggedin_chat = 0
|
||||
g.loggedin_orgy = 0
|
||||
v = getattr(g, 'v', None) if g else None
|
||||
if has_request_context and g and g.desires_auth and not g.is_api_or_xhr:
|
||||
loggedin = cache.get(LOGGED_IN_CACHE_KEY) or {}
|
||||
loggedout = cache.get(LOGGED_OUT_CACHE_KEY) or {}
|
||||
g.loggedin_chat = cache.get(CHAT_ONLINE_CACHE_KEY) or 0
|
||||
g.loggedin_chat = cache.get('loggedin_chat') or 0
|
||||
g.loggedin_orgy = cache.get('loggedin_orgy') or 0
|
||||
|
||||
timestamp = int(time.time())
|
||||
|
||||
check_session_id()
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
{% block content %}
|
||||
<h3 class="py-2">Admin Tools</h3>
|
||||
|
||||
{% if v.admin_level >= PERMS['ORGIES'] %}
|
||||
<h4>Orgies</h4>
|
||||
<ul>
|
||||
<li><a href="/admin/orgy">Start/Stop Orgy</a></li>
|
||||
</ul>
|
||||
{%- endif %}
|
||||
|
||||
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and (SITE_NAME == 'rDrama' or SIDEBAR_THREAD or BANNER_THREAD or BADGE_THREAD or SNAPPY_THREAD) %}
|
||||
<h4>Add Stuff</h4>
|
||||
<ul>
|
||||
|
@ -98,12 +105,6 @@
|
|||
</ul>
|
||||
{%- endif %}
|
||||
|
||||
{% if v.admin_level >= PERMS['ORGIES'] %}
|
||||
<h4>Misc</h4>
|
||||
<ul>
|
||||
<li><a href="/admin/orgy">Start/Stop Orgy</a></li>
|
||||
</ul>
|
||||
{%- endif %}
|
||||
<h4>Statistics</h4>
|
||||
<ul>
|
||||
<li><a href="/stats">Content Stats</a></li>
|
||||
|
|
|
@ -224,16 +224,27 @@
|
|||
<a class="nav-link" href="/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create Post"><i class="fas fa-feather-alt"></i></a>
|
||||
</li>
|
||||
|
||||
{% if FEATURES['CHAT'] -%}
|
||||
{%- if FEATURES['CHAT'] -%}
|
||||
{%- if v and v.allowed_in_chat and get_orgy() -%}
|
||||
<li class="nav-item d-none d-lg-flex align-items-center justify-content-center text-center mx-1" id="header--chat--item">
|
||||
<a class="nav-link position-relative" href="/chat">
|
||||
<a class="nav-link position-relative" href="/orgy" style="margin-top: -1.9px !important">
|
||||
<i class="fas fa-tv" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Orgy"></i>
|
||||
<b id="chat-count-header-bar" class="text-lg {% if g.loggedin_orgy > 40 %}text-danger{% elif g.loggedin_orgy > 20 %}text-yellow{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in right now">
|
||||
{{g.loggedin_orgy}}
|
||||
</b>
|
||||
</a>
|
||||
</li>
|
||||
{%- else -%}
|
||||
<li class="nav-item d-none d-lg-flex align-items-center justify-content-center text-center mx-1" id="header--chat--item">
|
||||
<a class="nav-link position-relative" href="/chat" style="margin-top: -1.6px !important">
|
||||
<i class="fas fa-messages" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Chat"></i>
|
||||
<b id="chat-count-header-bar" class="text-lg {% if g.loggedin_chat > 40 %}text-danger{% elif g.loggedin_chat > 20 %}text-yellow{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in chat right now">
|
||||
{{g.loggedin_chat}}
|
||||
</b>
|
||||
</a>
|
||||
</li>
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1" id="header--randomuser--item">
|
||||
<a class="nav-link" href="/random_user" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Random User with a Profile Anthem"><i class="fas fa-music"></i></a>
|
||||
|
|
|
@ -46,7 +46,17 @@
|
|||
</a>
|
||||
</button>
|
||||
{% if v %}
|
||||
{% if FEATURES['CHAT'] -%}
|
||||
{%- if FEATURES['CHAT'] -%}
|
||||
{%- if v and v.allowed_in_chat and get_orgy() -%}
|
||||
<button type="button" class="nobackground border-0 col px-0 btn btn-dead m-0 pt-0" style="margin-right:-10px!important">
|
||||
<a href="/orgy" class="text-decoration-none">
|
||||
<div class="text-center {% if request|selected_tab=='orgy' %}text-primary{% else %}text-muted{% endif %}">
|
||||
<b class="text-lg {% if g.loggedin_orgy > 40 %}text-danger{% elif g.loggedin_orgy > 20 %}text-yellow{% endif %}" style="padding-top:10px" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in Orgy right now">{{g.loggedin_orgy}}</b>
|
||||
<div class="text-small-extra">Orgy</div>
|
||||
</div>
|
||||
</a>
|
||||
</button>
|
||||
{%- else -%}
|
||||
<button type="button" class="nobackground border-0 col px-0 btn btn-dead m-0 pt-0" style="margin-right:-10px!important">
|
||||
<a href="/chat" class="text-decoration-none">
|
||||
<div class="text-center {% if request|selected_tab=='chat' %}text-primary{% else %}text-muted{% endif %}">
|
||||
|
@ -55,8 +65,10 @@
|
|||
</div>
|
||||
</a>
|
||||
</button>
|
||||
{%- endif %}
|
||||
{% if FEATURES['AWARDS'] -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if FEATURES['AWARDS'] -%}
|
||||
<button type="button" class="nobackground border-0 col px-0 mr-3 btn btn-dead m-0">
|
||||
<a href="/shop/awards" class="text-decoration-none">
|
||||
<div class="text-center {% if request|selected_tab=='shop' %}text-primary{% else %}text-muted{% endif %}">
|
||||
|
@ -65,7 +77,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</button>
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
{% else %}
|
||||
<button type="button" class="nobackground border-0 col px-0 mr-3 btn btn-dead m-0">
|
||||
<a href="/signup?redirect={{request.full_path | urlencode}}" class="text-decoration-none">
|
||||
|
|
Loading…
Reference in New Issue