Add request log in devtool
This commit is contained in:
@@ -2,24 +2,33 @@
|
|||||||
import { CurrentChat } from "src/ts/stores";
|
import { CurrentChat } from "src/ts/stores";
|
||||||
import TextInput from "../UI/GUI/TextInput.svelte";
|
import TextInput from "../UI/GUI/TextInput.svelte";
|
||||||
import NumberInput from "../UI/GUI/NumberInput.svelte";
|
import NumberInput from "../UI/GUI/NumberInput.svelte";
|
||||||
|
import Button from "../UI/GUI/Button.svelte";
|
||||||
|
import { getRequestLog } from "src/ts/storage/globalApi";
|
||||||
|
import { alertMd } from "src/ts/alert";
|
||||||
|
import Arcodion from "../UI/Arcodion.svelte";
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<span>Variables</span>
|
<Arcodion styled name={"Variables"}>
|
||||||
<div class="rounded-md border border-darkborderc grid grid-cols-2 gap-2 p-2">
|
<div class="rounded-md border border-darkborderc grid grid-cols-2 gap-2 p-2">
|
||||||
{#if $CurrentChat.scriptstate && Object.keys($CurrentChat.scriptstate).length > 0}
|
{#if $CurrentChat.scriptstate && Object.keys($CurrentChat.scriptstate).length > 0}
|
||||||
{#each Object.keys($CurrentChat.scriptstate) as key}
|
{#each Object.keys($CurrentChat.scriptstate) as key}
|
||||||
<span>{key}</span>
|
<span>{key}</span>
|
||||||
{#if typeof $CurrentChat.scriptstate[key] === "object"}
|
{#if typeof $CurrentChat.scriptstate[key] === "object"}
|
||||||
<div class="p-2 text-center">Object</div>
|
<div class="p-2 text-center">Object</div>
|
||||||
{:else if typeof $CurrentChat.scriptstate[key] === "string"}
|
{:else if typeof $CurrentChat.scriptstate[key] === "string"}
|
||||||
<TextInput bind:value={$CurrentChat.scriptstate[key]} />
|
<TextInput bind:value={$CurrentChat.scriptstate[key]} />
|
||||||
{:else if typeof $CurrentChat.scriptstate[key] === "number"}
|
{:else if typeof $CurrentChat.scriptstate[key] === "number"}
|
||||||
<NumberInput bind:value={$CurrentChat.scriptstate[key]} />
|
<NumberInput bind:value={$CurrentChat.scriptstate[key]} />
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="p-2 text-center">No variables</div>
|
<div class="p-2 text-center">No variables</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
</Arcodion>
|
||||||
|
|
||||||
|
<Button on:click={() => {
|
||||||
|
alertMd(getRequestLog())
|
||||||
|
}}>Request Log</Button>
|
||||||
Reference in New Issue
Block a user