WIP: No idea what exactly i did over those past 2 days
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { User } from '../bash/etc/userData';
|
||||
import { TermOS } from '$lib/termos/termos';
|
||||
import type { TreeNode } from '../bash/fs';
|
||||
//import { type ILocale } from './localeRegistry';
|
||||
import { Terminal, type PageCallbacks, type TermInitArgs } from './terminal';
|
||||
@@ -102,17 +102,19 @@ async function fetchFileSystem(path: string): Promise<any> {
|
||||
|
||||
async function fetchLocale(id: string): Promise<any> {
|
||||
const response = await fetch(`/src/lib/assets/locales/terminal/${id}.json`);
|
||||
if(!response.ok) throw new Error('Failed to fetch the chosen locale');
|
||||
if (!response.ok) throw new Error('Failed to fetch the chosen locale');
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
}
|
||||
|
||||
TermOS.Shell.Bash;
|
||||
|
||||
export async function initTerminal(
|
||||
user: {username: string, password: string},
|
||||
callbackInit: PageCallbacks,
|
||||
localeId: string
|
||||
): Promise<Terminal> {
|
||||
user: { username: string; password: string },
|
||||
callbackInit: PageCallbacks,
|
||||
localeId: string
|
||||
): Promise<Terminal> {
|
||||
try {
|
||||
const sig = await fetchFsSignature('/src/lib/assets/fs/signature');
|
||||
const fsJson = await fetchFsJson(sig);
|
||||
@@ -123,7 +125,7 @@ export async function initTerminal(
|
||||
}; */
|
||||
|
||||
const args: TermInitArgs = {
|
||||
//locale,
|
||||
//locale,
|
||||
bash: {
|
||||
fs,
|
||||
user
|
||||
|
||||
Reference in New Issue
Block a user