wraith/src/components/tools/ToolWindow.vue
Vantz Stockwell 3e548ed10e
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Failing after 6s
feat: SFTP editor opens as popup window instead of inline overlay
Right-click → Edit now opens a separate Tauri window with the file
content in a monospace editor. Ctrl+S saves back to remote via SFTP.
Tab inserts 4 spaces. Modified indicator in toolbar.

Removed the inline EditorWindow overlay that covered the terminal.

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

40 lines
1.7 KiB
Vue

<template>
<div class="h-screen w-screen flex flex-col bg-[#0d1117] text-[#e0e0e0]">
<NetworkScanner v-if="tool === 'network-scanner'" :session-id="sessionId" />
<PortScanner v-else-if="tool === 'port-scanner'" :session-id="sessionId" />
<PingTool v-else-if="tool === 'ping'" :session-id="sessionId" />
<TracerouteTool v-else-if="tool === 'traceroute'" :session-id="sessionId" />
<WakeOnLan v-else-if="tool === 'wake-on-lan'" :session-id="sessionId" />
<DnsLookup v-else-if="tool === 'dns-lookup'" :session-id="sessionId" />
<WhoisTool v-else-if="tool === 'whois'" :session-id="sessionId" />
<BandwidthTest v-else-if="tool === 'bandwidth'" :session-id="sessionId" />
<SubnetCalc v-else-if="tool === 'subnet-calc'" />
<FileEditor v-else-if="tool === 'editor'" :session-id="sessionId" />
<SshKeyGen v-else-if="tool === 'ssh-keygen'" />
<PasswordGen v-else-if="tool === 'password-gen'" />
<div v-else class="flex-1 flex items-center justify-center text-sm text-[#484f58]">
Unknown tool: {{ tool }}
</div>
</div>
</template>
<script setup lang="ts">
import NetworkScanner from "./NetworkScanner.vue";
import PortScanner from "./PortScanner.vue";
import PingTool from "./PingTool.vue";
import TracerouteTool from "./TracerouteTool.vue";
import WakeOnLan from "./WakeOnLan.vue";
import DnsLookup from "./DnsLookup.vue";
import WhoisTool from "./WhoisTool.vue";
import BandwidthTest from "./BandwidthTest.vue";
import SubnetCalc from "./SubnetCalc.vue";
import FileEditor from "./FileEditor.vue";
import SshKeyGen from "./SshKeyGen.vue";
import PasswordGen from "./PasswordGen.vue";
defineProps<{
tool: string;
sessionId: string;
}>();
</script>