From e2d4f9dc8c2c41e9c10fde9460cda2e70aca287a Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:03:10 +0900 Subject: [PATCH] streamline WI display --- public/css/mobile-styles.css | 4 +++ public/css/st-tailwind.css | 4 +++ public/index.html | 55 +++++++++++++++--------------------- public/scripts/world-info.js | 37 ++++++++++++++++++++++-- 4 files changed, 64 insertions(+), 36 deletions(-) diff --git a/public/css/mobile-styles.css b/public/css/mobile-styles.css index 8f062469d..f8148a734 100644 --- a/public/css/mobile-styles.css +++ b/public/css/mobile-styles.css @@ -70,6 +70,10 @@ } + .world_entry_form_control { + width: 100%; + } + .drawer-content { min-width: unset; width: 100%; diff --git a/public/css/st-tailwind.css b/public/css/st-tailwind.css index 5d51dcb70..39517620b 100644 --- a/public/css/st-tailwind.css +++ b/public/css/st-tailwind.css @@ -147,6 +147,10 @@ font-weight: 600; } +.textAlignCenter { + text-align: center; +} + .margin-right-10px { margin-right: 10px; } diff --git a/public/index.html b/public/index.html index 5580bc248..40c221cb5 100644 --- a/public/index.html +++ b/public/index.html @@ -3852,30 +3852,23 @@
+
-
- +
+ + + +
- + + + Comma separated (required) + +
@@ -3886,19 +3879,15 @@
- - + + + (ignored if empty) + + +
+ + +
@@ -3912,6 +3901,7 @@ Content (Tokens:  counting...) + @@ -4033,7 +4023,6 @@
-

@@ -4598,4 +4587,4 @@ - + \ No newline at end of file diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index c8cc686df..f174ef51d 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -288,7 +288,17 @@ function displayWorldEntries(name, data, navigation = navigation_option.none) { showNavigator: true, callback: function (page) { $("#world_popup_entries_list").empty(); + const keywordHeaders = ` +
+ + Keywords + + + Optional Filter + +
` const blocks = page.map(entry => getWorldEntry(name, data, entry)); + $("#world_popup_entries_list").append(keywordHeaders); $("#world_popup_entries_list").append(blocks); }, afterSizeSelectorChange: function (e) { @@ -780,8 +790,29 @@ function getWorldEntry(name, data, entry) { .prop("selected", true) .trigger("input"); - // display uid - template.find(".world_entry_form_uid_value").text(entry.uid); + // display position/order info left of keyword box + let posText + switch (entry.position) { + case 0: + posText = '↑CD'; + break + case 1: + posText = 'CD↓'; + break + case 2: + posText = '↑AN'; + break + case 3: + posText = 'AN↓'; + break + case 4: + posText = `@D${entry.depth}`; + break + } + + template.find(".world_entry_form_position_value").text(`(${posText} ${entry.order})`); + //add UID above content box (less important doesn't need to be always visible) + template.find(".world_entry_form_uid_value").text(`(UID: ${entry.uid})`); // disable const disableInput = template.find('input[name="disable"]'); @@ -808,7 +839,7 @@ function getWorldEntry(name, data, entry) { excludeRecursionInput.prop("checked", entry.excludeRecursion).trigger("input"); // delete button - const deleteButton = template.find("input.delete_entry_button"); + const deleteButton = template.find(".delete_entry_button"); deleteButton.data("uid", entry.uid); deleteButton.on("click", function () { const uid = $(this).data("uid");