Visual touche and fix-up of everything broken

This commit is contained in:
SillyLossy
2023-02-15 10:53:30 +02:00
parent 083e5efb32
commit 10e5e1e5ea
2 changed files with 60 additions and 41 deletions

View File

@@ -390,7 +390,10 @@
const response = await fetch('/getsoftprompts', { const response = await fetch('/getsoftprompts', {
method: 'POST', method: 'POST',
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ api_server: api_server }), body: JSON.stringify({ api_server: api_server }),
}); });
@@ -1506,7 +1509,7 @@
}else{ }else{
$("#mes_example_textarea").val(create_save_mes_example); $("#mes_example_textarea").val(create_save_mes_example);
} }
$("#avatar_div").css("display", "block"); $("#avatar_div").css("display", "flex");
$("#avatar_load_preview").attr('src',default_avatar); $("#avatar_load_preview").attr('src',default_avatar);
$("#name_div").css("display", "block"); $("#name_div").css("display", "block");
@@ -2286,7 +2289,10 @@
const selected = $('#softprompt').find(':selected').val(); const selected = $('#softprompt').find(':selected').val();
const response = await fetch('/setsoftprompt', { const response = await fetch('/setsoftprompt', {
method: 'POST', method: 'POST',
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ name: selected, api_server: api_server }), body: JSON.stringify({ name: selected, api_server: api_server }),
}); });
@@ -2403,7 +2409,10 @@
const response = await fetch("/synckoboldworld", { const response = await fetch("/synckoboldworld", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ "name": kobold_world }) body: JSON.stringify({ "name": kobold_world })
}); });
@@ -3219,7 +3228,10 @@
async function updateWorldInfoList(importedWorldName) { async function updateWorldInfoList(importedWorldName) {
var result = await fetch('/getsettings', { var result = await fetch('/getsettings', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: {
'Content-Type': 'application/json',
"X-CSRF-Token": token,
},
body: JSON.stringify({}) body: JSON.stringify({})
}); });
@@ -3259,7 +3271,10 @@
if (kobold_world) { if (kobold_world) {
const response = await fetch("/getworldinfo", { const response = await fetch("/getworldinfo", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ name: kobold_world }) body: JSON.stringify({ name: kobold_world })
}); });
@@ -3448,7 +3463,10 @@
async function _save() { async function _save() {
const response = await fetch("/editworldinfo", { const response = await fetch("/editworldinfo", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ name: kobold_world, data: kobold_world_data }) body: JSON.stringify({ name: kobold_world, data: kobold_world_data })
}); });
@@ -3485,7 +3503,10 @@
const response = await fetch("/deleteworldinfo", { const response = await fetch("/deleteworldinfo", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: {
"Content-Type": "application/json",
"X-CSRF-Token": token,
},
body: JSON.stringify({ name: worldInfoName }) body: JSON.stringify({ name: worldInfoName })
}); });
@@ -3854,7 +3875,7 @@
<div id="rm_api_block" class="right_menu" > <div id="rm_api_block" class="right_menu" >
<h3 id="title_api">API</h3> <h3 id="title_api">API</h3>
<select id="main_api" style="color:#fff;background-color:#13152c;" > <select id="main_api" style="color:#fff;" >
<option value="kobold">KoboldAI</option> <option value="kobold">KoboldAI</option>
<option value="novel">NovelAI</option> <option value="novel">NovelAI</option>
</select> </select>
@@ -3903,9 +3924,10 @@
<div id="world_status"> <div id="world_status">
<div id="world_status_indicator"></div><div id="world_status_text"></div> <div id="world_status_indicator"></div><div id="world_status_text"></div>
</div> </div>
<h4>Soft Prompt</h4><h5>About soft prompts (<a href="/notes/14" target="_blank">?</a>)</h5>
<div id="softprompt_block"> <div id="softprompt_block">
<select id="softprompt"> <h4>Soft Prompt</h4>
<h5>About soft prompts (<a href="/notes/14" target="_blank">?</a>)</h5>
<select id="softprompt" class="option_select_right_menu">
<option value="">None</option> <option value="">None</option>
</select> </select>
</div> </div>

View File

@@ -115,6 +115,7 @@ code {
overflow-y: scroll; overflow-y: scroll;
border-bottom: 1px solid #333; border-bottom: 1px solid #333;
margin-top:40px; margin-top:40px;
padding-top: 12px;
/*optional dark mode with blur and borders*/ /*optional dark mode with blur and borders*/
/* /*
@@ -490,7 +491,7 @@ input[type=button] {
} }
#api_url_text{ #api_url_text{
/*margin-right: 4px;*/ /*margin-right: 4px;*/
display:block; /*display:block;*/
} }
#api_button{ #api_button{
cursor: pointer; cursor: pointer;
@@ -606,7 +607,7 @@ input[type=button] {
margin-top: 0; margin-top: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: baseline;
} }
#rm_characters_topbar_expander { #rm_characters_topbar_expander {
@@ -826,16 +827,17 @@ input[type=button] {
.avatar_div{ .avatar_div{
margin-top: 16px; margin-top: 16px;
display: flex;
flex-direction: row;
align-items: center;
} }
.avatar_div .avatar{ .avatar_div .avatar{
margin-left: 4px; margin-left: 4px;
margin-right: 10px;
display: inline-block; display: inline-block;
} }
#add_avatar_button{ #add_avatar_button{
vertical-align: top;
display: inline-block;
margin-top: 52px;
background-color: rgb(36, 37, 37); background-color: rgb(36, 37, 37);
border: 1px solid #444; border: 1px solid #444;
} }
@@ -1113,7 +1115,7 @@ input[type=button] {
} }
#online_status2{ #online_status2{
opacity: 0.5; opacity: 0.5;
margin-top: 2px; margin-top: 10px;
margin-left: 10px; margin-left: 10px;
margin-bottom: 30px; margin-bottom: 30px;
} }
@@ -1146,9 +1148,12 @@ input[type=button] {
display: inline-block; display: inline-block;
} }
#softprompt {
margin-bottom: 10px;
}
#world_info { #world_info {
margin-bottom: 12px; margin-bottom: 12px;
margin-right: 4px;
} }
#world_info_block { #world_info_block {
@@ -1160,6 +1165,7 @@ input[type=button] {
opacity: 0.5; opacity: 0.5;
margin-top: 2px; margin-top: 2px;
margin-left: 10px; margin-left: 10px;
margin-bottom: 20px;
} }
#world_status_indicator{ #world_status_indicator{
@@ -1193,25 +1199,25 @@ input[type=button] {
#world_info_edit_button { #world_info_edit_button {
cursor: pointer; cursor: pointer;
color: #ffffffaa; color: #ffffffaa;
padding-left: 0.5rem; margin-left: 10px;
padding-right: 0.5rem;
} }
#world_popup { #world_popup {
display: none; display: none;
backdrop-filter: blur(50px);
flex-direction: column; flex-direction: column;
max-width: 800px; max-width: 800px;
height: 83vh; height: 83vh;
position: absolute; position: absolute;
z-index: 2060; z-index: 2064;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
left: 0; left: 0;
right: 0; right: 0;
margin-top: 0px; margin-top: 0px;
box-shadow: 0 0 2px rgba(200, 200, 200, 0.1); box-shadow: 0 0 2px rgb(200 200 200 / 10%);
padding: 4px 36px; padding: 4px;
background: #191b31F5; background-color: rgb(36, 37, 37);
border-radius: 1px; border-radius: 1px;
} }
@@ -1226,7 +1232,7 @@ input[type=button] {
margin-left: 1rem; margin-left: 1rem;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
opacity: 0.7; opacity: 0.8;
} }
#entry_edit_template { #entry_edit_template {
@@ -1239,21 +1245,21 @@ input[type=button] {
display: block; display: block;
width: 100%; width: 100%;
content: ''; content: '';
background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0)); background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), rgba(100, 100, 100, 0.75), rgba(0, 0, 0, 0));
} }
#world_popup_header { #world_popup_header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-left: 1rem; margin-left: 36px;
} }
#form_rename_world { #form_rename_world {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20px; margin-right: 50px;
opacity: 0.7; opacity: 0.8;
} }
#form_rename_world input[type="submit"] { #form_rename_world input[type="submit"] {
@@ -1291,7 +1297,7 @@ input[type=button] {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
opacity: 0.7; opacity: 0.8;
} }
.world_entry_form_control { .world_entry_form_control {
@@ -1415,15 +1421,6 @@ select {
background-color: rgb(36, 37, 37); background-color: rgb(36, 37, 37);
} }
#softprompt {
width: 284px;
margin-left: 10px;
margin-bottom: 35px;
color: #ffffff9d;
box-shadow: 0 0 2px rgba(200, 200, 200, 0.5);
background-color: #13152c;
}
.option_select_right_menu{ .option_select_right_menu{
width:284px; width:284px;
margin-left: 10px; margin-left: 10px;
@@ -1602,7 +1599,7 @@ label.checkbox span {
border-radius:3px; border-radius:3px;
width:20px; width:20px;
height:20px; height:20px;
background:rgba(19,21,44,0.75); /*background:rgba(19,21,44,0.75);*/
vertical-align:middle; vertical-align:middle;
margin:0px; margin:0px;
position: relative; position: relative;
@@ -1610,7 +1607,7 @@ label.checkbox span {
} }
label.checkbox :checked + span { label.checkbox :checked + span {
background:rgba(19,21,44,0.75); /*background:rgba(19,21,44,0.75);*/
width:20px; width:20px;
height:20px; height:20px;
margin: 0px; margin: 0px;