forked from rDrama/rDrama
fsdfsd
parent
79fc26b937
commit
b6b7d79fbf
|
@ -1054,6 +1054,7 @@ def settings_song_change(v):
|
||||||
id = song.split("v=")[1]
|
id = song.split("v=")[1]
|
||||||
elif song.startswith("https://youtu.be/"):
|
elif song.startswith("https://youtu.be/"):
|
||||||
id = song.split("https://youtu.be/")[1]
|
id = song.split("https://youtu.be/")[1]
|
||||||
|
else:
|
||||||
if not v or v.oldsite: template = ''
|
if not v or v.oldsite: template = ''
|
||||||
else: template = 'CHRISTMAS/'
|
else: template = 'CHRISTMAS/'
|
||||||
return render_template(f"{template}settings_profile.html", v=v, error=f"Not a youtube link.")
|
return render_template(f"{template}settings_profile.html", v=v, error=f"Not a youtube link.")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from files.mail import *
|
from files.mail import *
|
||||||
from files.__main__ import app, limiter, mail
|
from files.__main__ import app, limiter, mail
|
||||||
from files.helpers.alerts import *
|
from files.helpers.alerts import *
|
||||||
from files.helpers.const import BADGES
|
from files.helpers.const import *
|
||||||
from files.classes.award import AWARDS
|
from files.classes.award import AWARDS
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
from os import path
|
from os import path
|
||||||
|
@ -56,11 +56,11 @@ def participation_stats(v):
|
||||||
"removed_posts": g.db.query(Submission.id).filter_by(is_banned=True).count(),
|
"removed_posts": g.db.query(Submission.id).filter_by(is_banned=True).count(),
|
||||||
"deleted_posts": g.db.query(Submission.id).filter(Submission.deleted_utc > 0).count(),
|
"deleted_posts": g.db.query(Submission.id).filter(Submission.deleted_utc > 0).count(),
|
||||||
"posts_last_24h": g.db.query(Submission.id).filter(Submission.created_utc > day).count(),
|
"posts_last_24h": g.db.query(Submission.id).filter(Submission.created_utc > day).count(),
|
||||||
"total_comments": g.db.query(Comment.id).count(),
|
"total_comments": g.db.query(Comment.id).filter(Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
||||||
"commenting_users": g.db.query(Comment.author_id).distinct().count(),
|
"commenting_users": g.db.query(Comment.author_id).distinct().count(),
|
||||||
"removed_comments": g.db.query(Comment.id).filter_by(is_banned=True).count(),
|
"removed_comments": g.db.query(Comment.id).filter_by(is_banned=True).count(),
|
||||||
"deleted_comments": g.db.query(Comment.id).filter(Comment.deleted_utc>0).count(),
|
"deleted_comments": g.db.query(Comment.id).filter(Comment.deleted_utc>0).count(),
|
||||||
"comments_last_24h": g.db.query(Comment.id).filter(Comment.created_utc > day).count(),
|
"comments_last_24h": g.db.query(Comment.id).filter(Comment.created_utc > day, Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
||||||
"post_votes": g.db.query(Vote.id).count(),
|
"post_votes": g.db.query(Vote.id).count(),
|
||||||
"post_voting_users": g.db.query(Vote.user_id).distinct().count(),
|
"post_voting_users": g.db.query(Vote.user_id).distinct().count(),
|
||||||
"comment_votes": g.db.query(CommentVote.id).count(),
|
"comment_votes": g.db.query(CommentVote.id).count(),
|
||||||
|
@ -118,7 +118,7 @@ def cached_chart(days):
|
||||||
|
|
||||||
post_stats = [g.db.query(Submission.id).filter(Submission.created_utc < day_cutoffs[i], Submission.created_utc > day_cutoffs[i + 1], Submission.is_banned == False).count() for i in range(len(day_cutoffs) - 1)][::-1]
|
post_stats = [g.db.query(Submission.id).filter(Submission.created_utc < day_cutoffs[i], Submission.created_utc > day_cutoffs[i + 1], Submission.is_banned == False).count() for i in range(len(day_cutoffs) - 1)][::-1]
|
||||||
|
|
||||||
comment_stats = [g.db.query(Comment.id).filter(Comment.created_utc < day_cutoffs[i], Comment.created_utc > day_cutoffs[i + 1],Comment.is_banned == False, Comment.author_id != 1).count() for i in range(len(day_cutoffs) - 1)][::-1]
|
comment_stats = [g.db.query(Comment.id).filter(Comment.created_utc < day_cutoffs[i], Comment.created_utc > day_cutoffs[i + 1],Comment.is_banned == False, Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count() for i in range(len(day_cutoffs) - 1)][::-1]
|
||||||
|
|
||||||
plt.rcParams["figure.figsize"] = (20,20)
|
plt.rcParams["figure.figsize"] = (20,20)
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" href="/assets/CHRISTMAS/Drama.apk?v=201">
|
<a class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" href="/assets/CHRISTMAS/Drama.apk?v=202">
|
||||||
<i class="fab fa-android fa-sm fa-fw mr-4"></i>Android App
|
<i class="fab fa-android fa-sm fa-fw mr-4"></i>Android App
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<button class="dropdown-item copy-link" data-clipboard-text="/signup?ref={{v.username}}"><i class="fad fa-user-friends fa-fw text-left mr-3"></i>Invite friends</button>
|
<button class="dropdown-item copy-link" data-clipboard-text="/signup?ref={{v.username}}"><i class="fad fa-user-friends fa-fw text-left mr-3"></i>Invite friends</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
<a class="dropdown-item" href="/assets/CHRISTMAS/{{'SITE_NAME' | app_config}}.apk?v=201"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
|
<a class="dropdown-item" href="/assets/CHRISTMAS/{{'SITE_NAME' | app_config}}.apk?v=202"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
|
||||||
|
|
||||||
<a class="dropdown-item" href="/rules"><i class="fas fa-balance-scale fa-fw text-left mr-3"></i>Rules</a>
|
<a class="dropdown-item" href="/rules"><i class="fas fa-balance-scale fa-fw text-left mr-3"></i>Rules</a>
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
||||||
</li>
|
</li>
|
||||||
<a class="nav-item nav-link" href="/assets/CHRISTMAS/{{'SITE_NAME' | app_config}}.apk?v=201"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
|
<a class="nav-item nav-link" href="/assets/CHRISTMAS/{{'SITE_NAME' | app_config}}.apk?v=202"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
|
||||||
|
|
||||||
<a class="nav-item nav-link" href="/rules"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a>
|
<a class="nav-item nav-link" href="/rules"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a>
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
<button class="dropdown-item copy-link" data-clipboard-text="/signup?ref={{v.username}}"><i class="fad fa-user-friends fa-fw text-left mr-3"></i>Invite friends</button>
|
<button class="dropdown-item copy-link" data-clipboard-text="/signup?ref={{v.username}}"><i class="fad fa-user-friends fa-fw text-left mr-3"></i>Invite friends</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
<a class="dropdown-item" href="/assets/{{'SITE_NAME' | app_config}}.apk?v=192"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
|
<a class="dropdown-item" href="/assets/{{'SITE_NAME' | app_config}}.apk?v=193"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
|
||||||
|
|
||||||
<a class="dropdown-item" href="/rules"><i class="fas fa-balance-scale fa-fw text-left mr-3"></i>Rules</a>
|
<a class="dropdown-item" href="/rules"><i class="fas fa-balance-scale fa-fw text-left mr-3"></i>Rules</a>
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
|
||||||
</li>
|
</li>
|
||||||
<a class="nav-item nav-link" href="/assets/{{'SITE_NAME' | app_config}}.apk?v=192"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
|
<a class="nav-item nav-link" href="/assets/{{'SITE_NAME' | app_config}}.apk?v=193"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
|
||||||
|
|
||||||
<a class="nav-item nav-link" href="/rules"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a>
|
<a class="nav-item nav-link" href="/rules"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue