mirror of
https://github.com/s427/MARL.git
synced 2025-01-31 11:34:46 +01:00
attempted fix for issue #1
This commit is contained in:
parent
20cead90ed
commit
f7a09a646d
@ -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>
|
||||
|
14
js/main.js
14
js/main.js
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user