forked from tools/josh
Fix #24
This commit is contained in:
parent
5d7894cb56
commit
0d4ba41a54
|
@ -18,6 +18,10 @@ a:link.fileLink, a:visited.fileLink {
|
||||||
color: #FFFF00;
|
color: #FFFF00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prefixPath, a:link.prefixPath, a:visited.prefixPath, a:hover.prefixPath {
|
||||||
|
color: #008000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.wideScreenOnly {
|
.wideScreenOnly {
|
||||||
|
|
|
@ -116,7 +116,15 @@ export class Shell {
|
||||||
if (this.userSession.currentUser === undefined)
|
if (this.userSession.currentUser === undefined)
|
||||||
throw new IllegalStateError("User is logged in as undefined.");
|
throw new IllegalStateError("User is logged in as undefined.");
|
||||||
|
|
||||||
return `${this.userSession.currentUser.name}@fwdekker.com <span style="color: green;">${this.fileSystem.cwd}</span>> `;
|
let path = this.fileSystem.getPathTo("");
|
||||||
|
const parts = [];
|
||||||
|
while (path.toString() !== "/") {
|
||||||
|
parts.push(`<a href="#" class="prefixPath" onclick="execute('cd ${path}')">${path.fileName}</a>`);
|
||||||
|
path = path.parent;
|
||||||
|
}
|
||||||
|
const link = `<a href="#" class="prefixPath" onclick="execute('cd /')">/</a>` + parts.reverse().join("/");
|
||||||
|
|
||||||
|
return `${this.userSession.currentUser.name}@fwdekker.com <span class="prefixPath">${link}</span>> `;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue