#1221 Button to refresh WI sorts

This commit is contained in:
Cohee 2023-10-08 12:30:12 +03:00
parent 15cf87ef01
commit 2cbde8b55c
3 changed files with 11 additions and 2 deletions

View File

@ -103,6 +103,10 @@
align-self: start;
}
.gap3px {
gap: 3px !important;
}
.gap5px {
gap: 5px !important;
}

View File

@ -2743,7 +2743,7 @@
<div id="world_popup">
<hr>
<div class="flex-container alignitemscenter">
<div class="flex-container alignitemscenter gap3px">
<input type="file" id="world_import_file" accept=".json,.lorebook,.png" name="avatar" hidden>
<div id="world_create_button" class="menu_button menu_button_icon">
<i class="fa-solid fa-globe"></i>
@ -2777,6 +2777,7 @@
<option data-order="asc" data-field="probability" value="11">Trigger% ↗</option>
<option data-order="desc" data-field="probability" value="12">Trigger% ↘</option>
</select>
<div id="world_refresh" class="menu_button fa-solid fa-arrows-rotate" title="Refresh" data-i18n="[title]Refresh"></div>
<div id="world_info_pagination"></div>
</div>

View File

@ -2006,6 +2006,10 @@ jQuery(() => {
worldInfoFilter.setFilterData(FILTER_TYPES.WORLD_INFO_SEARCH, term);
});
$('#world_refresh').on('click', () => {
updateEditor(navigation_option.previous);
});
$('#world_info_sort_order').on('change', function(e) {
if (e.target instanceof HTMLOptionElement) {
localStorage.setItem(SORT_ORDER_KEY, e.target.value);