mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
phone app: installable, opens offline, takes the share sheet onto the scratchpad, back lets go of one thing
A manifest with a 192, a 512 and a maskable icon, and a hand-written service worker built beside the app by a small vite plugin: it keeps index.html, the logo, the entry with its imports and the latin fonts, keeps each hashed asset once fetched, asks the server for pages first and answers from the cache when it is down, and never touches /api. The CSP names worker-src and manifest-src. The share target posts to /share, which the worker catches: the text waits in a cache and becomes a scratchpad note once someone is logged in, with the drawer down on it. On a touch screen one guard entry in the history makes back let go of one thing at a time — a prompt, the line, a sheet, the drawer, the editor, a tile, then a folder up — and leave only at a space's root. The bar and the band grow by the safe-area insets. The login no longer says the server is unreachable once it answers again with the session gone.
This commit is contained in:
1 parent
9363a0024d
commit
a27d5de9c7
23 files changed
+377
-26
No files matched your search
+15
-1
@@ -205,7 +205,9 @@ curl -H "Authorization: Bearer nwc_…" -H 'content-type: application/json' \
|
||||
-d '{"text":"call the bank"}' https://your-host/api/capture
|
||||
```
|
||||
|
||||
The token can do this and nothing else. See [Capture](Capture.md).
|
||||
The token can do this and nothing else. On Android the installed app needs no
|
||||
token: share to it, and the text is a note on the scratchpad. See
|
||||
[Capture](Capture.md) and [On a phone](#on-a-phone).
|
||||
|
||||
## Evening: the diary
|
||||
|
||||
@@ -251,3 +253,15 @@ has a done button on each card.
|
||||
|  |  |
|
||||
|
||||
`:set vim` turns the vim keys on for a phone with a keyboard.
|
||||
|
||||
Over HTTPS the browser offers to install the workspace as an app (Chrome's
|
||||
menu: *Install app*, or *Add to Home screen*). Installed, it opens from its own
|
||||
icon, and with no network it still opens, to say the server cannot be reached.
|
||||
Back lets go of one thing at a time, as `Esc` does — a sheet, the scratchpad,
|
||||
the editor, the document, then a folder up — and only at the root of a space
|
||||
leaves the app.
|
||||
|
||||
On Android the installed app is in the share sheet. A link or some text shared
|
||||
to it becomes a note on the scratchpad, the title on its first line; the drawer
|
||||
comes down with it on top, ready to be kept, made a card or put at the end of a
|
||||
document. A share made while logged out waits for the login.
|
||||
Reference in new issue
Block a user