Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- platform/core/store_pg.py +16 -2
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
- web/src/home/DatabaseTile.tsx +6 -3
- web/src/home/HomePage.tsx +5 -5
- web/src/home/TemplateGallery.tsx +37 -89
- web/src/starred/StarredPage.tsx +2 -2
- web/src/styles/sdlc79/app-directory.css +0 -49
- web/src/styles/sdlc80/icon-tile.css +18 -9
- web/src/styles/wave59/templates.css +70 -94
- web/src/ui/IconTile.tsx +9 -3
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "85131cbfb",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
85131cbfb
|
platform/core/store_pg.py
CHANGED
|
@@ -2538,8 +2538,21 @@ _SHARED_VERSION = '_shared_cell_version'
|
|
| 2538 |
|
| 2539 |
|
| 2540 |
def _shared_exists(con, tenant_slug):
|
| 2541 |
-
|
| 2542 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2543 |
|
| 2544 |
|
| 2545 |
def _shared_load(con, name, tenant_slug, pids=None):
|
|
@@ -2593,6 +2606,7 @@ def _shared_ensure(con, tenant_slug):
|
|
| 2593 |
con.execute('SELECT pg_advisory_xact_lock(hashtextextended(%s, 0))',
|
| 2594 |
(_schema_for(tenant_slug) + '.shared_overlay_cells.ddl',))
|
| 2595 |
if not _shared_exists(con, tenant_slug):
|
|
|
|
| 2596 |
con.execute(_q('CREATE TABLE {tbl} (bucket text NOT NULL, row_id text NOT NULL, '
|
| 2597 |
'field_key text NOT NULL, value jsonb NOT NULL, '
|
| 2598 |
'version bigint GENERATED BY DEFAULT AS IDENTITY (START WITH 1000000000000), '
|
|
|
|
| 2538 |
|
| 2539 |
|
| 2540 |
def _shared_exists(con, tenant_slug):
|
| 2541 |
+
"""True only for the cell table `_shared_ensure` creates; a foreign table of that name has no `version`."""
|
| 2542 |
+
return con.execute("SELECT EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = to_regclass(%s) "
|
| 2543 |
+
"AND attname = 'version' AND NOT attisdropped)",
|
| 2544 |
+
(_schema_for(tenant_slug) + '.shared_overlay_cells',)).fetchone()[0]
|
| 2545 |
+
|
| 2546 |
+
|
| 2547 |
+
def _shared_retire_foreign(con, tenant_slug):
|
| 2548 |
+
"""Drop an empty foreign table holding the cell table's name; refuse one that holds rows."""
|
| 2549 |
+
if con.execute('SELECT to_regclass(%s)',
|
| 2550 |
+
(_schema_for(tenant_slug) + '.shared_overlay_cells',)).fetchone()[0] is None:
|
| 2551 |
+
return
|
| 2552 |
+
if con.execute(_q('SELECT EXISTS (SELECT 1 FROM {tbl})', 'shared_overlay_cells', tenant_slug)).fetchone()[0]:
|
| 2553 |
+
raise RuntimeError(f'{_schema_for(tenant_slug)}.shared_overlay_cells has rows but not the cell '
|
| 2554 |
+
'layout (no version column); move it aside before shared cells are written')
|
| 2555 |
+
con.execute(_q('DROP TABLE {tbl}', 'shared_overlay_cells', tenant_slug))
|
| 2556 |
|
| 2557 |
|
| 2558 |
def _shared_load(con, name, tenant_slug, pids=None):
|
|
|
|
| 2606 |
con.execute('SELECT pg_advisory_xact_lock(hashtextextended(%s, 0))',
|
| 2607 |
(_schema_for(tenant_slug) + '.shared_overlay_cells.ddl',))
|
| 2608 |
if not _shared_exists(con, tenant_slug):
|
| 2609 |
+
_shared_retire_foreign(con, tenant_slug)
|
| 2610 |
con.execute(_q('CREATE TABLE {tbl} (bucket text NOT NULL, row_id text NOT NULL, '
|
| 2611 |
'field_key text NOT NULL, value jsonb NOT NULL, '
|
| 2612 |
'version bigint GENERATED BY DEFAULT AS IDENTITY (START WITH 1000000000000), '
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
4dc3f9c04973060388ccc1b686880fe16cee3c65597ee729bc699e47175954fb
|
web/src/home/DatabaseTile.tsx
CHANGED
|
@@ -149,9 +149,12 @@ export default function DatabaseTile({
|
|
| 149 |
href={tile.href}
|
| 150 |
{...(tile.external ? { target: "_blank", rel: "noreferrer" } : {})}
|
| 151 |
>
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
| 155 |
<span className="home-tile-text">
|
| 156 |
<TruncatedName>{tile.label}</TruncatedName>
|
| 157 |
{/* No opened or edited line (owner item 23). Search alone adds the folder path. */}
|
|
|
|
| 149 |
href={tile.href}
|
| 150 |
{...(tile.external ? { target: "_blank", rel: "noreferrer" } : {})}
|
| 151 |
>
|
| 152 |
+
{/* `cg-db-mark` keeps the grid sheet's purple folder fill off this hollow mark, as in the rail. */}
|
| 153 |
+
<span className="cg-db-mark">
|
| 154 |
+
<IconTile icon={tile.icon} surface="home">
|
| 155 |
+
<DatabaseMark size={16} />
|
| 156 |
+
</IconTile>
|
| 157 |
+
</span>
|
| 158 |
<span className="home-tile-text">
|
| 159 |
<TruncatedName>{tile.label}</TruncatedName>
|
| 160 |
{/* No opened or edited line (owner item 23). Search alone adds the folder path. */}
|
web/src/home/HomePage.tsx
CHANGED
|
@@ -1320,7 +1320,7 @@ export function HomeSurface({
|
|
| 1320 |
<a className={"home-tile cg-view-row" + (selection.isSelected(moduleTileId(row)) ? " is-railsel" : "")}
|
| 1321 |
href={agentHref(row.kind, row.id)} {...moduleTileEvents(moduleTileId(row))}
|
| 1322 |
onClick={(event) => { moduleTileEvents(moduleTileId(row)).onClick?.(event); openTileLink(event, row.kind === "voice" ? "agent" : "automation", row.id, row.kind === "voice"); }}>
|
| 1323 |
-
<IconTile surface="home">
|
| 1324 |
<AgentIcon />
|
| 1325 |
</IconTile>
|
| 1326 |
<HomeTileText tile={{ id: row.id, name: row.name, kind: row.kind }}
|
|
@@ -1364,7 +1364,7 @@ export function HomeSurface({
|
|
| 1364 |
<a className={"home-tile" + (mode === "sheet" ? " cg-view-row" + (selection.isSelected(row.id) ? " is-railsel" : "") : "")}
|
| 1365 |
href={homeFolderHref("#/sheet?wb=" + encodeURIComponent(row.id), moduleIndex?.itemFolders?.[row.id])} {...moduleTileEvents(row.id)}
|
| 1366 |
onClick={(event) => { moduleTileEvents(row.id).onClick?.(event); openTileLink(event, "workbook", row.id); }}>
|
| 1367 |
-
<IconTile surface="home">
|
| 1368 |
<SheetGlyph />
|
| 1369 |
</IconTile>
|
| 1370 |
<HomeTileText tile={row}
|
|
@@ -1607,7 +1607,7 @@ export function HomeSurface({
|
|
| 1607 |
recordOpened(viewCountKey(row.database, row.id));
|
| 1608 |
onOpenView(row.database, row.id);
|
| 1609 |
}}>
|
| 1610 |
-
<IconTile surface="home"><SheetGlyph /></IconTile>
|
| 1611 |
<HomeTileText tile={row} fallback={entries.find((entry) => entry.key === row.database)?.label ?? "View"} />
|
| 1612 |
<SharedMark mark={viewShareMark(shareMarks, row)} fade={shareMarksFade} pending={shareMarksPending} />
|
| 1613 |
</a>
|
|
@@ -1692,7 +1692,7 @@ export function HomeSurface({
|
|
| 1692 |
openTileLink(event, "app", application.id);
|
| 1693 |
}}
|
| 1694 |
>
|
| 1695 |
-
<IconTile surface="home">
|
| 1696 |
{hasTemplateMark(application.templateKind)
|
| 1697 |
? <TemplateMark mark={application.templateKind!} size={16} /> : <ApplicationIcon />}
|
| 1698 |
</IconTile>
|
|
@@ -1766,7 +1766,7 @@ export function HomeSurface({
|
|
| 1766 |
void openExistingItem({ kind: "automation", id: a.id }, () => {});
|
| 1767 |
}}
|
| 1768 |
>
|
| 1769 |
-
<IconTile surface="home">
|
| 1770 |
<AgentIcon />
|
| 1771 |
</IconTile>
|
| 1772 |
<HomeTileText tile={{ id: a.id, name: a.name, kind: "agent" }} fallback="Automation" />
|
|
|
|
| 1320 |
<a className={"home-tile cg-view-row" + (selection.isSelected(moduleTileId(row)) ? " is-railsel" : "")}
|
| 1321 |
href={agentHref(row.kind, row.id)} {...moduleTileEvents(moduleTileId(row))}
|
| 1322 |
onClick={(event) => { moduleTileEvents(moduleTileId(row)).onClick?.(event); openTileLink(event, row.kind === "voice" ? "agent" : "automation", row.id, row.kind === "voice"); }}>
|
| 1323 |
+
<IconTile surface="home" fill="tint">
|
| 1324 |
<AgentIcon />
|
| 1325 |
</IconTile>
|
| 1326 |
<HomeTileText tile={{ id: row.id, name: row.name, kind: row.kind }}
|
|
|
|
| 1364 |
<a className={"home-tile" + (mode === "sheet" ? " cg-view-row" + (selection.isSelected(row.id) ? " is-railsel" : "") : "")}
|
| 1365 |
href={homeFolderHref("#/sheet?wb=" + encodeURIComponent(row.id), moduleIndex?.itemFolders?.[row.id])} {...moduleTileEvents(row.id)}
|
| 1366 |
onClick={(event) => { moduleTileEvents(row.id).onClick?.(event); openTileLink(event, "workbook", row.id); }}>
|
| 1367 |
+
<IconTile surface="home" fill="tint">
|
| 1368 |
<SheetGlyph />
|
| 1369 |
</IconTile>
|
| 1370 |
<HomeTileText tile={row}
|
|
|
|
| 1607 |
recordOpened(viewCountKey(row.database, row.id));
|
| 1608 |
onOpenView(row.database, row.id);
|
| 1609 |
}}>
|
| 1610 |
+
<IconTile surface="home" fill="tint"><SheetGlyph /></IconTile>
|
| 1611 |
<HomeTileText tile={row} fallback={entries.find((entry) => entry.key === row.database)?.label ?? "View"} />
|
| 1612 |
<SharedMark mark={viewShareMark(shareMarks, row)} fade={shareMarksFade} pending={shareMarksPending} />
|
| 1613 |
</a>
|
|
|
|
| 1692 |
openTileLink(event, "app", application.id);
|
| 1693 |
}}
|
| 1694 |
>
|
| 1695 |
+
<IconTile surface="home" fill="tint">
|
| 1696 |
{hasTemplateMark(application.templateKind)
|
| 1697 |
? <TemplateMark mark={application.templateKind!} size={16} /> : <ApplicationIcon />}
|
| 1698 |
</IconTile>
|
|
|
|
| 1766 |
void openExistingItem({ kind: "automation", id: a.id }, () => {});
|
| 1767 |
}}
|
| 1768 |
>
|
| 1769 |
+
<IconTile surface="home" fill="tint">
|
| 1770 |
<AgentIcon />
|
| 1771 |
</IconTile>
|
| 1772 |
<HomeTileText tile={{ id: a.id, name: a.name, kind: "agent" }} fallback="Automation" />
|
web/src/home/TemplateGallery.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import {
|
| 2 |
import { CONNECTORS_ROUTE } from "../shell/nav";
|
| 3 |
import { TemplateMark } from "../apps/templateMarks";
|
| 4 |
import { IconTile } from "../ui/IconTile";
|
|
@@ -53,7 +53,7 @@ const availability = (template: PickerTemplate) => {
|
|
| 53 |
return { actionLabel, reason };
|
| 54 |
};
|
| 55 |
|
| 56 |
-
// A new module starts at All
|
| 57 |
export default function TemplateGallery(props: TemplateGalleryProps) {
|
| 58 |
return <ModuleGallery key={props.module} {...props} />;
|
| 59 |
}
|
|
@@ -61,111 +61,60 @@ export default function TemplateGallery(props: TemplateGalleryProps) {
|
|
| 61 |
function ModuleGallery({ module, templates, loading, busy, onCreate, onNavigate, onAdd, added,
|
| 62 |
addError }: TemplateGalleryProps) {
|
| 63 |
const [category, setCategory] = useState<string | null>(null);
|
| 64 |
-
const [previewKey, setPreviewKey] = useState<string | null>(null);
|
| 65 |
-
const previewControls = useRef(new Map<string, HTMLButtonElement>());
|
| 66 |
-
const returnTo = useRef<string | null>(null);
|
| 67 |
-
const backRef = useRef<HTMLButtonElement>(null);
|
| 68 |
-
const allRef = useRef<HTMLButtonElement>(null);
|
| 69 |
const id = useId();
|
| 70 |
-
const preview = templates.find((template) => template.key === previewKey);
|
| 71 |
const categories = Array.from(new Set(module === "app"
|
| 72 |
? templates.flatMap((template) => template.tags ?? []) : templates.map((template) => template.category)));
|
| 73 |
const visible = category === null ? templates : templates.filter((template) => module === "app"
|
| 74 |
? template.tags?.includes(category) : template.category === category);
|
| 75 |
|
| 76 |
-
useEffect(() => {
|
| 77 |
-
if (loading) return;
|
| 78 |
-
if (preview) backRef.current?.focus();
|
| 79 |
-
else if (returnTo.current !== null) {
|
| 80 |
-
const target = previewControls.current.get(returnTo.current) ?? allRef.current;
|
| 81 |
-
target?.focus();
|
| 82 |
-
returnTo.current = null;
|
| 83 |
-
}
|
| 84 |
-
}, [loading, preview?.key]);
|
| 85 |
-
|
| 86 |
-
const createButton = (template: PickerTemplate, reasonId: string) => <button type="button"
|
| 87 |
-
className="home-tpl-create" disabled={!template.creatable || !!busy}
|
| 88 |
-
aria-describedby={!template.creatable ? reasonId : undefined}
|
| 89 |
-
onClick={() => { if (template.creatable && !busy) void onCreate(template); }}>
|
| 90 |
-
{busy === template.key ? "Creating…"
|
| 91 |
-
: module === "app" && template.creationMode !== "post" ? "Continue" : "Create"}
|
| 92 |
-
</button>;
|
| 93 |
-
|
| 94 |
-
const addButton = (template: PickerTemplate) => {
|
| 95 |
-
const address = added?.[template.key] ?? ownedApps(template)[0]?.address ?? "";
|
| 96 |
-
const name = plain(template.name);
|
| 97 |
-
return <button type="button" className="app-dir-add" data-added={address ? "true" : "false"}
|
| 98 |
-
aria-busy={busy === template.key} disabled={!!busy || (!address && !onAdd)}
|
| 99 |
-
aria-label={(address ? "Added. Open " : "Add ") + name}
|
| 100 |
-
onClick={() => {
|
| 101 |
-
if (busy) return;
|
| 102 |
-
if (address) onNavigate(address);
|
| 103 |
-
else void onAdd?.(template);
|
| 104 |
-
}}>{address ? "Added" : "Add"}</button>;
|
| 105 |
-
};
|
| 106 |
const templateTile = (template: PickerTemplate) => <IconTile surface="template">
|
| 107 |
<TemplateMark mark={module === "app" ? template.mark ?? template.key : undefined} />
|
| 108 |
</IconTile>;
|
|
|
|
| 109 |
const templateCard = (template: PickerTemplate) => {
|
| 110 |
-
const { reason } = availability(template);
|
| 111 |
const reasonId = id + "-reason-" + encodeURIComponent(template.key);
|
| 112 |
const directoryApp = module === "app" && template.creationMode === "post";
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
{templateTile(template)}
|
| 121 |
-
<span className="home-tpl-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
<
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
{addError?.key === template.key ? <p className="app-dir-error" role="alert">{addError.message}</p> : null}
|
| 131 |
-
</div>
|
| 132 |
</li>;
|
| 133 |
};
|
| 134 |
-
if (!loading && preview) {
|
| 135 |
-
const { reason, actionLabel } = availability(preview);
|
| 136 |
-
const reasonId = id + "-preview-reason";
|
| 137 |
-
const existing = module === "app" ? ownedApps(preview) : [];
|
| 138 |
-
return <div className="home-tpl-gallery home-tpl-detail" aria-busy={!!busy}>
|
| 139 |
-
<button ref={backRef} type="button" className="home-tpl-back" onClick={() => setPreviewKey(null)}>Back</button>
|
| 140 |
-
<div className="home-tpl-detail-layout">
|
| 141 |
-
<div className="home-tpl-detail-content">
|
| 142 |
-
{templateTile(preview)}
|
| 143 |
-
<span className="home-tpl-category-label">{module === "app"
|
| 144 |
-
? preview.tags?.map(plain).join(" · ") : shortLine(preview.category)}</span>
|
| 145 |
-
<h3 className="home-tpl-detail-title">{plain(preview.name)}</h3>
|
| 146 |
-
<p className="home-tpl-description">{shortLine(preview.description)}</p>
|
| 147 |
-
{reason ? <p id={reasonId} className="home-tpl-blocker">{reason}</p> : null}
|
| 148 |
-
<div className="home-tpl-actions">
|
| 149 |
-
{module === "app" && preview.creationMode === "post" ? addButton(preview) : createButton(preview, reasonId)}
|
| 150 |
-
{!preview.creatable && preview.action ? <button type="button" className="home-tpl-quiet"
|
| 151 |
-
disabled={!!busy} onClick={() => onNavigate("#/" + CONNECTORS_ROUTE)}>{actionLabel}</button> : null}
|
| 152 |
-
</div>
|
| 153 |
-
{addError?.key === preview.key ? <p className="app-dir-error" role="alert">{addError.message}</p> : null}
|
| 154 |
-
{existing.length ? <div className="home-tpl-existing" aria-label="Your apps">
|
| 155 |
-
<h4 className="home-tpl-existing-title">Your apps</h4>
|
| 156 |
-
{existing.map((owned) => <button key={owned.id} type="button" className="home-tpl-quiet"
|
| 157 |
-
disabled={!!busy} onClick={() => onNavigate(owned.address)}>Open {plain(owned.name)}</button>)}
|
| 158 |
-
</div> : null}
|
| 159 |
-
</div>
|
| 160 |
-
<img className="home-tpl-detail-image" src={preview.image} width={640} height={400}
|
| 161 |
-
alt={plain(preview.name) + " preview"} decoding="async" />
|
| 162 |
-
</div>
|
| 163 |
-
</div>;
|
| 164 |
-
}
|
| 165 |
|
| 166 |
return <div className="home-tpl-gallery home-tpl-browse" aria-busy={loading || !!busy}>
|
| 167 |
<nav className="home-tpl-categories" aria-label="Template categories">
|
| 168 |
-
<button
|
| 169 |
disabled={loading || !!busy} onClick={() => setCategory(null)}>All</button>
|
| 170 |
{categories.map((name) => <button key={name} type="button" className="home-tpl-category"
|
| 171 |
aria-pressed={category === name} disabled={loading || !!busy}
|
|
@@ -178,7 +127,6 @@ function ModuleGallery({ module, templates, loading, busy, onCreate, onNavigate,
|
|
| 178 |
<span className="home-tpl-skeleton-tile" />
|
| 179 |
<span className="home-tpl-skeleton-name" />
|
| 180 |
<span className="home-tpl-skeleton-line" />
|
| 181 |
-
<span className="home-tpl-skeleton-button" />
|
| 182 |
</div>)}
|
| 183 |
</div>
|
| 184 |
</div> : visible.length ? <ul className="home-tpl-grid" aria-label="Templates">
|
|
|
|
| 1 |
+
import { useId, useState } from "react";
|
| 2 |
import { CONNECTORS_ROUTE } from "../shell/nav";
|
| 3 |
import { TemplateMark } from "../apps/templateMarks";
|
| 4 |
import { IconTile } from "../ui/IconTile";
|
|
|
|
| 53 |
return { actionLabel, reason };
|
| 54 |
};
|
| 55 |
|
| 56 |
+
// A new module starts at All with its own category state.
|
| 57 |
export default function TemplateGallery(props: TemplateGalleryProps) {
|
| 58 |
return <ModuleGallery key={props.module} {...props} />;
|
| 59 |
}
|
|
|
|
| 61 |
function ModuleGallery({ module, templates, loading, busy, onCreate, onNavigate, onAdd, added,
|
| 62 |
addError }: TemplateGalleryProps) {
|
| 63 |
const [category, setCategory] = useState<string | null>(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
const id = useId();
|
|
|
|
| 65 |
const categories = Array.from(new Set(module === "app"
|
| 66 |
? templates.flatMap((template) => template.tags ?? []) : templates.map((template) => template.category)));
|
| 67 |
const visible = category === null ? templates : templates.filter((template) => module === "app"
|
| 68 |
? template.tags?.includes(category) : template.category === category);
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
const templateTile = (template: PickerTemplate) => <IconTile surface="template">
|
| 71 |
<TemplateMark mark={module === "app" ? template.mark ?? template.key : undefined} />
|
| 72 |
</IconTile>;
|
| 73 |
+
// The whole card is the create target. A card that cannot create renders no button body.
|
| 74 |
const templateCard = (template: PickerTemplate) => {
|
| 75 |
+
const { reason, actionLabel } = availability(template);
|
| 76 |
const reasonId = id + "-reason-" + encodeURIComponent(template.key);
|
| 77 |
const directoryApp = module === "app" && template.creationMode === "post";
|
| 78 |
+
const address = directoryApp ? added?.[template.key] ?? ownedApps(template)[0]?.address ?? "" : "";
|
| 79 |
+
const actionable = !!address || (template.creatable && (!directoryApp || !!onAdd));
|
| 80 |
+
const working = busy === template.key;
|
| 81 |
+
const name = plain(template.name);
|
| 82 |
+
const cue = address ? "Added" : directoryApp ? (working ? "Adding…" : "Add") : working ? "Creating…" : "Create";
|
| 83 |
+
const body = <>
|
| 84 |
+
<span className="home-tpl-card-head">
|
| 85 |
{templateTile(template)}
|
| 86 |
+
{actionable ? <span className="home-tpl-cue" data-added={address ? "true" : "false"}>{cue}</span> : null}
|
| 87 |
+
</span>
|
| 88 |
+
<span className="home-tpl-card-title">{name}</span>
|
| 89 |
+
<span className="home-tpl-description" title={shortLine(template.description)}>{shortLine(template.description)}</span>
|
| 90 |
+
{module === "app" ? <span className="home-tpl-category-label" aria-label="Tags">
|
| 91 |
+
{template.tags?.map(plain).join(" · ")}
|
| 92 |
+
</span> : null}
|
| 93 |
+
</>;
|
| 94 |
+
const footer = (!actionable && (!!reason || !!template.action)) || addError?.key === template.key;
|
| 95 |
+
return <li key={template.key} className={"home-tpl-card" + (directoryApp ? " app-dir-card" : "")}
|
| 96 |
+
data-template-key={template.key} data-template-module={module} data-creatable={actionable && !busy}>
|
| 97 |
+
{actionable ? <button type="button" className="home-tpl-pick" disabled={!!busy} aria-busy={working}
|
| 98 |
+
aria-label={(address ? "Added. Open " : directoryApp ? "Add " : "Create ") + name}
|
| 99 |
+
onClick={() => {
|
| 100 |
+
if (busy) return;
|
| 101 |
+
if (address) onNavigate(address);
|
| 102 |
+
else if (directoryApp) void onAdd?.(template);
|
| 103 |
+
else if (template.creatable) void onCreate(template);
|
| 104 |
+
}}>{body}</button> : <div className="home-tpl-pick">{body}</div>}
|
| 105 |
+
{footer ? <div className="home-tpl-card-footer">
|
| 106 |
+
{!actionable && reason ? <p id={reasonId} className="home-tpl-blocker">{reason}</p> : null}
|
| 107 |
+
{!actionable && template.action ? <button type="button" className="home-tpl-quiet" disabled={!!busy}
|
| 108 |
+
aria-describedby={reason ? reasonId : undefined}
|
| 109 |
+
onClick={() => onNavigate("#/" + CONNECTORS_ROUTE)}>{actionLabel}</button> : null}
|
| 110 |
{addError?.key === template.key ? <p className="app-dir-error" role="alert">{addError.message}</p> : null}
|
| 111 |
+
</div> : null}
|
| 112 |
</li>;
|
| 113 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
return <div className="home-tpl-gallery home-tpl-browse" aria-busy={loading || !!busy}>
|
| 116 |
<nav className="home-tpl-categories" aria-label="Template categories">
|
| 117 |
+
<button type="button" className="home-tpl-category" aria-pressed={category === null}
|
| 118 |
disabled={loading || !!busy} onClick={() => setCategory(null)}>All</button>
|
| 119 |
{categories.map((name) => <button key={name} type="button" className="home-tpl-category"
|
| 120 |
aria-pressed={category === name} disabled={loading || !!busy}
|
|
|
|
| 127 |
<span className="home-tpl-skeleton-tile" />
|
| 128 |
<span className="home-tpl-skeleton-name" />
|
| 129 |
<span className="home-tpl-skeleton-line" />
|
|
|
|
| 130 |
</div>)}
|
| 131 |
</div>
|
| 132 |
</div> : visible.length ? <ul className="home-tpl-grid" aria-label="Templates">
|
web/src/starred/StarredPage.tsx
CHANGED
|
@@ -169,7 +169,7 @@ export function Tile({
|
|
| 169 |
onOpen?: () => void;
|
| 170 |
}) {
|
| 171 |
const chip = (
|
| 172 |
-
<IconTile icon={row.icon} surface={surface}>
|
| 173 |
{glyph ?? (row.icon ? <FolderMark icon={row.icon} size={16} /> : row.initials)}
|
| 174 |
</IconTile>
|
| 175 |
);
|
|
@@ -404,7 +404,7 @@ export function StarredSurface({
|
|
| 404 |
window.location.hash = href;
|
| 405 |
void openExistingItem({ kind: "app", id: application.id }, () => {});
|
| 406 |
}}>
|
| 407 |
-
<IconTile surface="starred">{application.type.slice(0, 1).toUpperCase()}</IconTile><span className="home-tile-text"><span className="home-tile-name">{application.name}</span><span className="home-tile-ago">{application.type}</span></span></a>;
|
| 408 |
})}</div></section>}
|
| 409 |
|
| 410 |
{shown === 0 ? (
|
|
|
|
| 169 |
onOpen?: () => void;
|
| 170 |
}) {
|
| 171 |
const chip = (
|
| 172 |
+
<IconTile icon={row.icon} surface={surface} fill="chip">
|
| 173 |
{glyph ?? (row.icon ? <FolderMark icon={row.icon} size={16} /> : row.initials)}
|
| 174 |
</IconTile>
|
| 175 |
);
|
|
|
|
| 404 |
window.location.hash = href;
|
| 405 |
void openExistingItem({ kind: "app", id: application.id }, () => {});
|
| 406 |
}}>
|
| 407 |
+
<IconTile surface="starred" fill="tint">{application.type.slice(0, 1).toUpperCase()}</IconTile><span className="home-tile-text"><span className="home-tile-name">{application.name}</span><span className="home-tile-ago">{application.type}</span></span></a>;
|
| 408 |
})}</div></section>}
|
| 409 |
|
| 410 |
{shown === 0 ? (
|
web/src/styles/sdlc79/app-directory.css
CHANGED
|
@@ -34,18 +34,10 @@
|
|
| 34 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 35 |
}
|
| 36 |
|
| 37 |
-
.home-tpl .home-tpl-preview {
|
| 38 |
-
align-items: flex-start;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
.home-tpl .home-tpl-card-title {
|
| 42 |
margin-top: 0;
|
| 43 |
}
|
| 44 |
|
| 45 |
-
.home-tpl .home-tpl-preview .home-tpl-description {
|
| 46 |
-
width: 100%;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
.home-tpl .home-tpl-card-footer {
|
| 50 |
margin-top: auto;
|
| 51 |
}
|
|
@@ -86,38 +78,6 @@
|
|
| 86 |
font-weight: var(--lp-fw-semibold);
|
| 87 |
}
|
| 88 |
|
| 89 |
-
/* Add and Added share one box: the press changes colour only, never the layout. */
|
| 90 |
-
.home-tpl .app-dir-add {
|
| 91 |
-
appearance: none;
|
| 92 |
-
min-width: 76px;
|
| 93 |
-
min-height: 32px;
|
| 94 |
-
padding: 6px 12px;
|
| 95 |
-
border: 0;
|
| 96 |
-
border-radius: var(--lp-r-md);
|
| 97 |
-
background: var(--lp-primary);
|
| 98 |
-
color: var(--lp-surface);
|
| 99 |
-
font: inherit;
|
| 100 |
-
font-size: var(--lp-fs-xs);
|
| 101 |
-
font-weight: var(--lp-fw-semibold);
|
| 102 |
-
text-align: center;
|
| 103 |
-
cursor: pointer;
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
.home-tpl .app-dir-add[data-added="true"] {
|
| 107 |
-
background: var(--lp-green-tint);
|
| 108 |
-
color: var(--lp-green-deep);
|
| 109 |
-
}
|
| 110 |
-
|
| 111 |
-
.home-tpl .app-dir-add:disabled {
|
| 112 |
-
opacity: var(--lp-home-disabled-opacity);
|
| 113 |
-
cursor: not-allowed;
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
.home-tpl .app-dir-add:focus-visible {
|
| 117 |
-
outline: calc(var(--lp-hairline-width) + var(--lp-hairline-width)) solid var(--lp-blue-deep);
|
| 118 |
-
outline-offset: 2px;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
.home-tpl .app-dir-empty {
|
| 122 |
margin: 0;
|
| 123 |
color: var(--lp-muted);
|
|
@@ -130,15 +90,6 @@
|
|
| 130 |
font-size: var(--lp-fs-xs);
|
| 131 |
}
|
| 132 |
|
| 133 |
-
@media (hover: hover) and (pointer: fine) {
|
| 134 |
-
.home-tpl .app-dir-add:hover:not(:disabled):not([data-added="true"]) { background: var(--lp-primary-hover); }
|
| 135 |
-
.home-tpl .app-dir-add[data-added="true"]:hover:not(:disabled) { background: var(--lp-wash); }
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
@media (prefers-reduced-motion: reduce) {
|
| 139 |
-
.home-tpl .app-dir-add { transition: none; }
|
| 140 |
-
}
|
| 141 |
-
|
| 142 |
@media (max-width: 1100px) {
|
| 143 |
.home-tpl .home-tpl-browse .home-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 144 |
}
|
|
|
|
| 34 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 35 |
}
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
.home-tpl .home-tpl-card-title {
|
| 38 |
margin-top: 0;
|
| 39 |
}
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
.home-tpl .home-tpl-card-footer {
|
| 42 |
margin-top: auto;
|
| 43 |
}
|
|
|
|
| 78 |
font-weight: var(--lp-fw-semibold);
|
| 79 |
}
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
.home-tpl .app-dir-empty {
|
| 82 |
margin: 0;
|
| 83 |
color: var(--lp-muted);
|
|
|
|
| 90 |
font-size: var(--lp-fs-xs);
|
| 91 |
}
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
@media (max-width: 1100px) {
|
| 94 |
.home-tpl .home-tpl-browse .home-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 95 |
}
|
web/src/styles/sdlc80/icon-tile.css
CHANGED
|
@@ -28,14 +28,14 @@
|
|
| 28 |
--lp-icon-tile-size: var(--lp-icon-tile-template-size);
|
| 29 |
}
|
| 30 |
|
| 31 |
-
/*
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
stroke: currentColor;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
/* The frame owns its dimensions; dbChipClass owns every fill. */
|
| 38 |
.lp-icon-tile.shell-db-chip {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
box-sizing: border-box;
|
| 40 |
width: var(--lp-icon-tile-size);
|
| 41 |
height: var(--lp-icon-tile-size);
|
|
@@ -51,6 +51,11 @@
|
|
| 51 |
stroke: currentColor;
|
| 52 |
}
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
.cg-fold-toggle > .lp-icon-tile {
|
| 55 |
flex: none;
|
| 56 |
}
|
|
@@ -62,9 +67,11 @@
|
|
| 62 |
align-items: center;
|
| 63 |
}
|
| 64 |
|
|
|
|
| 65 |
.shell-home .home-card {
|
| 66 |
flex-direction: row;
|
| 67 |
align-items: center;
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
.home-card > .home-card-head {
|
|
@@ -74,16 +81,18 @@
|
|
| 74 |
min-width: 0;
|
| 75 |
}
|
| 76 |
|
| 77 |
-
|
|
|
|
| 78 |
color: inherit;
|
| 79 |
opacity: 1;
|
| 80 |
}
|
| 81 |
|
| 82 |
/* Stroke glyphs inherit tile ink; Phosphor keeps its filled path model. */
|
| 83 |
-
.home-card .lp-icon-tile :is(.home-card-icon, .home-app-icon, .shell-nav-icon:not(.is-glyph)) {
|
| 84 |
stroke: currentColor;
|
| 85 |
}
|
| 86 |
|
|
|
|
| 87 |
.home-card .lp-icon-tile .shell-nav-icon.is-glyph {
|
| 88 |
fill: currentColor;
|
| 89 |
stroke: none;
|
|
|
|
| 28 |
--lp-icon-tile-size: var(--lp-icon-tile-template-size);
|
| 29 |
}
|
| 30 |
|
| 31 |
+
/* The frame owns its dimensions; the fill prop decides the background.
|
| 32 |
+
Both selectors weigh two classes, so the frame beats `.shell-db-chip` and `.home-app-glyph`. */
|
| 33 |
+
.lp-icon-tile:not(.shell-db-chip),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
.lp-icon-tile.shell-db-chip {
|
| 35 |
+
display: inline-flex;
|
| 36 |
+
align-items: center;
|
| 37 |
+
justify-content: center;
|
| 38 |
+
flex: 0 0 auto;
|
| 39 |
box-sizing: border-box;
|
| 40 |
width: var(--lp-icon-tile-size);
|
| 41 |
height: var(--lp-icon-tile-size);
|
|
|
|
| 51 |
stroke: currentColor;
|
| 52 |
}
|
| 53 |
|
| 54 |
+
/* A rail glyph dims to 0.55. On the tinted app chip it stays at full ink. */
|
| 55 |
+
.lp-icon-tile.home-app-glyph .shell-nav-icon {
|
| 56 |
+
opacity: 1;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
.cg-fold-toggle > .lp-icon-tile {
|
| 60 |
flex: none;
|
| 61 |
}
|
|
|
|
| 67 |
align-items: center;
|
| 68 |
}
|
| 69 |
|
| 70 |
+
/* The row gap matches .home-tile; the stacked card's 4px gap is too tight beside a tile. */
|
| 71 |
.shell-home .home-card {
|
| 72 |
flex-direction: row;
|
| 73 |
align-items: center;
|
| 74 |
+
column-gap: calc(var(--lp-panel-inset) * 1.5);
|
| 75 |
}
|
| 76 |
|
| 77 |
.home-card > .home-card-head {
|
|
|
|
| 81 |
min-width: 0;
|
| 82 |
}
|
| 83 |
|
| 84 |
+
/* Only a filled tile repaints card glyphs. An unfilled one keeps the card's primary stroke. */
|
| 85 |
+
.home-card .lp-icon-tile.shell-db-chip :is(.home-card-icon, .home-app-icon, .shell-nav-icon) {
|
| 86 |
color: inherit;
|
| 87 |
opacity: 1;
|
| 88 |
}
|
| 89 |
|
| 90 |
/* Stroke glyphs inherit tile ink; Phosphor keeps its filled path model. */
|
| 91 |
+
.home-card .lp-icon-tile.shell-db-chip :is(.home-card-icon, .home-app-icon, .shell-nav-icon:not(.is-glyph)) {
|
| 92 |
stroke: currentColor;
|
| 93 |
}
|
| 94 |
|
| 95 |
+
/* Phosphor keeps its filled path model on every tile, filled or not. */
|
| 96 |
.home-card .lp-icon-tile .shell-nav-icon.is-glyph {
|
| 97 |
fill: currentColor;
|
| 98 |
stroke: none;
|
web/src/styles/wave59/templates.css
CHANGED
|
@@ -171,8 +171,7 @@
|
|
| 171 |
min-width: 0;
|
| 172 |
}
|
| 173 |
|
| 174 |
-
.home-tpl .home-tpl-categories-title
|
| 175 |
-
.home-tpl .home-tpl-existing-title {
|
| 176 |
margin: 0 0 8px;
|
| 177 |
color: var(--lp-muted);
|
| 178 |
font-size: var(--lp-fs-xs);
|
|
@@ -180,19 +179,27 @@
|
|
| 180 |
}
|
| 181 |
|
| 182 |
.home-tpl .home-tpl-category,
|
| 183 |
-
.home-tpl .home-tpl-
|
| 184 |
-
.home-tpl .home-tpl-
|
| 185 |
-
.home-tpl .home-tpl-quiet,
|
| 186 |
-
.home-tpl .home-tpl-back {
|
| 187 |
appearance: none;
|
| 188 |
border: 0;
|
| 189 |
background: transparent;
|
| 190 |
font: inherit;
|
| 191 |
color: inherit;
|
| 192 |
-
cursor: pointer;
|
| 193 |
text-align: left;
|
| 194 |
}
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
.home-tpl .home-tpl-category {
|
| 197 |
min-height: 36px;
|
| 198 |
padding: 8px 12px;
|
|
@@ -230,32 +237,49 @@
|
|
| 230 |
box-shadow: var(--lp-home-tile-shadow);
|
| 231 |
}
|
| 232 |
|
|
|
|
| 233 |
.home-tpl .home-tpl-card {
|
|
|
|
|
|
|
| 234 |
transform: none;
|
| 235 |
transition: transform var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing);
|
| 236 |
}
|
| 237 |
|
| 238 |
-
.home-tpl .home-tpl-
|
| 239 |
display: flex;
|
| 240 |
flex: 1;
|
| 241 |
flex-direction: column;
|
| 242 |
-
align-items:
|
| 243 |
gap: 8px;
|
| 244 |
width: 100%;
|
| 245 |
min-width: 0;
|
| 246 |
-
padding:
|
| 247 |
-
border-radius:
|
| 248 |
}
|
| 249 |
|
| 250 |
-
.home-tpl .home-tpl-card-
|
| 251 |
-
|
| 252 |
-
|
|
|
|
|
|
|
| 253 |
width: 100%;
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
border-radius: var(--lp-r-md);
|
| 258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
}
|
| 260 |
|
| 261 |
.home-tpl .home-tpl-card-title {
|
|
@@ -274,119 +298,71 @@
|
|
| 274 |
overflow-wrap: anywhere;
|
| 275 |
}
|
| 276 |
|
| 277 |
-
.home-tpl .home-tpl-
|
| 278 |
display: block;
|
|
|
|
| 279 |
overflow: hidden;
|
| 280 |
text-overflow: ellipsis;
|
| 281 |
white-space: nowrap;
|
| 282 |
}
|
| 283 |
|
| 284 |
-
.home-tpl .home-tpl-preview-label,
|
| 285 |
.home-tpl .home-tpl-category-label {
|
| 286 |
color: var(--lp-muted);
|
| 287 |
font-size: var(--lp-fs-2xs);
|
| 288 |
}
|
| 289 |
|
| 290 |
-
.home-tpl .home-tpl-
|
| 291 |
-
color: var(--lp-ink);
|
| 292 |
-
}
|
| 293 |
-
|
| 294 |
-
.home-tpl .home-tpl-card-footer,
|
| 295 |
-
.home-tpl .home-tpl-existing {
|
| 296 |
display: flex;
|
| 297 |
flex-direction: column;
|
| 298 |
align-items: flex-start;
|
| 299 |
gap: 8px;
|
|
|
|
| 300 |
}
|
| 301 |
|
| 302 |
-
.home-tpl .home-tpl-
|
| 303 |
-
.home-tpl .home-tpl-quiet,
|
| 304 |
-
.home-tpl .home-tpl-back {
|
| 305 |
min-height: 36px;
|
| 306 |
max-width: 100%;
|
| 307 |
padding: 8px 12px;
|
| 308 |
border-radius: var(--lp-r-md);
|
| 309 |
-
font-size: var(--lp-fs-xs);
|
| 310 |
-
overflow-wrap: anywhere;
|
| 311 |
-
}
|
| 312 |
-
|
| 313 |
-
.home-tpl .home-tpl-create {
|
| 314 |
-
background: var(--lp-primary);
|
| 315 |
-
color: var(--lp-surface);
|
| 316 |
-
font-weight: var(--lp-fw-semibold);
|
| 317 |
-
}
|
| 318 |
-
|
| 319 |
-
.home-tpl .home-tpl-quiet,
|
| 320 |
-
.home-tpl .home-tpl-back {
|
| 321 |
background: var(--lp-surface-2);
|
| 322 |
color: var(--lp-ink);
|
|
|
|
|
|
|
| 323 |
}
|
| 324 |
|
| 325 |
.home-tpl .home-tpl-category:disabled,
|
| 326 |
-
.home-tpl .home-tpl-create:disabled,
|
| 327 |
.home-tpl .home-tpl-quiet:disabled {
|
| 328 |
opacity: var(--lp-home-disabled-opacity);
|
| 329 |
cursor: not-allowed;
|
| 330 |
}
|
| 331 |
|
| 332 |
-
|
| 333 |
-
.home-tpl .home-tpl-
|
| 334 |
-
|
| 335 |
-
.home-tpl .home-tpl-quiet:focus-visible,
|
| 336 |
-
.home-tpl .home-tpl-back:focus-visible {
|
| 337 |
-
outline: calc(var(--lp-hairline-width) + var(--lp-hairline-width)) solid var(--lp-blue-deep);
|
| 338 |
-
outline-offset: 2px;
|
| 339 |
-
}
|
| 340 |
-
|
| 341 |
-
.home-tpl .home-tpl-detail {
|
| 342 |
-
display: flex;
|
| 343 |
-
flex-direction: column;
|
| 344 |
-
align-items: flex-start;
|
| 345 |
-
gap: var(--lp-home-tile-inset);
|
| 346 |
-
}
|
| 347 |
-
|
| 348 |
-
.home-tpl .home-tpl-detail-layout {
|
| 349 |
-
display: grid;
|
| 350 |
-
grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr);
|
| 351 |
-
align-items: start;
|
| 352 |
-
gap: var(--lp-section-gap);
|
| 353 |
-
width: 100%;
|
| 354 |
-
}
|
| 355 |
-
|
| 356 |
-
.home-tpl .home-tpl-detail-content {
|
| 357 |
-
display: flex;
|
| 358 |
-
flex-direction: column;
|
| 359 |
-
align-items: flex-start;
|
| 360 |
-
gap: 12px;
|
| 361 |
-
min-width: 0;
|
| 362 |
}
|
| 363 |
|
| 364 |
-
.home-tpl .home-tpl-
|
| 365 |
-
|
| 366 |
-
font-size: var(--lp-fs-lg);
|
| 367 |
-
font-weight: var(--lp-fw-semibold);
|
| 368 |
-
overflow-wrap: anywhere;
|
| 369 |
}
|
| 370 |
|
| 371 |
-
.home-tpl .home-tpl-
|
| 372 |
-
|
| 373 |
-
flex-wrap: wrap;
|
| 374 |
-
align-items: center;
|
| 375 |
-
gap: 8px;
|
| 376 |
}
|
| 377 |
|
| 378 |
-
.home-tpl .home-tpl-
|
| 379 |
-
|
|
|
|
|
|
|
|
|
|
| 380 |
}
|
| 381 |
|
| 382 |
-
.home-tpl .home-tpl-
|
| 383 |
-
|
| 384 |
}
|
| 385 |
|
| 386 |
.home-tpl .home-tpl-skeleton-image,
|
| 387 |
.home-tpl .home-tpl-skeleton-name,
|
| 388 |
-
.home-tpl .home-tpl-skeleton-line
|
| 389 |
-
.home-tpl .home-tpl-skeleton-button {
|
| 390 |
display: block;
|
| 391 |
border-radius: var(--lp-r-md);
|
| 392 |
background: var(--lp-surface-2);
|
|
@@ -399,18 +375,19 @@
|
|
| 399 |
|
| 400 |
.home-tpl .home-tpl-skeleton-name { width: 55%; height: 20px; }
|
| 401 |
.home-tpl .home-tpl-skeleton-line { width: 85%; height: 16px; }
|
| 402 |
-
.home-tpl .home-tpl-skeleton-button { width: 80px; height: 36px; }
|
| 403 |
|
| 404 |
@media (hover: hover) and (pointer: fine) {
|
| 405 |
.home-tpl .home-tpl-card[data-creatable="true"]:hover {
|
| 406 |
box-shadow: var(--lp-home-tile-shadow-hover);
|
| 407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
.home-tpl .home-tpl-category:hover:not(:disabled):not([aria-pressed="true"]),
|
| 409 |
-
.home-tpl .home-tpl-quiet:hover:not(:disabled)
|
| 410 |
-
.home-tpl .home-tpl-back:hover {
|
| 411 |
background: var(--lp-wash);
|
| 412 |
}
|
| 413 |
-
.home-tpl .home-tpl-create:hover:not(:disabled) { background: var(--lp-primary-hover); }
|
| 414 |
}
|
| 415 |
|
| 416 |
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
|
|
@@ -424,8 +401,7 @@
|
|
| 424 |
}
|
| 425 |
|
| 426 |
@media (max-width: 760px) {
|
| 427 |
-
.home-tpl .home-tpl-browse,
|
| 428 |
-
.home-tpl .home-tpl-detail-layout { grid-template-columns: minmax(0, 1fr); }
|
| 429 |
.home-tpl .home-tpl-categories { flex-direction: row; flex-wrap: wrap; }
|
| 430 |
.home-tpl .home-tpl-categories-title { width: 100%; margin-bottom: 4px; }
|
| 431 |
}
|
|
|
|
| 171 |
min-width: 0;
|
| 172 |
}
|
| 173 |
|
| 174 |
+
.home-tpl .home-tpl-categories-title {
|
|
|
|
| 175 |
margin: 0 0 8px;
|
| 176 |
color: var(--lp-muted);
|
| 177 |
font-size: var(--lp-fs-xs);
|
|
|
|
| 179 |
}
|
| 180 |
|
| 181 |
.home-tpl .home-tpl-category,
|
| 182 |
+
.home-tpl .home-tpl-pick,
|
| 183 |
+
.home-tpl .home-tpl-quiet {
|
|
|
|
|
|
|
| 184 |
appearance: none;
|
| 185 |
border: 0;
|
| 186 |
background: transparent;
|
| 187 |
font: inherit;
|
| 188 |
color: inherit;
|
|
|
|
| 189 |
text-align: left;
|
| 190 |
}
|
| 191 |
|
| 192 |
+
.home-tpl .home-tpl-category,
|
| 193 |
+
.home-tpl button.home-tpl-pick,
|
| 194 |
+
.home-tpl .home-tpl-quiet {
|
| 195 |
+
cursor: pointer;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
/* The selected section tab reads as ink on the blue tint, like the selected category chip. */
|
| 199 |
+
.home-tpl .home-layout-btn.is-on {
|
| 200 |
+
color: var(--lp-ink);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
.home-tpl .home-tpl-category {
|
| 204 |
min-height: 36px;
|
| 205 |
padding: 8px 12px;
|
|
|
|
| 237 |
box-shadow: var(--lp-home-tile-shadow);
|
| 238 |
}
|
| 239 |
|
| 240 |
+
/* The card body is the click target, so the inset moves from the card onto the body. */
|
| 241 |
.home-tpl .home-tpl-card {
|
| 242 |
+
gap: 0;
|
| 243 |
+
padding: 0;
|
| 244 |
transform: none;
|
| 245 |
transition: transform var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing);
|
| 246 |
}
|
| 247 |
|
| 248 |
+
.home-tpl .home-tpl-pick {
|
| 249 |
display: flex;
|
| 250 |
flex: 1;
|
| 251 |
flex-direction: column;
|
| 252 |
+
align-items: flex-start;
|
| 253 |
gap: 8px;
|
| 254 |
width: 100%;
|
| 255 |
min-width: 0;
|
| 256 |
+
padding: var(--lp-home-tile-inset);
|
| 257 |
+
border-radius: inherit;
|
| 258 |
}
|
| 259 |
|
| 260 |
+
.home-tpl .home-tpl-card-head {
|
| 261 |
+
display: flex;
|
| 262 |
+
align-items: flex-start;
|
| 263 |
+
justify-content: space-between;
|
| 264 |
+
gap: 8px;
|
| 265 |
width: 100%;
|
| 266 |
+
min-width: 0;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
/* A text cue, never a fill. Add and Added share one box, so the press changes colour only. */
|
| 270 |
+
.home-tpl .home-tpl-cue {
|
| 271 |
+
flex-shrink: 0;
|
| 272 |
+
padding: 2px 8px;
|
| 273 |
border-radius: var(--lp-r-md);
|
| 274 |
+
color: var(--lp-freeze-navy);
|
| 275 |
+
font-size: var(--lp-fs-xs);
|
| 276 |
+
font-weight: var(--lp-fw-semibold);
|
| 277 |
+
white-space: nowrap;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.home-tpl .home-tpl-cue[data-added="true"] {
|
| 281 |
+
background: var(--lp-green-tint);
|
| 282 |
+
color: var(--lp-green-deep);
|
| 283 |
}
|
| 284 |
|
| 285 |
.home-tpl .home-tpl-card-title {
|
|
|
|
| 298 |
overflow-wrap: anywhere;
|
| 299 |
}
|
| 300 |
|
| 301 |
+
.home-tpl .home-tpl-pick .home-tpl-description {
|
| 302 |
display: block;
|
| 303 |
+
width: 100%;
|
| 304 |
overflow: hidden;
|
| 305 |
text-overflow: ellipsis;
|
| 306 |
white-space: nowrap;
|
| 307 |
}
|
| 308 |
|
|
|
|
| 309 |
.home-tpl .home-tpl-category-label {
|
| 310 |
color: var(--lp-muted);
|
| 311 |
font-size: var(--lp-fs-2xs);
|
| 312 |
}
|
| 313 |
|
| 314 |
+
.home-tpl .home-tpl-card-footer {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
display: flex;
|
| 316 |
flex-direction: column;
|
| 317 |
align-items: flex-start;
|
| 318 |
gap: 8px;
|
| 319 |
+
padding: 0 var(--lp-home-tile-inset) var(--lp-home-tile-inset);
|
| 320 |
}
|
| 321 |
|
| 322 |
+
.home-tpl .home-tpl-quiet {
|
|
|
|
|
|
|
| 323 |
min-height: 36px;
|
| 324 |
max-width: 100%;
|
| 325 |
padding: 8px 12px;
|
| 326 |
border-radius: var(--lp-r-md);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
background: var(--lp-surface-2);
|
| 328 |
color: var(--lp-ink);
|
| 329 |
+
font-size: var(--lp-fs-xs);
|
| 330 |
+
overflow-wrap: anywhere;
|
| 331 |
}
|
| 332 |
|
| 333 |
.home-tpl .home-tpl-category:disabled,
|
|
|
|
| 334 |
.home-tpl .home-tpl-quiet:disabled {
|
| 335 |
opacity: var(--lp-home-disabled-opacity);
|
| 336 |
cursor: not-allowed;
|
| 337 |
}
|
| 338 |
|
| 339 |
+
/* While one card works, the others dim and the working card keeps full ink. */
|
| 340 |
+
.home-tpl button.home-tpl-pick:disabled {
|
| 341 |
+
cursor: not-allowed;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
}
|
| 343 |
|
| 344 |
+
.home-tpl button.home-tpl-pick[aria-busy="true"] {
|
| 345 |
+
cursor: progress;
|
|
|
|
|
|
|
|
|
|
| 346 |
}
|
| 347 |
|
| 348 |
+
.home-tpl .home-tpl-card:has(> button.home-tpl-pick:disabled:not([aria-busy="true"])) {
|
| 349 |
+
opacity: var(--lp-home-disabled-opacity);
|
|
|
|
|
|
|
|
|
|
| 350 |
}
|
| 351 |
|
| 352 |
+
.home-tpl .home-tpl-category:focus-visible,
|
| 353 |
+
.home-tpl .home-tpl-quiet:focus-visible,
|
| 354 |
+
.home-tpl .home-tpl-card:has(> .home-tpl-pick:focus-visible) {
|
| 355 |
+
outline: calc(var(--lp-hairline-width) + var(--lp-hairline-width)) solid var(--lp-blue-deep);
|
| 356 |
+
outline-offset: 2px;
|
| 357 |
}
|
| 358 |
|
| 359 |
+
.home-tpl .home-tpl-pick:focus-visible {
|
| 360 |
+
outline: none;
|
| 361 |
}
|
| 362 |
|
| 363 |
.home-tpl .home-tpl-skeleton-image,
|
| 364 |
.home-tpl .home-tpl-skeleton-name,
|
| 365 |
+
.home-tpl .home-tpl-skeleton-line {
|
|
|
|
| 366 |
display: block;
|
| 367 |
border-radius: var(--lp-r-md);
|
| 368 |
background: var(--lp-surface-2);
|
|
|
|
| 375 |
|
| 376 |
.home-tpl .home-tpl-skeleton-name { width: 55%; height: 20px; }
|
| 377 |
.home-tpl .home-tpl-skeleton-line { width: 85%; height: 16px; }
|
|
|
|
| 378 |
|
| 379 |
@media (hover: hover) and (pointer: fine) {
|
| 380 |
.home-tpl .home-tpl-card[data-creatable="true"]:hover {
|
| 381 |
box-shadow: var(--lp-home-tile-shadow-hover);
|
| 382 |
}
|
| 383 |
+
.home-tpl .home-tpl-card[data-creatable="true"]:hover .home-tpl-cue[data-added="false"] {
|
| 384 |
+
text-decoration: underline;
|
| 385 |
+
text-underline-offset: 2px;
|
| 386 |
+
}
|
| 387 |
.home-tpl .home-tpl-category:hover:not(:disabled):not([aria-pressed="true"]),
|
| 388 |
+
.home-tpl .home-tpl-quiet:hover:not(:disabled) {
|
|
|
|
| 389 |
background: var(--lp-wash);
|
| 390 |
}
|
|
|
|
| 391 |
}
|
| 392 |
|
| 393 |
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
|
|
|
|
| 401 |
}
|
| 402 |
|
| 403 |
@media (max-width: 760px) {
|
| 404 |
+
.home-tpl .home-tpl-browse { grid-template-columns: minmax(0, 1fr); }
|
|
|
|
| 405 |
.home-tpl .home-tpl-categories { flex-direction: row; flex-wrap: wrap; }
|
| 406 |
.home-tpl .home-tpl-categories-title { width: 100%; margin-bottom: 4px; }
|
| 407 |
}
|
web/src/ui/IconTile.tsx
CHANGED
|
@@ -5,13 +5,19 @@ import "../styles/sdlc80/icon-tile.css";
|
|
| 5 |
|
| 6 |
export type IconTileSurface = "home" | "home-card" | "starred" | "rail" | "template";
|
| 7 |
|
| 8 |
-
/**
|
| 9 |
-
export
|
|
|
|
|
|
|
|
|
|
| 10 |
children: ReactNode;
|
| 11 |
icon?: FolderIcon;
|
| 12 |
surface?: IconTileSurface;
|
|
|
|
| 13 |
}) {
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
data-icon-tile={surface} aria-hidden="true">
|
| 16 |
{children}
|
| 17 |
</span>;
|
|
|
|
| 5 |
|
| 6 |
export type IconTileSurface = "home" | "home-card" | "starred" | "rail" | "template";
|
| 7 |
|
| 8 |
+
/** `chip` is the filled database chip, `tint` the light app chip, `none` paints no background. */
|
| 9 |
+
export type IconTileFill = "chip" | "tint" | "none";
|
| 10 |
+
|
| 11 |
+
/** Object tiles share their frame; each surface owns one size token and each call its fill. */
|
| 12 |
+
export function IconTile({ children, icon, surface = "home", fill = "none" }: {
|
| 13 |
children: ReactNode;
|
| 14 |
icon?: FolderIcon;
|
| 15 |
surface?: IconTileSurface;
|
| 16 |
+
fill?: IconTileFill;
|
| 17 |
}) {
|
| 18 |
+
// `tint` reuses the app chip class so the tile keeps that chip's background and ink.
|
| 19 |
+
const fillClass = fill === "chip" ? dbChipClass(icon) + " " : fill === "tint" ? "home-app-glyph " : "";
|
| 20 |
+
return <span className={fillClass + "lp-icon-tile lp-icon-tile--" + surface}
|
| 21 |
data-icon-tile={surface} aria-hidden="true">
|
| 22 |
{children}
|
| 23 |
</span>;
|