From 39e019af9ffcd312ac801eee84de88f47fdd0a25 Mon Sep 17 00:00:00 2001 From: Jokin Date: Sun, 16 Aug 2026 04:50:53 +0200 Subject: [PATCH] Stage 2: move the win7 component tree into app/skins/7like/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All 14 components (including title-bar/, which has no modern counterpart) move under app/skins/7like/. git records every one as a rename — no content changed except main.ts. The @core alias from stage 1 paid off exactly as intended: not one of the 67 service imports needed touching despite every file changing depth. The only relative imports left inside the tree are skin-internal (app -> its dialogs, connection-manager -> title-bar), and those survived because the move preserved their relative structure. Added skins/7like/index.ts exporting SEVEN_ROOTS { main, manager, editor }. Every skin will export that same shape, so main.ts can pick a tree by skin and then a root by APP_MODE without knowing either skin's internals. main.ts selects from that barrel now, with the second axis still hardcoded until the shadlike tree lands. Verified: tsc clean, build:ui clean, opaque interior pixel-identical to the pre-refactor baseline. That last check also proves Tailwind still scans the templates from their new skins/** paths — a silent utility purge would have collapsed the layout rather than reproducing it exactly. The three structural 7.css contracts that a careless move breaks silently are intact by construction, since no markup changed: app-title-bar is still a direct child of .window.w7-frame, nothing new nests inside menu[role=tablist], and the context menu still emits ul[role=menu] > li[role=menuitem] > button. Co-Authored-By: Claude --- ui/src/app/{ => skins/7like}/app.html | 0 ui/src/app/{ => skins/7like}/app.ts | 0 .../connection-manager/connection-manager.html | 0 .../connection-manager/connection-manager.ts | 0 ui/src/app/{ => skins/7like}/context-menu.ts | 0 .../{ => skins/7like}/dialogs/chmod-dialog.ts | 0 .../{ => skins/7like}/dialogs/confirm-dialog.ts | 0 .../7like}/dialogs/overwrite-dialog.ts | 0 .../{ => skins/7like}/dialogs/prompt-dialog.ts | 0 .../7like}/editor-window/editor-window.html | 0 .../7like}/editor-window/editor-window.ts | 0 .../7like}/file-panel/file-panel.html | 0 .../{ => skins/7like}/file-panel/file-panel.ts | 0 ui/src/app/skins/7like/index.ts | 17 +++++++++++++++++ .../{ => skins/7like}/status-bar/status-bar.ts | 0 ui/src/app/{ => skins/7like}/tab-bar/tab-bar.ts | 0 .../{ => skins/7like}/title-bar/title-bar.ts | 0 ui/src/app/{ => skins/7like}/toasts/toasts.ts | 0 .../7like}/transfer-bar/transfer-bar.html | 0 .../7like}/transfer-bar/transfer-bar.ts | 0 ui/src/main.ts | 8 ++++---- 21 files changed, 21 insertions(+), 4 deletions(-) rename ui/src/app/{ => skins/7like}/app.html (100%) rename ui/src/app/{ => skins/7like}/app.ts (100%) rename ui/src/app/{ => skins/7like}/connection-manager/connection-manager.html (100%) rename ui/src/app/{ => skins/7like}/connection-manager/connection-manager.ts (100%) rename ui/src/app/{ => skins/7like}/context-menu.ts (100%) rename ui/src/app/{ => skins/7like}/dialogs/chmod-dialog.ts (100%) rename ui/src/app/{ => skins/7like}/dialogs/confirm-dialog.ts (100%) rename ui/src/app/{ => skins/7like}/dialogs/overwrite-dialog.ts (100%) rename ui/src/app/{ => skins/7like}/dialogs/prompt-dialog.ts (100%) rename ui/src/app/{ => skins/7like}/editor-window/editor-window.html (100%) rename ui/src/app/{ => skins/7like}/editor-window/editor-window.ts (100%) rename ui/src/app/{ => skins/7like}/file-panel/file-panel.html (100%) rename ui/src/app/{ => skins/7like}/file-panel/file-panel.ts (100%) create mode 100644 ui/src/app/skins/7like/index.ts rename ui/src/app/{ => skins/7like}/status-bar/status-bar.ts (100%) rename ui/src/app/{ => skins/7like}/tab-bar/tab-bar.ts (100%) rename ui/src/app/{ => skins/7like}/title-bar/title-bar.ts (100%) rename ui/src/app/{ => skins/7like}/toasts/toasts.ts (100%) rename ui/src/app/{ => skins/7like}/transfer-bar/transfer-bar.html (100%) rename ui/src/app/{ => skins/7like}/transfer-bar/transfer-bar.ts (100%) diff --git a/ui/src/app/app.html b/ui/src/app/skins/7like/app.html similarity index 100% rename from ui/src/app/app.html rename to ui/src/app/skins/7like/app.html diff --git a/ui/src/app/app.ts b/ui/src/app/skins/7like/app.ts similarity index 100% rename from ui/src/app/app.ts rename to ui/src/app/skins/7like/app.ts diff --git a/ui/src/app/connection-manager/connection-manager.html b/ui/src/app/skins/7like/connection-manager/connection-manager.html similarity index 100% rename from ui/src/app/connection-manager/connection-manager.html rename to ui/src/app/skins/7like/connection-manager/connection-manager.html diff --git a/ui/src/app/connection-manager/connection-manager.ts b/ui/src/app/skins/7like/connection-manager/connection-manager.ts similarity index 100% rename from ui/src/app/connection-manager/connection-manager.ts rename to ui/src/app/skins/7like/connection-manager/connection-manager.ts diff --git a/ui/src/app/context-menu.ts b/ui/src/app/skins/7like/context-menu.ts similarity index 100% rename from ui/src/app/context-menu.ts rename to ui/src/app/skins/7like/context-menu.ts diff --git a/ui/src/app/dialogs/chmod-dialog.ts b/ui/src/app/skins/7like/dialogs/chmod-dialog.ts similarity index 100% rename from ui/src/app/dialogs/chmod-dialog.ts rename to ui/src/app/skins/7like/dialogs/chmod-dialog.ts diff --git a/ui/src/app/dialogs/confirm-dialog.ts b/ui/src/app/skins/7like/dialogs/confirm-dialog.ts similarity index 100% rename from ui/src/app/dialogs/confirm-dialog.ts rename to ui/src/app/skins/7like/dialogs/confirm-dialog.ts diff --git a/ui/src/app/dialogs/overwrite-dialog.ts b/ui/src/app/skins/7like/dialogs/overwrite-dialog.ts similarity index 100% rename from ui/src/app/dialogs/overwrite-dialog.ts rename to ui/src/app/skins/7like/dialogs/overwrite-dialog.ts diff --git a/ui/src/app/dialogs/prompt-dialog.ts b/ui/src/app/skins/7like/dialogs/prompt-dialog.ts similarity index 100% rename from ui/src/app/dialogs/prompt-dialog.ts rename to ui/src/app/skins/7like/dialogs/prompt-dialog.ts diff --git a/ui/src/app/editor-window/editor-window.html b/ui/src/app/skins/7like/editor-window/editor-window.html similarity index 100% rename from ui/src/app/editor-window/editor-window.html rename to ui/src/app/skins/7like/editor-window/editor-window.html diff --git a/ui/src/app/editor-window/editor-window.ts b/ui/src/app/skins/7like/editor-window/editor-window.ts similarity index 100% rename from ui/src/app/editor-window/editor-window.ts rename to ui/src/app/skins/7like/editor-window/editor-window.ts diff --git a/ui/src/app/file-panel/file-panel.html b/ui/src/app/skins/7like/file-panel/file-panel.html similarity index 100% rename from ui/src/app/file-panel/file-panel.html rename to ui/src/app/skins/7like/file-panel/file-panel.html diff --git a/ui/src/app/file-panel/file-panel.ts b/ui/src/app/skins/7like/file-panel/file-panel.ts similarity index 100% rename from ui/src/app/file-panel/file-panel.ts rename to ui/src/app/skins/7like/file-panel/file-panel.ts diff --git a/ui/src/app/skins/7like/index.ts b/ui/src/app/skins/7like/index.ts new file mode 100644 index 0000000..9bab375 --- /dev/null +++ b/ui/src/app/skins/7like/index.ts @@ -0,0 +1,17 @@ +import { App } from './app'; +import { ConnectionManager } from './connection-manager/connection-manager'; +import { EditorWindow } from './editor-window/editor-window'; + +/** + * The three window roots of the Windows 7 skin, keyed by APP_MODE. + * + * Every skin exports this same shape, so main.ts selects a tree by skin and + * then a root by mode without knowing anything about either skin's internals. + * All three roots declare `selector: 'app-root'` — the single in + * index.html hosts whichever one gets bootstrapped. + */ +export const SEVEN_ROOTS = { + main: App, + manager: ConnectionManager, + editor: EditorWindow, +} as const; diff --git a/ui/src/app/status-bar/status-bar.ts b/ui/src/app/skins/7like/status-bar/status-bar.ts similarity index 100% rename from ui/src/app/status-bar/status-bar.ts rename to ui/src/app/skins/7like/status-bar/status-bar.ts diff --git a/ui/src/app/tab-bar/tab-bar.ts b/ui/src/app/skins/7like/tab-bar/tab-bar.ts similarity index 100% rename from ui/src/app/tab-bar/tab-bar.ts rename to ui/src/app/skins/7like/tab-bar/tab-bar.ts diff --git a/ui/src/app/title-bar/title-bar.ts b/ui/src/app/skins/7like/title-bar/title-bar.ts similarity index 100% rename from ui/src/app/title-bar/title-bar.ts rename to ui/src/app/skins/7like/title-bar/title-bar.ts diff --git a/ui/src/app/toasts/toasts.ts b/ui/src/app/skins/7like/toasts/toasts.ts similarity index 100% rename from ui/src/app/toasts/toasts.ts rename to ui/src/app/skins/7like/toasts/toasts.ts diff --git a/ui/src/app/transfer-bar/transfer-bar.html b/ui/src/app/skins/7like/transfer-bar/transfer-bar.html similarity index 100% rename from ui/src/app/transfer-bar/transfer-bar.html rename to ui/src/app/skins/7like/transfer-bar/transfer-bar.html diff --git a/ui/src/app/transfer-bar/transfer-bar.ts b/ui/src/app/skins/7like/transfer-bar/transfer-bar.ts similarity index 100% rename from ui/src/app/transfer-bar/transfer-bar.ts rename to ui/src/app/skins/7like/transfer-bar/transfer-bar.ts diff --git a/ui/src/main.ts b/ui/src/main.ts index aa52a98..cf8180e 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -1,10 +1,10 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from '@core/app.config'; -import { App } from './app/app'; -import { ConnectionManager } from './app/connection-manager/connection-manager'; -import { EditorWindow } from './app/editor-window/editor-window'; import { APP_MODE } from '@core/platform'; +import { SEVEN_ROOTS } from './app/skins/7like'; // One bundle, three window kinds: the preload global picks the root component. -const root = APP_MODE === 'editor' ? EditorWindow : APP_MODE === 'manager' ? ConnectionManager : App; +// A second axis (skin) joins APP_MODE here once the shadlike tree lands. +const tree = SEVEN_ROOTS; +const root = APP_MODE === 'editor' ? tree.editor : APP_MODE === 'manager' ? tree.manager : tree.main; bootstrapApplication(root, appConfig).catch((err) => console.error(err));