-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Add reject follower action (#123)
- Loading branch information
1 parent
2d6db5a
commit 9051c43
Showing
21 changed files
with
480 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
assets/javascripts/discourse/components/modal/activity-pub-actor-reject.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<DModal | ||
@closeModal={{@closeModal}} | ||
@title={{this.title}} | ||
class="activity-pub-actor-reject-modal" | ||
> | ||
<:body> | ||
<div class="activity-pub-actor-reject"> | ||
{{i18n | ||
"discourse_activity_pub.actor_reject.confirm" | ||
actor=@model.actor.name | ||
follower=@model.follower.handle | ||
}} | ||
</div> | ||
</:body> | ||
|
||
<:footer> | ||
<DButton | ||
@action={{action "reject"}} | ||
@label="discourse_activity_pub.actor_reject.label" | ||
class="btn-primary" | ||
/> | ||
<DModalCancel @close={{@closeModal}} /> | ||
</:footer> | ||
</DModal> |
18 changes: 18 additions & 0 deletions
18
assets/javascripts/discourse/components/modal/activity-pub-actor-reject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Component from "@glimmer/component"; | ||
import { action } from "@ember/object"; | ||
import I18n from "I18n"; | ||
|
||
export default class ActivityPubActorReject extends Component { | ||
get title() { | ||
return I18n.t("discourse_activity_pub.actor_reject.modal_title", { | ||
actor: this.args.model.actor?.name, | ||
}); | ||
} | ||
|
||
@action | ||
reject() { | ||
const model = this.args.model; | ||
model.reject(model.actor, model.follower); | ||
this.args.closeModal(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.