Compare commits

..

13 Commits

Author SHA1 Message Date
39710d9135 feature: ci/cd pipeline
# Conflicts:
#	api/mangamochi.ts
2025-10-28 22:28:23 -03:00
8196548f1d woodpecker test 9 2025-10-28 22:27:33 -03:00
9b5572c970 woodpecker test 8 2025-10-28 22:27:33 -03:00
b5fff43393 woodpecker test 7 2025-10-28 22:27:33 -03:00
b5bb6c7e87 woodpecker test 6 2025-10-28 22:27:33 -03:00
7475e8abae woodpecker test 5 2025-10-28 22:27:33 -03:00
c14ef1bc56 woodpecker test 4 2025-10-28 22:27:33 -03:00
ab8640a831 woodpecker test 3 2025-10-28 22:27:33 -03:00
fa52533b1a woodpecker test 2 2025-10-28 22:27:33 -03:00
21f6fc1a0e woodpecker test 1 2025-10-28 22:27:33 -03:00
bf51ae4656 woodpecker test 2025-10-28 22:27:33 -03:00
f872d96b80 feat: add functionality to fetch all chapters from provider and update related hooks 2025-10-27 17:10:54 -03:00
rov
6c8ed19be4 Merge pull request 'feature/pipeline: add pipeline to project' (#2) from feature/pipeline into main
All checks were successful
ci/woodpecker/push/pipeline Pipeline was successful
Reviewed-on: #2
2025-10-26 21:42:02 -03:00
2 changed files with 24 additions and 7 deletions

View File

@ -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

View File

@ -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"