1
0
mirror of https://github.com/s427/MARL.git synced 2025-01-31 03:24:48 +01:00

attempted fix for issue #1

This commit is contained in:
Vincent CLAVIEN 2024-12-01 10:45:20 +01:00
parent 20cead90ed
commit f7a09a646d
2 changed files with 12 additions and 10 deletions

View File

@ -800,7 +800,7 @@
<div class="toots-filters-reset">
<button
@click="$store.files.resetFilters()"
@click="$store.files.resetFilters(true)"
:disabled="!$store.files.filtersActive"
>
<svg class="btn-icon" aria-hidden="true">
@ -1213,7 +1213,7 @@
<p>No results for the specified filters</p>
<p class="action">
<button
@click="$store.files.resetFilters()"
@click="$store.files.resetFilters(true)"
:disabled="!$store.files.filtersActive"
>
<svg class="btn-icon" aria-hidden="true">
@ -1493,8 +1493,6 @@
</template>
</div>
<script src="js/main.js"></script>
<svg style="display: none">
<symbol viewBox="0 -960 960 960" id="reset-filters">
<path
@ -1597,5 +1595,7 @@
/>
</symbol>
</svg>
<script src="js/main.js?20241201"></script>
</body>
</html>

View File

@ -113,12 +113,14 @@ const filesStore = {
document.getElementById(id).focus();
}, 100);
},
resetFilters() {
resetFilters(userAction) {
this.filters = JSON.parse(JSON.stringify(this.filtersDefault));
this.currentPage = 1;
this.filtersActive = false;
scrollTootsToTop();
pagingUpdated();
if (userAction) {
this.currentPage = 1;
this.filtersActive = false;
scrollTootsToTop();
pagingUpdated();
}
},
get filteredToots() {
@ -850,7 +852,7 @@ function loadJsonFile(name) {
delete data.orderedItems;
Alpine.store("files").outbox = data;
Alpine.store("files").resetFilters();
Alpine.store("files").resetFilters(false);
Alpine.store("files").loaded.outbox = true;
} // outbox.json