Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.1.0 — 2026-05-05

### Added
- PWA: persist frontmatter toggle, comments toggle and comment depth across reloads via `localStorage` (keys `pullmd-frontmatter`, `pullmd-comments`, `pullmd-comment-depth`). Closes #20.

## v2.0.0 — 2026-XX-XX

**Breaking:** PullMD now supports an authentication system. Existing installs keep working unchanged (default `PULLMD_AUTH_MODE=disabled`); operators who want auth must follow [`MIGRATION.md`](./MIGRATION.md).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pullmd",
"version": "2.0.0",
"version": "2.1.0",
"type": "module",
"main": "server.js",
"license": "AGPL-3.0-or-later",
Expand Down
23 changes: 23 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,29 @@ <h2 data-i18n="section.recent">Letzte Abrufe</h2>
}
}

(function restorePwaControls() {
try {
var v = localStorage.getItem('pullmd-comments');
if (v !== null) commentsToggle.checked = v === 'true';
v = localStorage.getItem('pullmd-frontmatter');
if (v !== null) frontmatterToggle.checked = v === 'true';
v = localStorage.getItem('pullmd-comment-depth');
if (v !== null) {
var n = parseInt(v, 10);
if (n >= 1 && n <= 10) depthInput.value = String(n);
}
} catch (e) {}
})();
commentsToggle.addEventListener('change', function () {
try { localStorage.setItem('pullmd-comments', String(commentsToggle.checked)); } catch (e) {}
});
frontmatterToggle.addEventListener('change', function () {
try { localStorage.setItem('pullmd-frontmatter', String(frontmatterToggle.checked)); } catch (e) {}
});
depthInput.addEventListener('change', function () {
try { localStorage.setItem('pullmd-comment-depth', depthInput.value); } catch (e) {}
});

function updateDepthVisibility() {
depthLabel.style.display = commentsToggle.checked ? '' : 'none';
}
Expand Down
2 changes: 1 addition & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CACHE_NAME = 'pullmd-v18';
const CACHE_NAME = 'pullmd-v19';
const SHELL_URLS = ['/', '/index.html', '/manifest.json'];

self.addEventListener('install', (event) => {
Expand Down
Loading