Revert "welcome screen"
Template tests / tests (push) Failing after 16s

This reverts commit 34fe8183b6.
This commit is contained in:
Iisyourdad
2026-06-10 20:05:39 -05:00
parent 34fe8183b6
commit 4ab18080ce
2 changed files with 3 additions and 137 deletions
+2 -53
View File
@@ -6,14 +6,13 @@ const dialogs = window.StepForgeDialogs || {};
class StepForgeApp {
constructor() {
this.view = document.getElementById('view');
this.topbar = document.getElementById('topbar');
this.topbarContext = document.getElementById('topbar-context');
this.searchInput = document.getElementById('global-search');
this.captureStatus = document.getElementById('capture-status');
this.homeBtn = document.getElementById('btn-home');
this.state = {
view: 'welcome',
view: 'library',
query: '',
folderFilter: 'all',
library: { guides: [], folders: [], guideFolders: {} },
@@ -25,11 +24,9 @@ class StepForgeApp {
this.libraryRenderToken = 0;
this.view.innerHTML = `
<div id="welcome-host"></div>
<div id="library-host"></div>
<div id="editor-host" class="hidden"></div>
`;
this.welcomeHost = document.getElementById('welcome-host');
this.libraryHost = document.getElementById('library-host');
this.editorHost = document.getElementById('editor-host');
@@ -90,7 +87,7 @@ class StepForgeApp {
async init() {
await this.refreshData();
this.updateCaptureState(await api.capture.state());
this.renderWelcome();
this.renderLibrary();
}
async refreshData() {
@@ -126,44 +123,12 @@ class StepForgeApp {
setView(view) {
this.state.view = view;
this.topbar.classList.toggle('hidden', view === 'welcome');
this.welcomeHost.classList.toggle('hidden', view !== 'welcome');
this.libraryHost.classList.toggle('hidden', view !== 'library');
this.editorHost.classList.toggle('hidden', view !== 'editor');
this.searchInput.classList.toggle('hidden', view !== 'library');
this.renderTopbar();
}
renderWelcome() {
this.setView('welcome');
clearNode(this.welcomeHost);
this.welcomeHost.append(
el('section.welcome-screen', {},
el('div.welcome-copy', {},
el('div.welcome-kicker', {}, 'Offline capture workspace'),
el('h1', {}, 'StepForge'),
el('p', {},
'Start a new capture, open an existing workspace, or adjust settings before you begin.'),
),
el('div.welcome-spacer', {}),
el('div.welcome-actions', {},
el('button.primary', {
type: 'button',
onClick: () => this.startNewCapture(),
}, 'New Capture'),
el('button', {
type: 'button',
onClick: () => this.showLibrary(),
}, 'Existing Workspace'),
el('button', {
type: 'button',
onClick: () => this.openSettings(),
}, 'settings'),
),
),
);
}
async showLibrary(reason = null) {
this.editor.setActive(false);
this.setView('library');
@@ -217,7 +182,6 @@ class StepForgeApp {
renderTopbar() {
clearNode(this.topbarContext);
if (this.state.view === 'welcome') return;
if (this.state.view === 'library') {
this.topbarContext.append(
el('button', { type: 'button', onClick: () => this.createGuide() }, 'New'),
@@ -484,21 +448,6 @@ class StepForgeApp {
await this.openGuide(guide.guideId);
}
async startNewCapture() {
const title = await dialogs.promptText({
title: 'New Capture',
label: 'Title',
value: 'Untitled guide',
placeholder: 'Untitled guide',
});
if (title == null) return;
const guide = await api.library.create({ title: title.trim() || 'Untitled guide' });
await this.refreshLibrary();
await this.openGuide(guide.guideId);
await api.capture.session({ action: 'start', guideId: guide.guideId });
this.updateCaptureState(await api.capture.state());
}
async createFolder() {
const name = await dialogs.promptText({ title: 'New folder', label: 'Folder name', value: '' });
if (name == null || !name.trim()) return;
+1 -84
View File
@@ -53,7 +53,6 @@ body {
#app { display: flex; flex-direction: column; height: 100vh; }
#view { flex: 1; min-height: 0; display: flex; }
#view > div { flex: 1; min-width: 0; min-height: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
@@ -154,89 +153,6 @@ kbd {
color: #fff;
}
#welcome-host {
position: relative;
display: flex;
overflow: hidden;
background:
radial-gradient(circle at top left, rgba(0, 104, 255, 0.14), transparent 32%),
radial-gradient(circle at bottom right, rgba(0, 104, 255, 0.09), transparent 28%),
linear-gradient(180deg, color-mix(in srgb, var(--panel-solid) 84%, transparent), color-mix(in srgb, var(--bg) 92%, var(--panel-solid) 8%));
}
.welcome-screen {
position: relative;
width: 100%;
min-height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 40px clamp(24px, 4vw, 56px) 30px;
isolation: isolate;
}
.welcome-screen::before {
content: '';
position: absolute;
inset: 18px 18px auto auto;
width: min(36vw, 340px);
height: min(36vw, 340px);
border-radius: 50%;
background: radial-gradient(circle, rgba(0, 104, 255, 0.16), transparent 68%);
filter: blur(8px);
pointer-events: none;
z-index: 0;
}
.welcome-copy {
position: relative;
z-index: 1;
max-width: 760px;
}
.welcome-kicker {
margin-bottom: 18px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--accent-strong);
}
.welcome-copy h1 {
margin: 0;
max-width: 13ch;
font-size: clamp(40px, 6vw, 72px);
line-height: 0.94;
letter-spacing: -0.05em;
}
.welcome-copy p {
margin: 16px 0 0;
max-width: 46rem;
color: var(--muted);
font-size: 16px;
line-height: 1.6;
}
.welcome-spacer {
flex: 1;
min-height: 24px;
}
.welcome-actions {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
width: min(100%, 980px);
align-self: stretch;
}
.welcome-actions button {
min-height: 64px;
border-radius: 16px;
padding: 14px 18px;
font-size: 15px;
font-weight: 650;
box-shadow: var(--shadow);
}
.welcome-actions button.primary {
box-shadow: 0 18px 38px rgba(0, 104, 255, 0.22);
}
.library, .editor { flex: 1; min-height: 0; display: flex; }
.lib-side {
@@ -754,3 +670,4 @@ fieldset legend {
border: 0;
border-top: 1px solid var(--border);
}