fix: change browse sort from desc to asc

This commit is contained in:
2026-06-12 10:37:50 +02:00
parent c252739610
commit 90ae58b99e
4 changed files with 6 additions and 6 deletions

View File

@@ -68,8 +68,8 @@ func (h *AnimeHandler) commandPaletteNavigationItems(query string) []commandPale
all := []commandPaletteItem{ all := []commandPaletteItem{
{ID: "nav:discover", Type: "navigation", Label: "Go to Discover", Subtitle: "Navigation", Href: "/discover", Icon: "compass"}, {ID: "nav:discover", Type: "navigation", Label: "Go to Discover", Subtitle: "Navigation", Href: "/discover", Icon: "compass"},
{ID: "nav:watchlist", Type: "navigation", Label: "Go to Watchlist", Subtitle: "Navigation", Href: "/watchlist", Icon: "bookmark"}, {ID: "nav:watchlist", Type: "navigation", Label: "Go to Watchlist", Subtitle: "Navigation", Href: "/watchlist", Icon: "bookmark"},
{ID: "nav:popular", Type: "navigation", Label: "Browse popular", Subtitle: "Browse", Href: "/browse?order_by=popularity&sort=desc", Icon: "trending"}, {ID: "nav:popular", Type: "navigation", Label: "Browse popular", Subtitle: "Browse", Href: "/browse?order_by=popularity&sort=asc", Icon: "trending"},
{ID: "nav:airing", Type: "navigation", Label: "Currently airing", Subtitle: "Browse", Href: "/browse?status=airing&order_by=popularity&sort=desc", Icon: "play"}, {ID: "nav:airing", Type: "navigation", Label: "Currently airing", Subtitle: "Browse", Href: "/browse?status=airing&order_by=popularity&sort=asc", Icon: "play"},
} }
if query == "" { if query == "" {
return all return all

View File

@@ -20,7 +20,7 @@
<p class="text-sm">Try clearing filters or browsing whats popular.</p> <p class="text-sm">Try clearing filters or browsing whats popular.</p>
<div class="mt-2 flex gap-2"> <div class="mt-2 flex gap-2">
<a href="/browse" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Clear filters</a> <a href="/browse" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Clear filters</a>
<a href="/browse?order_by=popularity&sort=desc" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse popular</a> <a href="/browse?order_by=popularity&sort=asc" class=" inline-flex h-10 items-center justify-center bg-background-button px-4 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Browse popular</a>
</div> </div>
</div> </div>
{{else}} {{else}}

View File

@@ -56,7 +56,7 @@
<section class="flex flex-col gap-4"> <section class="flex flex-col gap-4">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<h2 class="text-base font-normal text-foreground">Trending This Season</h2> <h2 class="text-base font-normal text-foreground">Trending This Season</h2>
<a href="/browse?order_by=popularity&sort=desc" class="text-sm text-foreground-muted transition-colors hover:text-foreground">View all</a> <a href="/browse?order_by=popularity&sort=asc" class="text-sm text-foreground-muted transition-colors hover:text-foreground">View all</a>
</div> </div>
<div hx-get="/api/discover/trending" hx-trigger="load" hx-swap="outerHTML"> <div hx-get="/api/discover/trending" hx-trigger="load" hx-swap="outerHTML">
{{template "discover_skeleton"}} {{template "discover_skeleton"}}

View File

@@ -14,7 +14,7 @@
<section class="w-full"> <section class="w-full">
<div class="mb-4 flex items-end justify-between"> <div class="mb-4 flex items-end justify-between">
<h2 class="text-base font-normal text-foreground">Currently Airing</h2> <h2 class="text-base font-normal text-foreground">Currently Airing</h2>
<a href="/browse?status=airing&order_by=popularity&sort=desc" class="group flex items-center gap-1 text-sm text-foreground-muted transition-colors hover:text-foreground"> <a href="/browse?status=airing&order_by=popularity&sort=asc" class="group flex items-center gap-1 text-sm text-foreground-muted transition-colors hover:text-foreground">
See more See more
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="transition-transform group-hover:translate-x-0.5"><path d="m9 18 6-6-6-6"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="transition-transform group-hover:translate-x-0.5"><path d="m9 18 6-6-6-6"/></svg>
</a> </a>
@@ -27,7 +27,7 @@
<section class="w-full"> <section class="w-full">
<div class="mb-4 flex items-end justify-between"> <div class="mb-4 flex items-end justify-between">
<h2 class="text-base font-normal text-foreground">Most Popular</h2> <h2 class="text-base font-normal text-foreground">Most Popular</h2>
<a href="/browse?order_by=popularity&sort=desc" class="group flex items-center gap-1 text-sm text-foreground-muted transition-colors hover:text-foreground"> <a href="/browse?order_by=popularity&sort=asc" class="group flex items-center gap-1 text-sm text-foreground-muted transition-colors hover:text-foreground">
See more See more
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="transition-transform group-hover:translate-x-0.5"><path d="m9 18 6-6-6-6"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="transition-transform group-hover:translate-x-0.5"><path d="m9 18 6-6-6-6"/></svg>
</a> </a>