mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
feat: spaces, folder import, boards and mail; rename to narl-workspace
The diary grows into a workspace: a flat list of dated entries becomes a tree of spaces, and the app is renamed to match what it now is. Spaces and nodes One recursive `nodes` table replaces `entries`: a space is a root node, and folders and documents nest under it without limit. Entries keep their ids through the migration, so share tokens, media links and the drafts in localStorage all still resolve. Folder import A folder or a zip is uploaded as a document tree. Markdown becomes documents titled from their first heading, everything else becomes media, and relative links between the imported files are rewritten to the paths they landed at, so a set of cross-linked notes stays navigable after the upload. Boards A kanban board per space, with the space as the board: lists, cards, due dates and an optional link to a document. `diary` has none. Mail SMTP notifications through an outbox. A mail is enqueued under a key naming the occurrence it belongs to, so a restart cannot resend and a relay that refuses is retried with a widening backoff. Four kinds: the diary reminder, cards due and overdue, a weekly digest, and logins from a browser that has not been seen before or a burst of failures. All of it is dormant until WORKSPACE_SMTP_URL is set. Rename Everything user-visible says workspace; everything that already exists outside this repo keeps its name, because renaming it would break a running deployment for tidiness alone: the database file, the docker volume, the session cookie, the Proton device, the keyring entry and the localStorage keys. Configuration reads WORKSPACE_* first and falls back to DIARY_*, so the deployed .env keeps working untouched.
This commit is contained in:
1 parent
76f0887ac5
commit
49b2056215
50 files changed
+5487
-972
No files matched your search
+40
-12
@@ -1,26 +1,44 @@
|
||||
<script lang="ts">
|
||||
import { commands, groups, type CommandSpec, type Group } from './commands'
|
||||
import { diary } from './store.svelte'
|
||||
import { workspace } from './store.svelte'
|
||||
|
||||
const keys: [string, string][] = [
|
||||
['j / k · ↓ ↑', 'move down / up the entry list'],
|
||||
['gg / G', 'first / last entry'],
|
||||
['Enter · l', 'open the highlighted entry'],
|
||||
['o', 'new entry, straight into insert mode'],
|
||||
['i · a', 'edit the open entry'],
|
||||
['Esc · h · q', 'back out to the list'],
|
||||
['/', 'full-text search'],
|
||||
['j / k · ↓ ↑', 'move down / up the list'],
|
||||
['gg / G', 'first / last row'],
|
||||
['Enter · l', 'open a document, or enter a folder'],
|
||||
['h', 'up one level, or back out of a document'],
|
||||
['o', 'new document here, straight into insert mode'],
|
||||
['O', 'new folder here'],
|
||||
['i · a', 'edit the open document'],
|
||||
['Esc · q', 'back out to the list'],
|
||||
['/', 'full-text search, inside the current space'],
|
||||
['n', 'clear the search'],
|
||||
['s', 'toggle sharing for the entry'],
|
||||
['s', 'toggle sharing for the document'],
|
||||
['y', 'mint a new share link and copy it'],
|
||||
['x · dd', 'delete the entry (asks first)'],
|
||||
['x · dd', 'delete what is selected (asks first)'],
|
||||
[':', 'command line'],
|
||||
['Ctrl-S', 'save, from anywhere'],
|
||||
['?', 'this screen — in the editor too'],
|
||||
]
|
||||
|
||||
/* The board rebinds most keys, so it gets its own column rather than
|
||||
footnotes on the list keys. */
|
||||
const boardKeys: [string, string][] = [
|
||||
['h / l', 'to the list left / right'],
|
||||
['j / k', 'down / up the cards'],
|
||||
['J / K', 'move the card down / up its list'],
|
||||
['H / L', 'move the card to the list left / right'],
|
||||
['Enter', 'open the document the card links to'],
|
||||
['t · Space', 'tick the card off, or un-tick it'],
|
||||
['o', 'new card on this list'],
|
||||
['x', 'delete the card (asks first)'],
|
||||
['q · Esc', 'back to the tree'],
|
||||
]
|
||||
|
||||
const titles: Record<Group, string> = {
|
||||
entries: 'entries',
|
||||
tree: 'spaces & folders',
|
||||
board: 'boards',
|
||||
documents: 'documents',
|
||||
editing: 'writing',
|
||||
sharing: 'sharing & export',
|
||||
view: 'session',
|
||||
@@ -39,7 +57,7 @@
|
||||
<header>
|
||||
<span class="accent">:help</span>
|
||||
<span class="faint">everything is a key or a `:` command</span>
|
||||
<button onclick={() => (diary.overlay = 'none')}>esc</button>
|
||||
<button onclick={() => (workspace.overlay = 'none')}>esc</button>
|
||||
</header>
|
||||
|
||||
<div class="cols">
|
||||
@@ -53,6 +71,16 @@
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="keys">
|
||||
<h2>board keys</h2>
|
||||
<dl>
|
||||
{#each boardKeys as [key, description] (key)}
|
||||
<dt>{key}</dt>
|
||||
<dd>{description}</dd>
|
||||
{/each}
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
{#each grouped as [group, specs] (group)}
|
||||
<section>
|
||||
<h2>{titles[group]}</h2>
|
||||
|
||||
Reference in new issue
Block a user