Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…o feat/xfrog2
  • Loading branch information
velzie committed Sep 28, 2024
2 parents 7026129 + 5bbad7d commit 8491c36
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 47 deletions.
1 change: 1 addition & 0 deletions src/AliceWM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@ class WMSplitBar {
document.documentElement.clientWidth ||
document.body.clientWidth;
this.element.style.left = width / 2 - 4 + "px";
this.element.style.zIndex = getHighestZindex() + "";
document.body.appendChild(this.element);
setTimeout(() => {
this.element.style.removeProperty("background-color");
Expand Down
8 changes: 3 additions & 5 deletions src/coreapps/AboutApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ class AboutApp extends App {
<p>
This product is licensed under the{" "}
<button
on:click={async () => {
const browser =
await anura.import("anura.libbrowser");
browser.openTab(
on:click={() => {
anura.apps["anura.browser"].open([
"https://github.com/MercuryWorkshop/anuraOS/blob/main/LICENSE",
);
]);
}}
class="aboutapp-link-button"
>
Expand Down
4 changes: 2 additions & 2 deletions src/coreapps/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class App {
icon: string;
package: string;
name: string;
package: string;
icon: string;
/**
* This should be set to false by default because apps should
* only be hidden if there is an explicit reason to do so
Expand Down
1 change: 1 addition & 0 deletions src/coreapps/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Dialog extends App {
icon = "/assets/icons/generic.svg";
source: string;
hidden = true;

css = css`
margin: 16px;
h2 {
Expand Down
13 changes: 7 additions & 6 deletions src/coreapps/ExploreApp.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
class ExploreApp extends App {
name = "Explore";
package = "anura.explore";
icon = "/assets/icons/explore.png";
hidden = false;
constructor() {
super();
this.name = "Explore";
this.icon = "/assets/icons/explore.png";
this.package = "anura.explore";
}

css = css`
background-color: var(--theme-bg);
Expand Down Expand Up @@ -134,6 +131,10 @@ class ExploreApp extends App {
}
`;

constructor() {
super();
}

whatsnew = (
<div id="body">
<h1>What's new in AnuraOS {anura.version.pretty}?</h1>
Expand Down
6 changes: 3 additions & 3 deletions src/coreapps/GenericApp.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class GenericApp extends App {
name = "Generic App";
package = "anura.generic";
icon = "/assets/icons/generic.svg";
hidden = true;
constructor() {
super();
this.name = "Generic App";
this.icon = "/assets/icons/generic.svg";
this.package = "anura.generic";
}

async open(args: string[] = []): Promise<WMWindow | undefined> {
Expand Down
17 changes: 9 additions & 8 deletions src/coreapps/RegEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const DisclosureGroup: Component<{
if (!this.level) this.level = 1;

this.css = `
padding-left: ${0.8 * this.level!}em;
padding-left: ${0.8 * this.level!}em;
`;

return (
Expand Down Expand Up @@ -75,13 +75,9 @@ const DisclosureGroup: Component<{
};

class RegEdit extends App {
hidden = false;
constructor() {
super();
this.name = "Registry Editor";
this.icon = "/assets/icons/regedit.svg";
this.package = "anura.regedit";
}
name = "Registry Editor";
package = "anura.regedit";
icon = "/assets/icons/regedit.svg";

css = css`
display: flex;
Expand Down Expand Up @@ -137,6 +133,11 @@ class RegEdit extends App {
background-color: var(--theme-bg);
}
`;

constructor() {
super();
}

state = $state({
selected: anura.settings.cache,
});
Expand Down
10 changes: 5 additions & 5 deletions src/coreapps/SettingsApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,18 @@ class SettingsApp extends App {
name = "Settings";
package = "anura.settings";
icon = "/assets/icons/settings.png";
win: WMWindow;

constructor() {
super();
}

state = $state({
show_x86_install: anura.settings.get("x86-disabled"),
x86_installing: false,
resizing: false,
settingsBody: undefined as unknown as HTMLDivElement,
});
win: WMWindow;

page = async () => (
<div
Expand Down Expand Up @@ -768,10 +772,6 @@ class SettingsApp extends App {
</div>
);

constructor() {
super();
}

async open(): Promise<WMWindow | undefined> {
if (this.win?.element?.parentElement) {
return this.win;
Expand Down
13 changes: 7 additions & 6 deletions src/coreapps/TaskManager.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// probably some of the most clusterfucked code i've written - fish
class TaskManager extends App {
constructor() {
super();
this.name = "Task Manager";
this.icon = "/assets/icons/system-monitor.svg";
this.package = "anura.taskmgr";
}
name = "Task Manager";
package = "anura.taskmgr";
icon = "/assets/icons/system-monitor.svg";

// incomprehensible css
css = css`
Expand Down Expand Up @@ -137,6 +134,10 @@ class TaskManager extends App {
}
`;

constructor() {
super();
}

state = $state({
selected: -1, // TODO: Multiselect. Shouldn't be too hard
});
Expand Down
7 changes: 4 additions & 3 deletions src/coreapps/ThemeEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
class ThemeEditor extends App {
name = "Theme Editor";
package = "anura.ui.themeeditor";
icon = "/assets/icons/theme.png";

state = $state({
resizing: false,
});
Expand Down Expand Up @@ -153,9 +157,6 @@ class ThemeEditor extends App {

constructor() {
super();
this.name = "Theme Editor";
this.icon = "/assets/icons/theme.png";
this.package = "anura.ui.themeeditor";
}

page = async () => (
Expand Down
12 changes: 4 additions & 8 deletions src/coreapps/XFrogApp.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
class XFrogApp extends App {
manifest: AppManifest;

activeWin: WMWindow;

name = "XFrog86";
package = "anura.xfrog";
icon = "/assets/icons/xfrog.png";
hidden = true;

activeWin: WMWindow;
xwindows: { [wid: string]: WMWindow } = {};

constructor() {
super();
this.name = "XFrog86";
this.package = "anura.xfrog";
this.icon = "/assets/icons/xfrog.png";
}

async startup() {
Expand Down
1 change: 1 addition & 0 deletions src/coreapps/x86MgrApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class x86MgrApp extends App {
constructor() {
super();
}

async open(): Promise<WMWindow | undefined> {
const win = anura.wm.create(this, {
title: "x86",
Expand Down

0 comments on commit 8491c36

Please sign in to comment.