Skip to content

Commit 7ff4589

Browse files
committed
more anura housekeeping
1 parent 66c0d4c commit 7ff4589

File tree

14 files changed

+47
-81
lines changed

14 files changed

+47
-81
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
.hintrc
2-
.vscode/
3-
.vscode
4-
.vscode/*
5-
/.vscode
62
**/.DS_Store
73
*.log
84
rootfs

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"*.ajs": "javascript"
4+
}
5+
}

apps/v86-terminal.app

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "v86 Terminal",
3-
"icon": "/assets/images/v86-terminal.png",
3+
"icon": "/assets/icons/v86-terminal.png",
44
"command": "/usr/bin/x86-run.ajs",
55
"console": true
66
}
File renamed without changes.
File renamed without changes.

src/api/ContextMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
class ContextMenu {
22
large = false;
3+
#isShown = false;
34
#element = (
45
<div class={`custom-menu${this.large ? " large" : ""}`} style=""></div>
56
);
7+
68
item(text: string, callback: VoidFunction, icon?: string) {
79
return (
810
<div class="custom-menu-item" on:click={callback.bind(this)}>
@@ -11,7 +13,6 @@ class ContextMenu {
1113
</div>
1214
);
1315
}
14-
#isShown = false;
1516
constructor(large = false) {
1617
this.large = large;
1718
if (this.large) {

src/api/Theme.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ interface ThemeProps {
1010
}
1111

1212
class Theme implements ThemeProps {
13-
// foreground: string;
14-
// secondaryForeground: string;
15-
// border: string;
16-
// background: string;
17-
// secondaryBackground: string;
18-
// darkBackground: string;
19-
// accent: string;
2013
get foreground() {
2114
return this.state.foreground;
2215
}

src/api/WmApi.ts

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -42,46 +42,6 @@ class WMAPI {
4242
alttab.update();
4343
return win;
4444
}
45-
createGeneric(info: object): WMWindow {
46-
const win = AliceWM.create(info as unknown as any);
47-
const ctx = anura.apps["anura.generic"];
48-
win.focus();
49-
50-
win.addEventListener("focus", (event) => {
51-
//@ts-ignore
52-
document.activeElement?.blur();
53-
alttab.update();
54-
55-
taskbar.element.style.zIndex = getHighestZindex() + 3 + "";
56-
});
57-
58-
win.addEventListener("resize", (event: MessageEvent) => {});
59-
60-
win.addEventListener("close", (event) => {
61-
this.windows = this.windows.filter(
62-
(w: WeakRef<WMWindow>) => w.deref() !== win,
63-
);
64-
});
65-
66-
win.addEventListener("maximize", () => {
67-
taskbar.maximizedWins.push(win);
68-
taskbar.updateRadius();
69-
});
70-
71-
win.addEventListener("unmaximize", () => {
72-
taskbar.maximizedWins = taskbar.maximizedWins.filter((w) => w !== win);
73-
taskbar.updateRadius();
74-
});
75-
76-
win.addEventListener("snap", (event: MessageEvent) => {
77-
taskbar.updateRadius();
78-
});
79-
80-
ctx.windows.push(win);
81-
this.windows.push(new WeakRef(win));
82-
83-
taskbar.updateTaskbar();
84-
alttab.update();
85-
return win;
86-
}
45+
createGeneric: (info: WindowInformation | string) => WMWindow =
46+
this.create.bind(this, anura.apps["anura.generic"]);
8747
}

src/networking/Networking.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,4 @@ class Networking {
152152
return this.external.fetch(url, methods); // just pass through
153153
}
154154
};
155-
setWispServer = function (wisp_server: string) {
156-
this.libcurl.set_websocket(wisp_server);
157-
};
158155
}

src/oobe/OobeView.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,20 @@ class OobeView {
331331

332332
async function installx86(tracker = document.getElementById("tracker")) {
333333
console.debug("installing x86");
334+
await anura.fs.mkdir("/boot");
334335
const x86image = anura.settings.get("x86-image");
335336
tracker!.innerText = "Downloading x86 kernel";
336337
const bzimage = await fetch(anura.config.x86[x86image].bzimage);
337-
anura.fs.writeFile("/bzimage", Filer.Buffer(await bzimage.arrayBuffer()));
338+
anura.fs.writeFile(
339+
"/boot/bzimage",
340+
Filer.Buffer(await bzimage.arrayBuffer()),
341+
);
338342
tracker!.innerText = "Downloading x86 initrd";
339343
const initrd = await fetch(anura.config.x86[x86image].initrd);
340-
anura.fs.writeFile("/initrd.img", Filer.Buffer(await initrd.arrayBuffer()));
344+
anura.fs.writeFile(
345+
"/boot/initrd.img",
346+
Filer.Buffer(await initrd.arrayBuffer()),
347+
);
341348

342349
if (typeof anura.config.x86[x86image].rootfs === "string") {
343350
const rootfs = await fetch(anura.config.x86[x86image].rootfs);

0 commit comments

Comments
 (0)