mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Change color of clearfilters button when filters are applied to give better feedback to user.
This commit is contained in:
parent
4a2c806448
commit
ecfa65f12a
@ -461,11 +461,21 @@ class ExtraNetworksTab {
|
||||
recurse = recurse === true || recurse === false ? recurse : false;
|
||||
this.card_list.addDirectoryFilter(div_id, filter_str, recurse);
|
||||
this.directory_filters[div_id] = {filter_str: filter_str, recurse: recurse};
|
||||
|
||||
const btn = this.controls_elem.querySelector(".extra-network-control--clear-filters");
|
||||
isElementThrowError(btn);
|
||||
btn.dataset.selected = "";
|
||||
}
|
||||
|
||||
removeDirectoryFilter(div_id) {
|
||||
this.card_list.removeDirectoryFilter(div_id);
|
||||
delete this.directory_filters[div_id];
|
||||
|
||||
if (Object.keys(this.directory_filters).length === 0) {
|
||||
const btn = this.controls_elem.querySelector(".extra-network-control--clear-filters");
|
||||
isElementThrowError(btn);
|
||||
delete btn.dataset.selected;
|
||||
}
|
||||
}
|
||||
|
||||
clearDirectoryFilters({excluded_div_ids} = {}) {
|
||||
@ -1157,6 +1167,8 @@ function extraNetworksControlClearFiltersOnClick(event) {
|
||||
tab.clearSelectedButtons();
|
||||
tab.clearDirectoryFilters();
|
||||
tab.applyDirectoryFilters();
|
||||
|
||||
delete btn.dataset.selected;
|
||||
}
|
||||
|
||||
function extraNetworksControlSortModeOnClick(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user