Skip to content

Commit 01b30a6

Browse files
author
prima
committed
feat: Added back buttons for character manager and fixes empty lorebook name issue and fixed some mobile sizing issues
1 parent c8448fb commit 01b30a6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

klite.embd

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37226,13 +37226,13 @@ flowchart TD\n${treeToViewOutput.outputText.trim()}`
3722637226

3722737227
window.addEventListener('load', () => {
3722837228
let topButton = `<li class="nav-item" id="topbtn_remote_mods">
37229-
<a class="nav-link mainnav" href="#" onclick="modManager.showModListWarning()" tabindex="0">Third party mods</a>
37229+
<a class="nav-link mainnav" href="#" onclick="closeTopNav(); modManager.showModListWarning();" tabindex="0">Third party mods</a>
3723037230
</li>`
3723137231
topButton += `<li class="nav-item" id="topbtn_server_saves">
37232-
<a class="nav-link mainnav" href="#" onclick="showServerSavesPopup()" tabindex="0">Server saves</a>
37232+
<a class="nav-link mainnav" href="#" onclick="closeTopNav(); showServerSavesPopup();" tabindex="0">Server saves</a>
3723337233
</li>`
3723437234
topButton += `<li class="nav-item" id="topbtn_server_saves">
37235-
<a class="nav-link mainnav" href="#" onclick="showCharacterList()" tabindex="0">Characters</a>
37235+
<a class="nav-link mainnav" href="#" onclick="closeTopNav(); showCharacterList();" tabindex="0">Characters</a>
3723637236
</li>`
3723737237

3723837238
document.querySelector("#navbarNavDropdown > ul").innerHTML += topButton
@@ -37372,7 +37372,11 @@ flowchart TD\n${treeToViewOutput.outputText.trim()}`
3737237372
overflow-y: auto;
3737337373
overflow-x: hidden;
3737437374
height: calc(100% - 40px);
37375-
width: 70vw;
37375+
}
37376+
37377+
#popupContainer .popupfooter
37378+
{
37379+
display: block;
3737637380
}
3737737381

3737837382
#popupContainer .popupfooter button
@@ -37620,7 +37624,7 @@ flowchart TD\n${treeToViewOutput.outputText.trim()}`
3762037624
console.error(e)
3762137625
}
3762237626

37623-
popupUtils.reset().title("Character Options").content(contents).button("Load character", async () => {
37627+
popupUtils.reset().title("Character Options").content(contents).button("Back", showCharacterList).button("Load character", async () => {
3762437628
popupUtils.reset()
3762537629
let charData = await getCharacterData(name)
3762637630
load_tavern_obj(charData.data);
@@ -37652,7 +37656,7 @@ flowchart TD\n${treeToViewOutput.outputText.trim()}`
3765237656
console.error(e)
3765337657
}
3765437658

37655-
popupUtils.reset().title("World Info Options").content(contents).button("Add to WI", async () => {
37659+
popupUtils.reset().title("World Info Options").content(contents).button("Back", showCharacterList).button("Add to WI", async () => {
3765637660
popupUtils.reset()
3765737661
let charData = await getCharacterData(name)
3765837662
let wiToAdd = charData.data;
@@ -37696,7 +37700,7 @@ flowchart TD\n${treeToViewOutput.outputText.trim()}`
3769637700
let has_tav_wi_check = has_tavern_wi_check(wiToAdd), wiName = fileName;
3769737701
if(has_tav_wi_check)
3769837702
{
37699-
if (wiToAdd?.name !== undefined)
37703+
if (wiToAdd?.name !== undefined && wiToAdd.name.trim().length > 0)
3770037704
{
3770137705
wiName = wiToAdd.name
3770237706
}

0 commit comments

Comments
 (0)