fix toggle logic and cursors

This commit is contained in:
RossAscends 2024-08-10 13:07:07 +09:00
parent 704058ac36
commit 0dce445375
3 changed files with 10 additions and 3 deletions

View File

@ -120,6 +120,14 @@
flex-wrap: wrap;
}
.world_entry .inline-drawer-header {
cursor: initial;
}
.world_entry .killSwitch {
cursor: pointer;
}
.world_entry_form_control input[type=button] {
cursor: pointer;
}

View File

@ -5302,7 +5302,7 @@
<span class="drag-handle">&#9776;</span>
<div class="gap5px world_entry_thin_controls wide100p alignitemscenter">
<div class="inline-drawer-toggle fa-fw fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
<div class="fa-solid fa-toggle-on" name="entryKillSwitch"></div>
<div class="fa-solid fa-toggle-on killSwitch" name="entryKillSwitch"></div>
<div class="flex-container alignitemscenter wide100p">
<div class="WIEntryTitleAndStatus flex-container flex1 alignitemscenter">

View File

@ -2916,10 +2916,9 @@ async function getWorldEntry(name, data, entry) {
const entryKillSwitch = template.find('div[name="entryKillSwitch"]');
entryKillSwitch.data('uid', entry.uid);
entryKillSwitch.on('click', async function (event) {
event.stopPropagation();
const uid = entry.uid;
data.entries[uid].disable = !data.entries[uid].disable;
let isActive = data.entries[uid].disable;
let isActive = !data.entries[uid].disable;
setWIOriginalDataValue(data, uid, 'enabled', isActive);
if (isActive) {
template.removeClass('disabledWIEntry');