forked from MarseyWorld/MarseyWorld
fds\
parent
a666a2d12a
commit
dbdcb5d56b
|
@ -32,7 +32,7 @@ services:
|
|||
- BOT_DISABLE=0
|
||||
- DEFAULT_TIME_FILTER=all
|
||||
- DEFAULT_THEME=midnight
|
||||
- DEFAULT_COLOR=ff66ac #YOU HAVE TO PICK ONE OF THOSE COLORS OR SHIT WILL BREAK: ff66ac, 805ad5, 62ca56, 38a169, 80ffff, 2a96f3, eb4963, ff0000, f39731, 30409f, 3e98a7, e4432d, 7b9ae4, ec72de, 7f8fa6, f8db58
|
||||
- DEFAULT_COLOR=ff66ac
|
||||
- GUMROAD_TOKEN=3435tdfsdudebussylmaoxxt43
|
||||
- GUMROAD_LINK=https://marsey1.gumroad.com/l/tfcvri
|
||||
- GUMROAD_ID=tfcvri
|
||||
|
|
2
env
2
env
|
@ -27,7 +27,7 @@ export CARD_VIEW="1"
|
|||
export DISABLE_DOWNVOTES="0"
|
||||
export DUES="0"
|
||||
export DEFAULT_THEME="midnight"
|
||||
export DEFAULT_COLOR="ff66ac" # YOU HAVE TO PICK ONE OF THOSE COLORS OR SHIT WILL BREAK: ff66ac, 805ad5, 62ca56, 38a169, 80ffff, 2a96f3, eb4963, ff0000, f39731, 30409f, 3e98a7, e4432d, 7b9ae4, ec72de, 7f8fa6, f8db58
|
||||
export DEFAULT_COLOR="ff66ac"
|
||||
export MAIL_USERNAME="blahblahblah@gmail.com"
|
||||
export MAIL_PASSWORD="3435tdfsdudebussylmaoxxt43"
|
||||
export DESCRIPTION="rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!"
|
||||
|
|
|
@ -19,7 +19,6 @@ import random
|
|||
from os import environ, remove, path
|
||||
|
||||
defaulttheme = environ.get("DEFAULT_THEME", "midnight").strip()
|
||||
defaultcolor = environ.get("DEFAULT_COLOR", "fff").strip()
|
||||
defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip()
|
||||
cardview = bool(int(environ.get("CARD_VIEW", 1)))
|
||||
|
||||
|
@ -33,13 +32,13 @@ class User(Base):
|
|||
|
||||
id = Column(Integer, primary_key=True)
|
||||
username = Column(String)
|
||||
namecolor = Column(String, default=defaultcolor)
|
||||
namecolor = Column(String, default=DEFAULT_COLOR)
|
||||
background = Column(String)
|
||||
customtitle = Column(String)
|
||||
customtitleplain = deferred(Column(String))
|
||||
titlecolor = Column(String, default=defaultcolor)
|
||||
titlecolor = Column(String, default=DEFAULT_COLOR)
|
||||
theme = Column(String, default=defaulttheme)
|
||||
themecolor = Column(String, default=defaultcolor)
|
||||
themecolor = Column(String, default=DEFAULT_COLOR)
|
||||
cardview = Column(Boolean, default=cardview)
|
||||
song = Column(String)
|
||||
highres = Column(String)
|
||||
|
|
|
@ -229,6 +229,8 @@ else:
|
|||
|
||||
PUSHER_ID = environ.get("PUSHER_ID", "").strip()
|
||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
||||
DEFAULT_COLOR = environ.get("DEFAULT_COLOR", "fff").strip()
|
||||
COLORS = {'ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58', DEFAULT_COLOR}
|
||||
|
||||
AWARDS = {
|
||||
"snow": {
|
||||
|
|
|
@ -16,4 +16,4 @@ def post_embed(id, v):
|
|||
|
||||
@app.context_processor
|
||||
def inject_constants():
|
||||
return {"environ":environ, "SITE_NAME":SITE_NAME, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get}
|
||||
return {"environ":environ, "SITE_NAME":SITE_NAME, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS}
|
||||
|
|
|
@ -7,8 +7,6 @@ from files.__main__ import app, limiter, cache
|
|||
from sqlalchemy.orm import joinedload
|
||||
from os import environ
|
||||
|
||||
defaultcolor = environ.get("DEFAULT_COLOR").strip()
|
||||
|
||||
@app.get("/votes")
|
||||
@limiter.limit("5/second;60/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
|
@ -104,7 +102,7 @@ def api_vote_post(post_id, new, v):
|
|||
post.author.coins += 1
|
||||
post.author.truecoins += 1
|
||||
g.db.add(post.author)
|
||||
real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor))
|
||||
real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != DEFAULT_COLOR))
|
||||
vote = Vote(user_id=v.id,
|
||||
vote_type=new,
|
||||
submission_id=post_id,
|
||||
|
@ -167,7 +165,7 @@ def api_vote_comment(comment_id, new, v):
|
|||
comment.author.coins += 1
|
||||
comment.author.truecoins += 1
|
||||
g.db.add(comment.author)
|
||||
real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor))
|
||||
real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != DEFAULT_COLOR))
|
||||
vote = CommentVote(user_id=v.id,
|
||||
vote_type=new,
|
||||
comment_id=comment_id,
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<form action="/settings/themecolor" id="themecolor-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
{% for themecolor in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
||||
{% for themecolor in COLORS %}
|
||||
<input autocomplete="off" type="radio" name="themecolor" id="themecolor-{{themecolor}}" value="{{themecolor}}" {% if v.themecolor == themecolor %}checked{% endif %} onclick="document.getElementById('themecolor-form').submit()">
|
||||
<label class="color-radio" for="themecolor-{{themecolor}}">
|
||||
<span style="background-color: #{{themecolor}}">
|
||||
|
@ -392,7 +392,7 @@
|
|||
<form action="/settings/namecolor" id="color-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
{% for color in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
||||
{% for color in COLORS %}
|
||||
<input autocomplete="off" type="radio" name="color" id="color-{{color}}" value="{{color}}" {% if v.namecolor == color %}checked{% endif %} onclick="document.getElementById('color-form').submit()">
|
||||
<label class="color-radio" for="color-{{color}}">
|
||||
<span style="background-color: #{{color}}">
|
||||
|
@ -448,7 +448,7 @@
|
|||
<form action="/settings/titlecolor" id="titlecolor-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
{% for titlecolor in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
||||
{% for titlecolor in COLORS %}
|
||||
<input autocomplete="off" type="radio" name="titlecolor" id="titlecolor-{{titlecolor}}" value="{{titlecolor}}" {% if v.titlecolor == titlecolor %}checked{% endif %} onclick="document.getElementById('titlecolor-form').submit()">
|
||||
<label class="color-radio" for="titlecolor-{{titlecolor}}">
|
||||
<span style="background-color: #{{titlecolor}}">
|
||||
|
@ -493,7 +493,7 @@
|
|||
<form action="/settings/verifiedcolor" id="verifiedcolor-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
{% for verifiedcolor in ['ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58'] %}
|
||||
{% for verifiedcolor in COLORS %}
|
||||
<input autocomplete="off" type="radio" name="verifiedcolor" id="verifiedcolor-{{verifiedcolor}}" value="{{verifiedcolor}}" {% if v.verifiedcolor == verifiedcolor %}checked{% endif %} onclick="document.getElementById('verifiedcolor-form').submit()">
|
||||
<label class="color-radio" for="verifiedcolor-{{verifiedcolor}}">
|
||||
<span style="background-color: #{{verifiedcolor}}">
|
||||
|
|
Loading…
Reference in New Issue