wraith/src/App.vue
Vantz Stockwell 875dd1a28f
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Failing after 6s
feat: complete Tools suite — 7 tool UIs in popup windows
All 7 tool windows with full UIs:
- Network Scanner: subnet scan, ARP+DNS discovery, results table with
  Quick Scan per host, SSH/RDP connect buttons, CSV export
- Port Scanner: custom range or quick scan (24 common ports), open/closed
  results table with service names
- Ping: remote ping with count, raw output display
- Traceroute: remote traceroute, raw output display
- Wake on LAN: MAC address input, broadcasts via python3 on remote host
- SSH Key Generator: ed25519/RSA, copy public/private key, fingerprint
- Password Generator: configurable length/charset, copy button, history

Architecture:
- App.vue detects tool mode via URL hash (#/tool/name?sessionId=...)
- ToolWindow.vue routes to correct tool component
- Tools menu in toolbar opens Tauri popup windows (WebviewWindow)
- Capabilities grant tool-* windows the same permissions as main
- SFTP context menu: right-click Edit/Download/Rename/Delete

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:07:15 -04:00

51 lines
1.3 KiB
Vue

<script setup lang="ts">
import { ref, onMounted, defineAsyncComponent } from "vue";
import { useAppStore } from "@/stores/app.store";
import UnlockLayout from "@/layouts/UnlockLayout.vue";
const MainLayout = defineAsyncComponent(
() => import("@/layouts/MainLayout.vue")
);
const ToolWindow = defineAsyncComponent(
() => import("@/components/tools/ToolWindow.vue")
);
const app = useAppStore();
// Tool window mode — detected from URL hash: #/tool/network-scanner?sessionId=abc
const isToolMode = ref(false);
const toolName = ref("");
const toolSessionId = ref("");
onMounted(async () => {
const hash = window.location.hash;
if (hash.startsWith("#/tool/")) {
isToolMode.value = true;
const rest = hash.substring(7); // after "#/tool/"
const [name, query] = rest.split("?");
toolName.value = name;
toolSessionId.value = new URLSearchParams(query || "").get("sessionId") || "";
} else {
await app.checkVaultState();
}
});
</script>
<template>
<!-- Tool popup window mode -->
<ToolWindow v-if="isToolMode" :tool="toolName" :session-id="toolSessionId" />
<!-- Normal app mode -->
<div v-else class="app-root">
<UnlockLayout v-if="!app.isUnlocked" />
<MainLayout v-else />
</div>
</template>
<style scoped>
.app-root {
height: 100%;
display: flex;
flex-direction: column;
}
</style>