Revert "Add Y'all Seein' Eye award."

This reverts commit a0f441a67d.
remotes/1693045480750635534/spooky-22
Aevann1 2022-05-26 02:51:42 +02:00
parent 65388d3e57
commit 163267c88c
18 changed files with 22 additions and 53 deletions

View File

@ -89,7 +89,6 @@ class User(Base):
unmutable = Column(Boolean)
eye = Column(Boolean)
alt = Column(Boolean)
profileeye = Column(Boolean)
frontsize = Column(Integer, default=25)
controversial = Column(Boolean, default=False)
bio = deferred(Column(String))
@ -217,11 +216,7 @@ class User(Base):
if self.has_badge(badge): discount -= discounts[badge]
return discount
@property
@lazy
def can_see_visitors(self):
return self.admin_level >= 2 or self.profileeye
@property
@lazy

View File

@ -662,14 +662,6 @@ AWARDS = {
"color": "checkmark",
"price": 100000
},
"profileeye": {
"kind": "profileeye",
"title": "Y'all Seein' Eye",
"description": "Gives the recipient the ability to see who visited their profile.",
"icon": "fas fa-eyes",
"color": "text-silver",
"price": 150000,
},
}
if SITE_NAME == 'PCM':

View File

@ -305,13 +305,6 @@ def award_post(pid, v):
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "profileeye":
author.profileeye = True
if not author.has_badge(136):
new_badge = Badge(badge_id=136, user_id=author.id)
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "unblockable":
author.unblockable = True
if not author.has_badge(87):
@ -558,13 +551,6 @@ def award_comment(cid, v):
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "profileeye":
author.profileeye = True
if not author.has_badge(136):
new_badge = Badge(badge_id=136, user_id=author.id)
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "unblockable":
author.unblockable = True
if not author.has_badge(87):

View File

@ -867,8 +867,7 @@ def following(username, v):
@app.get("/views")
@auth_required
def visitors(v):
if not v.can_see_visitors:
return render_template("errors/patron.html", v=v)
if v.admin_level < 2 and not v.patron: return render_template("errors/patron.html", v=v)
viewers=sorted(v.viewers, key = lambda x: x.last_view_utc, reverse=True)
return render_template("viewers.html", v=v, viewers=viewers)

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<script src="/assets/js/bootstrap.js?v=251"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=58">
<link rel="stylesheet" href="/assets/css/awards.css?v=7">
{% if v.agendaposter %}
@ -33,7 +33,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/awards.css?v=7">
{% 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=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
{% if v.agendaposter %}
<style>
@ -31,7 +31,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
{% endif %}

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
</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=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
</head>

View File

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

View File

@ -39,11 +39,11 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=57">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
{% 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=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
</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=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
</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=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=49">
{% if v.agendaposter %}
<style>
@ -51,7 +51,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=276">
<link rel="stylesheet" href="/assets/css/main.css?v=275">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=49">
{% endif %}
{% endblock %}

View File

@ -229,7 +229,7 @@
{% elif v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary">Edit profile</a>
{% if v.can_see_visitors %}<a href="/views" class="btn btn-secondary">Profile views</a>{% endif %}
<a href="/views" class="btn btn-secondary">Profile views</a>
{% endif %}
{% if u.song and v and (v.id == u.id or v.mute and not u.unmutable) %}
@ -479,7 +479,7 @@
</div>
{% if v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary ">Edit profile</a>
{% if v.can_see_visitors %}<a href="/views" class="btn btn-secondary">Profile views</a>{% endif %}
<a href="/views" class="btn btn-secondary">Profile views</a>
{% endif %}
{% if u.song and v and (v.id == u.id or v.mute and not u.unmutable) %}

View File

@ -629,8 +629,7 @@ CREATE TABLE public.users (
house character varying(16),
subs_created integer DEFAULT 0 NOT NULL,
deflector integer,
reddit character varying(15) NOT NULL,
profileeye boolean
reddit character varying(15) NOT NULL
);

File diff suppressed because one or more lines are too long