mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Support restoring preferences via new prefs param
Fixes #1352 Fixes #553 Fixes #249
This commit is contained in:
parent
5d28bd18c6
commit
db36f75519
9 changed files with 107 additions and 14 deletions
|
|
@ -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."
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue