Fix lists
This commit is contained in:
@@ -83,9 +83,8 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#key sorted}
|
||||||
<div class="border-solid border-selected p-2 flex flex-col border-1 rounded-md" bind:this={ele}>
|
<div class="border-solid border-selected p-2 flex flex-col border-1 rounded-md" bind:this={ele}>
|
||||||
{#key sorted}
|
|
||||||
{#if globalMode}
|
{#if globalMode}
|
||||||
{#if DBState.db.loreBook[DBState.db.loreBookPage].data.length === 0}
|
{#if DBState.db.loreBook[DBState.db.loreBookPage].data.length === 0}
|
||||||
<span class="text-textcolor2">No Lorebook</span>
|
<span class="text-textcolor2">No Lorebook</span>
|
||||||
@@ -123,5 +122,5 @@
|
|||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{/key}
|
</div>
|
||||||
</div>
|
{/key}
|
||||||
|
|||||||
@@ -61,12 +61,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
{#key sorted}
|
||||||
<div class="contain w-full max-w-full mt-2 flex flex-col p-3 border-selected border-1 bg-darkbg rounded-md" bind:this={ele}>
|
<div class="contain w-full max-w-full mt-2 flex flex-col p-3 border-selected border-1 bg-darkbg rounded-md" bind:this={ele}>
|
||||||
{#if value.length === 0}
|
{#if value.length === 0}
|
||||||
<div class="text-textcolor2">No Scripts</div>
|
<div class="text-textcolor2">No Scripts</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#key sorted}
|
|
||||||
{#each value as customscript, i}
|
{#each value as customscript, i}
|
||||||
<RegexData idx={i} bind:value={value[i]} onOpen={onOpen} onClose={onClose} onRemove={() => {
|
<RegexData idx={i} bind:value={value[i]} onOpen={onOpen} onClose={onClose} onRemove={() => {
|
||||||
let customscript = value
|
let customscript = value
|
||||||
@@ -74,5 +73,5 @@
|
|||||||
value = customscript
|
value = customscript
|
||||||
}}/>
|
}}/>
|
||||||
{/each}
|
{/each}
|
||||||
{/key}
|
</div>
|
||||||
</div>
|
{/key}
|
||||||
|
|||||||
@@ -119,27 +119,27 @@
|
|||||||
openURL(hubURL + '/redirect/docs/lua')
|
openURL(hubURL + '/redirect/docs/lua')
|
||||||
}}>{language.helpBlock}</Button>
|
}}>{language.helpBlock}</Button>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="contain w-full max-w-full mt-2 flex flex-col p-3 border-selected border-1 bg-darkbg rounded-md" bind:this={ele}>
|
{#key sorted}
|
||||||
{#if value.length === 0}
|
<div class="contain w-full max-w-full mt-2 flex flex-col p-3 border-selected border-1 bg-darkbg rounded-md" bind:this={ele}>
|
||||||
<div class="text-textcolor2">No Scripts</div>
|
{#if value.length === 0}
|
||||||
{/if}
|
<div class="text-textcolor2">No Scripts</div>
|
||||||
{#key sorted}
|
{/if}
|
||||||
{#each value as triggerscript, i}
|
{#each value as triggerscript, i}
|
||||||
<TriggerData idx={i} bind:value={value[i]} lowLevelAble={lowLevelAble} onOpen={onOpen} onClose={onClose} onRemove={() => {
|
<TriggerData idx={i} bind:value={value[i]} lowLevelAble={lowLevelAble} onOpen={onOpen} onClose={onClose} onRemove={() => {
|
||||||
let triggerscript = value
|
let triggerscript = value
|
||||||
triggerscript.splice(i, 1)
|
triggerscript.splice(i, 1)
|
||||||
value = triggerscript
|
value = triggerscript
|
||||||
}}/>
|
}}/>
|
||||||
{/each}
|
{/each}
|
||||||
{/key}
|
</div>
|
||||||
</div>
|
<button class="font-medium cursor-pointer hover:text-textcolor mb-2 text-textcolor2" onclick={() => {
|
||||||
<button class="font-medium cursor-pointer hover:text-textcolor mb-2 text-textcolor2" onclick={() => {
|
value.push({
|
||||||
value.push({
|
comment: "",
|
||||||
comment: "",
|
type: "start",
|
||||||
type: "start",
|
conditions: [],
|
||||||
conditions: [],
|
effect: []
|
||||||
effect: []
|
})
|
||||||
})
|
value = value
|
||||||
value = value
|
}}><PlusIcon /></button>
|
||||||
}}><PlusIcon /></button>
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
Reference in New Issue
Block a user