Skip to content

Commit 638169d

Browse files
authored
DEV: Don't use string-based actions (#237)
1 parent a8acfce commit 638169d

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

assets/javascripts/discourse/components/activity-pub-actor-admin-row.gjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export default class ActivityPubActorAdminRow extends Component {
3737
}
3838

3939
@action
40-
editActor(actor) {
40+
editActor() {
4141
this.router
42-
.transitionTo("adminPlugins.activityPub.actorShow", actor)
42+
.transitionTo("adminPlugins.activityPub.actorShow", this.actor)
4343
.then(() => {
4444
this.actorShowController.set("showForm", true);
4545
});
@@ -102,15 +102,15 @@ export default class ActivityPubActorAdminRow extends Component {
102102
<div class="directory-table__cell activity-pub-actor-table-actions">
103103
{{#if this.actor.isDeleted}}
104104
<DButton
105-
@action={{action "destroyActor"}}
105+
@action={{this.destroyActor}}
106106
@label="admin.discourse_activity_pub.actor.destroy.label"
107107
@title="admin.discourse_activity_pub.actor.destroy.title"
108108
@icon="trash-can"
109109
class="activity-pub-destroy-actor-btn btn-danger"
110110
@disabled={{this.loading}}
111111
/>
112112
<DButton
113-
@action={{action "restoreActor"}}
113+
@action={{this.restoreActor}}
114114
@label="admin.discourse_activity_pub.actor.restore.label"
115115
@title="admin.discourse_activity_pub.actor.restore.title"
116116
@icon="arrow-rotate-left"
@@ -119,7 +119,7 @@ export default class ActivityPubActorAdminRow extends Component {
119119
/>
120120
{{else}}
121121
<DButton
122-
@action={{action "editActor" this.actor}}
122+
@action={{this.editActor}}
123123
@label="admin.discourse_activity_pub.actor.edit.label"
124124
@title="admin.discourse_activity_pub.actor.edit.title"
125125
@icon="pencil"

assets/javascripts/discourse/components/activity-pub-authorize.gjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default class ActivityPubAuthorize extends Component {
146146
<span>{{this.domain}}</span>
147147
<DButton
148148
@icon="xmark"
149-
@action={{action "clearDomain"}}
149+
@action={{this.clearDomain}}
150150
@title="user.discourse_activity_pub.clear_domain_button.title"
151151
id="user_activity_pub_authorize_clear_domain"
152152
class="activity-pub-authorize-clear-domain"
@@ -163,7 +163,7 @@ export default class ActivityPubAuthorize extends Component {
163163
{{/if}}
164164
<DButton
165165
@icon="check"
166-
@action={{action "verifyDomain"}}
166+
@action={{this.verifyDomain}}
167167
@label="user.discourse_activity_pub.verify_domain_button.label"
168168
@title="user.discourse_activity_pub.verify_domain_button.title"
169169
@disabled={{this.verifyDisabled}}
@@ -172,7 +172,7 @@ export default class ActivityPubAuthorize extends Component {
172172
/>
173173
<DButton
174174
@icon="fingerprint"
175-
@action={{action "authorizeDomain"}}
175+
@action={{this.authorizeDomain}}
176176
@label="user.discourse_activity_pub.authorize_button.label"
177177
@title="user.discourse_activity_pub.authorize_button.title"
178178
@disabled={{this.authorizeDisabled}}

assets/javascripts/discourse/components/activity-pub-follow-domain.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class ActivityPubFollowDomain extends Component {
103103
/>
104104
<DButton
105105
@icon="up-right-from-square"
106-
@action={{action "follow"}}
106+
@action={{this.follow}}
107107
@label="discourse_activity_pub.follow.domain.btn_label"
108108
@title="discourse_activity_pub.follow.domain.btn_title"
109109
@disabled={{this.verifying}}

assets/javascripts/discourse/components/modal/activity-pub-actor-follow.gjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default class ActivityPubFollowRemote extends Component {
105105
/>
106106
<DButton
107107
@icon="magnifying-glass"
108-
@action={{action "find"}}
108+
@action={{this.find}}
109109
@label="discourse_activity_pub.actor_follow.find.btn_label"
110110
@title="discourse_activity_pub.actor_follow.find.btn_title"
111111
@disabled={{this.validating}}
@@ -129,7 +129,7 @@ export default class ActivityPubFollowRemote extends Component {
129129
<ActivityPubActorFollowBtn
130130
@actor={{@model.actor}}
131131
@followActor={{this.followActor}}
132-
@follow={{action "follow"}}
132+
@follow={{this.follow}}
133133
/>
134134
</div>
135135
{{else if this.finding}}

assets/javascripts/discourse/components/modal/activity-pub-actor-reject.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class ActivityPubActorReject extends Component {
3737

3838
<:footer>
3939
<DButton
40-
@action={{action "reject"}}
40+
@action={{this.reject}}
4141
@label="discourse_activity_pub.actor_reject.label"
4242
class="btn-primary"
4343
/>

assets/javascripts/discourse/components/modal/activity-pub-actor-unfollow.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class ActivityPubActorUnfollow extends Component {
3737

3838
<:footer>
3939
<DButton
40-
@action={{action "unfollow"}}
40+
@action={{this.unfollow}}
4141
@label="discourse_activity_pub.actor_unfollow.label"
4242
class="btn-primary"
4343
/>

0 commit comments

Comments
 (0)