diff options
| author | Factiven <[email protected]> | 2023-09-13 18:24:50 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-13 18:24:50 +0700 |
| commit | 195ffb79c013225cf65e8b89b1f2be0b34adb2f6 (patch) | |
| tree | 97e2b2dc201955bf716ef4bf5011344270fcc3d1 | |
| parent | Update v4 - Merge pre-push to main (#71) (diff) | |
| download | moopa-195ffb79c013225cf65e8b89b1f2be0b34adb2f6.tar.xz moopa-195ffb79c013225cf65e8b89b1f2be0b34adb2f6.zip | |
Update v4.0.1 - Merge pre-push to main (#73)v4.0.1
* Create build-test.yml
* initial v4 commit
* update: github workflow
* update: push on branch
* Update .github/ISSUE_TEMPLATE/bug_report.md
* configuring next.config.js file
* Update v4.0.1
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | components/anime/mobile/topSection.js | 33 | ||||
| -rw-r--r-- | components/home/content.js | 1 | ||||
| -rw-r--r-- | components/home/staticNav.js | 38 | ||||
| -rw-r--r-- | components/navbar.js | 2 | ||||
| -rw-r--r-- | next.config.js | 124 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | pages/en/anime/recently-watched.js | 4 | ||||
| -rw-r--r-- | pages/en/index.js | 2 | ||||
| -rw-r--r-- | release.md | 17 |
10 files changed, 111 insertions, 113 deletions
@@ -26,6 +26,7 @@ docker-compose.yml *.pem /assets/dummyData.json /backup +release-template.md # debug npm-debug.log* diff --git a/components/anime/mobile/topSection.js b/components/anime/mobile/topSection.js index 25d387f..4420d24 100644 --- a/components/anime/mobile/topSection.js +++ b/components/anime/mobile/topSection.js @@ -113,18 +113,22 @@ export function NewNavbar({ info, session, scrollP = 200, toTop = false }) { // title={sessions ? "Go to Profile" : "Login With AniList"} > */} {session ? ( - <button - type="button" - onClick={() => router.push(`/en/profile/${session?.user.name}`)} - className="w-7 h-7 relative flex flex-col items-center group" - > - <Image - src={session?.user.image.large} - alt="avatar" - width={50} - height={50} - className="w-full h-full object-cover" - /> + <div className="w-7 h-7 relative flex flex-col items-center group"> + <button + type="button" + onClick={() => + router.push(`/en/profile/${session?.user.name}`) + } + className="rounded-full bg-white/30 overflow-hidden" + > + <Image + src={session?.user.image.large} + alt="avatar" + width={50} + height={50} + className="w-full h-full object-cover" + /> + </button> <div className="hidden absolute z-50 w-28 text-center -bottom-20 text-white shadow-2xl opacity-0 bg-secondary p-1 py-2 rounded-md font-karla font-light invisible group-hover:visible group-hover:opacity-100 duration-300 transition-all md:grid place-items-center gap-1"> <Link href={`/en/profile/${session?.user.name}`} @@ -133,13 +137,13 @@ export function NewNavbar({ info, session, scrollP = 200, toTop = false }) { Profile </Link> <div - onClick={() => signOut({ callbackUrl: "/" })} + onClick={() => signOut("AniListProvider")} className="hover:text-action" > Log out </div> </div> - </button> + </div> ) : ( <button type="button" @@ -220,7 +224,6 @@ export default function DetailTop({ <div className="shrink-0 w-[180px] h-[250px] rounded overflow-hidden"> <Image src={info?.coverImage?.extraLarge} - // alt="coverImage" alt="poster anime" width={300} height={300} diff --git a/components/home/content.js b/components/home/content.js index e18e5d8..c869f6b 100644 --- a/components/home/content.js +++ b/components/home/content.js @@ -6,7 +6,6 @@ import { MdChevronRight } from "react-icons/md"; import { ChevronRightIcon, ArrowRightCircleIcon, - XMarkIcon, } from "@heroicons/react/24/outline"; import { parseCookies } from "nookies"; diff --git a/components/home/staticNav.js b/components/home/staticNav.js index b22a9e3..3f43461 100644 --- a/components/home/staticNav.js +++ b/components/home/staticNav.js @@ -19,8 +19,8 @@ export default function Navigasi() { return ( <> {/* NAVBAR PC */} - <div className="flex items-center justify-center"> - <div className="flex w-full items-center justify-between px-5 lg:mx-[94px] lg:pt-7"> + <div className="flex items-center justify-center w-full"> + <div className="flex w-full items-center justify-between px-4 lg:w-[90%] lg:pt-7"> <div className="flex items-center lg:gap-16"> <Link href="/en/" @@ -118,20 +118,22 @@ export default function Navigasi() { // title={sessions ? "Go to Profile" : "Login With AniList"} > */} {sessions ? ( - <button - type="button" - onClick={() => - router.push(`/en/profile/${sessions?.user.name}`) - } - className="w-7 h-7 relative flex flex-col items-center group" - > - <Image - src={sessions?.user.image.large} - alt="avatar" - width={50} - height={50} - className="w-full h-full object-cover" - /> + <div className="w-8 h-8 relative flex flex-col items-center group"> + <button + type="button" + onClick={() => + router.push(`/en/profile/${sessions?.user.name}`) + } + className="rounded-full bg-white/30 overflow-hidden" + > + <Image + src={sessions?.user.image.large} + alt="avatar" + width={50} + height={50} + className="w-full h-full object-cover" + /> + </button> <div className="hidden absolute z-50 w-28 text-center -bottom-20 text-white shadow-2xl opacity-0 bg-secondary p-1 py-2 rounded-md font-karla font-light invisible group-hover:visible group-hover:opacity-100 duration-300 transition-all md:grid place-items-center gap-1"> <Link href={`/en/profile/${sessions?.user.name}`} @@ -140,13 +142,13 @@ export default function Navigasi() { Profile </Link> <div - onClick={() => signOut({ callbackUrl: "/" })} + onClick={() => signOut("AniListProvider")} className="hover:text-action cursor-pointer" > Log out </div> </div> - </button> + </div> ) : ( <button type="button" diff --git a/components/navbar.js b/components/navbar.js index 7edd6c1..0bb254f 100644 --- a/components/navbar.js +++ b/components/navbar.js @@ -107,7 +107,7 @@ function Navbar(props) { Profile </Link> <button - onClick={() => signOut({ callbackUrl: "/" })} + onClick={() => signOut("AniListProvider")} className="hover:text-action" > Log out diff --git a/next.config.js b/next.config.js index b3cf9a1..b32b625 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,5 @@ /** @type {import('next').NextConfig} */ -const nextSafe = require("next-safe"); +// const nextSafe = require("next-safe"); const withPWA = require("next-pwa")({ dest: "public", @@ -44,68 +44,68 @@ module.exports = withPWA({ }, ], }, - { - source: "/:path*", - headers: nextSafe({ - contentTypeOptions: "nosniff", - contentSecurityPolicy: { - "base-uri": "'none'", - "child-src": "'none'", - "connect-src": [ - "'self'", - "webpack://*", - "https://graphql.anilist.co/", - "https://api.aniskip.com/", - "https://m3u8proxy.moopa.workers.dev/", - ], - "default-src": "'self'", - "font-src": [ - "'self'", - "https://cdnjs.cloudflare.com/", - "https://fonts.gstatic.com/", - ], - "form-action": "'self'", - "frame-ancestors": "'none'", - "frame-src": "'none'", - "img-src": [ - "'self'", - "https://s4.anilist.co", - "data:", - "https://media.kitsu.io", - "https://artworks.thetvdb.com", - "https://img.moopa.live", - "https://meo.comick.pictures", - "https://kitsu-production-media.s3.us-west-002.backblazeb2.com", - ], - "manifest-src": "'self'", - "media-src": ["'self'", "blob:"], - "object-src": "'none'", - "prefetch-src": false, - "script-src": [ - "'self'", - "https://static.cloudflareinsights.com", - "'unsafe-inline'", - "'unsafe-eval'", - ], + // { + // source: "/:path*", + // headers: nextSafe({ + // contentTypeOptions: "nosniff", + // contentSecurityPolicy: { + // "base-uri": "'none'", + // "child-src": "'none'", + // "connect-src": [ + // "'self'", + // "webpack://*", + // "https://graphql.anilist.co/", + // "https://api.aniskip.com/", + // "https://m3u8proxy.moopa.workers.dev/", + // ], + // "default-src": "'self'", + // "font-src": [ + // "'self'", + // "https://cdnjs.cloudflare.com/", + // "https://fonts.gstatic.com/", + // ], + // "form-action": "'self'", + // "frame-ancestors": "'none'", + // "frame-src": "'none'", + // "img-src": [ + // "'self'", + // "https://s4.anilist.co", + // "data:", + // "https://media.kitsu.io", + // "https://artworks.thetvdb.com", + // "https://img.moopa.live", + // "https://meo.comick.pictures", + // "https://kitsu-production-media.s3.us-west-002.backblazeb2.com", + // ], + // "manifest-src": "'self'", + // "media-src": ["'self'", "blob:"], + // "object-src": "'none'", + // "prefetch-src": false, + // "script-src": [ + // "'self'", + // "https://static.cloudflareinsights.com", + // "'unsafe-inline'", + // "'unsafe-eval'", + // ], - "style-src": [ - "'self'", - "'unsafe-inline'", - "https://cdnjs.cloudflare.com", - "https://fonts.googleapis.com", - ], - "worker-src": "'self'", - mergeDefaultDirectives: false, - reportOnly: false, - }, - frameOptions: "DENY", - permissionsPolicy: false, - // permissionsPolicyDirectiveSupport: ["proposed", "standard"], - isDev: false, - referrerPolicy: "no-referrer", - xssProtection: "1; mode=block", - }), - }, + // "style-src": [ + // "'self'", + // "'unsafe-inline'", + // "https://cdnjs.cloudflare.com", + // "https://fonts.googleapis.com", + // ], + // "worker-src": "'self'", + // mergeDefaultDirectives: false, + // reportOnly: false, + // }, + // frameOptions: "DENY", + // permissionsPolicy: false, + // // permissionsPolicyDirectiveSupport: ["proposed", "standard"], + // isDev: false, + // referrerPolicy: "no-referrer", + // xssProtection: "1; mode=block", + // }), + // }, ]; }, }); diff --git a/package.json b/package.json index e57ecbb..2a6f84c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moopa", - "version": "4.0.0", + "version": "4.0.1", "private": true, "founder": "Factiven", "scripts": { diff --git a/pages/en/anime/recently-watched.js b/pages/en/anime/recently-watched.js index 9d3b6cf..0b7a710 100644 --- a/pages/en/anime/recently-watched.js +++ b/pages/en/anime/recently-watched.js @@ -164,13 +164,15 @@ export default function PopularAnime({ sessions }) { </div> <div className="grid grid-cols-1 xs:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4 gap-3 md:gap-7 pt-16"> {data - ?.filter((i) => i.title !== null) + ?.filter((i) => i?.watchId) .map((i) => { const time = i.timeWatched; const duration = i.duration; let prog = (time / duration) * 100; if (prog > 90) prog = 100; + console.log({ i }); + return ( <div key={i.watchId} diff --git a/pages/en/index.js b/pages/en/index.js index 5577fc4..acd3705 100644 --- a/pages/en/index.js +++ b/pages/en/index.js @@ -398,7 +398,7 @@ export default function Home({ detail, populars, upComing }) { animate={{ opacity: 1 }} transition={{ duration: 0.5, staggerChildren: 0.2 }} // Add staggerChildren prop > - {user?.length > 0 && ( + {user?.length > 0 && user?.some((i) => i?.watchId) && ( <motion.section // Add motion.div to each child component key="recentlyWatched" initial={{ y: 20, opacity: 0 }} @@ -2,22 +2,13 @@ This document contains a summary of all significant changes made to this release. -## Update v4.0.0 - -### Added - -- Added option to disable custom list. -- Added schdeule -- Added redis for caching. -- Support for the GPL v3.0 license in the project documentation. +## Update v4.0.1 ### Fixed -- Issue #66: Resolved a bug that caused the workflow to fail under specific conditions. -- Premid not detecting cover image when viewing info page +- No episodes showing on recently watched +- Logout button on profile send user to profile page ### Changed -- Changed the app's license from MIT to GPL v3.0 for improved open-source compliance and restrictions. -- Redesigned and rewrote portions of the information page to improve mobile-friendliness and enhance the user experience. -- Conducted a significant refactoring of the API codebase to enhance performance and scalability, resulting in a more efficient and responsive application. +- Changed profile picture from square to circle |