Skip to content

Commit

Permalink
FIX: uses the new <DropdownMenu /> component
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed May 7, 2024
1 parent b796ae3 commit 45a8f95
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
1 change: 1 addition & 0 deletions .discourse-compatibility
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
< 3.3.0.beta2-dev: b796ae3fcc89b48cf777de5ee3a4c21aada9271e
< 3.3.0.beta1-dev: 56b0de3896361b6a87523537c8f5b450d2fe0807
3.2.0: 33c43ca51ac7b7baa8a309a269dcf8685b8bd638
< 3.2.0.beta2-dev: ac930c509e2a5b0c37b84bcea28d332e686add95
Expand Down
41 changes: 20 additions & 21 deletions assets/javascripts/discourse/components/assigned-to-post.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import DButton from "discourse/components/d-button";
import DropdownMenu from "discourse/components/dropdown-menu";
import icon from "discourse-common/helpers/d-icon";
import i18n from "discourse-common/helpers/i18n";
import DMenu from "float-kit/components/d-menu";
Expand Down Expand Up @@ -38,27 +39,25 @@ export default class AssignedToPost extends Component {
{{/if}}
</a>

<DMenu @icon="ellipsis-h" class="btn-flat more-button">
<div class="popup-menu">
<ul>
<li>
<DButton
@action={{this.unassign}}
@icon="user-plus"
@label="discourse_assign.unassign.title"
class="popup-menu-btn"
/>
</li>
<li>
<DButton
@action={{this.editAssignment}}
@icon="group-plus"
@label="discourse_assign.reassign.title_w_ellipsis"
class="popup-menu-btn"
/>
</li>
</ul>
</div>
<DMenu @icon="ellipsis-h" class="btn-flat more-button" @autofocus={{true}}>
<DropdownMenu as |dropdown|>
<dropdown.item>
<DButton
@action={{this.unassign}}
@icon="user-plus"
@label="discourse_assign.unassign.title"
class="popup-menu-btn"
/>
</dropdown.item>
<dropdown.item>
<DButton
@action={{this.editAssignment}}
@icon="group-plus"
@label="discourse_assign.reassign.title_w_ellipsis"
class="btn-transparent"
/>
</dropdown.item>
</DropdownMenu>
</DMenu>
</template>
}

0 comments on commit 45a8f95

Please sign in to comment.