feat(viewer): add Vue-based HUD, ops strip, and history window

This commit is contained in:
2026-03-19 13:49:56 -04:00
parent 710addf1f5
commit 3ca568c05d
36 changed files with 2648 additions and 1017 deletions

View File

@@ -9,10 +9,10 @@ import {
refreshHistoryWindows,
updateHistoryWindowDrag,
} from "./viewerHistoryManager";
import type { HistoryWindowState, Selectable, WorldState } from "./viewerTypes";
import type { HistoryWindowState } from "./viewerHudState";
import type { Selectable, WorldState } from "./viewerTypes";
export interface ViewerHistoryWindowContext {
historyLayerEl: HTMLDivElement;
historyWindows: HistoryWindowState[];
getWorld: () => WorldState | undefined;
getHistoryWindowCounter: () => number;
@@ -33,7 +33,6 @@ export class ViewerHistoryWindowController {
openHistoryWindow(target: Selectable) {
const nextCounter = openHistoryWindow(
this.context.historyWindows,
this.context.historyLayerEl,
target,
this.context.getHistoryWindowCounter() + 1,
(windowState) => this.bringHistoryWindowToFront(windowState),
@@ -155,14 +154,14 @@ export class ViewerHistoryWindowController {
try {
await copyTextToClipboard(windowState.text);
windowState.copyButtonEl.textContent = "Copied";
windowState.copyLabel = "Copied";
window.setTimeout(() => {
windowState.copyButtonEl.textContent = "Copy";
windowState.copyLabel = "Copy";
}, 1200);
} catch {
windowState.copyButtonEl.textContent = "Failed";
windowState.copyLabel = "Failed";
window.setTimeout(() => {
windowState.copyButtonEl.textContent = "Copy";
windowState.copyLabel = "Copy";
}, 1200);
}
}