diff --git a/src/css/main.css b/src/css/main.css index 65628a0..c6d38d7 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -71,6 +71,14 @@ color: var(--c64-dark-blue); } +a { + color: var(--cyan); +} + +a:visited { + color: var(--purple); +} + html, body { font-family: var(--font-family); diff --git a/src/server.tsx b/src/server.tsx index c86d3bb..2127da8 100644 --- a/src/server.tsx +++ b/src/server.tsx @@ -79,8 +79,7 @@ app.get("/apps", c => { return c.html(<>

apps

- + ) }) diff --git a/src/shell.ts b/src/shell.ts index 3225451..0169612 100644 --- a/src/shell.ts +++ b/src/shell.ts @@ -1,9 +1,9 @@ //// // runs commands and such. +import { join } from "path" import type { CommandResult, CommandOutput } from "./shared/types" import type { State } from "./state" -import { join } from "path" import { NOSE_SYS_BIN, NOSE_BIN } from "./config" import { isFile } from "./utils" import { ALS } from "./state" @@ -46,6 +46,8 @@ function processExecOutput(output: string | any): ["ok" | "error", CommandOutput } else if (typeof output === "object") { if (output.error) { return ["error", output.error] + } else if (output.tag && output.props && output.children) { + return ["ok", { html: output.toString() }] } else { return ["ok", output] } @@ -65,10 +67,12 @@ function getState(session: string, id: string): State { } function commandPath(cmd: string): string | undefined { - const sysPath = join(NOSE_SYS_BIN, cmd + ".ts") - const usrPath = join(NOSE_BIN, cmd + ".ts") - - return (isFile(sysPath) && sysPath) || (isFile(usrPath) && usrPath) || undefined + return [ + join(NOSE_SYS_BIN, cmd + ".ts"), + join(NOSE_SYS_BIN, cmd + ".tsx"), + join(NOSE_BIN, cmd + ".ts"), + join(NOSE_BIN, cmd + ".tsx") + ].find((path: string) => isFile(path)) } function commandExists(cmd: string): boolean {