Commit Graph

39 Commits

Author SHA1 Message Date
Julien Calixte
9f75e7971d fix(layout): cache pageWidth in localStorage to avoid render glitch
The page width from .remanso.json was only applied after an async
PouchDB + network fetch, so notes briefly rendered at the default
500px before snapping to the configured value. Persist pageWidth
alongside the existing font cache (key renamed to remanso:layout:*),
so it is read synchronously during setUserRepo and applied before
the first render. Also always reset --note-width with a default
fallback to prevent stale values leaking across repo navigation.
2026-04-26 13:44:10 +02:00
Julien Calixte
e03ff49764 fix(mobile): restore overflow-y and unstick readme on vertical scroll
- Restore explicit overflow-y:auto on #main-app for mobile (removed in
  63f5d64) — implicit coercion from overflow-x:auto is not reliable in
  all Safari/WebKit versions.
- Override position:sticky on .readme to position:relative on mobile.
  The desktop sticky (left:0) is correct for horizontal scroll, but on
  mobile vertical scroll it pinned the 100dvh-tall readme across the
  entire viewport, hiding all stacked notes behind it.
2026-04-24 23:42:22 +02:00
Julien Calixte
e369541dc0 refactor: scope PouchDB writes to repo config, not user font prefs
chosen* fields are per-browser preferences — localStorage is the correct
and sufficient store for them. Removing data.update from font setters and
stripping chosen* from the GitHub fetch PouchDB write prevents stale PouchDB
data from conflicting with localStorage on reload.
2026-04-06 23:26:50 +02:00
Julien Calixte
73a6014750 fix: persist font selections across navigation and page reloads
- Use v-model with writable computeds instead of :value+@change so selects
  re-sync when the options list changes asynchronously
- Always include currently chosen fonts in sortedFontFamilies so a selected
  font not present in .remanso.json fontFamilies still shows in the select
- Initialize userSettings instead of returning early in font setters so
  changes made before async GitHub fetch completes are not silently dropped
- Back font choices with localStorage so they survive hard reloads even when
  PouchDB/IndexedDB fails silently in the web worker
2026-04-06 18:51:27 +02:00
Julien Calixte
99c349f6df fix: preserve font settings when repo has no .remanso.json
When no config file exists, userSettings was set to null which destroyed
cached user preferences and silently blocked all setFont* actions.
2026-04-04 14:39:34 +02:00
Julien Calixte
b003a3e008 perf: move PouchDB/IndexedDB operations to a Web Worker
All database reads and writes now run off the main thread via a
dedicated worker, eliminating IndexedDB overhead from the frame budget.

- Create data.worker.ts exposing the Data class via Comlink
- Refactor data.ts to export a Comlink-wrapped proxy and a standalone
  generateId() pure function (workers can't expose sync methods cleanly)
- Update all 10 call sites to import generateId directly instead of
  calling data.generateId()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:27:45 +02:00
Julien Calixte
1b5e23e3d4 fix: keep font settings visible during repo navigation
- resetFiles() no longer clears userSettings so FontChange stays visible
  while navigating between repos (old fonts show until new ones load)
- Add _requestId counter to setUserRepo() to discard stale async callbacks
  from previous navigations, preventing state corruption on quick nav
- Load savedRepo and userSettings caches in parallel with Promise.all,
  reducing yield points so cache hits apply before first render

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:21:56 +02:00
Julien Calixte
20e9538983 feat: mv profile to footer 2026-03-28 20:24:08 +01:00
Julien Calixte
5f48aa5690 chore: lint and fmt 2026-03-28 09:38:55 +01:00
Julien Calixte
b93dfbd824 perf: run on nextTick only if necessary 2025-07-12 17:39:00 +02:00
Julien Calixte
df250750e5 feat: add chosen font size 2025-07-06 15:49:58 +02:00
Julien Calixte
b2250b2b95 feat: add fontFamilies array 2025-07-06 11:23:15 +02:00
Julien Calixte
0fe71068e7 upgrade typescript 2024-11-26 22:00:56 +01:00
Julien Calixte
ffa7c42021 fix: more resilient saved to avoid conflict. (no need to add the README main file when saveCacheNote) 2024-10-27 12:07:32 +01:00
Julien Calixte
941f867031 cache all notes 2024-09-01 22:27:51 +02:00
Julien Calixte
df25634b98 add a method to cache all files when necessary 2024-09-01 00:36:13 +02:00
Julien Calixte
b4a7571b8a Sep 1, 2024, 12:02 AM 2024-08-31 22:02:18 +00:00
Julien Calixte
b9a14e205f refacto: more consistent code 2024-07-19 20:11:41 +02:00
Julien Calixte
15296b8832 Now files from repo are cached to be quickly retrieved even offline 2024-07-19 20:05:42 +02:00
Julien Calixte
c7ea52c7f8 add path to new inbox file in pinia store
Not ideal to have data in multiple store (pinia and PouchDB) but it work this way. May need a refactoring.
2023-11-26 10:35:38 +01:00
Julien Calixte
1d21ac50b2 ️ (user settings) cache user settings 2023-09-11 23:02:52 +02:00
Julien Calixte
4adaad8683 lower timeout time 2023-09-09 20:45:43 +02:00
Julien Calixte
c249fb886a ️ (user settings) eager api call 2023-08-28 23:55:41 +02:00
Julien Calixte
bd9d97b0af trying to be as little blocking as possible 2023-08-17 20:06:32 +02:00
Julien Calixte
780eaeb7f7 reset stacked note on click 2023-08-14 18:57:17 +02:00
Julien Calixte
2cab8c8e3f autoimport with eslint now 2023-08-14 18:04:27 +02:00
Julien Calixte
111794a40b display if readme is from cache or network 2023-08-13 21:22:33 +02:00
Julien Calixte
656e4b14a9 store has a first copy of readme from cache is no waiting 2023-08-13 21:07:17 +02:00
Julien Calixte
a0f62bf6fa 🔊 (refresh token) try catch refresh token 2021-11-16 22:46:02 +01:00
Julien Calixte
5f272a44bb ♻️ (authentication) 2021-05-27 13:24:55 +02:00
Julien Calixte
6a5e7a9d63 🚨 2021-05-09 01:12:01 +02:00
Julien Calixte
a9fba33760 🚨 (app) 2021-05-08 14:46:12 +02:00
4f4d4e2024 🐛 (user repo) refresh token before getting files 2021-05-06 00:03:02 +02:00
Julien Calixte
d33fa18b9c 🐛 (refresh) refresh correct token 2021-05-02 18:33:46 +02:00
373ba812f5 (litenote config) implement dark mode on notes
Closes #5
2021-03-27 17:00:50 +01:00
935acb6813 🐛 (user settings) reset user settings with tree 2021-03-24 22:48:13 +01:00
556ddb7f1e (user settings) init user settings with .litenote.json 2021-03-24 22:35:41 +01:00
55faf04d4f 🐛 (flux) listen to click day 1 2021-03-24 21:45:57 +01:00
e199c68d68 ♻️ (store) use a store to store readme and files 2021-03-24 21:23:23 +01:00