Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanvidrine committed Nov 8, 2024
1 parent 96a1f3d commit 9f5d01b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Component from "@glimmer/component";
import { hash } from "@ember/helper";
import { service } from "@ember/service";
import { modifier } from "ember-modifier";
import { eq, or } from "truth-helpers";
import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class";
import replaceEmoji from "discourse/helpers/replace-emoji";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export default class DiscoursePostEventStatus extends Component {
@service discoursePostEventApi;
@service siteSettings;

get watchingInviteeStatus() {
return this.args.event.watchingInvitee?.status;
}

get eventButtons() {
return this.siteSettings.event_participation_buttons.split("|");
}
Expand All @@ -32,10 +36,6 @@ export default class DiscoursePostEventStatus extends Component {
return this.args.event.watchingInvitee && this.args.event.isPublic;
}

get watchingInviteeStatus() {
return this.args.event.watchingInvitee?.status;
}

@action
async leaveEvent() {
try {
Expand Down Expand Up @@ -107,12 +107,12 @@ export default class DiscoursePostEventStatus extends Component {
}

<template>
<section
<div
class={{concatClass
"event__section event-actions event-status"
"event-status"
(if
this.watchingInviteeStatus
(concat "status-" this.args.watchingInviteeStatus)
(concat "status-" this.watchingInviteeStatus)
)
}}
>
Expand Down Expand Up @@ -177,6 +177,6 @@ export default class DiscoursePostEventStatus extends Component {
{{/unless}}
{{/if}}
</PluginOutlet>
</section>
</div>
</template>
}

0 comments on commit 9f5d01b

Please sign in to comment.