ls & projects have links

This commit is contained in:
Chris Wanstrath 2025-09-28 16:38:53 -07:00
parent 26855ce388
commit 3e02b3d348
2 changed files with 9 additions and 2 deletions

View File

@ -17,5 +17,10 @@ export default function () {
files = files.filter(file => file.endsWith(`${project}.ts`) || file.endsWith(`${project}.tsx`)) files = files.filter(file => file.endsWith(`${project}.ts`) || file.endsWith(`${project}.tsx`))
} }
return files.join(" ") return <>
{root !== projectDir() && <a href="#cd ..;ls">..</a>}
{files.map(file =>
<a href={file.endsWith('/') ? `#cd ${file};ls` : `#cat ${file}`}>{file}</a>
)}
</>
} }

View File

@ -5,5 +5,7 @@ export default function () {
const state = getState() const state = getState()
if (!state) return { error: "no state" } if (!state) return { error: "no state" }
return { html: apps().map(app => app === state.project ? `<b class="cyan">${app}</b>` : app).join(" ") } return <>
{apps().map(app => <a href={`#load ${app}`} class={app === state.project ? "magenta" : ""}>{app}</a>)}
</>
} }