mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Merge pull request #56 from one-some/ui2-wi-cleanup
Fix world info alignment
This commit is contained in:
@@ -731,6 +731,17 @@ td.server_vars {
|
|||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wi_title {
|
||||||
|
position: relative;
|
||||||
|
bottom: 4px;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wi_add_text {
|
||||||
|
position: relative;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.wi_add_button{
|
.wi_add_button{
|
||||||
margin: 0 0 0 10px;
|
margin: 0 0 0 10px;
|
||||||
padding: 4px 4px 4px 4px;
|
padding: 4px 4px 4px 4px;
|
||||||
@@ -738,6 +749,11 @@ td.server_vars {
|
|||||||
background-color: var(--wi_tag_color);
|
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 {
|
.wi_folder_collapser, .wi_add_button, #new_world_info_button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@@ -1596,7 +1612,7 @@ h2 .material-icons-outlined {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapsable_header, .section_header, .help_text {
|
.material-icons-outlined, .collapsable_header, .section_header, .help_text {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-khtml-user-select: none;
|
-khtml-user-select: none;
|
||||||
|
@@ -1541,6 +1541,7 @@ function world_info_folder(data) {
|
|||||||
icon.textContent = "folder";
|
icon.textContent = "folder";
|
||||||
title.append(icon);
|
title.append(icon);
|
||||||
title_text = document.createElement("span");
|
title_text = document.createElement("span");
|
||||||
|
title_text.classList.add("wi_title");
|
||||||
title_text.setAttribute("contenteditable", true);
|
title_text.setAttribute("contenteditable", true);
|
||||||
title_text.setAttribute("original_text", folder_name);
|
title_text.setAttribute("original_text", folder_name);
|
||||||
title_text.textContent = folder_name;
|
title_text.textContent = folder_name;
|
||||||
@@ -1561,6 +1562,7 @@ function world_info_folder(data) {
|
|||||||
new_icon.append(add_icon);
|
new_icon.append(add_icon);
|
||||||
add_text = document.createElement("span");
|
add_text = document.createElement("span");
|
||||||
add_text.textContent = "Add World Info Entry";
|
add_text.textContent = "Add World Info Entry";
|
||||||
|
add_text.classList.add("wi_add_text");
|
||||||
add_text.setAttribute("folder", folder_name);
|
add_text.setAttribute("folder", folder_name);
|
||||||
add_text.onclick = function() {
|
add_text.onclick = function() {
|
||||||
create_new_wi_entry(this.getAttribute("folder"));
|
create_new_wi_entry(this.getAttribute("folder"));
|
||||||
@@ -1626,6 +1628,7 @@ function world_info_folder(data) {
|
|||||||
add_icon.append(icon);
|
add_icon.append(icon);
|
||||||
text_span = document.createElement("span");
|
text_span = document.createElement("span");
|
||||||
text_span.textContent = "Add World Info Folder";
|
text_span.textContent = "Add World Info Folder";
|
||||||
|
text_span.classList.add("wi_title");
|
||||||
add_icon.onclick = function() {
|
add_icon.onclick = function() {
|
||||||
socket.emit("create_world_info_folder", {});
|
socket.emit("create_world_info_folder", {});
|
||||||
}
|
}
|
||||||
|
@@ -81,11 +81,11 @@
|
|||||||
<span id="world_info_folder_collapse_root" class="wi_folder_collapser material-icons-outlined" folder="root">expand_more</span>
|
<span id="world_info_folder_collapse_root" class="wi_folder_collapser material-icons-outlined" folder="root">expand_more</span>
|
||||||
<span id="world_info_folder_expand_root" class="wi_folder_collapser material-icons-outlined hidden" folder="root">chevron_right</span>
|
<span id="world_info_folder_expand_root" class="wi_folder_collapser material-icons-outlined hidden" folder="root">chevron_right</span>
|
||||||
<span class="material-icons-outlined" folder="root">folder</span>
|
<span class="material-icons-outlined" folder="root">folder</span>
|
||||||
<span original_text="root" contenteditable="true">root</span>
|
<span class="wi_title" original_text="root" contenteditable="true">root</span>
|
||||||
</h2>
|
</h2>
|
||||||
<span class="wi_add_button" onclick='create_new_wi_entry(this.getAttribute("folder"));'>
|
<span class="wi_add_button" onclick='create_new_wi_entry(this.getAttribute("folder"));'>
|
||||||
<span class="material-icons-outlined">post_add</span>
|
<span class="material-icons-outlined">post_add</span>
|
||||||
<span folder="root" >Add World Info Entry</span>
|
<span class="wi_add_text" folder="root">Add World Info Entry</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user