Skip to content

Commit 81f3489

Browse files
author
DavidQ
committed
More location management stuff for Workspace Manager
1 parent 24ba379 commit 81f3489

10 files changed

Lines changed: 142 additions & 102 deletions

File tree

tools/Tilemap Studio/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@
2626
<div class="app-shell" id="appShell">
2727
<header class="toolbar">
2828
<div class="toolbar-group tools-platform-control-cluster tools-platform-control-cluster--primary">
29-
<button id="newProjectButton" type="button">New Project</button>
30-
<button id="loadProjectButton" type="button">Load Project</button>
31-
<input id="loadProjectInput" class="hidden-file-input" type="file" accept=".json,application/json" />
3229
<label>
3330
Samples
3431
<select id="sampleSelect">
3532
<option value="">No samples loaded</option>
3633
</select>
3734
</label>
3835
<button id="loadSampleButton" type="button" disabled>Load Sample</button>
39-
<button id="saveProjectButton" type="button">Save Project</button>
4036
<button id="loadAssetRegistryButton" type="button">Load Assets Registry</button>
4137
<input id="loadAssetRegistryInput" class="hidden-file-input" type="file" accept=".json,application/json" />
4238
<button id="saveAssetRegistryButton" type="button">Save Assets Registry</button>

tools/Tilemap Studio/main.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,23 @@ class TileMapEditorApp {
644644
}
645645

646646
attachEvents() {
647-
this.refs.newProjectButton.addEventListener("click", () => this.handleNewProject());
648-
this.refs.loadProjectButton.addEventListener("click", () => this.refs.loadProjectInput.click());
649-
this.refs.loadProjectInput.addEventListener("change", (event) => this.handleLoadProject(event));
647+
if (this.refs.newProjectButton) {
648+
this.refs.newProjectButton.addEventListener("click", () => this.handleNewProject());
649+
}
650+
if (this.refs.loadProjectButton && this.refs.loadProjectInput) {
651+
this.refs.loadProjectButton.addEventListener("click", () => this.refs.loadProjectInput.click());
652+
}
653+
if (this.refs.loadProjectInput) {
654+
this.refs.loadProjectInput.addEventListener("change", (event) => this.handleLoadProject(event));
655+
}
650656
this.refs.loadSampleButton.addEventListener("click", () => this.handleLoadSelectedSample());
651657
this.refs.sampleSelect.addEventListener("change", () => this.handleSampleSelectionChanged());
652658
this.refs.sampleSelect.addEventListener("focus", () => {
653659
void this.loadSampleManifest({ quiet: true });
654660
});
655-
this.refs.saveProjectButton.addEventListener("click", () => this.handleSaveProject());
661+
if (this.refs.saveProjectButton) {
662+
this.refs.saveProjectButton.addEventListener("click", () => this.handleSaveProject());
663+
}
656664
this.refs.loadAssetRegistryButton.addEventListener("click", () => this.refs.loadAssetRegistryInput.click());
657665
this.refs.loadAssetRegistryInput.addEventListener("change", (event) => this.handleLoadAssetRegistry(event));
658666
this.refs.saveAssetRegistryButton.addEventListener("click", () => this.handleSaveAssetRegistry());
@@ -943,7 +951,9 @@ class TileMapEditorApp {
943951
this.updateStatus(`Load failed: ${error instanceof Error ? error.message : "invalid JSON"}`);
944952
}
945953

946-
this.refs.loadProjectInput.value = "";
954+
if (this.refs.loadProjectInput) {
955+
this.refs.loadProjectInput.value = "";
956+
}
947957
};
948958

949959
reader.readAsText(file);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Tool Host</title>
6+
<title>Workspace Manager</title>
77
<link rel="stylesheet" href="./toolHost.css" />
88
</head>
99
<body class="tool-host-page">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function bindEvents() {
236236

237237
function init() {
238238
if (!hasAvailableTools) {
239-
writeStatus("No active tools are currently available for Tool Host.");
239+
writeStatus("No active tools are currently available for Workspace Manager.");
240240
}
241241
const initialToolId = readInitialToolId();
242242
populateToolSelect(initialToolId);

tools/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<p class="subtitle">Launch the first-class art and scene tools from one registry-driven surface. The landing page
3131
shows only active, user-facing tools and keeps preserved legacy content out of the main launcher.</p>
3232
<p class="subtitle">Use Open Tool for normal day-to-day use, cleanest behavior, and quickest direct debugging.<br />
33-
Use Open In Host for integration checks: shared shell behavior, tool switching (prev/next), and optional JSON
33+
Use Open In Workspace Manager for integration checks: shared shell behavior, tool switching (prev/next), and optional JSON
3434
state handoff.</p>
3535
</section>
3636

tools/renderToolsIndex.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function toStandaloneHref(entryPoint) {
77
}
88

99
function toHostHref(toolId) {
10-
return `/tools/Tool%20Host/index.html?tool=${encodeURIComponent(toolId)}`;
10+
return `/tools/Workspace%20Manager/index.html?tool=${encodeURIComponent(toolId)}`;
1111
}
1212

1313
function renderToolCard(tool) {
@@ -33,11 +33,11 @@ function renderToolCard(tool) {
3333
<p>${escapeHtml(tool.description)}</p>
3434
<div class="meta">
3535
<a class="tools-platform-card__action" href="${escapeHtml(standaloneHref)}">Open Tool</a>
36-
<a class="tools-platform-card__action tools-platform-card__action--secondary" href="${escapeHtml(hostHref)}">Open In Host</a>
36+
<a class="tools-platform-card__action tools-platform-card__action--secondary" href="${escapeHtml(hostHref)}">Open In Workspace Manager</a>
3737
</div>
3838
<p class="tools-platform-card__launch-help">
3939
Open Tool = launch the tool directly/standalone<br />
40-
Open In Host = launch the same tool inside a shared host shell/container
40+
Open In Workspace Manager = launch the same tool inside a shared host shell/container
4141
</p>
4242
${sampleLinks}
4343
</div>

tools/shared/platformShell.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ body.tools-platform-surface {
3232
.tools-platform-statusbar {
3333
border: 1px solid var(--line, rgba(221, 214, 254, 0.26));
3434
border-radius: 18px;
35-
background: linear-gradient(180deg, var(--panel, rgba(76, 29, 149, 0.88)) 0%, var(--panel2, rgba(49, 17, 102, 0.94)) 100%);
35+
background: var(--bg-gradient, linear-gradient(180deg, #c4b5fd 0%, #a78bfa 18%, #8b5cf6 36%, #7c3aed 54%, #6d28d9 74%, #5b21b6 88%, #4c1d95 100%));
3636
box-shadow: var(--tools-shell-shadow);
3737
}
3838

@@ -103,6 +103,17 @@ body.tools-platform-surface {
103103
margin: 0 0 36px;
104104
}
105105

106+
.tools-platform-frame__divider {
107+
margin: 10px 0;
108+
border: 0;
109+
border-top: 1px solid var(--line, rgba(221, 214, 254, 0.26));
110+
}
111+
112+
.tools-platform-frame__controls-stack {
113+
display: grid;
114+
gap: 8px;
115+
}
116+
106117
.tools-platform-frame__eyebrow {
107118
margin: 2px 0 0;
108119
color: #f5d0fe;
@@ -192,9 +203,9 @@ body.tools-platform-surface {
192203
flex-direction: column;
193204
gap: 14px;
194205
flex-wrap: wrap;
195-
margin-top: 10px;
196-
padding-top: 10px;
197-
border-top: 1px solid var(--line, rgba(221, 214, 254, 0.26));
206+
margin-top: 0;
207+
padding-top: 0;
208+
border-top: 0;
198209
}
199210

200211
.tools-platform-frame__project-copy,
@@ -205,6 +216,7 @@ body.tools-platform-surface {
205216
gap: 10px;
206217
flex-wrap: wrap;
207218
text-align: center;
219+
width: 100%;
208220
}
209221

210222
.tools-platform-frame__project-label,

0 commit comments

Comments
 (0)