change board filter icon when filter active
This commit is contained in:
Vendored
+15
-1
@@ -2601,6 +2601,10 @@
|
|||||||
this.handleNewSearch(newQuery);
|
this.handleNewSearch(newQuery);
|
||||||
});
|
});
|
||||||
this.restoreSearch();
|
this.restoreSearch();
|
||||||
|
this.isFilterActive = createProxyState(
|
||||||
|
[this.searchViewModel.appliedQuery],
|
||||||
|
() => this.searchViewModel.appliedQuery.value != ""
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4367,6 +4371,10 @@
|
|||||||
// src/View/ChatPages/boardPage.tsx
|
// src/View/ChatPages/boardPage.tsx
|
||||||
function BoardPage(coreViewModel2, boardViewModel) {
|
function BoardPage(coreViewModel2, boardViewModel) {
|
||||||
boardViewModel.loadData();
|
boardViewModel.loadData();
|
||||||
|
const filterIcon = createProxyState(
|
||||||
|
[boardViewModel.isFilterActive],
|
||||||
|
() => boardViewModel.isFilterActive.value ? "filter_alt" : "filter_alt_off"
|
||||||
|
);
|
||||||
const mainContent = createProxyState(
|
const mainContent = createProxyState(
|
||||||
[boardViewModel.selectedPage],
|
[boardViewModel.selectedPage],
|
||||||
() => {
|
() => {
|
||||||
@@ -4453,7 +4461,13 @@
|
|||||||
"aria-label": coreViewModel2.translations.chatPage.task.filterTasksButtonAudioLabel,
|
"aria-label": coreViewModel2.translations.chatPage.task.filterTasksButtonAudioLabel,
|
||||||
"on:click": boardViewModel.showFilterModal
|
"on:click": boardViewModel.showFilterModal
|
||||||
},
|
},
|
||||||
/* @__PURE__ */ createElement("span", { class: "icon" }, "filter_alt")
|
/* @__PURE__ */ createElement(
|
||||||
|
"span",
|
||||||
|
{
|
||||||
|
class: "icon",
|
||||||
|
"subscribe:innerText": filterIcon
|
||||||
|
}
|
||||||
|
)
|
||||||
), /* @__PURE__ */ createElement(
|
), /* @__PURE__ */ createElement(
|
||||||
"button",
|
"button",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,14 @@ export function BoardPage(
|
|||||||
) {
|
) {
|
||||||
boardViewModel.loadData();
|
boardViewModel.loadData();
|
||||||
|
|
||||||
|
const filterIcon = React.createProxyState(
|
||||||
|
[boardViewModel.isFilterActive],
|
||||||
|
() =>
|
||||||
|
boardViewModel.isFilterActive.value
|
||||||
|
? "filter_alt"
|
||||||
|
: "filter_alt_off",
|
||||||
|
);
|
||||||
|
|
||||||
// main content
|
// main content
|
||||||
const mainContent = React.createProxyState(
|
const mainContent = React.createProxyState(
|
||||||
[boardViewModel.selectedPage],
|
[boardViewModel.selectedPage],
|
||||||
@@ -135,7 +143,10 @@ export function BoardPage(
|
|||||||
}
|
}
|
||||||
on:click={boardViewModel.showFilterModal}
|
on:click={boardViewModel.showFilterModal}
|
||||||
>
|
>
|
||||||
<span class="icon">filter_alt</span>
|
<span
|
||||||
|
class="icon"
|
||||||
|
subscribe:innerText={filterIcon}
|
||||||
|
></span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="ghost"
|
class="ghost"
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
|||||||
searchViewModel: SearchViewModel<TaskViewModel>;
|
searchViewModel: SearchViewModel<TaskViewModel>;
|
||||||
filteredTaskViewModels: React.ListState<TaskViewModel> =
|
filteredTaskViewModels: React.ListState<TaskViewModel> =
|
||||||
new React.ListState();
|
new React.ListState();
|
||||||
|
isFilterActive: React.State<boolean>;
|
||||||
|
|
||||||
// paths
|
// paths
|
||||||
getBasePath = (): string[] => {
|
getBasePath = (): string[] => {
|
||||||
@@ -289,6 +290,11 @@ export default class BoardViewModel extends TaskContainingPageViewModel {
|
|||||||
this.handleNewSearch(newQuery);
|
this.handleNewSearch(newQuery);
|
||||||
});
|
});
|
||||||
this.restoreSearch();
|
this.restoreSearch();
|
||||||
|
|
||||||
|
this.isFilterActive = React.createProxyState(
|
||||||
|
[this.searchViewModel.appliedQuery],
|
||||||
|
() => this.searchViewModel.appliedQuery.value != "",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user