forked from rDrama/rDrama
1
0
Fork 0

make award immunity only apply to negative awards

master
Aevann 2023-10-02 17:24:09 +03:00
parent de79260774
commit c061936b53
10 changed files with 96 additions and 15 deletions

View File

@ -163,6 +163,8 @@ register_new_elements(document);
bs_trigger(document); bs_trigger(document);
const negative_awards = document.querySelectorAll("[data-positive=False]")
document.addEventListener("click", function (e) { document.addEventListener("click", function (e) {
let element = e.target let element = e.target
if (element.tagName == "I") if (element.tagName == "I")
@ -197,6 +199,17 @@ document.addEventListener("click", function (e) {
else { else {
effect_author_tab.classList.remove('disabled') effect_author_tab.classList.remove('disabled')
} }
if (element.dataset.immune == 'True') {
for (const award of negative_awards) {
award.classList.add('disabled')
}
}
else {
for (const award of negative_awards) {
award.classList.remove('disabled')
}
}
} }

View File

@ -381,20 +381,18 @@ class User(Base):
@lazy @lazy
def immune_to_awards(self, v): def immune_to_negative_awards(self, v):
if SITE_NAME != 'rDrama': if SITE_NAME != 'rDrama':
return False return False
if IS_EVENT():
return False
if v.id == self.id: if v.id == self.id:
return False return False
if v.id in IMMUNE_TO_AWARDS: if v.id in IMMUNE_TO_NEGATIVE_AWARDS:
return False return False
if v.admin_level >= PERMS['IGNORE_AWARD_IMMUNITY']: if v.admin_level >= PERMS['IGNORE_AWARD_IMMUNITY']:
return False return False
if self.alts: if self.alts:
return False return False
if self.id in IMMUNE_TO_AWARDS: if self.id in IMMUNE_TO_NEGATIVE_AWARDS:
return True return True
if self.new_user and not self.alts: if self.new_user and not self.alts:
return True return True

View File

@ -18,6 +18,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": False, "enabled": False,
"positive": True,
}, },
### Deprecated ### Deprecated
@ -32,6 +33,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": False, "enabled": False,
"positive": True,
}, },
"nword": { "nword": {
"kind": "nword", "kind": "nword",
@ -44,6 +46,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": False, "enabled": False,
"positive": True,
}, },
"fish": { "fish": {
"kind": "fish", "kind": "fish",
@ -56,6 +59,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": False, "enabled": False,
"positive": True,
}, },
@ -71,6 +75,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_FISTMAS() or IS_HOMOWEEN(), "enabled": IS_FISTMAS() or IS_HOMOWEEN(),
"positive": True,
}, },
### Fistmas ### Fistmas
@ -85,6 +90,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"snow": { "snow": {
"kind": "snow", "kind": "snow",
@ -97,6 +103,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"gingerbread": { "gingerbread": {
"kind": "gingerbread", "kind": "gingerbread",
@ -109,6 +116,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"lights": { "lights": {
"kind": "lights", "kind": "lights",
@ -121,6 +129,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"frostbite": { "frostbite": {
"kind": "frostbite", "kind": "frostbite",
@ -133,6 +142,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"candycane": { "candycane": {
"kind": "candycane", "kind": "candycane",
@ -145,6 +155,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
"grinch": { "grinch": {
"kind": "grinch", "kind": "grinch",
@ -157,6 +168,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_FISTMAS(), "enabled": IS_FISTMAS(),
"positive": True,
}, },
### Homoween ### Homoween
@ -171,6 +183,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"fog": { "fog": {
"kind": "fog", "kind": "fog",
@ -183,6 +196,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"bones": { "bones": {
"kind": "bones", "kind": "bones",
@ -195,6 +209,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"pumpkin": { "pumpkin": {
"kind": "pumpkin", "kind": "pumpkin",
@ -207,6 +222,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"candy-corn": { "candy-corn": {
"kind": "candy-corn", "kind": "candy-corn",
@ -219,6 +235,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"ectoplasm": { "ectoplasm": {
"kind": "ectoplasm", "kind": "ectoplasm",
@ -231,6 +248,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"stab": { "stab": {
"kind": "stab", "kind": "stab",
@ -243,6 +261,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"upsidedown": { "upsidedown": {
"kind": "upsidedown", "kind": "upsidedown",
@ -255,6 +274,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"flashlight": { "flashlight": {
"kind": "flashlight", "kind": "flashlight",
@ -267,6 +287,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"haunt": { "haunt": {
"kind": "haunt", "kind": "haunt",
@ -279,6 +300,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"jumpscare": { "jumpscare": {
@ -292,6 +314,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"bite": { "bite": {
"kind": "bite", "kind": "bite",
@ -304,6 +327,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"vax": { "vax": {
"kind": "vax", "kind": "vax",
@ -316,6 +340,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
"hw-grinch": { "hw-grinch": {
"kind": "hw-grinch", "kind": "hw-grinch",
@ -328,6 +353,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": IS_HOMOWEEN(), "enabled": IS_HOMOWEEN(),
"positive": True,
}, },
### Birthgay/Birthdead ### Birthgay/Birthdead
@ -342,6 +368,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": IS_BIRTHGAY() or IS_BIRTHDEAD(), "enabled": IS_BIRTHGAY() or IS_BIRTHDEAD(),
"positive": True,
}, },
### Standard ### Standard
@ -356,6 +383,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"marsify": { "marsify": {
"kind": "marsify", "kind": "marsify",
@ -368,6 +396,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"rainbow": { "rainbow": {
"kind": "rainbow", "kind": "rainbow",
@ -380,6 +409,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": not FEATURES['HOUSES'], "enabled": not FEATURES['HOUSES'],
"positive": False,
}, },
"sharpen": { "sharpen": {
"kind": "sharpen", "kind": "sharpen",
@ -392,6 +422,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": not FEATURES['HOUSES'], "enabled": not FEATURES['HOUSES'],
"positive": False,
}, },
"shit": { "shit": {
"kind": "shit", "kind": "shit",
@ -404,6 +435,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"fireflies": { "fireflies": {
"kind": "fireflies", "kind": "fireflies",
@ -416,6 +448,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"train": { "train": {
"kind": "train", "kind": "train",
@ -428,6 +461,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"scooter": { "scooter": {
"kind": "scooter", "kind": "scooter",
@ -440,6 +474,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"wholesome": { "wholesome": {
"kind": "wholesome", "kind": "wholesome",
@ -452,6 +487,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"firework": { "firework": {
"kind": "firework", "kind": "firework",
@ -464,6 +500,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"ricardo": { "ricardo": {
"kind": "ricardo", "kind": "ricardo",
@ -476,6 +513,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"tilt": { "tilt": {
"kind": "tilt", "kind": "tilt",
@ -488,6 +526,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": False,
}, },
"glowie": { "glowie": {
"kind": "glowie", "kind": "glowie",
@ -500,6 +539,7 @@ AWARDS = {
"cosmetic": True, "cosmetic": True,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": False,
}, },
"spider": { "spider": {
"kind": "spider", "kind": "spider",
@ -512,6 +552,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"owoify": { "owoify": {
"kind": "owoify", "kind": "owoify",
@ -524,6 +565,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": not FEATURES['HOUSES'], "enabled": not FEATURES['HOUSES'],
"positive": False,
}, },
"flairlock": { "flairlock": {
"kind": "flairlock", "kind": "flairlock",
@ -536,6 +578,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"rehab": { "rehab": {
"kind": "rehab", "kind": "rehab",
@ -548,6 +591,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"namelock": { "namelock": {
"kind": "namelock", "kind": "namelock",
@ -560,6 +604,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"queen": { "queen": {
"kind": "queen", "kind": "queen",
@ -572,6 +617,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"offsitementions": { "offsitementions": {
"kind": "offsitementions", "kind": "offsitementions",
@ -584,6 +630,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"unpin": { "unpin": {
"kind": "unpin", "kind": "unpin",
@ -596,6 +643,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": False,
}, },
"chud": { "chud": {
"kind": "chud", "kind": "chud",
@ -608,6 +656,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"pin": { "pin": {
"kind": "pin", "kind": "pin",
@ -620,6 +669,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": True, "ghost": True,
"enabled": True, "enabled": True,
"positive": True,
}, },
"progressivestack": { "progressivestack": {
"kind": "progressivestack", "kind": "progressivestack",
@ -632,6 +682,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"pizzashill": { "pizzashill": {
"kind": "pizzashill", "kind": "pizzashill",
@ -644,6 +695,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"bird": { "bird": {
"kind": "bird", "kind": "bird",
@ -656,6 +708,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"marsey": { "marsey": {
"kind": "marsey", "kind": "marsey",
@ -668,6 +721,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"ban": { "ban": {
"kind": "ban", "kind": "ban",
@ -680,6 +734,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"unban": { "unban": {
"kind": "unban", "kind": "unban",
@ -692,6 +747,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"deflector": { "deflector": {
"kind": "deflector", "kind": "deflector",
@ -704,6 +760,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"benefactor": { "benefactor": {
"kind": "benefactor", "kind": "benefactor",
@ -716,6 +773,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": FEATURES['MARSEYBUX'], "enabled": FEATURES['MARSEYBUX'],
"positive": True,
}, },
"eye": { "eye": {
"kind": "eye", "kind": "eye",
@ -728,6 +786,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"grass": { "grass": {
"kind": "grass", "kind": "grass",
@ -740,6 +799,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": False,
}, },
"unblockable": { "unblockable": {
"kind": "unblockable", "kind": "unblockable",
@ -752,6 +812,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"pause": { "pause": {
"kind": "pause", "kind": "pause",
@ -764,6 +825,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"unpausable": { "unpausable": {
"kind": "unpausable", "kind": "unpausable",
@ -776,6 +838,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"alt": { "alt": {
"kind": "alt", "kind": "alt",
@ -788,6 +851,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
"checkmark": { "checkmark": {
"kind": "checkmark", "kind": "checkmark",
@ -800,6 +864,7 @@ AWARDS = {
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"enabled": True, "enabled": True,
"positive": True,
}, },
} }
@ -821,6 +886,7 @@ HOUSE_AWARDS = {
"deflectable": True, "deflectable": True,
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"positive": False,
}, },
"Femboy": { "Femboy": {
"kind": "Femboy", "kind": "Femboy",
@ -832,6 +898,7 @@ HOUSE_AWARDS = {
"deflectable": True, "deflectable": True,
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"positive": False,
}, },
"Vampire": { "Vampire": {
"kind": "Vampire", "kind": "Vampire",
@ -843,6 +910,7 @@ HOUSE_AWARDS = {
"deflectable": True, "deflectable": True,
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"positive": False,
}, },
"Racist": { "Racist": {
"kind": "Racist", "kind": "Racist",
@ -854,6 +922,7 @@ HOUSE_AWARDS = {
"deflectable": True, "deflectable": True,
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"positive": False,
}, },
"Edgy": { "Edgy": {
"kind": "Edgy", "kind": "Edgy",
@ -865,6 +934,7 @@ HOUSE_AWARDS = {
"deflectable": True, "deflectable": True,
"cosmetic": False, "cosmetic": False,
"ghost": False, "ghost": False,
"positive": False,
}, },
} }

View File

@ -528,7 +528,7 @@ AEVANN_ID = 0
GTIX_ID = 0 GTIX_ID = 0
LAWLZ_ID = 0 LAWLZ_ID = 0
IMMUNE_TO_AWARDS = {} IMMUNE_TO_NEGATIVE_AWARDS = {}
EXEMPT_FROM_1WEEK_EDITING_LIMIT = {} EXEMPT_FROM_1WEEK_EDITING_LIMIT = {}
MODMAIL_ID = 2 MODMAIL_ID = 2
@ -647,7 +647,7 @@ if SITE in {'rdrama.net', 'staging.rdrama.net'}:
AEVANN_ID = 1 AEVANN_ID = 1
LAWLZ_ID = 3833 LAWLZ_ID = 3833
IMMUNE_TO_AWARDS = {PIZZASHILL_ID, CARP_ID} IMMUNE_TO_NEGATIVE_AWARDS = {PIZZASHILL_ID, CARP_ID}
NOTIFIED_USERS = { NOTIFIED_USERS = {
'aevan': AEVANN_ID, 'aevan': AEVANN_ID,

View File

@ -181,8 +181,8 @@ def award_thing(v, thing_type, id):
safe_username = f"@{thing.author_name} is" safe_username = f"@{thing.author_name} is"
if author.immune_to_awards(v): if author.immune_to_negative_awards(v):
abort(403, f"{safe_username} immune to awards!") abort(403, f"{safe_username} immune to negative awards!")
if kind == "benefactor" and author.id == v.id: if kind == "benefactor" and author.id == v.id:
abort(403, "You can't use this award on yourself!") abort(403, "You can't use this award on yourself!")

View File

@ -140,7 +140,7 @@ def inject_constants():
"DEFAULT_CONFIG_VALUE":DEFAULT_CONFIG_VALUE, "IS_LOCALHOST":IS_LOCALHOST, "BACKGROUND_CATEGORIES":BACKGROUND_CATEGORIES, "PAGE_SIZE":PAGE_SIZE, "TAGLINES":TAGLINES, "get_alt_graph":get_alt_graph, "current_registered_users":current_registered_users, "DEFAULT_CONFIG_VALUE":DEFAULT_CONFIG_VALUE, "IS_LOCALHOST":IS_LOCALHOST, "BACKGROUND_CATEGORIES":BACKGROUND_CATEGORIES, "PAGE_SIZE":PAGE_SIZE, "TAGLINES":TAGLINES, "get_alt_graph":get_alt_graph, "current_registered_users":current_registered_users,
"git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS, "git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS,
"BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, "BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT,
"IMMUNE_TO_AWARDS": IMMUNE_TO_AWARDS, "SITE_FULL_IMAGES": SITE_FULL_IMAGES, "SITE_FULL_IMAGES": SITE_FULL_IMAGES,
"IS_EVENT":IS_EVENT, "IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN, "IS_EVENT":IS_EVENT, "IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN,
"IS_DKD":IS_DKD, "IS_BIRTHGAY":IS_BIRTHGAY, "IS_BIRTHDEAD":IS_BIRTHDEAD, "IS_DKD":IS_DKD, "IS_BIRTHGAY":IS_BIRTHGAY, "IS_BIRTHDEAD":IS_BIRTHDEAD,
"CHUD_PHRASES":CHUD_PHRASES, "hasattr":hasattr, "calc_users":calc_users, "HOLE_INACTIVITY_DELETION":HOLE_INACTIVITY_DELETION, "LIGHT_THEMES":LIGHT_THEMES, "CHUD_PHRASES":CHUD_PHRASES, "hasattr":hasattr, "calc_users":calc_users, "HOLE_INACTIVITY_DELETION":HOLE_INACTIVITY_DELETION, "LIGHT_THEMES":LIGHT_THEMES,

View File

@ -386,7 +386,7 @@
<button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#reportCommentModal" data-nonce="{{g.nonce}}" data-onclick="report_commentModal('{{c.id}}','{{c.author_name}}',)"><i class="fas fa-flag fa-fw"></i>Report</button> <button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#reportCommentModal" data-nonce="{{g.nonce}}" data-onclick="report_commentModal('{{c.id}}','{{c.author_name}}',)"><i class="fas fa-flag fa-fw"></i>Report</button>
{% if FEATURES['AWARDS'] -%} {% if FEATURES['AWARDS'] -%}
<button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#awardModal" data-url="/award/comment/{{c.id}}" data-ghost="{{c.ghost}}" data-nonce="{{g.nonce}}" {% if c.author.immune_to_awards(v) %}disabled{% endif %}><i class="fas fa-gift"></i>Give Award</button> <button type="button" class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#awardModal" data-url="/award/comment/{{c.id}}" data-immune="{{c.author.immune_to_negative_awards(v)}}" data-ghost="{{c.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift"></i>Give Award</button>
{%- endif %} {%- endif %}
<button type="button" id="save-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist %}d-md-inline-block{% endif %} text-muted d-none" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}','d-md-inline-block')"><i class="fas fa-save"></i>Save {% if c.num_savers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of users who saved this comment">[{{c.num_savers}}]</span>{% endif %}</button> <button type="button" id="save-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist %}d-md-inline-block{% endif %} text-muted d-none" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}','d-md-inline-block')"><i class="fas fa-save"></i>Save {% if c.num_savers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of users who saved this comment">[{{c.num_savers}}]</span>{% endif %}</button>
@ -595,7 +595,7 @@
<button type="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportCommentModal" data-nonce="{{g.nonce}}" data-onclick="report_commentModal('{{c.id}}','{{c.author_name}}')" class="list-group-item"><i class="fas fa-flag mr-2"></i>Report</button> <button type="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportCommentModal" data-nonce="{{g.nonce}}" data-onclick="report_commentModal('{{c.id}}','{{c.author_name}}')" class="list-group-item"><i class="fas fa-flag mr-2"></i>Report</button>
{% if FEATURES['AWARDS'] -%} {% if FEATURES['AWARDS'] -%}
<button type="button" class="list-group-item" data-bs-toggle="modal" data-bs-target="#awardModal" data-url="/award/comment/{{c.id}}" data-ghost="{{c.ghost}}" data-nonce="{{g.nonce}}" {% if c.author.immune_to_awards(v) %}disabled{% endif %}><i class="fas fa-gift mr-2"></i>Give Award</button> <button type="button" class="list-group-item" data-bs-toggle="modal" data-bs-target="#awardModal" data-url="/award/comment/{{c.id}}" data-immune="{{c.author.immune_to_negative_awards(v)}}" data-ghost="{{c.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift mr-2"></i>Give Award</button>
{%- endif %} {%- endif %}
<button type="button" id="save2-{{c.id}}" class="list-group-item {% if c.id in v.saved_comment_idlist %}d-none{% endif %}" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}','d-none')"><i class="fas fa-save mr-2"></i>Save {% if c.num_savers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of users who saved this comment">[{{c.num_savers}}]</span>{% endif %}</button> <button type="button" id="save2-{{c.id}}" class="list-group-item {% if c.id in v.saved_comment_idlist %}d-none{% endif %}" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}','d-none')"><i class="fas fa-save mr-2"></i>Save {% if c.num_savers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of users who saved this comment">[{{c.num_savers}}]</span>{% endif %}</button>

View File

@ -22,7 +22,7 @@
{% macro iterate_awards(awards) %} {% macro iterate_awards(awards) %}
{% for award in awards %} {% for award in awards %}
{% set price = (award.price*v.award_discount)|int %} {% set price = (award.price*v.award_discount)|int %}
<div data-bs-toggle="tooltip" data-bs-placement="bottom" title="Price: {{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})"> <div data-bs-toggle="tooltip" data-bs-placement="bottom" title="Price: {{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-positive="{{award.positive}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})">
<i class="{{award.icon}} {{award.color}}"></i> <i class="{{award.icon}} {{award.color}}"></i>
<div class="pt-1 award-name">{{award.title}}</div> <div class="pt-1 award-name">{{award.title}}</div>
<div class="text-muted award-owned"><span id="{{award.kind}}-owned">{{award.owned}}</span> owned</div> <div class="text-muted award-owned"><span id="{{award.kind}}-owned">{{award.owned}}</span> owned</div>

View File

@ -8,7 +8,7 @@
{% endif %} {% endif %}
{% if v and FEATURES['AWARDS'] %} {% if v and FEATURES['AWARDS'] %}
<button type="button" class="list-inline-item d-none d-md-inline-block" data-bs-toggle="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}" {% if p.author.immune_to_awards(v) %}disabled{% endif %}><i class="fas fa-gift fa-fw"></i>Give Award</button> <button type="button" class="list-inline-item d-none d-md-inline-block" data-bs-toggle="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-immune="{{p.author.immune_to_negative_awards(v)}}" data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift fa-fw"></i>Give Award</button>
{% endif %} {% endif %}
<button type="button" class="list-inline-item copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}{{SITE_FULL}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button> <button type="button" class="list-inline-item copy-link" data-clipboard-text="{% if SITE == 'rdrama.net' %}{{SITE_FULL}}{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</button>

View File

@ -16,7 +16,7 @@
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" data-nonce="{{g.nonce}}" data-onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag text-center text-muted mr-2"></i>Report</button> <button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" data-nonce="{{g.nonce}}" data-onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag text-center text-muted mr-2"></i>Report</button>
{% if FEATURES['AWARDS'] -%} {% if FEATURES['AWARDS'] -%}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}" {% if p.author.immune_to_awards(v) %}disabled{% endif %}><i class="fas fa-gift text-center text-muted mr-2"></i>Give Award</button> <button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-immune="{{p.author.immune_to_negative_awards(v)}}" data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift text-center text-muted mr-2"></i>Give Award</button>
{%- endif %} {%- endif %}
<button type="button" id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" data-areyousure="postToastSwitch(this,'/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}','d-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-dismiss="modal"><i class="fas fa-bell text-center text-muted mr-2"></i>Subscribe {% if p.num_subscribers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of subscribers">[{{p.num_subscribers}}]</span>{% endif %}</button> <button type="button" id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" data-areyousure="postToastSwitch(this,'/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}','d-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-dismiss="modal"><i class="fas fa-bell text-center text-muted mr-2"></i>Subscribe {% if p.num_subscribers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of subscribers">[{{p.num_subscribers}}]</span>{% endif %}</button>