mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-23 03:45:36 +00:00
Remove Location field autofocus from search panel
This commit is contained in:
parent
310b0ab9a1
commit
096d44856f
|
@ -55,12 +55,12 @@ proc genCheckbox*(pref, label: string; state: bool): VNode =
|
||||||
else: input(name=pref, `type`="checkbox")
|
else: input(name=pref, `type`="checkbox")
|
||||||
span(class="checkbox")
|
span(class="checkbox")
|
||||||
|
|
||||||
proc genInput*(pref, label, state, placeholder: string; class=""): VNode =
|
proc genInput*(pref, label, state, placeholder: string; class=""; autofocus=true): VNode =
|
||||||
let p = placeholder
|
let p = placeholder
|
||||||
buildHtml(tdiv(class=("pref-group pref-input " & class))):
|
buildHtml(tdiv(class=("pref-group pref-input " & class))):
|
||||||
if label.len > 0:
|
if label.len > 0:
|
||||||
label(`for`=pref): text label
|
label(`for`=pref): text label
|
||||||
if state.len == 0:
|
if autofocus and state.len == 0:
|
||||||
input(name=pref, `type`="text", placeholder=p, value=state, autofocus="")
|
input(name=pref, `type`="text", placeholder=p, value=state, autofocus="")
|
||||||
else:
|
else:
|
||||||
input(name=pref, `type`="text", placeholder=p, value=state)
|
input(name=pref, `type`="text", placeholder=p, value=state)
|
||||||
|
|
|
@ -88,7 +88,7 @@ proc renderSearchPanel*(query: Query): VNode =
|
||||||
genDate("until", query.until)
|
genDate("until", query.until)
|
||||||
tdiv:
|
tdiv:
|
||||||
span(class="search-title"): text "Near"
|
span(class="search-title"): text "Near"
|
||||||
genInput("near", "", query.near, placeholder="Location...")
|
genInput("near", "", query.near, "Location...", autofocus=false)
|
||||||
|
|
||||||
proc renderTweetSearch*(results: Result[Tweet]; prefs: Prefs; path: string;
|
proc renderTweetSearch*(results: Result[Tweet]; prefs: Prefs; path: string;
|
||||||
pinned=none(Tweet)): VNode =
|
pinned=none(Tweet)): VNode =
|
||||||
|
|
Loading…
Reference in a new issue