feat: remove MobaXTerm import entirely
Removed ImportDialog, MobaXTerm first-run prompt, import menu item, and all related refs. 6 connections — entered by hand. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9cf64f99c7
commit
3a260f6a2c
@ -1,36 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
function open() {
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function close() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div v-if="visible" class="fixed inset-0 z-50 flex items-center justify-center bg-black/60" @click.self="close">
|
||||
<div class="bg-zinc-800 border border-zinc-700 rounded-xl shadow-2xl p-6 w-[400px]">
|
||||
<h2 class="text-lg font-semibold text-zinc-100 mb-4">Import Connections</h2>
|
||||
<p class="text-sm text-zinc-400 mb-6">
|
||||
Import is not available in this version. Add connections manually via the sidebar.
|
||||
</p>
|
||||
<div class="flex justify-end">
|
||||
<button
|
||||
class="px-4 py-2 text-sm bg-zinc-700 hover:bg-zinc-600 text-zinc-200 rounded-lg"
|
||||
@click="close"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
@ -32,14 +32,6 @@
|
||||
<kbd class="text-[10px] text-[var(--wraith-text-muted)]">Ctrl+N</kbd>
|
||||
</button>
|
||||
<div class="border-t border-[#30363d] my-1" />
|
||||
<button
|
||||
class="w-full flex items-center gap-3 px-4 py-2 text-xs text-left text-[var(--wraith-text-secondary)] hover:bg-[#30363d] hover:text-[var(--wraith-text-primary)] transition-colors cursor-pointer"
|
||||
@mousedown.prevent="handleFileMenuAction('import')"
|
||||
>
|
||||
<svg class="w-3.5 h-3.5 shrink-0" viewBox="0 0 16 16" fill="currentColor"><path d="M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14ZM11.78 4.72a.749.749 0 1 1-1.06 1.06L8.75 3.81V9.5a.75.75 0 0 1-1.5 0V3.81L5.28 5.78a.749.749 0 1 1-1.06-1.06l3.25-3.25a.749.749 0 0 1 1.06 0l3.25 3.25Z"/></svg>
|
||||
<span class="flex-1">Import from MobaXTerm</span>
|
||||
</button>
|
||||
<div class="border-t border-[#30363d] my-1" />
|
||||
<button
|
||||
class="w-full flex items-center gap-3 px-4 py-2 text-xs text-left text-[var(--wraith-text-secondary)] hover:bg-[#30363d] hover:text-[var(--wraith-text-primary)] transition-colors cursor-pointer"
|
||||
@mousedown.prevent="handleFileMenuAction('settings')"
|
||||
@ -169,7 +161,6 @@
|
||||
<!-- Command Palette (Ctrl+K) — stub, full implementation Phase N -->
|
||||
<CommandPalette
|
||||
ref="commandPalette"
|
||||
@open-import="importDialog?.open()"
|
||||
@open-settings="settingsModal?.open()"
|
||||
@open-new-connection="connectionEditDialog?.openNew()"
|
||||
/>
|
||||
@ -177,44 +168,12 @@
|
||||
<!-- Theme Picker -->
|
||||
<ThemePicker ref="themePicker" @select="handleThemeSelect" />
|
||||
|
||||
<!-- Import Dialog -->
|
||||
<ImportDialog ref="importDialog" />
|
||||
|
||||
<!-- Settings Modal -->
|
||||
<SettingsModal ref="settingsModal" />
|
||||
|
||||
<!-- Connection Edit Dialog (for File menu / Command Palette new connection) -->
|
||||
<ConnectionEditDialog ref="connectionEditDialog" />
|
||||
|
||||
<!-- First-run: MobaXTerm import prompt -->
|
||||
<Teleport to="body">
|
||||
<div
|
||||
v-if="showMobaPrompt"
|
||||
class="fixed inset-0 z-50 flex items-center justify-center"
|
||||
>
|
||||
<div class="absolute inset-0 bg-black/50" @click="showMobaPrompt = false" />
|
||||
<div class="relative w-full max-w-sm bg-[#161b22] border border-[#30363d] rounded-lg shadow-2xl p-6 space-y-4">
|
||||
<h3 class="text-sm font-semibold text-[var(--wraith-text-primary)]">No connections found</h3>
|
||||
<p class="text-xs text-[var(--wraith-text-secondary)]">
|
||||
It looks like this is your first time running Wraith. Would you like to import connections from MobaXTerm?
|
||||
</p>
|
||||
<div class="flex gap-2 justify-end">
|
||||
<button
|
||||
class="px-3 py-1.5 text-xs rounded bg-[var(--wraith-bg-tertiary)] text-[var(--wraith-text-secondary)] hover:text-[var(--wraith-text-primary)] transition-colors cursor-pointer"
|
||||
@click="showMobaPrompt = false"
|
||||
>
|
||||
Skip
|
||||
</button>
|
||||
<button
|
||||
class="px-3 py-1.5 text-xs rounded bg-[#1f6feb] text-white hover:bg-[#388bfd] transition-colors cursor-pointer"
|
||||
@click="() => { showMobaPrompt = false; importDialog?.open(); }"
|
||||
>
|
||||
Import from MobaXTerm
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -232,7 +191,6 @@ import SessionContainer from "@/components/session/SessionContainer.vue";
|
||||
import StatusBar from "@/components/common/StatusBar.vue";
|
||||
import CommandPalette from "@/components/common/CommandPalette.vue";
|
||||
import ThemePicker from "@/components/common/ThemePicker.vue";
|
||||
import ImportDialog from "@/components/common/ImportDialog.vue";
|
||||
import SettingsModal from "@/components/common/SettingsModal.vue";
|
||||
import ConnectionEditDialog from "@/components/connections/ConnectionEditDialog.vue";
|
||||
import FileTree from "@/components/sftp/FileTree.vue";
|
||||
@ -255,12 +213,9 @@ const sidebarVisible = ref(true);
|
||||
const sidebarTab = ref<SidebarTab>("connections");
|
||||
const quickConnectInput = ref("");
|
||||
|
||||
/** Whether to show the MobaXTerm import prompt (first run, no connections). */
|
||||
const showMobaPrompt = ref(false);
|
||||
|
||||
const commandPalette = ref<InstanceType<typeof CommandPalette> | null>(null);
|
||||
const themePicker = ref<InstanceType<typeof ThemePicker> | null>(null);
|
||||
const importDialog = ref<InstanceType<typeof ImportDialog> | null>(null);
|
||||
const settingsModal = ref<InstanceType<typeof SettingsModal> | null>(null);
|
||||
const connectionEditDialog = ref<InstanceType<typeof ConnectionEditDialog> | null>(null);
|
||||
const statusBar = ref<InstanceType<typeof StatusBar> | null>(null);
|
||||
@ -289,9 +244,6 @@ async function handleFileMenuAction(action: string): Promise<void> {
|
||||
case "new-connection":
|
||||
connectionEditDialog.value?.openNew();
|
||||
break;
|
||||
case "import":
|
||||
importDialog.value?.open();
|
||||
break;
|
||||
case "settings":
|
||||
settingsModal.value?.open();
|
||||
break;
|
||||
@ -495,10 +447,6 @@ onMounted(async () => {
|
||||
// Load connections and groups from the Rust backend after vault unlock
|
||||
await connectionStore.loadAll();
|
||||
|
||||
// First-run: if no connections found, offer to import from MobaXTerm
|
||||
if (connectionStore.connections.length === 0) {
|
||||
showMobaPrompt.value = true;
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user