master
Aevann1 2022-04-07 01:50:32 +02:00
parent 1c7c40b5ca
commit 77175051ac
12 changed files with 31 additions and 19 deletions

View File

@ -374,6 +374,14 @@ AWARDS = {
"color": "text-blue",
"price": 300
},
"glowie": {
"kind": "glowie",
"title": "Glowie",
"description": "Indicates that the recipient can be seen when driving. Just run them over.",
"icon": "fas fa-user-secret",
"color": "text-green",
"price": 300
},
"rehab": {
"kind": "rehab",
"title": "Rehab",

View File

@ -41,9 +41,9 @@ def buy(v, award):
AWARDS = deepcopy(AWARDS2)
if award not in AWARDS: abort(400)
price = AWARDS[award]["price"]
og_price = AWARDS[award]["price"]
price = int(price * v.discount)
price = int(og_price * v.discount)
if request.values.get("mb"):
if v.procoins < price: return {"error": "Not enough marseybux."}, 400
@ -115,10 +115,14 @@ def buy(v, award):
send_notification(v.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
else:
award = AwardRelationship(user_id=v.id, kind=award)
g.db.add(award)
award_object = AwardRelationship(user_id=v.id, kind=award)
g.db.add(award_object)
g.db.add(v)
if CARP_ID and v.id != CARP_ID and og_price >= 10000:
send_repeatable_notification(CARP_ID, f"@{v.username} has bought a `{award}` award!")
g.db.commit()
return {"message": "Award bought!"}

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% if v.agendaposter %}
<style>
html {
@ -39,7 +39,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
{% endif %}
</head>

View File

@ -14,7 +14,7 @@
<title>Chat</title>
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216">
<link rel="stylesheet" href="/assets/css/main.css?v=217">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css">

View File

@ -7,7 +7,7 @@
<script src="/assets/js/bootstrap.js?v=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216">
<link rel="stylesheet" href="/assets/css/main.css?v=217">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% if v.agendaposter %}
<style>
@ -32,7 +32,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216">
<link rel="stylesheet" href="/assets/css/main.css?v=217">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
{% endif %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216">
<link rel="stylesheet" href="/assets/css/main.css?v=217">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
</head>

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
{% endif %}
</head>

View File

@ -31,7 +31,7 @@
<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>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
</head>

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
<link rel="stylesheet" href="/assets/css/main.css?v=217"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
{% if v.agendaposter %}
<style>
html {
@ -50,7 +50,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=216">
<link rel="stylesheet" href="/assets/css/main.css?v=217">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
{% endif %}
{% endblock %}