Slur swear blocker challenges redux (#15089)

* update packages on local/origin repo

* feat(challenges): add banned words & slur blocker to challenges

* feat(challenges): slur blocker work

* feat(challenges): slur blocker

* feat(challenges): more slur blocker

* feat(challenges): even more slur blocker

* feat(challenges): swear and slur blocker

* feat(challenges): update behavior based on public/private groups

* feat(profiles): slur/swear blocker

* feat(profiles): slur/swear blocker

* feat(profiles/PMs): slur/swear blocker upgrade

* feat(slur/swear): working on it

* feat(profiles/challenges): work on profile block & slack report

* feat(slur/swear blocker): work on Profiles

* feat(slur blocker): refactoring code

* feat(slur blocker): more refactoring

* feat(slur blocker): arghhhhhh

* fix(profiles): improve profanity check logic

* fix(slack): update Slack notification to include authorEmail and remove undefined

* feat(s/s blocker): work on challenges

* feat(s/s blocker): challenge update

* feat(s/s blocker): slack notifs refinements

* feat(s/s blocker): refine slack notifs & disallow use of challenges POST API route if user is chatRevoked:true in db

* update package.json and package-lock.json

* attempt to disable create challenge button for muted users

* another attempt to disable create challenge

* block muted users from creating challenges

* CSS button fun

* fix CSS button

* refactor(css): move button style to global
Also, disable Clone button if user is chat revoked

* fix(lint): remove unused fn

* fix(challenges): handle null slur check

* fix(groups): throw notFound earlier

* fix(challenges): CSS and logic updates

* fix(lint): remove whitespace

* fix(challenges): don't disable create buttons

* fix(slack): restore broken profile flag fields

* chore(cleanup): remove comments and whitespace

* chore(cleanup): one more white space

---------

Co-authored-by: SabreCat <sabe@habitica.com>
This commit is contained in:
Natalie
2024-01-16 15:22:03 -05:00
committed by GitHub
parent 8b2e13b5fd
commit 4cbc3d7664
14 changed files with 166 additions and 86 deletions

View File

@@ -189,8 +189,9 @@
<div>
<button
class="btn"
:disabled="flaggedAndHidden"
:class="flaggedAndHidden ? 'disabled btn-disabled' : 'btn-primary'"
:disabled="flaggedAndHidden || chatRevocation"
:class="flaggedAndHidden || chatRevocation
? 'disabled btn-disabled' : 'btn-primary'"
@click="cloneChallenge()"
>
{{ $t('clone') }}
@@ -280,17 +281,6 @@
}
}
.btn-disabled {
background-color: $gray-700;
color: $gray-50;
box-shadow: none;
cursor: arrow;
&:hover {
box-shadow: none;
}
}
.calendar-icon {
width: 12px;
display: inline-block;
@@ -473,6 +463,10 @@ export default {
flaggedAndHidden () {
return this.challenge.flagCount > 1;
},
chatRevocation () {
return this.user.flags.chatRevoked
&& this.challenge.group && this.challenge.group.name === 'Tavern';
},
},
watch: {
'challenge.name': {