forked from rDrama/rDrama
make award immunity only apply to negative awards
parent
de79260774
commit
c061936b53
|
@ -163,6 +163,8 @@ register_new_elements(document);
|
|||
bs_trigger(document);
|
||||
|
||||
|
||||
const negative_awards = document.querySelectorAll("[data-positive=False]")
|
||||
|
||||
document.addEventListener("click", function (e) {
|
||||
let element = e.target
|
||||
if (element.tagName == "I")
|
||||
|
@ -197,6 +199,17 @@ document.addEventListener("click", function (e) {
|
|||
else {
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -381,20 +381,18 @@ class User(Base):
|
|||
|
||||
|
||||
@lazy
|
||||
def immune_to_awards(self, v):
|
||||
def immune_to_negative_awards(self, v):
|
||||
if SITE_NAME != 'rDrama':
|
||||
return False
|
||||
if IS_EVENT():
|
||||
return False
|
||||
if v.id == self.id:
|
||||
return False
|
||||
if v.id in IMMUNE_TO_AWARDS:
|
||||
if v.id in IMMUNE_TO_NEGATIVE_AWARDS:
|
||||
return False
|
||||
if v.admin_level >= PERMS['IGNORE_AWARD_IMMUNITY']:
|
||||
return False
|
||||
if self.alts:
|
||||
return False
|
||||
if self.id in IMMUNE_TO_AWARDS:
|
||||
if self.id in IMMUNE_TO_NEGATIVE_AWARDS:
|
||||
return True
|
||||
if self.new_user and not self.alts:
|
||||
return True
|
||||
|
|
|
@ -18,6 +18,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": False,
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
### Deprecated
|
||||
|
@ -32,6 +33,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": False,
|
||||
"positive": True,
|
||||
},
|
||||
"nword": {
|
||||
"kind": "nword",
|
||||
|
@ -44,6 +46,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": False,
|
||||
"positive": True,
|
||||
},
|
||||
"fish": {
|
||||
"kind": "fish",
|
||||
|
@ -56,6 +59,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": False,
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
|
||||
|
@ -71,6 +75,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_FISTMAS() or IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
### Fistmas
|
||||
|
@ -85,6 +90,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"snow": {
|
||||
"kind": "snow",
|
||||
|
@ -97,6 +103,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"gingerbread": {
|
||||
"kind": "gingerbread",
|
||||
|
@ -109,6 +116,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"lights": {
|
||||
"kind": "lights",
|
||||
|
@ -121,6 +129,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"frostbite": {
|
||||
"kind": "frostbite",
|
||||
|
@ -133,6 +142,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"candycane": {
|
||||
"kind": "candycane",
|
||||
|
@ -145,6 +155,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
"grinch": {
|
||||
"kind": "grinch",
|
||||
|
@ -157,6 +168,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_FISTMAS(),
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
### Homoween
|
||||
|
@ -171,6 +183,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"fog": {
|
||||
"kind": "fog",
|
||||
|
@ -183,6 +196,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"bones": {
|
||||
"kind": "bones",
|
||||
|
@ -195,6 +209,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"pumpkin": {
|
||||
"kind": "pumpkin",
|
||||
|
@ -207,6 +222,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"candy-corn": {
|
||||
"kind": "candy-corn",
|
||||
|
@ -219,6 +235,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"ectoplasm": {
|
||||
"kind": "ectoplasm",
|
||||
|
@ -231,6 +248,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"stab": {
|
||||
"kind": "stab",
|
||||
|
@ -243,6 +261,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"upsidedown": {
|
||||
"kind": "upsidedown",
|
||||
|
@ -255,6 +274,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"flashlight": {
|
||||
"kind": "flashlight",
|
||||
|
@ -267,6 +287,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"haunt": {
|
||||
"kind": "haunt",
|
||||
|
@ -279,6 +300,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
"jumpscare": {
|
||||
|
@ -292,6 +314,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"bite": {
|
||||
"kind": "bite",
|
||||
|
@ -304,6 +327,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"vax": {
|
||||
"kind": "vax",
|
||||
|
@ -316,6 +340,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
"hw-grinch": {
|
||||
"kind": "hw-grinch",
|
||||
|
@ -328,6 +353,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": IS_HOMOWEEN(),
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
### Birthgay/Birthdead
|
||||
|
@ -342,6 +368,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": IS_BIRTHGAY() or IS_BIRTHDEAD(),
|
||||
"positive": True,
|
||||
},
|
||||
|
||||
### Standard
|
||||
|
@ -356,6 +383,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"marsify": {
|
||||
"kind": "marsify",
|
||||
|
@ -368,6 +396,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"rainbow": {
|
||||
"kind": "rainbow",
|
||||
|
@ -380,6 +409,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": not FEATURES['HOUSES'],
|
||||
"positive": False,
|
||||
},
|
||||
"sharpen": {
|
||||
"kind": "sharpen",
|
||||
|
@ -392,6 +422,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": not FEATURES['HOUSES'],
|
||||
"positive": False,
|
||||
},
|
||||
"shit": {
|
||||
"kind": "shit",
|
||||
|
@ -404,6 +435,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"fireflies": {
|
||||
"kind": "fireflies",
|
||||
|
@ -416,6 +448,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"train": {
|
||||
"kind": "train",
|
||||
|
@ -428,6 +461,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"scooter": {
|
||||
"kind": "scooter",
|
||||
|
@ -440,6 +474,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"wholesome": {
|
||||
"kind": "wholesome",
|
||||
|
@ -452,6 +487,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"firework": {
|
||||
"kind": "firework",
|
||||
|
@ -464,6 +500,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"ricardo": {
|
||||
"kind": "ricardo",
|
||||
|
@ -476,6 +513,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"tilt": {
|
||||
"kind": "tilt",
|
||||
|
@ -488,6 +526,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"glowie": {
|
||||
"kind": "glowie",
|
||||
|
@ -500,6 +539,7 @@ AWARDS = {
|
|||
"cosmetic": True,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"spider": {
|
||||
"kind": "spider",
|
||||
|
@ -512,6 +552,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"owoify": {
|
||||
"kind": "owoify",
|
||||
|
@ -524,6 +565,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": not FEATURES['HOUSES'],
|
||||
"positive": False,
|
||||
},
|
||||
"flairlock": {
|
||||
"kind": "flairlock",
|
||||
|
@ -536,6 +578,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"rehab": {
|
||||
"kind": "rehab",
|
||||
|
@ -548,6 +591,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"namelock": {
|
||||
"kind": "namelock",
|
||||
|
@ -560,6 +604,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"queen": {
|
||||
"kind": "queen",
|
||||
|
@ -572,6 +617,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"offsitementions": {
|
||||
"kind": "offsitementions",
|
||||
|
@ -584,6 +630,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"unpin": {
|
||||
"kind": "unpin",
|
||||
|
@ -596,6 +643,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"chud": {
|
||||
"kind": "chud",
|
||||
|
@ -608,6 +656,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"pin": {
|
||||
"kind": "pin",
|
||||
|
@ -620,6 +669,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": True,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"progressivestack": {
|
||||
"kind": "progressivestack",
|
||||
|
@ -632,6 +682,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"pizzashill": {
|
||||
"kind": "pizzashill",
|
||||
|
@ -644,6 +695,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"bird": {
|
||||
"kind": "bird",
|
||||
|
@ -656,6 +708,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"marsey": {
|
||||
"kind": "marsey",
|
||||
|
@ -668,6 +721,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"ban": {
|
||||
"kind": "ban",
|
||||
|
@ -680,6 +734,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"unban": {
|
||||
"kind": "unban",
|
||||
|
@ -692,6 +747,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"deflector": {
|
||||
"kind": "deflector",
|
||||
|
@ -704,6 +760,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"benefactor": {
|
||||
"kind": "benefactor",
|
||||
|
@ -716,6 +773,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": FEATURES['MARSEYBUX'],
|
||||
"positive": True,
|
||||
},
|
||||
"eye": {
|
||||
"kind": "eye",
|
||||
|
@ -728,6 +786,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"grass": {
|
||||
"kind": "grass",
|
||||
|
@ -740,6 +799,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": False,
|
||||
},
|
||||
"unblockable": {
|
||||
"kind": "unblockable",
|
||||
|
@ -752,6 +812,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"pause": {
|
||||
"kind": "pause",
|
||||
|
@ -764,6 +825,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"unpausable": {
|
||||
"kind": "unpausable",
|
||||
|
@ -776,6 +838,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"alt": {
|
||||
"kind": "alt",
|
||||
|
@ -788,6 +851,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
"checkmark": {
|
||||
"kind": "checkmark",
|
||||
|
@ -800,6 +864,7 @@ AWARDS = {
|
|||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"enabled": True,
|
||||
"positive": True,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -821,6 +886,7 @@ HOUSE_AWARDS = {
|
|||
"deflectable": True,
|
||||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"positive": False,
|
||||
},
|
||||
"Femboy": {
|
||||
"kind": "Femboy",
|
||||
|
@ -832,6 +898,7 @@ HOUSE_AWARDS = {
|
|||
"deflectable": True,
|
||||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"positive": False,
|
||||
},
|
||||
"Vampire": {
|
||||
"kind": "Vampire",
|
||||
|
@ -843,6 +910,7 @@ HOUSE_AWARDS = {
|
|||
"deflectable": True,
|
||||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"positive": False,
|
||||
},
|
||||
"Racist": {
|
||||
"kind": "Racist",
|
||||
|
@ -854,6 +922,7 @@ HOUSE_AWARDS = {
|
|||
"deflectable": True,
|
||||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"positive": False,
|
||||
},
|
||||
"Edgy": {
|
||||
"kind": "Edgy",
|
||||
|
@ -865,6 +934,7 @@ HOUSE_AWARDS = {
|
|||
"deflectable": True,
|
||||
"cosmetic": False,
|
||||
"ghost": False,
|
||||
"positive": False,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -528,7 +528,7 @@ AEVANN_ID = 0
|
|||
GTIX_ID = 0
|
||||
LAWLZ_ID = 0
|
||||
|
||||
IMMUNE_TO_AWARDS = {}
|
||||
IMMUNE_TO_NEGATIVE_AWARDS = {}
|
||||
EXEMPT_FROM_1WEEK_EDITING_LIMIT = {}
|
||||
|
||||
MODMAIL_ID = 2
|
||||
|
@ -647,7 +647,7 @@ if SITE in {'rdrama.net', 'staging.rdrama.net'}:
|
|||
AEVANN_ID = 1
|
||||
LAWLZ_ID = 3833
|
||||
|
||||
IMMUNE_TO_AWARDS = {PIZZASHILL_ID, CARP_ID}
|
||||
IMMUNE_TO_NEGATIVE_AWARDS = {PIZZASHILL_ID, CARP_ID}
|
||||
|
||||
NOTIFIED_USERS = {
|
||||
'aevan': AEVANN_ID,
|
||||
|
|
|
@ -181,8 +181,8 @@ def award_thing(v, thing_type, id):
|
|||
|
||||
safe_username = f"@{thing.author_name} is"
|
||||
|
||||
if author.immune_to_awards(v):
|
||||
abort(403, f"{safe_username} immune to awards!")
|
||||
if author.immune_to_negative_awards(v):
|
||||
abort(403, f"{safe_username} immune to negative awards!")
|
||||
|
||||
if kind == "benefactor" and author.id == v.id:
|
||||
abort(403, "You can't use this award on yourself!")
|
||||
|
|
|
@ -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,
|
||||
"git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS,
|
||||
"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_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,
|
||||
|
|
|
@ -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>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<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>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<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>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{% macro iterate_awards(awards) %}
|
||||
{% for award in awards %}
|
||||
{% 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>
|
||||
<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>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<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>
|
||||
|
|
Loading…
Reference in New Issue