refactor(frontend): extract refresh button into standalone component and put sort dropdown in watchlist header
Move the refresh button out of the WatchList component header and into its own RefreshWatchListButton.svelte component, placing it at the top of the Home route page with right-alignment. This gives the refresh control better visibility at the page level rather than being buried inside the watchlist header. Replace the removed refresh button in the WatchList header with the new Sort dropdown component, giving users sort controls directly alongside the watchlist title.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
import { Rating } from "flowbite-svelte";
|
||||
import loader from "../helperFunctions/loader";
|
||||
import { CheckIfAniListLoggedInAndLoadWatchList } from "../helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte";
|
||||
import Sort from "../helperComponents/Sort.svelte";
|
||||
|
||||
let isAniListLoggedIn: boolean;
|
||||
let aniListWatchListLoaded: AniListCurrentUserWatchList;
|
||||
@@ -25,17 +26,7 @@
|
||||
>
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h1 class="text-left text-xl font-bold">Your AniList WatchList</h1>
|
||||
<button
|
||||
type="button"
|
||||
class="py-2 px-4 bg-gray-700 rounded-lg"
|
||||
on:click={async () => {
|
||||
loading.set(true);
|
||||
await CheckIfAniListLoggedInAndLoadWatchList();
|
||||
loading.set(false);
|
||||
}}
|
||||
>
|
||||
Refresh WatchList
|
||||
</button>
|
||||
<Sort />
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user