Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
Update v4.0.1 - Merge pre-push to main (#73)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DevanAbinaya authored Sep 13, 2023
1 parent 7327a69 commit 195ffb7
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 113 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ docker-compose.yml
*.pem
/assets/dummyData.json
/backup
release-template.md

# debug
npm-debug.log*
Expand Down
33 changes: 18 additions & 15 deletions components/anime/mobile/topSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`}
Expand All @@ -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"
Expand Down Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion components/home/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { MdChevronRight } from "react-icons/md";
import {
ChevronRightIcon,
ArrowRightCircleIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";

import { parseCookies } from "nookies";
Expand Down
38 changes: 20 additions & 18 deletions components/home/staticNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down Expand Up @@ -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}`}
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion components/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Navbar(props) {
Profile
</Link>
<button
onClick={() => signOut({ callbackUrl: "/" })}
onClick={() => signOut("AniListProvider")}
className="hover:text-action"
>
Log out
Expand Down
124 changes: 62 additions & 62 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
// }),
// },
];
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moopa",
"version": "4.0.0",
"version": "4.0.1",
"private": true,
"founder": "Factiven",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion pages/en/anime/recently-watched.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 4 additions & 13 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 195ffb7

Please sign in to comment.