forked from rDrama/rDrama
better user links in mod log
parent
30b46195ea
commit
9974590a19
|
@ -56,7 +56,7 @@ class ModAction(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def target_link(self):
|
def target_link(self):
|
||||||
if self.target_user: return f'<a href="{self.target_user.url}">{self.target_user.username}</a>'
|
if self.target_user: return f'<a href="{self.target_user.url}">@{self.target_user.username}</a>'
|
||||||
elif self.target_post:
|
elif self.target_post:
|
||||||
return censor_slurs(f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>', None)
|
return censor_slurs(f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>', None)
|
||||||
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}#context">comment</a>'
|
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}#context">comment</a>'
|
||||||
|
|
|
@ -48,7 +48,7 @@ class SubAction(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def target_link(self):
|
def target_link(self):
|
||||||
if self.target_user: return f'<a href="{self.target_user.url}">{self.target_user.username}</a>'
|
if self.target_user: return f'<a href="{self.target_user.url}">@{self.target_user.username}</a>'
|
||||||
elif self.target_post:
|
elif self.target_post:
|
||||||
return censor_slurs(f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>', None)
|
return censor_slurs(f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>', None)
|
||||||
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}#context">comment</a>'
|
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}#context">comment</a>'
|
||||||
|
|
|
@ -37,12 +37,12 @@ MODACTION_TYPES = {
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
},
|
},
|
||||||
'ban_user': {
|
'ban_user': {
|
||||||
"str": 'banned user {self.target_link}',
|
"str": 'banned {self.target_link}',
|
||||||
"icon": 'fa-user-slash',
|
"icon": 'fa-user-slash',
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
},
|
},
|
||||||
'blacklist_user': {
|
'blacklist_user': {
|
||||||
"str": 'blacklisted user {self.target_link} from restricted holes',
|
"str": 'blacklisted {self.target_link} from restricted holes',
|
||||||
"icon": 'fa-lock',
|
"icon": 'fa-lock',
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
},
|
},
|
||||||
|
@ -192,12 +192,12 @@ MODACTION_TYPES = {
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
'mod_mute_user': {
|
'mod_mute_user': {
|
||||||
"str": 'muted reports from user {self.target_link}',
|
"str": 'muted reports from {self.target_link}',
|
||||||
"icon": 'fa-file-signature',
|
"icon": 'fa-file-signature',
|
||||||
"color": 'bg-danger'
|
"color": 'bg-danger'
|
||||||
},
|
},
|
||||||
'mod_unmute_user': {
|
'mod_unmute_user': {
|
||||||
"str": 'unmuted reports from user {self.target_link}',
|
"str": 'unmuted reports from {self.target_link}',
|
||||||
"icon": 'fa-file-signature',
|
"icon": 'fa-file-signature',
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
|
@ -322,12 +322,12 @@ MODACTION_TYPES = {
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
'unban_user': {
|
'unban_user': {
|
||||||
"str": 'unbanned user {self.target_link}',
|
"str": 'unbanned {self.target_link}',
|
||||||
"icon": 'fa-user',
|
"icon": 'fa-user',
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
'unblacklist_user': {
|
'unblacklist_user': {
|
||||||
"str": 'unblacklisted user {self.target_link} from restricted holes',
|
"str": 'unblacklisted {self.target_link} from restricted holes',
|
||||||
"icon": 'fa-lock-open',
|
"icon": 'fa-lock-open',
|
||||||
"color": 'bg-success'
|
"color": 'bg-success'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue