Stage 2: move the win7 component tree into app/skins/7like/
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 <app-root> in
|
||||
* index.html hosts whichever one gets bootstrapped.
|
||||
*/
|
||||
export const SEVEN_ROOTS = {
|
||||
main: App,
|
||||
manager: ConnectionManager,
|
||||
editor: EditorWindow,
|
||||
} as const;
|
||||
+4
-4
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user