diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 4effd9f88..7290f78fe 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -5627,6 +5627,10 @@ blockquote p { color: orange !important; } +.text-silver { + color: silver !important; +} + .timeline-Widget { max-height: 500px !important; overflow-y: scroll !important; diff --git a/files/assets/images/badges/eye.webp b/files/assets/images/badges/eye.webp new file mode 100644 index 000000000..aa197ddd5 Binary files /dev/null and b/files/assets/images/badges/eye.webp differ diff --git a/files/classes/user.py b/files/classes/user.py index 861c1e97d..10f3d2157 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -81,6 +81,7 @@ class User(Base): nitter = Column(Boolean) mute = Column(Boolean) unmutable = Column(Boolean) + eye = Column(Boolean) frontsize = Column(Integer, default=25) controversial = Column(Boolean, default=False) bio = deferred(Column(String)) diff --git a/files/helpers/const.py b/files/helpers/const.py index 972c23d76..80ff68edf 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -314,6 +314,14 @@ AWARDS = { "color": "text-orange", "price": 1000 }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "price": 10000 + }, } AWARDS2 = { @@ -405,6 +413,14 @@ AWARDS2 = { "color": "text-success", "price": 10000 }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "price": 10000 + }, "pause": { "kind": "pause", "title": "Pause", diff --git a/files/routes/awards.py b/files/routes/awards.py index d8a8d8d00..c466f20a0 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -55,7 +55,8 @@ def shop(v): "icon": "fas fa-poop", "color": "text-black-50", "owned": 0, - "price": 500 + "price": 500, + "MB": True }, "fireflies": { "kind": "fireflies", @@ -64,7 +65,8 @@ def shop(v): "icon": "fas fa-sparkles", "color": "text-warning", "owned": 0, - "price": 500 + "price": 500, + "MB": True }, "train": { "kind": "train", @@ -73,7 +75,8 @@ def shop(v): "icon": "fas fa-train", "color": "text-pink", "owned": 0, - "price": 500 + "price": 500, + "MB": True }, "pin": { "kind": "pin", @@ -82,7 +85,8 @@ def shop(v): "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "owned": 0, - "price": 750 + "price": 750, + "MB": True }, "unpin": { "kind": "unpin", @@ -91,7 +95,8 @@ def shop(v): "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "owned": 0, - "price": 1000 + "price": 1000, + "MB": True }, "flairlock": { "kind": "flairlock", @@ -100,7 +105,8 @@ def shop(v): "icon": "fas fa-lock", "color": "text-black", "owned": 0, - "price": 1250 + "price": 1250, + "MB": True }, "agendaposter": { "kind": "agendaposter", @@ -109,7 +115,8 @@ def shop(v): "icon": "fas fa-snooze", "color": "text-purple", "owned": 0, - "price": 2500 + "price": 2500, + "MB": True }, "marsey": { "kind": "marsey", @@ -118,7 +125,8 @@ def shop(v): "icon": "fas fa-cat", "color": "text-orange", "owned": 0, - "price": 3000 + "price": 3000, + "MB": True }, "ban": { "kind": "ban", @@ -127,7 +135,8 @@ def shop(v): "icon": "fas fa-gavel", "color": "text-danger", "owned": 0, - "price": 3000 + "price": 3000, + "MB": True }, "unban": { "kind": "unban", @@ -136,7 +145,8 @@ def shop(v): "icon": "fas fa-gavel", "color": "text-success", "owned": 0, - "price": 3500 + "price": 3500, + "MB": True }, "grass": { "kind": "grass", @@ -145,7 +155,18 @@ def shop(v): "icon": "fas fa-seedling", "color": "text-success", "owned": 0, - "price": 10000 + "price": 10000, + "MB": True + }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "owned": 0, + "price": 10000, + "MB": True }, "pause": { "kind": "pause", @@ -154,7 +175,8 @@ def shop(v): "icon": "fas fa-volume-mute", "color": "text-danger", "owned": 0, - "price": 20000 + "price": 20000, + "MB": True }, "unpausable": { "kind": "unpausable", @@ -163,7 +185,8 @@ def shop(v): "icon": "fas fa-volume", "color": "text-success", "owned": 0, - "price": 40000 + "price": 40000, + "MB": True }, } @@ -279,6 +302,14 @@ def buy(v, award): "color": "text-success", "price": 10000 }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "price": 10000 + }, "pause": { "kind": "pause", "title": "Pause", @@ -468,6 +499,11 @@ def award_post(pid, v): send_notification(995, f"@{v.username} bought {kind} award!") new_badge = Badge(badge_id=67, user_id=author.id) g.db.add(new_badge) + elif kind == "eye": + author.eye = True + send_notification(995, f"@{v.username} bought {kind} award!") + new_badge = Badge(badge_id=83, user_id=author.id) + g.db.add(new_badge) elif kind == "marsey": author.marseyawarded = time.time() + 86400 @@ -755,6 +791,15 @@ def items(v): "owned": 0, "price": 10000 }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "owned": 0, + "price": 10000 + }, "pause": { "kind": "pause", "title": "Pause", diff --git a/files/routes/users.py b/files/routes/users.py index 942c3bdb5..fb6a4fb3a 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -512,7 +512,7 @@ def u_username(username, v=None): g.db.commit() - if u.is_private and (not v or (v.id != u.id and v.admin_level < 3)): + if u.is_private and (not v or (v.id != u.id and v.admin_level < 2 and not v.eye)): if v and u.id == LLM_ID: if int(time.time()) - v.rent_utc > 600: @@ -523,12 +523,12 @@ def u_username(username, v=None): else: return render_template("userpage_private.html", time=int(time.time()), u=u, v=v) - if hasattr(u, 'is_blocking') and u.is_blocking and (not v or v.admin_level < 3): + if hasattr(u, 'is_blocking') and u.is_blocking and (not v or v.admin_level < 2): if request.headers.get("Authorization"): return {"error": f"You are blocking @{u.username}."} else: return render_template("userpage_blocking.html", u=u, v=v) - if hasattr(u, 'is_blocked') and u.is_blocked and (not v or v.admin_level < 3): + if hasattr(u, 'is_blocked') and u.is_blocked and (not v or v.admin_level < 2): if request.headers.get("Authorization"): return {"error": "This person is blocking you."} else: return render_template("userpage_blocked.html", u=u, v=v) @@ -605,7 +605,7 @@ def u_username_comments(username, v=None): v=v) - if u.is_private and (not v or (v.id != u.id and v.admin_level < 3)): + if u.is_private and (not v or (v.id != u.id and v.admin_level < 2 and not v.eye)): if v and u.id == LLM_ID: if int(time.time()) - v.rent_utc > 600: if request.headers.get("Authorization"): return {"error": "That userpage is private"} @@ -614,13 +614,13 @@ def u_username_comments(username, v=None): if request.headers.get("Authorization"): return {"error": "That userpage is private"} else: return render_template("userpage_private.html", time=int(time.time()), u=u, v=v) - if hasattr(u, 'is_blocking') and u.is_blocking and (not v or v.admin_level < 3): + if hasattr(u, 'is_blocking') and u.is_blocking and (not v or v.admin_level < 2): if request.headers.get("Authorization"): return {"error": f"You are blocking @{u.username}."} else: return render_template("userpage_blocking.html", u=u, v=v) - if hasattr(u, 'is_blocked') and u.is_blocked and (not v or v.admin_level < 3): + if hasattr(u, 'is_blocked') and u.is_blocked and (not v or v.admin_level < 2): if request.headers.get("Authorization"): return {"error": "This person is blocking you."} else: return render_template("userpage_blocked.html", u=u, diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 325124362..536eb901e 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,11 +15,11 @@ {% if v %} - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index b90ef5a02..19bba7e52 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -23,11 +23,6 @@