Compare commits
13 Commits
371c221489
...
39710d9135
| Author | SHA1 | Date | |
|---|---|---|---|
| 39710d9135 | |||
| 8196548f1d | |||
| 9b5572c970 | |||
| b5fff43393 | |||
| b5bb6c7e87 | |||
| 7475e8abae | |||
| c14ef1bc56 | |||
| ab8640a831 | |||
| fa52533b1a | |||
| 21f6fc1a0e | |||
| bf51ae4656 | |||
| f872d96b80 | |||
| 6c8ed19be4 |
@ -6,7 +6,6 @@ when:
|
||||
|
||||
steps:
|
||||
- name: publish-image
|
||||
depends_on: [ test-build ]
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
platforms: linux/amd64
|
||||
@ -25,9 +24,6 @@ steps:
|
||||
event: [ push, pull_request ]
|
||||
branch: [ main, dev, feature/*, feat/* ]
|
||||
|
||||
# ----------------------------
|
||||
# 3️⃣ Deploy via SSH on main
|
||||
# ----------------------------
|
||||
- name: deploy
|
||||
depends_on: [ publish-image ]
|
||||
image: alpine:3.20
|
||||
|
||||
@ -20,9 +20,10 @@ import {
|
||||
CollapsibleTrigger,
|
||||
} from "@/components/ui/collapsible";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { useFetchMangaChapters, useGetManga } from "@/api/mangamochi";
|
||||
import {useFetchAllChapters, useFetchMangaChapters, useGetManga} from "@/api/mangamochi";
|
||||
import { MangaChapter } from "@/components/manga-chapter";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import {toast} from "sonner";
|
||||
|
||||
export default function MangaDetailPage() {
|
||||
const params = useParams();
|
||||
@ -33,12 +34,20 @@ export default function MangaDetailPage() {
|
||||
|
||||
const { data: mangaData, queryKey } = useGetManga(mangaId);
|
||||
|
||||
const { mutate, isPending } = useFetchMangaChapters({
|
||||
const { mutate, isPending: fetchPending } = useFetchMangaChapters({
|
||||
mutation: {
|
||||
onSuccess: () => queryClient.invalidateQueries({ queryKey }),
|
||||
},
|
||||
});
|
||||
|
||||
const { mutate: fetchAllMutate, isPending: fetchAllPending } = useFetchAllChapters({
|
||||
mutation: {
|
||||
onSuccess: () => toast.success("Chapter import queued successfully.")
|
||||
}
|
||||
})
|
||||
|
||||
const isPending = fetchPending || fetchAllPending;
|
||||
|
||||
const [openProviders, setOpenProviders] = useState<Set<number>>(new Set());
|
||||
|
||||
if (!mangaData) {
|
||||
@ -258,7 +267,19 @@ export default function MangaDetailPage() {
|
||||
</div>
|
||||
</div>
|
||||
{provider.supportsChapterFetch && (
|
||||
<div className={"pr-4"}>
|
||||
<div className={"flex gap-4 pr-4"}>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
disabled={isPending}
|
||||
onClick={() =>
|
||||
fetchAllMutate({ mangaProviderId: provider.id })
|
||||
}
|
||||
className="gap-2"
|
||||
>
|
||||
<Database className="h-4 w-4" />
|
||||
Fetch all from Provider
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user