mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 20:18:23 -05:00
UX: Show bulk select on filter page when set to show in nav controls (#34237)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { service } from "@ember/service";
|
||||
import { and } from "truth-helpers";
|
||||
import BulkSelectToggle from "discourse/components/bulk-select-toggle";
|
||||
import FilterNavigationMenu from "discourse/components/discovery/filter-navigation-menu";
|
||||
import bodyClass from "discourse/helpers/body-class";
|
||||
import { bind } from "discourse/lib/decorators";
|
||||
import { resettableTracked } from "discourse/lib/tracked-tools";
|
||||
import { applyValueTransformer } from "discourse/lib/transformer";
|
||||
|
||||
export default class DiscoveryFilterNavigation extends Component {
|
||||
@service site;
|
||||
@@ -22,12 +22,22 @@ export default class DiscoveryFilterNavigation extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
get showBulkSelectInNavControls() {
|
||||
const enableOnDesktop = applyValueTransformer(
|
||||
"bulk-select-in-nav-controls",
|
||||
false,
|
||||
{ site: this.site }
|
||||
);
|
||||
|
||||
return this.site.mobileView || (enableOnDesktop && this.args.canBulkSelect);
|
||||
}
|
||||
|
||||
<template>
|
||||
{{bodyClass "navigation-filter"}}
|
||||
|
||||
<section class="navigation-container">
|
||||
<div class="topic-query-filter">
|
||||
{{#if (and this.site.mobileView @canBulkSelect)}}
|
||||
{{#if this.showBulkSelectInNavControls}}
|
||||
<div class="topic-query-filter__bulk-action-btn">
|
||||
<BulkSelectToggle @bulkSelectHelper={{@bulkSelectHelper}} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user