From dfe12176080a7ba3561eadff913067cca3f894cc Mon Sep 17 00:00:00 2001 From: somebody Date: Tue, 23 Aug 2022 20:36:27 -0500 Subject: [PATCH] Fix world info alignment --- static/koboldai.css | 18 +++++++++++++++++- static/koboldai.js | 3 +++ templates/story flyout.html | 4 ++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/static/koboldai.css b/static/koboldai.css index 47a766dc..6e8342c9 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -690,6 +690,17 @@ td.server_vars { margin: 5px; } +.wi_title { + position: relative; + bottom: 4px; + margin-left: 4px; +} + +.wi_add_text { + position: relative; + top: 1px; +} + .wi_add_button{ margin: 0 0 0 10px; padding: 4px 4px 4px 4px; @@ -697,6 +708,11 @@ td.server_vars { background-color: var(--wi_tag_color); } +.wi_add_button .material-icons-outlined{ + position: relative; + top: 7px; +} + .wi_folder_collapser, .wi_add_button, #new_world_info_button { cursor: pointer; margin-left: 10px; @@ -1552,7 +1568,7 @@ h2 .material-icons-outlined { cursor: pointer; } -.collapsable_header, .section_header, .help_text { +.material-icons-outlined, .collapsable_header, .section_header, .help_text { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; diff --git a/static/koboldai.js b/static/koboldai.js index 96f546ca..83cdc16a 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -1515,6 +1515,7 @@ function world_info_folder(data) { icon.textContent = "folder"; title.append(icon); title_text = document.createElement("span"); + title_text.classList.add("wi_title"); title_text.setAttribute("contenteditable", true); title_text.setAttribute("original_text", folder_name); title_text.textContent = folder_name; @@ -1535,6 +1536,7 @@ function world_info_folder(data) { new_icon.append(add_icon); add_text = document.createElement("span"); add_text.textContent = "Add World Info Entry"; + add_text.classList.add("wi_add_text"); add_text.setAttribute("folder", folder_name); add_text.onclick = function() { create_new_wi_entry(this.getAttribute("folder")); @@ -1600,6 +1602,7 @@ function world_info_folder(data) { add_icon.append(icon); text_span = document.createElement("span"); text_span.textContent = "Add World Info Folder"; + text_span.classList.add("wi_title"); add_icon.onclick = function() { socket.emit("create_world_info_folder", {}); } diff --git a/templates/story flyout.html b/templates/story flyout.html index 77ed7f83..21384051 100644 --- a/templates/story flyout.html +++ b/templates/story flyout.html @@ -83,11 +83,11 @@ expand_more folder - root + root post_add - Add World Info Entry + Add World Info Entry