mirror of
https://github.com/JoshiCodes/knock.git
synced 2026-12-04 15:29:40 +01:00
Design pass: fewer boxes, one emphasis signal, type glyphs in the JSON form
- Welcome screen: the mark as a peephole and actions as plain lines instead of a card grid and key chips - Title bar: search as a small button, documentation (F1) next to it; help entries in the command palette - The vertical cyan rule marks what needs attention (redirect URI, inactive environment, banners) instead of nested framed boxes - JSON form: fixed key column so types and values line up at any depth, type glyphs in the code view's colours, row actions float on hover - Crisper corners; Send carries the mark; Saved instead of a disabled Save button - Open tabs are restored after a restart again
This commit is contained in:
@@ -108,7 +108,10 @@ class Workspace {
|
||||
// ------------------------------------------------------------ collections
|
||||
|
||||
async restore() {
|
||||
// Read everything first: opening a collection saves the (still empty) tab list.
|
||||
const open: string[] = load('knock.open', []);
|
||||
const savedTabs: { kind: TabKind; col: string | null; id: string | null }[] = load('knock.tabs', []);
|
||||
const active = load<string | null>('knock.activeTab', null);
|
||||
for (const root of open) {
|
||||
try {
|
||||
this.upsert(await api.collectionOpen(root));
|
||||
@@ -116,12 +119,11 @@ class Workspace {
|
||||
/* folder moved or deleted; it simply is not reopened */
|
||||
}
|
||||
}
|
||||
const savedTabs: { kind: TabKind; col: string | null; id: string | null }[] = load('knock.tabs', []);
|
||||
for (const t of savedTabs) {
|
||||
if (t.kind === 'request' && t.col && t.id) await this.openRequest(t.col, t.id, false);
|
||||
}
|
||||
const active = load<string | null>('knock.activeTab', null);
|
||||
if (active && this.tabs.some((t) => t.key === active)) this.activeKey = active;
|
||||
this.persistOpen();
|
||||
}
|
||||
|
||||
persistOpen() {
|
||||
|
||||
Reference in New Issue
Block a user