statusline rocks
This commit is contained in:
parent
7be77d5a69
commit
907d8b5393
|
|
@ -175,4 +175,9 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
#statusline a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
@ -35,6 +35,6 @@ export const Terminal: FC = async () => (
|
||||||
<li class="center">VRAM <span id="vram-size">000KB</span></li>
|
<li class="center">VRAM <span id="vram-size">000KB</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="statusline"><div><span id="project-name">root</span>: <span id="project-cwd">/</span></div></div>
|
<div id="statusline"><div><a href="#projects" id="project-name">root</a>: <a href="#ls" id="project-cwd">/</a></div></div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
@ -8,8 +8,8 @@ import { randomId } from "../shared/utils"
|
||||||
import { $ } from "./dom"
|
import { $ } from "./dom"
|
||||||
|
|
||||||
export const sessionId = randomId()
|
export const sessionId = randomId()
|
||||||
export const projectName = $("project-name") as HTMLSpanElement
|
export const projectName = $("project-name") as HTMLAnchorElement
|
||||||
export const projectCwd = $("project-cwd") as HTMLSpanElement
|
export const projectCwd = $("project-cwd") as HTMLAnchorElement
|
||||||
export const sessionStore = new Map<string, string>()
|
export const sessionStore = new Map<string, string>()
|
||||||
|
|
||||||
export function handleSessionStart(msg: SessionStartMessage) {
|
export function handleSessionStart(msg: SessionStartMessage) {
|
||||||
|
|
@ -44,5 +44,5 @@ function displayProjectPath(path: string): string {
|
||||||
let prefix = sessionStore.get("NOSE_DIR") || ""
|
let prefix = sessionStore.get("NOSE_DIR") || ""
|
||||||
prefix += "/" + sessionStore.get("project")
|
prefix += "/" + sessionStore.get("project")
|
||||||
|
|
||||||
return path.replace(prefix, "")
|
return path.replace(prefix, "") || "/"
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user