From b7b70fe22d44b1d7a5eb2d0357ac5a741b138701 Mon Sep 17 00:00:00 2001 From: loki5512344 Date: Mon, 15 Jun 2026 21:13:01 +0200 Subject: [PATCH] remove leftover Svelte frontend files --- index.html | 12 - package.json | 20 -- src/App.svelte | 153 --------- src/app.css | 80 ----- .../Dialogs/NewConnectionDialog.svelte | 252 --------------- src/lib/components/Panes/FilePane.svelte | 299 ------------------ src/lib/components/Panes/LocalPane.svelte | 49 --- src/lib/components/Panes/RemotePane.svelte | 62 ---- src/lib/components/Queue/TransferQueue.svelte | 279 ---------------- src/lib/components/StatusBar.svelte | 78 ----- src/lib/components/Tabs/Tabs.svelte | 116 ------- src/lib/components/Toolbar/Toolbar.svelte | 139 -------- src/lib/stores/connection.svelte.ts | 39 --- src/lib/types.ts | 34 -- src/main.ts | 6 - vite.config.ts | 16 - 16 files changed, 1634 deletions(-) delete mode 100644 index.html delete mode 100644 package.json delete mode 100644 src/App.svelte delete mode 100644 src/app.css delete mode 100644 src/lib/components/Dialogs/NewConnectionDialog.svelte delete mode 100644 src/lib/components/Panes/FilePane.svelte delete mode 100644 src/lib/components/Panes/LocalPane.svelte delete mode 100644 src/lib/components/Panes/RemotePane.svelte delete mode 100644 src/lib/components/Queue/TransferQueue.svelte delete mode 100644 src/lib/components/StatusBar.svelte delete mode 100644 src/lib/components/Tabs/Tabs.svelte delete mode 100644 src/lib/components/Toolbar/Toolbar.svelte delete mode 100644 src/lib/stores/connection.svelte.ts delete mode 100644 src/lib/types.ts delete mode 100644 src/main.ts delete mode 100644 vite.config.ts diff --git a/index.html b/index.html deleted file mode 100644 index 74563df..0000000 --- a/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - LoFlum - - -
- - - diff --git a/package.json b/package.json deleted file mode 100644 index 56ddc3a..0000000 --- a/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "loflum", - "type": "module", - "version": "0.1.0", - "scripts": { - "dev": "vite", - "build": "vite build", - "tauri": "tauri" - }, - "dependencies": { - "@tauri-apps/api": "^2", - "@tauri-apps/plugin-shell": "^2", - "svelte": "^5" - }, - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^4", - "@tauri-apps/cli": "^2", - "vite": "^6" - } -} diff --git a/src/App.svelte b/src/App.svelte deleted file mode 100644 index 0a4e72c..0000000 --- a/src/App.svelte +++ /dev/null @@ -1,153 +0,0 @@ - - -
- - - - - dialogOpen = true} - {upload} - {download} - {mkdir} - /> - - - - - -
- -
- deleteFile(e)} - onRename={(e) => rename(e)} - /> -
- - - - - - -
- - diff --git a/src/app.css b/src/app.css deleted file mode 100644 index 37de081..0000000 --- a/src/app.css +++ /dev/null @@ -1,80 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -:root { - --bg-0: #1a1a1a; - --bg-1: #222222; - --bg-2: #2a2a2a; - --bg-3: #333333; - --bg-hover: #2e2e2e; - --bg-selected: #1e4a7a; - - --border: #3a3a3a; - --border-light: #444; - - --text-primary: #e0e0e0; - --text-secondary: #999; - --text-muted: #666; - - --accent: #4a9eff; - --accent-dim: #2a5a9a; - --green: #4caf50; - --yellow: #ffc107; - --red: #f44336; - - --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; - --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", monospace; - - --tab-h: 40px; - --toolbar-h: 48px; - --queue-h: 180px; - --sidebar-w: 200px; - --statusbar-h: 28px; -} - -html, body, #app { - height: 100%; - width: 100%; - overflow: hidden; - background: var(--bg-0); - color: var(--text-primary); - font-family: var(--font-ui); - font-size: 13px; - -webkit-font-smoothing: antialiased; -} - -button { - background: none; - border: none; - cursor: pointer; - color: inherit; - font: inherit; -} - -input { - background: var(--bg-3); - border: 1px solid var(--border); - color: var(--text-primary); - font: inherit; - border-radius: 4px; - padding: 4px 8px; - outline: none; -} - -input:focus { - border-color: var(--accent); -} - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} -::-webkit-scrollbar-track { background: transparent; } -::-webkit-scrollbar-thumb { - background: var(--border); - border-radius: 3px; -} -::-webkit-scrollbar-thumb:hover { background: var(--border-light); } diff --git a/src/lib/components/Dialogs/NewConnectionDialog.svelte b/src/lib/components/Dialogs/NewConnectionDialog.svelte deleted file mode 100644 index 785883a..0000000 --- a/src/lib/components/Dialogs/NewConnectionDialog.svelte +++ /dev/null @@ -1,252 +0,0 @@ - - -{#if open} -
-
e.stopPropagation()}> -
- Новое соединение - -
- -
- -
- -
- {#each ["sftp", "ftp", "ftps"] as p} - - {/each} -
-
- -
-
- - -
-
- - -
-
- -
- - -
- -
- - -
- - {#if protocol === "sftp"} -
- -
- {/if} - - {#if useKey && protocol === "sftp"} -
- - -
- {:else} -
- - -
- {/if} - - {#if error} -
{error}
- {/if} -
- - -
-
-{/if} - - diff --git a/src/lib/components/Panes/FilePane.svelte b/src/lib/components/Panes/FilePane.svelte deleted file mode 100644 index 2a55f5d..0000000 --- a/src/lib/components/Panes/FilePane.svelte +++ /dev/null @@ -1,299 +0,0 @@ - - -
- -
- {icon} - {title} -
- {#if onUpload} - - {/if} - {#if onDownload} - - {/if} - {#if onMkdir} - - {/if} - {#if onDelete} - - {/if} - {#if onRename} - - {/if} -
-
- - -
- - onPathChange?.((e.target as HTMLInputElement).value)} - spellcheck="false" - /> - -
- - -
- Имя - Размер - Тип - Изменён ↕ -
- - -
- {#if loading} -
Загрузка...
- {:else if entries.length === 0} -
Пусто
- {:else} - {#each entries as entry} - - {/each} - {/if} -
- - - -
- - diff --git a/src/lib/components/Panes/LocalPane.svelte b/src/lib/components/Panes/LocalPane.svelte deleted file mode 100644 index e859896..0000000 --- a/src/lib/components/Panes/LocalPane.svelte +++ /dev/null @@ -1,49 +0,0 @@ - - - loadDir(e.path)} - onPathChange={(p) => loadDir(p)} -/> diff --git a/src/lib/components/Panes/RemotePane.svelte b/src/lib/components/Panes/RemotePane.svelte deleted file mode 100644 index 00b5e49..0000000 --- a/src/lib/components/Panes/RemotePane.svelte +++ /dev/null @@ -1,62 +0,0 @@ - - - loadDir(e.path)} - onPathChange={(p) => loadDir(p)} -/> diff --git a/src/lib/components/Queue/TransferQueue.svelte b/src/lib/components/Queue/TransferQueue.svelte deleted file mode 100644 index 84a9dce..0000000 --- a/src/lib/components/Queue/TransferQueue.svelte +++ /dev/null @@ -1,279 +0,0 @@ - - -
-
- Очередь передач ({tasks.length}) - - -
- - {#if open} -
-
- Имя - Операция - Источник - Назначение - Размер - Прогресс - Скорость - Осталось - Статус -
- - {#each activeTasks as task} -
- - 📄 - {task.fileName} - - {task.kind === "upload" ? "Загрузка" : "Скачать"} - {task.localPath} - {task.remotePath} - {formatSize(task.totalBytes)} - -
-
- {pct(task)}% -
-
- {formatSpeed(task.speed)} - {formatEta(task.etaSecs)} - - {#if task.state === "completed"} - ✓ {stateLabel(task.state)} - {:else if task.state === "running"} - {stateLabel(task.state)} - - - {:else} - {stateLabel(task.state)} - {/if} - -
- {:else} -
Нет активных передач
- {/each} -
- {/if} -
- - diff --git a/src/lib/components/StatusBar.svelte b/src/lib/components/StatusBar.svelte deleted file mode 100644 index a07a993..0000000 --- a/src/lib/components/StatusBar.svelte +++ /dev/null @@ -1,78 +0,0 @@ - - -
- - - {#if conn?.status === "connected"} - Подключено к {conn.label} ({conn.protocol.toUpperCase()}) - {:else} - Нет соединения - {/if} - - -
- - {#if totalSpeed > 0} - 📊 {formatSpeed(totalSpeed)} - {/if} -
- - diff --git a/src/lib/components/Tabs/Tabs.svelte b/src/lib/components/Tabs/Tabs.svelte deleted file mode 100644 index a84177d..0000000 --- a/src/lib/components/Tabs/Tabs.svelte +++ /dev/null @@ -1,116 +0,0 @@ - - -
- - -
- {#each $connections as conn} - - {/each} - - -
-
- - diff --git a/src/lib/components/Toolbar/Toolbar.svelte b/src/lib/components/Toolbar/Toolbar.svelte deleted file mode 100644 index a4e84d5..0000000 --- a/src/lib/components/Toolbar/Toolbar.svelte +++ /dev/null @@ -1,139 +0,0 @@ - - -
- - -
- - - - - - - -
- -
- - - -
- - -
- - diff --git a/src/lib/stores/connection.svelte.ts b/src/lib/stores/connection.svelte.ts deleted file mode 100644 index 4be8bca..0000000 --- a/src/lib/stores/connection.svelte.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { writable, derived } from "svelte/store"; - -export interface Connection { - id: string; - label: string; - protocol: "sftp" | "ftp" | "ftps"; - host: string; - status: "connected" | "disconnected" | "connecting" | "error"; -} - -function createConnections() { - const { subscribe, set, update } = writable([ - // Моковые соединения для разработки UI - { id: "srv1", label: "srv1", protocol: "sftp", host: "192.168.1.1", status: "connected" }, - { id: "srv2", label: "srv2", protocol: "ftp", host: "192.168.1.2", status: "disconnected" }, - { id: "backup", label: "backup", protocol: "ftps", host: "backup.example.com", status: "disconnected" }, - ]); - - return { - subscribe, - add(conn: Connection) { - update(cs => [...cs, conn]); - }, - remove(id: string) { - update(cs => cs.filter(c => c.id !== id)); - }, - setStatus(id: string, status: Connection["status"]) { - update(cs => cs.map(c => c.id === id ? { ...c, status } : c)); - }, - }; -} - -export const connections = createConnections(); -export const activeId = writable("srv1"); - -export const activeConnection = derived( - [connections, activeId], - ([conns, id]) => conns.find(c => c.id === id) ?? null -); diff --git a/src/lib/types.ts b/src/lib/types.ts deleted file mode 100644 index 8e59e81..0000000 --- a/src/lib/types.ts +++ /dev/null @@ -1,34 +0,0 @@ -export interface FileEntry { - name: string; - path: string; - kind: "file" | "dir" | "symlink"; - size?: number; - modified?: number; - permissions?: string; -} - -export interface TransferTask { - id: string; - kind: "upload" | "download"; - connectionId: string; - localPath: string; - remotePath: string; - fileName: string; - totalBytes: number; - transferredBytes: number; - state: "queued" | "running" | "paused" | "cancelled" | "completed" | "failed"; - speed?: number | null; - etaSecs?: number | null; -} - -export interface Site { - id: string; - name: string; - protocol: "sftp" | "ftp" | "ftps"; - host: string; - port: number; - username: string; - keyPath?: string; - folder?: string; - note?: string; -} diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index b1f2754..0000000 --- a/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import App from "./App.svelte"; -import { mount } from "svelte"; - -const app = mount(App, { target: document.getElementById("app")! }); - -export default app; diff --git a/vite.config.ts b/vite.config.ts deleted file mode 100644 index 5083436..0000000 --- a/vite.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { defineConfig } from "vite"; -import { svelte } from "@sveltejs/vite-plugin-svelte"; - -export default defineConfig({ - plugins: [svelte()], - clearScreen: false, - server: { - port: 5173, - strictPort: true, - watch: { ignored: ["**/src-tauri/**"] }, - }, - build: { - outDir: "dist", - target: "chrome120", - }, -});