forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

master
Nekobit 2022-05-30 02:28:01 -04:00
commit 8f77fd45f9
11 changed files with 44 additions and 19 deletions

View File

@ -49,7 +49,9 @@ def end_lottery_session():
active_lottery.is_active = False active_lottery.is_active = False
manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID) manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID)
manager.coins -= active_lottery.prize
if manager:
manager.coins -= active_lottery.prize
g.db.commit() g.db.commit()
@ -88,7 +90,9 @@ def purchase_lottery_ticket(v):
grant_lottery_proceeds_to_manager(net_ticket_value) grant_lottery_proceeds_to_manager(net_ticket_value)
beneficiary = g.db.query(User).get(LOTTERY_ROYALTY_ACCOUNT_ID) beneficiary = g.db.query(User).get(LOTTERY_ROYALTY_ACCOUNT_ID)
beneficiary.coins += LOTTERY_ROYALTY_RATE
if beneficiary:
beneficiary.coins += LOTTERY_ROYALTY_RATE
g.db.commit() g.db.commit()
@ -96,7 +100,9 @@ def purchase_lottery_ticket(v):
def grant_lottery_proceeds_to_manager(amount): def grant_lottery_proceeds_to_manager(amount):
manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID) manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID)
manager.coins += amount
if manager:
manager.coins += amount
def grant_lottery_tickets_to_user(v, amount): def grant_lottery_tickets_to_user(v, amount):
active_lottery = get_active_lottery() active_lottery = get_active_lottery()

View File

@ -19,7 +19,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View File

@ -16,7 +16,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% if v.css %} {% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css"> <link rel="stylesheet" href="/@{{v.username}}/css">
{% endif %} {% endif %}

View File

@ -14,7 +14,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=58"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
<link rel="stylesheet" href="/assets/css/awards.css?v=7"> <link rel="stylesheet" href="/assets/css/awards.css?v=7">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>

View File

@ -78,15 +78,16 @@
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a> <a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/random_post"><i class="fas fa-random align-middle text-gray-500 black"></i></a> <a class="mobile-nav-icon d-md-none" href="/random_post"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
{% if v and LOTTERY_ENABLED %} {% if v and LOTTERY_ENABLED %}
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Lottershe">
<a <a
href="#" href="#"
class="mobile-nav-icon d-md-none" class="mobile-nav-icon d-md-none"
title="Lottershe"
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-dismiss="modal" data-bs-dismiss="modal"
data-bs-target="#lotteryModal"> data-bs-target="#lotteryModal">
<i class="fas fa-ticket align-middle text-gray-500"></i> <i class="fas fa-ticket align-middle text-gray-500"></i>
</a> </a>
</span>
{% endif %} {% endif %}
{% if v and v.admin_level > 1 %} {% if v and v.admin_level > 1 %}
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a> <a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
@ -115,11 +116,14 @@
</li> </li>
{% if v and LOTTERY_ENABLED %} {% if v and LOTTERY_ENABLED %}
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1"> <li
class="nav-item d-flex align-items-center justify-content-center text-center mx-1"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="Lottershe">
<a <a
href="#" href="#"
class="nav-link" class="nav-link"
title="Lottershe"
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-dismiss="modal" data-bs-dismiss="modal"
data-bs-target="#lotteryModal"> data-bs-target="#lotteryModal">

View File

@ -7,7 +7,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View File

@ -139,7 +139,7 @@
margin: 0 auto; margin: 0 auto;
left: 0; left: 0;
right: 0; right: 0;
width: 275px; width: unset;
z-index: 1000; z-index: 1000;
" "
role="alert" role="alert"
@ -165,7 +165,7 @@
margin: 0 auto; margin: 0 auto;
left: 0; left: 0;
right: 0; right: 0;
width: 275px; width: unset;
z-index: 1000; z-index: 1000;
" "
role="alert" role="alert"

View File

@ -35,7 +35,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View File

@ -40,7 +40,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% else %} {% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style> <style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">

View File

@ -28,7 +28,7 @@
{% if v %} {% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}"> <link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=49"> <link rel="stylesheet" href="{{asset('css/' + v.theme + '.css')}}">
{% if v.agendaposter %} {% if v.agendaposter %}
<style> <style>
html { html {

View File

@ -1,9 +1,24 @@
{%- {%-
set CACHE_VER = { set CACHE_VER = {
'css/main.css': 283, 'css/main.css': 284,
'js/award_modal.js': 251,
'js/bootstrap.js': 257, 'css/4chan.css': 59,
'js/header.js': 268, 'css/classic.css': 59,
'css/classic_dark.css': 59,
'css/coffee.css': 59,
'css/dark.css': 59,
'css/dramblr.css': 59,
'css/light.css': 59,
'css/midnight.css': 59,
'css/reddit.css': 59,
'css/transparent.css': 59,
'css/tron.css': 59,
'css/win98.css': 59,
'js/award_modal.js': 252,
'js/bootstrap.js': 258,
'js/header.js': 269,
'images/badges/': 1017, 'images/badges/': 1017,
} }
-%} -%}