Online defaults to order:hot, with an Account toggle
New online_hot_default preference (on by default, so guests and accounts that never saved preferences get it): opening /online without a search replaces the URL with ?tags=order:hot — e621's metatag for the order the Hot page uses — so it is visible in the search field and shareable. Existing searches are never touched: they live in the URL, so a refresh or back/forward keeps them, while a fresh visit (nav pill, first time, after a long time away) gets the hot default again. Turning the toggle off opens Online on the site-wide newest posts as before. The toggle sits in Account -> Browsing preferences and saves with the rest of the settings; the backend validates the new boolean (400 for non-boolean input).
This commit is contained in:
@@ -170,6 +170,28 @@ export function PreferencesCard() {
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label className="flex items-start gap-2 text-sm text-ctp-subtext0">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={values.online_hot_default ?? true}
|
||||
onChange={(event) =>
|
||||
setValues((current) => ({
|
||||
...current,
|
||||
online_hot_default: event.target.checked,
|
||||
}))
|
||||
}
|
||||
className="mt-0.5 accent-ctp-mauve"
|
||||
/>
|
||||
<span>
|
||||
Online starts with{" "}
|
||||
<span className="font-mono text-ctp-blue">order:hot</span>
|
||||
<span className="mt-0.5 block text-[11px] leading-relaxed text-ctp-overlay0">
|
||||
Used when you open Online without a search. With it off, Online
|
||||
opens on the site-wide newest posts.
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<Button onClick={() => void handleSave()} disabled={saving}>
|
||||
{saving ? "Saving…" : "Save preferences"}
|
||||
|
||||
Reference in New Issue
Block a user