diff --git a/src/components/WindowTitleBar.tsx b/src/components/WindowTitleBar.tsx new file mode 100644 index 0000000..fc21c7f --- /dev/null +++ b/src/components/WindowTitleBar.tsx @@ -0,0 +1,64 @@ +import { username, hostname, path } from "../../constants"; + +const WindowTitleBar = (props: { customUserName: string }) => { + return ( +
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + {props.customUserName == "" ? username : props.customUserName}@ + {hostname}:{path} + +
+ ); +}; + +export default WindowTitleBar; diff --git a/src/pages/Homepage.tsx b/src/pages/Homepage.tsx index 18bda27..25c110d 100644 --- a/src/pages/Homepage.tsx +++ b/src/pages/Homepage.tsx @@ -6,6 +6,7 @@ import { themes } from "../../constants"; const options = info.options.map((option) => option.label); import { Queue } from "queue-typescript"; import PromptBar from "../components/PromptBar"; +import WindowTitleBar from "../components/WindowTitleBar"; import { IDataType } from "../types"; const historyCommand = new Queue(); @@ -278,6 +279,7 @@ function Homepage() { return (
+
{ /* History */ diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 9c6352b..8c9a882 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -9,6 +9,7 @@ import { } from "react"; import PromptBar from "../components/PromptBar"; import commands from "../commands.json"; +import WindowTitleBar from "../components/WindowTitleBar"; import { themes } from "../../constants"; interface State { @@ -389,6 +390,7 @@ function Profile() { }, []); return (
+ {state.showWelcomeMessage && (

Type 'help' to view all available commands