1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-04-14 01:32:32 -04:00

Support restoring preferences via new prefs param

Fixes #1352
Fixes #553
Fixes #249
This commit is contained in:
Zed
2026-02-09 20:23:31 +01:00
parent 5d28bd18c6
commit db36f75519
9 changed files with 107 additions and 14 deletions

View File

@@ -32,7 +32,8 @@ macro renderPrefs*(): untyped =
result[2].add stmt
proc renderPreferences*(prefs: Prefs; path: string; themes: seq[string]): VNode =
proc renderPreferences*(prefs: Prefs; path: string; themes: seq[string];
prefsUrl: string): VNode =
buildHtml(tdiv(class="overlay-panel")):
fieldset(class="preferences"):
form(`method`="post", action="/saveprefs", autocomplete="off"):
@@ -40,6 +41,12 @@ proc renderPreferences*(prefs: Prefs; path: string; themes: seq[string]): VNode
renderPrefs()
legend: text "Bookmark"
p(class="bookmark-note"):
text "Save this URL to restore your preferences (?prefs works on all pages)"
pre(class="prefs-code"):
text prefsUrl
h4(class="note"):
text "Preferences are stored client-side using cookies without any personal information."