mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-09 19:46:11 +00:00
lite fix admin button display issue when preload story
This commit is contained in:
parent
6888f5495d
commit
131107dc91
1 changed files with 7 additions and 9 deletions
16
klite.embd
16
klite.embd
|
|
@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
|
|||
-->
|
||||
|
||||
<script>
|
||||
const LITEVER = 223;
|
||||
const LITEVER = 224;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
var localflag = true;
|
||||
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
|
||||
|
|
@ -9647,20 +9647,18 @@ Current version indicated by LITEVER below.
|
|||
.then(response => response.json())
|
||||
.then(values5 => {
|
||||
let tmpstory = values5;
|
||||
if(is_kai_json(tmpstory))
|
||||
{
|
||||
if (is_kai_json(tmpstory)) {
|
||||
if (localsettings.persist_session && !safe_to_overwrite()) {
|
||||
console.log("Preload story: Unsafe to overwrite");
|
||||
} else {
|
||||
close_welcome_panel(false);
|
||||
kai_json_load(tmpstory, false);
|
||||
}
|
||||
}else{
|
||||
if(koboldcpp_has_multiplayer || koboldcpp_admin_type>0)
|
||||
{
|
||||
//force refresh
|
||||
render_gametext(false);
|
||||
}
|
||||
}
|
||||
if(koboldcpp_has_multiplayer || koboldcpp_admin_type>0)
|
||||
{
|
||||
//force refresh
|
||||
render_gametext(false);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log("Failed to get preloaded story: " + error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue