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:
@@ -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."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user