diff --git a/public/index.html b/public/index.html index 9929242ea..f95e88204 100644 --- a/public/index.html +++ b/public/index.html @@ -2839,7 +2839,7 @@
-
+
-
+
@@ -2896,6 +2901,7 @@ After Char
+
Insertion Order diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 3bc347da7..d71da7612 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -204,6 +204,7 @@ function appendWorldEntry(entry) { // comment const commentInput = template.find('textarea[name="comment"]'); + const commentToggle = template.find('input[name="addMemo"]'); commentInput.data("uid", entry.uid); commentInput.on("input", function () { const uid = $(this).data("uid"); @@ -211,8 +212,24 @@ function appendWorldEntry(entry) { world_info_data.entries[uid].comment = value; saveWorldInfo(); }); + commentToggle.data("uid", entry.uid); + commentToggle.on("input", function () { + const uid = $(this).data("uid"); + const value = $(this).prop("checked"); + console.log(value) + const commentContainer = $(this) + .closest(".world_entry") + .find(".commentContainer"); + world_info_data.entries[uid].addMemo = value; + saveWorldInfo(); + value ? commentContainer.show() : commentContainer.hide(); + }); + commentInput.val(entry.comment).trigger("input"); - //initScrollHeight(commentInput); + commentToggle.prop("checked", entry.selective).trigger("input"); + commentToggle.siblings(".checkbox_fancy").click(function () { + $(this).siblings("input").click(); + }); // content const countTokensDebounced = debounce(function (that, value) { @@ -377,6 +394,7 @@ function createWorldInfoEntry() { content: "", constant: false, selective: false, + addMemo: false, order: 100, position: 0, disable: false, diff --git a/public/style.css b/public/style.css index 34e6ff0c7..2bbbec68b 100644 --- a/public/style.css +++ b/public/style.css @@ -1899,9 +1899,10 @@ input[type=search]:focus::-webkit-search-cancel-button { } .WIEntryContentAndMemo .world_entry_thin_controls { - width: 50%; + flex: 1; } + #world_popup_name_button { display: none; } @@ -3863,7 +3864,7 @@ toolcool-color-picker { } .flex2 { - flex: 2; + flex: 2 !important; } .flexFlowColumn {