Build ready commit
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
let scrollDiv: HTMLElement;
|
||||
let stdout: string = '';
|
||||
let count: [string, string, string][] = $state([]);
|
||||
let pwd: string = working_dir;
|
||||
|
||||
const mwinoptions: Partial<MWinParams> = {
|
||||
handle: '#terminal-bar',
|
||||
@@ -47,7 +48,7 @@
|
||||
async function onsubmit(value: string) {
|
||||
const input = value.trim();
|
||||
await shell!.execute(input);
|
||||
scrollDiv.scrollTop = scrollDiv.scrollHeight;
|
||||
pwd = resolvePointerToHome(shell!.State, shell!.Session.cwd);
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
@@ -60,7 +61,8 @@
|
||||
if (payload.result.type === 'error') {
|
||||
stdout = stdout + payload.result.error.message + '\n';
|
||||
}
|
||||
count.push([inputValue, resolvePointerToHome(shell!.State, shell!.Session.cwd), stdout]);
|
||||
working_dir = resolvePointerToHome(shell!.State, shell!.Session.cwd);
|
||||
count.push([inputValue, pwd, stdout]);
|
||||
stdout = '';
|
||||
inputValue = '';
|
||||
});
|
||||
@@ -90,19 +92,19 @@
|
||||
<div class="dots-wrapper m-auto mx-3 flex size-max flex-row items-center justify-center gap-2">
|
||||
<button
|
||||
data-close-btn
|
||||
class="bg-term-close h-2.5 w-2.5 cursor-pointer rounded-full active:brightness-85"
|
||||
class="bg-tl-red h-2.5 w-2.5 cursor-pointer rounded-full active:brightness-85"
|
||||
type="button"
|
||||
aria-label="Close terminal"
|
||||
onclick={() => close?.(id)}
|
||||
></button>
|
||||
<button
|
||||
class="bg-term-maximize h-2.5 w-2.5 cursor-pointer rounded-full active:brightness-85"
|
||||
class="bg-tl-yellow h-2.5 w-2.5 cursor-pointer rounded-full active:brightness-85"
|
||||
type="button"
|
||||
aria-label="Maximize terminal"
|
||||
onclick={() => mwin?.maximize()}
|
||||
></button>
|
||||
<button
|
||||
class="bg-term-minimize h-2.5 w-2.5 cursor-pointer rounded-2xl active:brightness-85"
|
||||
class="bg-tl-green h-2.5 w-2.5 cursor-pointer rounded-2xl active:brightness-85"
|
||||
type="button"
|
||||
aria-label="Minimize terminal"
|
||||
></button>
|
||||
@@ -126,8 +128,8 @@
|
||||
{/each}
|
||||
</div>
|
||||
<span
|
||||
><span class=" text-tyellow">{username}</span><span>@</span><span class=" text-fg1"
|
||||
>{hostname}</span
|
||||
><span class=" text-tyellow">{shell!.Session.user.username}</span><span>@</span><span
|
||||
class=" text-fg1">{hostname}</span
|
||||
>
|
||||
<span class="text-bg4">{working_dir}</span><br /></span
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user