mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +00:00
Initial dev-1.0 commit for TS and Shadcn migration
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
import React from "react"
|
||||
|
||||
import {Homepage} from "@/apps/Homepage/Homepage.tsx"
|
||||
import {SSH} from "@/apps/SSH/SSH.tsx"
|
||||
import {SSHTunnel} from "@/apps/SSH Tunnel/SSHTunnel.tsx";
|
||||
import {ConfigEditor} from "@/apps/Config Editor/ConfigEditor.tsx";
|
||||
import {Tools} from "@/apps/Tools/Tools.tsx";
|
||||
|
||||
function App() {
|
||||
const [view, setView] = React.useState<string>("homepage")
|
||||
|
||||
const renderActiveView = () => {
|
||||
switch (view) {
|
||||
case "homepage":
|
||||
return <Homepage
|
||||
onSelectView={setView}
|
||||
/>
|
||||
case "ssh":
|
||||
return <SSH
|
||||
onSelectView={setView}
|
||||
/>
|
||||
case "ssh_tunnel":
|
||||
return <SSHTunnel
|
||||
onSelectView={setView}
|
||||
/>
|
||||
case "config_editor":
|
||||
return <ConfigEditor
|
||||
onSelectView={setView}
|
||||
/>
|
||||
case "tools":
|
||||
return <Tools
|
||||
onSelectView={setView}
|
||||
/>
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex">
|
||||
<main>
|
||||
{renderActiveView()}
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
Reference in New Issue
Block a user