Terminal exit goes back
This commit is contained in:
parent
e97c00ed89
commit
2a03646196
@ -225,12 +225,9 @@ const exitCmd: Command = {
|
|||||||
window.opener = null;
|
window.opener = null;
|
||||||
window.open("", "_self");
|
window.open("", "_self");
|
||||||
window.close();
|
window.close();
|
||||||
|
window.history.back();
|
||||||
}
|
}
|
||||||
return [
|
return [];
|
||||||
"If you can read this, closing the window did not work.",
|
|
||||||
"This is most likely because of a restriction in JavaScript.",
|
|
||||||
"#{Read more here|https://developer.mozilla.org/en-US/docs/Web/API/Window/close}."
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import type { NextPage, GetStaticProps } from "next";
|
import type { NextPage, GetStaticProps } from "next";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Link from "next/link";
|
||||||
import Icon from "@mdi/react";
|
import Icon from "@mdi/react";
|
||||||
import { mdiEmail } from "@mdi/js";
|
import { mdiEmail } from "@mdi/js";
|
||||||
import { Discord, Github, Instagram, Steam, Linkedin } from "@icons-pack/react-simple-icons";
|
|
||||||
import { useEffect, useRef,useCallback } from "react";
|
import { useEffect, useRef,useCallback } from "react";
|
||||||
import { useCommands } from "../lib/commands/ContextProvider";
|
import { useCommands } from "../lib/commands/ContextProvider";
|
||||||
import { useModalFunctions } from "../components/Terminal/contexts/ModalFunctions";
|
import { useModalFunctions } from "../components/Terminal/contexts/ModalFunctions";
|
||||||
@ -64,6 +64,8 @@ const Terminal: NextPage<{ buildTime: string }> = ({ buildTime }) => {
|
|||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<span className={styles.spacer} onClick={focusInput}> </span>
|
<span className={styles.spacer} onClick={focusInput}> </span>
|
||||||
|
<Link href="/"><a>Main page</a></Link>
|
||||||
|
<span className={styles.divider}>|</span>
|
||||||
<a href="https://github.com/C0ntroller/c0ntroller.de" target="_blank" rel="noreferrer">Source</a>
|
<a href="https://github.com/C0ntroller/c0ntroller.de" target="_blank" rel="noreferrer">Source</a>
|
||||||
<span className={styles.divider}>|</span>
|
<span className={styles.divider}>|</span>
|
||||||
<a href="https://github.com/C0ntroller/c0ntroller.de/issues/new" target="_blank" rel="noreferrer">Bug?</a>
|
<a href="https://github.com/C0ntroller/c0ntroller.de/issues/new" target="_blank" rel="noreferrer">Bug?</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user