Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd8c6431d5 | ||
|
|
b8dc3828e8 | ||
|
|
909aead056 | ||
|
|
88474b494b | ||
|
|
3833f4d626 | ||
|
|
ef55f13d7b | ||
|
|
3db18e22a4 | ||
|
|
1e93fb1c29 | ||
|
|
18df836cf4 | ||
|
|
2bbe846184 | ||
|
|
50f8e1c0f1 | ||
|
|
fdbe279071 | ||
|
|
90094d9103 | ||
|
|
51647cdd0d | ||
|
|
628f90ef57 | ||
|
|
7cba5a39f6 | ||
|
|
ee524b57c7 | ||
|
|
9aea2e4750 | ||
|
|
c49f8d8c76 | ||
|
|
1158c38575 | ||
|
|
f08a3e8337 | ||
|
|
64cc9fa7ff | ||
|
|
fd2d8a1efd | ||
|
|
0febb68047 | ||
|
|
e51c2261c2 | ||
|
|
537cf61df5 | ||
|
|
62f7a6cd48 | ||
|
|
ee48de0f30 |
No files matched your search
@@ -30,3 +30,8 @@
|
||||
# 📃 Roadmap:
|
||||
- Checkout [GitHub Project](https://github.com/users/prayag17/projects/3)
|
||||
> **Note** : There is no current due date for alpha 1 release
|
||||
|
||||
# 🎊 Special thanks to:
|
||||
- [@ferferga](https://github.com/ferferga) for helping in development behind the scenes.
|
||||
- All contributors of [jellyfin/jellyfin-vue](https://github.com/jellyfin/jellyfin-vue).
|
||||
- And also [@jellyfin](https://github.com/jellyfin/) for creating the main service
|
||||
Generated
+126
-77
@@ -15,7 +15,7 @@
|
||||
"@jellyfin/sdk": "^0.7.0",
|
||||
"@mdi/js": "^7.2.96",
|
||||
"@mui/lab": "^5.0.0-alpha.124",
|
||||
"@mui/material": "^5.11.14",
|
||||
"@mui/material": "^5.11.15",
|
||||
"@reduxjs/toolkit": "^1.9.3",
|
||||
"@tanstack/react-query": "^4.26.1",
|
||||
"@tanstack/react-query-devtools": "^4.28.0",
|
||||
@@ -30,10 +30,10 @@
|
||||
"react-cookie": "^4.1.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-material-ui-carousel": "^3.4.2",
|
||||
"react-multi-carousel": "^2.8.2",
|
||||
"react-multi-carousel": "^2.8.3",
|
||||
"react-parallax": "^3.5.1",
|
||||
"react-redux": "^8.0.5",
|
||||
"react-router-dom": "^6.9.0",
|
||||
"react-router-dom": "^6.10.0",
|
||||
"redux": "^4.2.1",
|
||||
"sort-by": "^1.2.0",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
@@ -42,10 +42,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.2.2",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react": "^18.0.32",
|
||||
"@types/react-dom": "^18.0.8",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"sass": "^1.59.3",
|
||||
"sass": "^1.60.0",
|
||||
"vite": "^4.2.1"
|
||||
}
|
||||
},
|
||||
@@ -950,9 +950,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/core-downloads-tracker": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.11.14.tgz",
|
||||
"integrity": "sha512-rfc08z6+3Fif+Gopx2/qmk+MEQlwYeA+gOcSK048BHkTty/ol/boHuVeL2BNC/cf9OVRjJLYHtVb/DeW791LSQ==",
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.11.15.tgz",
|
||||
"integrity": "sha512-Q0e2oBsjHyIWWj1wLzl14btunvBYC0yl+px7zL9R69tF87uenj6q72ieS369BJ6jxYpJwvXfR6/f+TC+ZUsKKg==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui"
|
||||
@@ -1025,14 +1025,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/material": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.11.14.tgz",
|
||||
"integrity": "sha512-uoiUyybmo+M+nYARBygmbXgX6s/hH0NKD56LCAv9XvmdGVoXhEGjOvxI5/Bng6FS3NNybnA8V+rgZW1Z/9OJtA==",
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.11.15.tgz",
|
||||
"integrity": "sha512-E5RbLq9/OvRKmGyeZawdnmFBCvhKkI/Zqgr0xFqW27TGwKLxObq/BreJc6Uu5Sbv8Fjj34vEAbRx6otfOyxn5w==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@mui/base": "5.0.0-alpha.122",
|
||||
"@mui/core-downloads-tracker": "^5.11.14",
|
||||
"@mui/system": "^5.11.14",
|
||||
"@mui/base": "5.0.0-alpha.123",
|
||||
"@mui/core-downloads-tracker": "^5.11.15",
|
||||
"@mui/system": "^5.11.15",
|
||||
"@mui/types": "^7.2.3",
|
||||
"@mui/utils": "^5.11.13",
|
||||
"@types/react-transition-group": "^4.4.5",
|
||||
@@ -1068,6 +1068,38 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/material/node_modules/@mui/base": {
|
||||
"version": "5.0.0-alpha.123",
|
||||
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.123.tgz",
|
||||
"integrity": "sha512-pxzcAfET3I6jvWqS4kijiLMn1OmdMw+mGmDa0SqmDZo3bXXdvLhpCCPqCkULG3UykhvFCOcU5HclOX3JCA+Zhg==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@emotion/is-prop-valid": "^1.2.0",
|
||||
"@mui/types": "^7.2.3",
|
||||
"@mui/utils": "^5.11.13",
|
||||
"@popperjs/core": "^2.11.7",
|
||||
"clsx": "^1.2.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"react-is": "^18.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^17.0.0 || ^18.0.0",
|
||||
"react": "^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^17.0.0 || ^18.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/private-theming": {
|
||||
"version": "5.11.13",
|
||||
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.11.13.tgz",
|
||||
@@ -1126,9 +1158,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/system": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.11.14.tgz",
|
||||
"integrity": "sha512-/MBv5dUoijJNEKEGi5tppIszGN0o2uejmeISi5vl0CLcaQsI1cd+uBgK+JYUP1VWvI/MtkWRLVSWtF2FWhu5Nw==",
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.11.15.tgz",
|
||||
"integrity": "sha512-vCatoWCTnAPquoNifHbqMCMnOElEbLosVUeW0FQDyjCq+8yMABD9E6iY0s14O7iq1wD+qqU7rFAuDIVvJ/AzzA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@mui/private-theming": "^5.11.13",
|
||||
@@ -1200,9 +1232,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
|
||||
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
@@ -1232,9 +1264,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@remix-run/router": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.4.0.tgz",
|
||||
"integrity": "sha512-BJ9SxXux8zAg991UmT8slpwpsd31K1dHHbD3Ba4VzD+liLQ4WAMSxQp2d2ZPRPfN0jN2NPRowcSSoM7lCaF08Q==",
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.5.0.tgz",
|
||||
"integrity": "sha512-bkUDCp8o1MvFO+qxkODcbhSqRa6P2GXgrGZVpt0dCXNW2HCSCqYI0ZoAqEOSAjRWmmlKcYgFvN4B4S+zo/f8kg==",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
@@ -1745,9 +1777,9 @@
|
||||
"integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.0.28",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz",
|
||||
"integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==",
|
||||
"version": "18.0.32",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.32.tgz",
|
||||
"integrity": "sha512-gYGXdtPQ9Cj0w2Fwqg5/ak6BcK3Z15YgjSqtyDizWUfx7mQ8drs0NBUzRRsAdoFVTO8kJ8L2TL8Skm7OFPnLUw==",
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"@types/scheduler": "*",
|
||||
@@ -2886,9 +2918,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-multi-carousel": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-multi-carousel/-/react-multi-carousel-2.8.2.tgz",
|
||||
"integrity": "sha512-M9Y7DfAp8bA/r6yexttU6RLA7uyppje4c0ELRuCHZWswH+u7nr0uVP6qHNPjc4XGOEY1MYFOb5nBg7JvoKutuQ==",
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/react-multi-carousel/-/react-multi-carousel-2.8.3.tgz",
|
||||
"integrity": "sha512-wpHwq9Y/ydX+5yxpW8250jMOtg8NuBVlFrDTuS5/MdN0uD0zFIHxVbXhzzc4WFeQl6bn9ZLo8Fef2Ik5aBRgmw==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -2950,11 +2982,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.9.0.tgz",
|
||||
"integrity": "sha512-51lKevGNUHrt6kLuX3e/ihrXoXCa9ixY/nVWRLlob4r/l0f45x3SzBvYJe3ctleLUQQ5fVa4RGgJOTH7D9Umhw==",
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.10.0.tgz",
|
||||
"integrity": "sha512-Nrg0BWpQqrC3ZFFkyewrflCud9dio9ME3ojHCF/WLsprJVzkq3q3UeEhMCAW1dobjeGbWgjNn/PVF6m46ANxXQ==",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.4.0"
|
||||
"@remix-run/router": "1.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
@@ -2964,12 +2996,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.9.0.tgz",
|
||||
"integrity": "sha512-/seUAPY01VAuwkGyVBPCn1OXfVbaWGGu4QN9uj0kCPcTyNYgL1ldZpxZUpRU7BLheKQI4Twtl/OW2nHRF1u26Q==",
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.10.0.tgz",
|
||||
"integrity": "sha512-E5dfxRPuXKJqzwSe/qGcqdwa18QiWC6f3H3cWXM24qj4N0/beCIf/CWTipop2xm7mR0RCS99NnaqPNjHtrAzCg==",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.4.0",
|
||||
"react-router": "6.9.0"
|
||||
"@remix-run/router": "1.5.0",
|
||||
"react-router": "6.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
@@ -3077,9 +3109,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.59.3",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.59.3.tgz",
|
||||
"integrity": "sha512-QCq98N3hX1jfTCoUAsF3eyGuXLsY7BCnCEg9qAact94Yc21npG2/mVOqoDvE0fCbWDqiM4WlcJQla0gWG2YlxQ==",
|
||||
"version": "1.60.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.60.0.tgz",
|
||||
"integrity": "sha512-updbwW6fNb5gGm8qMXzVO7V4sWf7LMXnMly/JEyfbfERbVH46Fn6q02BX7/eHTdKpE7d+oTkMMQpFWNUMfFbgQ==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
@@ -3906,9 +3938,9 @@
|
||||
}
|
||||
},
|
||||
"@mui/core-downloads-tracker": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.11.14.tgz",
|
||||
"integrity": "sha512-rfc08z6+3Fif+Gopx2/qmk+MEQlwYeA+gOcSK048BHkTty/ol/boHuVeL2BNC/cf9OVRjJLYHtVb/DeW791LSQ=="
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.11.15.tgz",
|
||||
"integrity": "sha512-Q0e2oBsjHyIWWj1wLzl14btunvBYC0yl+px7zL9R69tF87uenj6q72ieS369BJ6jxYpJwvXfR6/f+TC+ZUsKKg=="
|
||||
},
|
||||
"@mui/icons-material": {
|
||||
"version": "5.11.9",
|
||||
@@ -3934,14 +3966,14 @@
|
||||
}
|
||||
},
|
||||
"@mui/material": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.11.14.tgz",
|
||||
"integrity": "sha512-uoiUyybmo+M+nYARBygmbXgX6s/hH0NKD56LCAv9XvmdGVoXhEGjOvxI5/Bng6FS3NNybnA8V+rgZW1Z/9OJtA==",
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.11.15.tgz",
|
||||
"integrity": "sha512-E5RbLq9/OvRKmGyeZawdnmFBCvhKkI/Zqgr0xFqW27TGwKLxObq/BreJc6Uu5Sbv8Fjj34vEAbRx6otfOyxn5w==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@mui/base": "5.0.0-alpha.122",
|
||||
"@mui/core-downloads-tracker": "^5.11.14",
|
||||
"@mui/system": "^5.11.14",
|
||||
"@mui/base": "5.0.0-alpha.123",
|
||||
"@mui/core-downloads-tracker": "^5.11.15",
|
||||
"@mui/system": "^5.11.15",
|
||||
"@mui/types": "^7.2.3",
|
||||
"@mui/utils": "^5.11.13",
|
||||
"@types/react-transition-group": "^4.4.5",
|
||||
@@ -3950,6 +3982,23 @@
|
||||
"prop-types": "^15.8.1",
|
||||
"react-is": "^18.2.0",
|
||||
"react-transition-group": "^4.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mui/base": {
|
||||
"version": "5.0.0-alpha.123",
|
||||
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.123.tgz",
|
||||
"integrity": "sha512-pxzcAfET3I6jvWqS4kijiLMn1OmdMw+mGmDa0SqmDZo3bXXdvLhpCCPqCkULG3UykhvFCOcU5HclOX3JCA+Zhg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@emotion/is-prop-valid": "^1.2.0",
|
||||
"@mui/types": "^7.2.3",
|
||||
"@mui/utils": "^5.11.13",
|
||||
"@popperjs/core": "^2.11.7",
|
||||
"clsx": "^1.2.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"react-is": "^18.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@mui/private-theming": {
|
||||
@@ -3974,9 +4023,9 @@
|
||||
}
|
||||
},
|
||||
"@mui/system": {
|
||||
"version": "5.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.11.14.tgz",
|
||||
"integrity": "sha512-/MBv5dUoijJNEKEGi5tppIszGN0o2uejmeISi5vl0CLcaQsI1cd+uBgK+JYUP1VWvI/MtkWRLVSWtF2FWhu5Nw==",
|
||||
"version": "5.11.15",
|
||||
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.11.15.tgz",
|
||||
"integrity": "sha512-vCatoWCTnAPquoNifHbqMCMnOElEbLosVUeW0FQDyjCq+8yMABD9E6iY0s14O7iq1wD+qqU7rFAuDIVvJ/AzzA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@mui/private-theming": "^5.11.13",
|
||||
@@ -4007,9 +4056,9 @@
|
||||
}
|
||||
},
|
||||
"@popperjs/core": {
|
||||
"version": "2.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
|
||||
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw=="
|
||||
},
|
||||
"@reduxjs/toolkit": {
|
||||
"version": "1.9.3",
|
||||
@@ -4023,9 +4072,9 @@
|
||||
}
|
||||
},
|
||||
"@remix-run/router": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.4.0.tgz",
|
||||
"integrity": "sha512-BJ9SxXux8zAg991UmT8slpwpsd31K1dHHbD3Ba4VzD+liLQ4WAMSxQp2d2ZPRPfN0jN2NPRowcSSoM7lCaF08Q=="
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.5.0.tgz",
|
||||
"integrity": "sha512-bkUDCp8o1MvFO+qxkODcbhSqRa6P2GXgrGZVpt0dCXNW2HCSCqYI0ZoAqEOSAjRWmmlKcYgFvN4B4S+zo/f8kg=="
|
||||
},
|
||||
"@rollup/pluginutils": {
|
||||
"version": "5.0.2",
|
||||
@@ -4279,9 +4328,9 @@
|
||||
"integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
|
||||
},
|
||||
"@types/react": {
|
||||
"version": "18.0.28",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz",
|
||||
"integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==",
|
||||
"version": "18.0.32",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.32.tgz",
|
||||
"integrity": "sha512-gYGXdtPQ9Cj0w2Fwqg5/ak6BcK3Z15YgjSqtyDizWUfx7mQ8drs0NBUzRRsAdoFVTO8kJ8L2TL8Skm7OFPnLUw==",
|
||||
"requires": {
|
||||
"@types/prop-types": "*",
|
||||
"@types/scheduler": "*",
|
||||
@@ -5104,9 +5153,9 @@
|
||||
}
|
||||
},
|
||||
"react-multi-carousel": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-multi-carousel/-/react-multi-carousel-2.8.2.tgz",
|
||||
"integrity": "sha512-M9Y7DfAp8bA/r6yexttU6RLA7uyppje4c0ELRuCHZWswH+u7nr0uVP6qHNPjc4XGOEY1MYFOb5nBg7JvoKutuQ=="
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/react-multi-carousel/-/react-multi-carousel-2.8.3.tgz",
|
||||
"integrity": "sha512-wpHwq9Y/ydX+5yxpW8250jMOtg8NuBVlFrDTuS5/MdN0uD0zFIHxVbXhzzc4WFeQl6bn9ZLo8Fef2Ik5aBRgmw=="
|
||||
},
|
||||
"react-parallax": {
|
||||
"version": "3.5.1",
|
||||
@@ -5134,20 +5183,20 @@
|
||||
"dev": true
|
||||
},
|
||||
"react-router": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.9.0.tgz",
|
||||
"integrity": "sha512-51lKevGNUHrt6kLuX3e/ihrXoXCa9ixY/nVWRLlob4r/l0f45x3SzBvYJe3ctleLUQQ5fVa4RGgJOTH7D9Umhw==",
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.10.0.tgz",
|
||||
"integrity": "sha512-Nrg0BWpQqrC3ZFFkyewrflCud9dio9ME3ojHCF/WLsprJVzkq3q3UeEhMCAW1dobjeGbWgjNn/PVF6m46ANxXQ==",
|
||||
"requires": {
|
||||
"@remix-run/router": "1.4.0"
|
||||
"@remix-run/router": "1.5.0"
|
||||
}
|
||||
},
|
||||
"react-router-dom": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.9.0.tgz",
|
||||
"integrity": "sha512-/seUAPY01VAuwkGyVBPCn1OXfVbaWGGu4QN9uj0kCPcTyNYgL1ldZpxZUpRU7BLheKQI4Twtl/OW2nHRF1u26Q==",
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.10.0.tgz",
|
||||
"integrity": "sha512-E5dfxRPuXKJqzwSe/qGcqdwa18QiWC6f3H3cWXM24qj4N0/beCIf/CWTipop2xm7mR0RCS99NnaqPNjHtrAzCg==",
|
||||
"requires": {
|
||||
"@remix-run/router": "1.4.0",
|
||||
"react-router": "6.9.0"
|
||||
"@remix-run/router": "1.5.0",
|
||||
"react-router": "6.10.0"
|
||||
}
|
||||
},
|
||||
"react-transition-group": {
|
||||
@@ -5223,9 +5272,9 @@
|
||||
}
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.59.3",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.59.3.tgz",
|
||||
"integrity": "sha512-QCq98N3hX1jfTCoUAsF3eyGuXLsY7BCnCEg9qAact94Yc21npG2/mVOqoDvE0fCbWDqiM4WlcJQla0gWG2YlxQ==",
|
||||
"version": "1.60.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.60.0.tgz",
|
||||
"integrity": "sha512-updbwW6fNb5gGm8qMXzVO7V4sWf7LMXnMly/JEyfbfERbVH46Fn6q02BX7/eHTdKpE7d+oTkMMQpFWNUMfFbgQ==",
|
||||
"devOptional": true,
|
||||
"requires": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
|
||||
+5
-5
@@ -16,7 +16,7 @@
|
||||
"@jellyfin/sdk": "^0.7.0",
|
||||
"@mdi/js": "^7.2.96",
|
||||
"@mui/lab": "^5.0.0-alpha.124",
|
||||
"@mui/material": "^5.11.14",
|
||||
"@mui/material": "^5.11.15",
|
||||
"@reduxjs/toolkit": "^1.9.3",
|
||||
"@tanstack/react-query": "^4.26.1",
|
||||
"@tanstack/react-query-devtools": "^4.28.0",
|
||||
@@ -31,10 +31,10 @@
|
||||
"react-cookie": "^4.1.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-material-ui-carousel": "^3.4.2",
|
||||
"react-multi-carousel": "^2.8.2",
|
||||
"react-multi-carousel": "^2.8.3",
|
||||
"react-parallax": "^3.5.1",
|
||||
"react-redux": "^8.0.5",
|
||||
"react-router-dom": "^6.9.0",
|
||||
"react-router-dom": "^6.10.0",
|
||||
"redux": "^4.2.1",
|
||||
"sort-by": "^1.2.0",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
@@ -43,10 +43,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.2.2",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react": "^18.0.32",
|
||||
"@types/react-dom": "^18.0.8",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"sass": "^1.59.3",
|
||||
"sass": "^1.60.0",
|
||||
"vite": "^4.2.1"
|
||||
},
|
||||
"license": "GPL-3.0-only"
|
||||
|
||||
@@ -17,7 +17,7 @@ tauri-build = { version = "1.2.1", features = [] }
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.2.2", features = [] }
|
||||
tauri = { version = "1.2.2", features = ["process-exit", "process-relaunch"] }
|
||||
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -8,11 +8,17 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "JellyPlayer",
|
||||
"version": "../package.json"
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
"all": false
|
||||
"all": false,
|
||||
"process": {
|
||||
"all": false,
|
||||
"exit": true,
|
||||
"relaunch": true,
|
||||
"relaunchDangerousAllowSymlinkMacos": false
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
|
||||
+19
-1
@@ -45,6 +45,8 @@ import {
|
||||
UserLoginManual,
|
||||
} from "./routes/login/root";
|
||||
import LibraryView from "./routes/library/root.jsx";
|
||||
import ItemMovie from "./routes/item/Movie/root.jsx";
|
||||
import ItemSeries from "./routes/item/Series/root.jsx";
|
||||
|
||||
import { SideMenu } from "./components/menu/sidemenu.jsx";
|
||||
import { AppBar } from "./components/appBar/appBar.jsx";
|
||||
@@ -59,6 +61,8 @@ import { v4 as uuidv4 } from "uuid";
|
||||
import { delServer, getServer } from "./utils/storage/servers.js";
|
||||
import { getUser } from "./utils/storage/user.js";
|
||||
|
||||
import { useDispatch } from "react-redux";
|
||||
import { showSidemenu } from "./utils/slice/sidemenu.js";
|
||||
const jellyfin = new Jellyfin({
|
||||
clientInfo: {
|
||||
name: "JellyPlayer",
|
||||
@@ -120,12 +124,15 @@ const AnimationWrapper = () => {
|
||||
function App() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [serverReachable, setServerReachable] = useState(true);
|
||||
const [checkingServer, setChecking] = useState(false);
|
||||
|
||||
const createApi = async () => {
|
||||
const server = await getServer();
|
||||
event.emit("create-jellyfin-api", server.Ip);
|
||||
dispatch(showSidemenu());
|
||||
};
|
||||
|
||||
const serverAvailable = async () => {
|
||||
@@ -240,11 +247,14 @@ function App() {
|
||||
};
|
||||
|
||||
const handleRelaunch = async () => {
|
||||
await relaunch();
|
||||
let result = await relaunch();
|
||||
console.log(result);
|
||||
};
|
||||
|
||||
const handleRemoveServer = async () => {
|
||||
await delServer();
|
||||
let result = await relaunch();
|
||||
console.log(result);
|
||||
};
|
||||
const location = useLocation();
|
||||
|
||||
@@ -344,6 +354,14 @@ function App() {
|
||||
path="/library/:id"
|
||||
element={<LibraryView />}
|
||||
/>
|
||||
<Route
|
||||
path="/item/Movie/:id"
|
||||
element={<ItemMovie />}
|
||||
/>
|
||||
<Route
|
||||
path="/item/Series/:id"
|
||||
element={<ItemSeries />}
|
||||
/>
|
||||
|
||||
{/* Logical Routes */}
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/** @format */
|
||||
import { useEffect } from "react";
|
||||
|
||||
import MuiAppBar from "@mui/material/AppBar";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import InputAdornment from "@mui/material/InputAdornment";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import Avatar from "@mui/material/Avatar";
|
||||
import Box from "@mui/material/Box";
|
||||
import Zoom from "@mui/material/Zoom";
|
||||
|
||||
import { MdiMagnify } from "../icons/mdiMagnify";
|
||||
import { theme } from "../../theme";
|
||||
|
||||
import { useSelector } from "react-redux";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { hideBackButton } from "../../utils/slice/appBar";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { useQueryClient, useQuery } from "@tanstack/react-query";
|
||||
@@ -19,25 +22,40 @@ import { useQueryClient, useQuery } from "@tanstack/react-query";
|
||||
import "./appBar.module.scss";
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
|
||||
export const AppBar = () => {
|
||||
const dispatch = useDispatch();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const visible = useSelector((state) => state.appBar.visible);
|
||||
const backButtonVisible = useSelector(
|
||||
(state) => state.appBar.backButtonVisible,
|
||||
);
|
||||
const backdropVisible = useSelector((state) => state.appBar.backdrop);
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
const user = useQuery({
|
||||
queryKey: ["appBar", "user"],
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(window.api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (location.pathname == "/home") {
|
||||
dispatch(hideBackButton());
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
visible && (
|
||||
<MuiAppBar
|
||||
sx={{
|
||||
width: `calc(100vw - ${theme.spacing(7)} - 20px)`,
|
||||
mr: "10px",
|
||||
width: `calc(100vw - ${theme.spacing(7)} - 10px)`,
|
||||
// mr: "10px",
|
||||
background: "transparent",
|
||||
}}
|
||||
className={
|
||||
@@ -46,7 +64,26 @@ export const AppBar = () => {
|
||||
elevation={backdropVisible ? 6 : 0}
|
||||
>
|
||||
<Toolbar sx={{ justifyContent: "space-between" }}>
|
||||
<Box sx={{ display: "flex", gap: 1 }}>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: 1,
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() => navigate(-1)}
|
||||
sx={{
|
||||
transition: "transform 0.2s",
|
||||
transform: backButtonVisible
|
||||
? "scale(1)"
|
||||
: "scale(0)",
|
||||
transformOrigin: "left",
|
||||
}}
|
||||
>
|
||||
<MdiArrowLeft />
|
||||
</IconButton>
|
||||
|
||||
<TextField
|
||||
variant="outlined"
|
||||
placeholder="Search..."
|
||||
|
||||
+265
-68
@@ -1,5 +1,5 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
@@ -9,6 +9,11 @@ import CardMedia from "@mui/material/CardMedia";
|
||||
import CardActionArea from "@mui/material/CardActionArea";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import { Blurhash } from "react-blurhash";
|
||||
import { green, pink } from "@mui/material/colors";
|
||||
|
||||
import {
|
||||
MediaCollectionTypeIconCollectionCard,
|
||||
@@ -17,6 +22,12 @@ import {
|
||||
|
||||
import { borderRadiusDefault } from "../../palette.module.scss";
|
||||
import "./card.module.scss";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
|
||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
import { MdiHeart } from "../icons/mdiHeart";
|
||||
|
||||
export const Card = ({
|
||||
itemName,
|
||||
@@ -27,8 +38,88 @@ export const Card = ({
|
||||
subText = "",
|
||||
playedPercent,
|
||||
cardOrientation,
|
||||
props,
|
||||
cardProps,
|
||||
onClickEvent,
|
||||
watchedStatus,
|
||||
watchedCount,
|
||||
blurhash,
|
||||
currentUser,
|
||||
favourite,
|
||||
}) => {
|
||||
const [imgLoading, setImgLoading] = useState(true);
|
||||
const [isWatched, setIsWatched] = useState(watchedStatus);
|
||||
const [isFavourite, setIsFavourite] = useState(favourite);
|
||||
const [watchedCountState, setWatchedCountState] = useState(watchedCount);
|
||||
const handleMarkAsPlayOrUnMarkAsPlay = async () => {
|
||||
let result;
|
||||
if (!isWatched) {
|
||||
result = await getPlaystateApi(window.api).markPlayedItem({
|
||||
userId: currentUser.Id,
|
||||
itemId: itemId,
|
||||
});
|
||||
} else if (isWatched) {
|
||||
result = await getPlaystateApi(window.api).markUnplayedItem({
|
||||
userId: currentUser.Id,
|
||||
itemId: itemId,
|
||||
});
|
||||
}
|
||||
console.log(result.data);
|
||||
setIsWatched(result.data.Played);
|
||||
setWatchedCountState(result.data.UnplayedItemCount);
|
||||
};
|
||||
const handleLiking = async () => {
|
||||
let result;
|
||||
if (isFavourite) {
|
||||
result = await getUserLibraryApi(window.api).unmarkFavoriteItem({
|
||||
userId: currentUser.Id,
|
||||
itemId: itemId,
|
||||
});
|
||||
} else if (!isFavourite) {
|
||||
result = await getUserLibraryApi(window.api).markFavoriteItem({
|
||||
userId: currentUser.Id,
|
||||
itemId: itemId,
|
||||
});
|
||||
}
|
||||
console.log(result.data.IsFavorite);
|
||||
setIsFavourite(result.data.IsFavorite);
|
||||
};
|
||||
|
||||
const availableMarkButtonTypes = [
|
||||
"Audio",
|
||||
"AudioBook",
|
||||
"Book",
|
||||
"BoxSet",
|
||||
"CollectionFolder",
|
||||
"Movie",
|
||||
"MusicAlbum",
|
||||
"MusicVideo",
|
||||
"Season",
|
||||
"Series",
|
||||
"Video",
|
||||
"Episode",
|
||||
];
|
||||
const allowedLikeButton = [
|
||||
"Audio",
|
||||
"AudioBook",
|
||||
"Book",
|
||||
"BoxSet",
|
||||
"CollectionFolder",
|
||||
"Movie",
|
||||
"MusicAlbum",
|
||||
"MusicVideo",
|
||||
"Season",
|
||||
"Series",
|
||||
"Video",
|
||||
"Channel",
|
||||
"MusicAlbum",
|
||||
"MusicArtist",
|
||||
"Person",
|
||||
"Photo",
|
||||
"Playlist",
|
||||
"Studio",
|
||||
"Episode",
|
||||
];
|
||||
|
||||
return (
|
||||
<MuiCard
|
||||
className={"card " + cardOrientation}
|
||||
@@ -38,9 +129,11 @@ export const Card = ({
|
||||
mr: 1,
|
||||
}}
|
||||
elevation={0}
|
||||
{...props}
|
||||
{...cardProps}
|
||||
>
|
||||
<CardActionArea>
|
||||
<CardActionArea
|
||||
onClick={!!onClickEvent ? onClickEvent : () => {}}
|
||||
>
|
||||
<Box
|
||||
className="card-media-container"
|
||||
sx={{
|
||||
@@ -54,73 +147,171 @@ export const Card = ({
|
||||
: "1",
|
||||
}}
|
||||
>
|
||||
{imageTags &&
|
||||
(cardType == "thumb" ? (
|
||||
<CardMedia
|
||||
component="div"
|
||||
image={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
itemId +
|
||||
"/Images/Backdrop?fillHeight=300&fillWidth=532&quality=96"
|
||||
}
|
||||
alt={itemName}
|
||||
sx={{
|
||||
width: "100%",
|
||||
aspectRatio:
|
||||
cardOrientation == "landscape"
|
||||
? "1.777"
|
||||
: cardOrientation ==
|
||||
"portait"
|
||||
? "0.666"
|
||||
: "1",
|
||||
}}
|
||||
className="card-image"
|
||||
></CardMedia>
|
||||
) : (
|
||||
<CardMedia
|
||||
component="div"
|
||||
image={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
itemId +
|
||||
"/Images/Primary"
|
||||
}
|
||||
alt={itemName}
|
||||
sx={{
|
||||
width: "100%",
|
||||
aspectRatio:
|
||||
cardOrientation == "landscape"
|
||||
? "1.777"
|
||||
: cardOrientation ==
|
||||
"portait"
|
||||
? "0.666"
|
||||
: "1",
|
||||
}}
|
||||
className="card-image"
|
||||
></CardMedia>
|
||||
))}
|
||||
<div className="card-image-icon-container">
|
||||
{cardType == "lib"
|
||||
? MediaCollectionTypeIconCollectionCard[
|
||||
iconType
|
||||
]
|
||||
: TypeIconCollectionCard[iconType]}
|
||||
</div>
|
||||
{!!playedPercent && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={playedPercent}
|
||||
<>
|
||||
<Chip
|
||||
className="card-indicator"
|
||||
label={<MdiCheck />}
|
||||
sx={{
|
||||
width: "90%",
|
||||
position: "absolute",
|
||||
left: "5%",
|
||||
bottom: "5%",
|
||||
borderRadius: "100px",
|
||||
height: "5px",
|
||||
transition: "opacity 150ms",
|
||||
opacity: isWatched ? 1 : 0,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!!watchedCountState && (
|
||||
<Chip
|
||||
className="card-indicator card-indicator-text"
|
||||
label={watchedCountState}
|
||||
></Chip>
|
||||
)}
|
||||
<div
|
||||
className="card-media-image-container"
|
||||
style={{ opacity: imgLoading ? 0 : 1 }}
|
||||
>
|
||||
{imageTags &&
|
||||
(cardType == "thumb" ? (
|
||||
<CardMedia
|
||||
component="img"
|
||||
image={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
itemId +
|
||||
"/Images/Backdrop?fillHeight=300&fillWidth=532&quality=96"
|
||||
}
|
||||
alt={itemName}
|
||||
sx={{
|
||||
width: "100%",
|
||||
aspectRatio:
|
||||
cardOrientation ==
|
||||
"landscape"
|
||||
? "1.777"
|
||||
: cardOrientation ==
|
||||
"portait"
|
||||
? "0.666"
|
||||
: "1",
|
||||
borderRadius:
|
||||
borderRadiusDefault,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
onLoad={() =>
|
||||
setImgLoading(false)
|
||||
}
|
||||
className="card-image"
|
||||
></CardMedia>
|
||||
) : (
|
||||
<CardMedia
|
||||
component="img"
|
||||
image={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
itemId +
|
||||
"/Images/Primary"
|
||||
}
|
||||
alt={itemName}
|
||||
sx={{
|
||||
width: "100%",
|
||||
aspectRatio:
|
||||
cardOrientation ==
|
||||
"landscape"
|
||||
? "1.777"
|
||||
: cardOrientation ==
|
||||
"portait"
|
||||
? "0.666"
|
||||
: "1",
|
||||
}}
|
||||
className="card-image"
|
||||
onLoad={() =>
|
||||
setImgLoading(false)
|
||||
}
|
||||
></CardMedia>
|
||||
))}
|
||||
</div>
|
||||
{!!blurhash && (
|
||||
<Blurhash
|
||||
hash={blurhash}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={64}
|
||||
style={{
|
||||
aspectRatio:
|
||||
cardOrientation == "landscape"
|
||||
? "1.777"
|
||||
: cardOrientation ==
|
||||
"portait"
|
||||
? "0.666"
|
||||
: "1",
|
||||
}}
|
||||
className="card-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
<div className="card-image-icon-container">
|
||||
{cardType == "lib"
|
||||
? MediaCollectionTypeIconCollectionCard[
|
||||
iconType
|
||||
]
|
||||
: TypeIconCollectionCard[iconType]}
|
||||
</div>
|
||||
{!!playedPercent && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={playedPercent}
|
||||
sx={{
|
||||
width: "90%",
|
||||
position: "absolute",
|
||||
left: "5%",
|
||||
bottom: "5%",
|
||||
borderRadius: "100px",
|
||||
height: "5px",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
<Box
|
||||
className="card-media-overlay"
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "flex-end",
|
||||
justifyContent: "flex-end",
|
||||
p: 1,
|
||||
}}
|
||||
>
|
||||
<ButtonGroup>
|
||||
{availableMarkButtonTypes.includes(
|
||||
iconType,
|
||||
) && (
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleMarkAsPlayOrUnMarkAsPlay();
|
||||
}}
|
||||
>
|
||||
<MdiCheck
|
||||
sx={{
|
||||
color: isWatched
|
||||
? green[200]
|
||||
: "white",
|
||||
}}
|
||||
/>
|
||||
</IconButton>
|
||||
)}
|
||||
{allowedLikeButton.includes(iconType) && (
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleLiking();
|
||||
}}
|
||||
>
|
||||
{isFavourite ? (
|
||||
<MdiHeart
|
||||
sx={{ color: pink[700] }}
|
||||
/>
|
||||
) : (
|
||||
<MdiHeartOutline />
|
||||
)}
|
||||
</IconButton>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<CardContent
|
||||
@@ -172,4 +363,10 @@ Card.propTypes = {
|
||||
subText: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
playedPercent: PropTypes.number,
|
||||
cardOrientation: PropTypes.string.isRequired,
|
||||
onClickEvent: PropTypes.func,
|
||||
watchedStatus: PropTypes.bool,
|
||||
watchedCount: PropTypes.number,
|
||||
blurhash: PropTypes.string,
|
||||
currentUser: PropTypes.object,
|
||||
favourite: PropTypes.bool,
|
||||
};
|
||||
@@ -2,6 +2,30 @@
|
||||
|
||||
.card {
|
||||
border-radius: $border-radius-default;
|
||||
&-media {
|
||||
&-container {
|
||||
position: relative;
|
||||
border-radius: $border-radius-default;
|
||||
overflow: hidden;
|
||||
}
|
||||
&-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgb(0 0 0 / 0.6);
|
||||
opacity: 0;
|
||||
transition: opacity $transition-time-default;
|
||||
z-index: 10;
|
||||
}
|
||||
&-image-container {
|
||||
transition: opacity $transition-time-default;
|
||||
}
|
||||
}
|
||||
&:hover .card-media-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
&-image {
|
||||
position: relative;
|
||||
border-radius: $border-radius-default;
|
||||
@@ -9,6 +33,8 @@
|
||||
background-position: center;
|
||||
&-container {
|
||||
position: relative;
|
||||
border-radius: $border-radius-default;
|
||||
overflow: hidden;
|
||||
}
|
||||
&-icon {
|
||||
font-size: 4.5em !important;
|
||||
@@ -27,9 +53,19 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
z-index: -2;
|
||||
}
|
||||
}
|
||||
&-blurhash {
|
||||
position: absolute !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-radius: $border-radius-default;
|
||||
overflow: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
&-text-container {
|
||||
display: flex;
|
||||
@@ -37,4 +73,18 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
&-indicator {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
// padding: 2px 10px;
|
||||
z-index: 10;
|
||||
// border-radius: 100px;
|
||||
background: $clr-gradient-default;
|
||||
box-shadow: 0 0 5px rgb(0 0 0 / 0.4);
|
||||
&-text {
|
||||
aspect-ratio: 1;
|
||||
padding: 5px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,12 @@ import ButtonGroup from "@mui/material/ButtonGroup";
|
||||
import "./cardScroller.module.scss";
|
||||
export const CardScroller = ({ children, displayCards, title }) => {
|
||||
const responsive = {
|
||||
superLargeDesktop: {
|
||||
// the naming can be any, depends on you.
|
||||
breakpoint: { max: 4000, min: 3000 },
|
||||
items: displayCards + 1,
|
||||
slidesToSlide: displayCards + 1,
|
||||
},
|
||||
desktop: {
|
||||
breakpoint: { max: 3000, min: 1025 },
|
||||
items: displayCards,
|
||||
@@ -25,13 +31,13 @@ export const CardScroller = ({ children, displayCards, title }) => {
|
||||
},
|
||||
tablet: {
|
||||
breakpoint: { max: 1024, min: 464 },
|
||||
items: displayCards - 1,
|
||||
slidesToSlide: displayCards - 1, // optional, default to 1.
|
||||
items: displayCards - 2,
|
||||
slidesToSlide: displayCards - 2, // optional, default to 1.
|
||||
},
|
||||
mobile: {
|
||||
breakpoint: { max: 464, min: 0 },
|
||||
items: displayCards - 2,
|
||||
slidesToSlide: displayCards - 2, // optional, default to 1.
|
||||
items: displayCards - 3,
|
||||
slidesToSlide: displayCards - 3, // optional, default to 1.
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/** @format */
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import { MdiEmoticonCryOutline } from "../icons/mdiEmoticonCryOutline";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
export const EmptyNotice = () => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
flexFlow: "column",
|
||||
opacity: 0.2,
|
||||
}}
|
||||
>
|
||||
<MdiEmoticonCryOutline sx={{ fontSize: 200 }} />
|
||||
<Typography variant="h3">Nothing found</Typography>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -65,6 +65,25 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
||||
? "sqaure"
|
||||
: "portait"
|
||||
}
|
||||
watchedStatus={item.UserData.Played}
|
||||
watchedCount={
|
||||
item.UserData.UnplayedItemCount
|
||||
}
|
||||
blurhash={
|
||||
item.ImageBlurHashes == {}
|
||||
? ""
|
||||
: !!item.ImageTags.Primary
|
||||
? !!item.ImageBlurHashes.Primary
|
||||
? item.ImageBlurHashes
|
||||
.Primary[
|
||||
item.ImageTags
|
||||
.Primary
|
||||
]
|
||||
: ""
|
||||
: ""
|
||||
}
|
||||
currentUser={user.data}
|
||||
favourite={item.UserData.IsFavorite}
|
||||
></Card>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCheck } from "@mdi/js";
|
||||
|
||||
export const MdiCheck = (props) => {
|
||||
return (
|
||||
<SvgIcon color="red" {...props}>
|
||||
<path d={mdiCheck}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronDown } from "@mdi/js";
|
||||
|
||||
export const MdiChevronDown = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronDown}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonCryOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonCryOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonCryOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilterOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFilterOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilterOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHeart } from "@mdi/js";
|
||||
|
||||
export const MdiHeart = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHeart}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortAscending } from "@mdi/js";
|
||||
|
||||
export const MdiSortAscending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortAscending}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortDescending } from "@mdi/js";
|
||||
|
||||
export const MdiSortDescending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortDescending}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
+192
-159
@@ -1,11 +1,12 @@
|
||||
/** @format */
|
||||
import { useEffect, useState } from "react";
|
||||
import { delUser } from "../../utils/storage/user";
|
||||
|
||||
import { useQueryClient, useQuery, QueryClient } from "@tanstack/react-query";
|
||||
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
|
||||
import { useNavigate, NavLink } from "react-router-dom";
|
||||
import { useNavigate, NavLink, useLocation } from "react-router-dom";
|
||||
|
||||
import { theme } from "../../theme";
|
||||
|
||||
@@ -27,7 +28,7 @@ import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
|
||||
import { MediaCollectionTypeIconCollection } from "../../components/utils/iconsCollection.jsx";
|
||||
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { hideSidemenu } from "../../utils/slice/sidemenu";
|
||||
import { hideSidemenu, setBackdrop } from "../../utils/slice/sidemenu";
|
||||
|
||||
import { MdiHomeVariantOutline } from "../icons/mdiHomeVariantOutline";
|
||||
|
||||
@@ -56,20 +57,23 @@ const MiniDrawer = styled(MuiDrawer, {
|
||||
}));
|
||||
|
||||
export const SideMenu = ({}) => {
|
||||
const queryClient = useQueryClient();
|
||||
const location = useLocation();
|
||||
|
||||
const [display, setDisplay] = useState(false);
|
||||
|
||||
const visible = useSelector((state) => state.sidebar.visible);
|
||||
const backdrop = useSelector((state) => state.sidebar.backdrop);
|
||||
const navigate = useNavigate();
|
||||
const user = useQuery({
|
||||
queryKey: ["home", "user"],
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(window.api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
enabled: visible,
|
||||
enabled: false,
|
||||
});
|
||||
let libraries = useQuery({
|
||||
queryKey: ["sidemenu", "libraries"],
|
||||
queryKey: ["libraries"],
|
||||
queryFn: async () => {
|
||||
let libs = await getUserViewsApi(window.api).getUserViews({
|
||||
userId: user.data.Id,
|
||||
@@ -89,147 +93,202 @@ export const SideMenu = ({}) => {
|
||||
navigate("/login");
|
||||
};
|
||||
|
||||
return (
|
||||
<MiniDrawer
|
||||
variant="permanent"
|
||||
open={false}
|
||||
PaperProps={{
|
||||
sx: {
|
||||
backgroundColor: "inherit",
|
||||
border: "none",
|
||||
const getCurrentPathWithoutParam = () => {
|
||||
return location.pathname.slice(0, location.pathname.lastIndexOf("/"));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
getCurrentPathWithoutParam() != "/login" &&
|
||||
getCurrentPathWithoutParam() != "/setup/server"
|
||||
) {
|
||||
setDisplay(true);
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
if (!display) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
if (display) {
|
||||
return (
|
||||
<MiniDrawer
|
||||
variant="permanent"
|
||||
open={false}
|
||||
PaperProps={{
|
||||
sx: {
|
||||
backgroundColor: "inherit",
|
||||
border: "none",
|
||||
width: visible
|
||||
? `calc(${theme.spacing(7)} + 10px)`
|
||||
: 0,
|
||||
height: "100vh",
|
||||
// display: visible ? "block" : "none",
|
||||
},
|
||||
}}
|
||||
sx={{
|
||||
width: visible
|
||||
? `calc(${theme.spacing(7)} + 10px)`
|
||||
: 0,
|
||||
height: "100vh",
|
||||
// display: visible ? "block" : "none",
|
||||
},
|
||||
}}
|
||||
sx={{
|
||||
width: visible ? `calc(${theme.spacing(7)} + 10px)` : 0,
|
||||
}}
|
||||
>
|
||||
<DrawerHeader
|
||||
className="Mui-DrawerHeader"
|
||||
sx={{
|
||||
justifyContent: "center",
|
||||
background: backdrop
|
||||
? theme.palette.background.paper
|
||||
: "transparent",
|
||||
borderLeft: "1px solid white",
|
||||
}}
|
||||
>
|
||||
{/* <div>
|
||||
<DrawerHeader
|
||||
className="Mui-DrawerHeader"
|
||||
sx={{
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
{/* <div>
|
||||
<Avatar src={""}/>
|
||||
<Typography variant="h3">
|
||||
{user["Name"]}
|
||||
</Typography>
|
||||
</div> */}
|
||||
<IconButton
|
||||
color="inherit"
|
||||
aria-label="open drawer"
|
||||
onClick={handleDrawerOpen}
|
||||
>
|
||||
<MdiMenu />
|
||||
</IconButton>
|
||||
</DrawerHeader>
|
||||
<Divider />
|
||||
{libraries.isLoading ? (
|
||||
<>
|
||||
<Skeleton
|
||||
height="100%"
|
||||
variant="rounded"
|
||||
width="calc(100% - 10px )"
|
||||
sx={{ margin: "5px" }}
|
||||
></Skeleton>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<List sx={{ border: "none" }}>
|
||||
{libraries.data.Items.map((library, index) => {
|
||||
return (
|
||||
<Tooltip
|
||||
title={library.Name}
|
||||
placement="right"
|
||||
arrow
|
||||
followCursor
|
||||
key={index}
|
||||
>
|
||||
<ListItem
|
||||
className="sidemenu-item-container"
|
||||
disablePadding
|
||||
>
|
||||
<NavLink
|
||||
to={
|
||||
"/library/" +
|
||||
library.Id
|
||||
}
|
||||
className={({
|
||||
isActive,
|
||||
isPending,
|
||||
}) =>
|
||||
isPending
|
||||
? "sidemenu-item-pending sidemenu-item"
|
||||
: isActive
|
||||
? "sidemenu-item-active sidemenu-item"
|
||||
: "sidemenu-item"
|
||||
}
|
||||
<IconButton
|
||||
color="inherit"
|
||||
aria-label="open drawer"
|
||||
onClick={handleDrawerOpen}
|
||||
>
|
||||
<MdiMenu />
|
||||
</IconButton>
|
||||
</DrawerHeader>
|
||||
<Divider />
|
||||
{libraries.isLoading ? (
|
||||
<>
|
||||
<Skeleton
|
||||
height="100%"
|
||||
variant="rounded"
|
||||
width="calc(100% - 10px )"
|
||||
sx={{ margin: "5px" }}
|
||||
></Skeleton>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<List sx={{ border: "none" }}>
|
||||
{libraries.data.Items.map(
|
||||
(library, index) => {
|
||||
return (
|
||||
<Tooltip
|
||||
title={library.Name}
|
||||
placement="right"
|
||||
arrow
|
||||
followCursor
|
||||
key={index}
|
||||
>
|
||||
<ListItemButton
|
||||
<ListItem
|
||||
className="sidemenu-item-container"
|
||||
disablePadding
|
||||
>
|
||||
<NavLink
|
||||
to={
|
||||
"/library/" +
|
||||
library.Id
|
||||
}
|
||||
className={({
|
||||
isActive,
|
||||
isPending,
|
||||
}) =>
|
||||
isPending
|
||||
? "sidemenu-item-pending sidemenu-item"
|
||||
: isActive
|
||||
? "sidemenu-item-active sidemenu-item"
|
||||
: "sidemenu-item"
|
||||
}
|
||||
>
|
||||
<ListItemButton
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
justifyContent:
|
||||
"center",
|
||||
px: 2.5,
|
||||
}}
|
||||
color="white"
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
minWidth: 0,
|
||||
justifyContent:
|
||||
"center",
|
||||
}}
|
||||
>
|
||||
{
|
||||
MediaCollectionTypeIconCollection[
|
||||
library
|
||||
.CollectionType
|
||||
]
|
||||
}
|
||||
</ListItemIcon>
|
||||
</ListItemButton>
|
||||
</NavLink>
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</List>
|
||||
<List sx={{ marginTop: "auto" }}>
|
||||
<Tooltip
|
||||
title="Home"
|
||||
placement="right"
|
||||
followCursor
|
||||
arrow
|
||||
>
|
||||
<ListItem
|
||||
className="sidemenu-item-container"
|
||||
disablePadding
|
||||
>
|
||||
<NavLink
|
||||
to="/home"
|
||||
className={({
|
||||
isActive,
|
||||
isPending,
|
||||
}) =>
|
||||
isPending
|
||||
? "sidemenu-item-pending sidemenu-item"
|
||||
: isActive
|
||||
? "sidemenu-item-active sidemenu-item"
|
||||
: "sidemenu-item"
|
||||
}
|
||||
>
|
||||
<ListItemButton
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
justifyContent:
|
||||
"center",
|
||||
px: 2.5,
|
||||
}}
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
minWidth: 0,
|
||||
justifyContent:
|
||||
"center",
|
||||
px: 2.5,
|
||||
}}
|
||||
color="white"
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
minWidth: 0,
|
||||
justifyContent:
|
||||
"center",
|
||||
}}
|
||||
>
|
||||
{
|
||||
MediaCollectionTypeIconCollection[
|
||||
library
|
||||
.CollectionType
|
||||
]
|
||||
}
|
||||
</ListItemIcon>
|
||||
</ListItemButton>
|
||||
</NavLink>
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
<List sx={{ marginTop: "auto" }}>
|
||||
<Tooltip
|
||||
title="Home"
|
||||
placement="right"
|
||||
followCursor
|
||||
arrow
|
||||
>
|
||||
<ListItem
|
||||
className="sidemenu-item-container"
|
||||
disablePadding
|
||||
<MdiHomeVariantOutline></MdiHomeVariantOutline>
|
||||
</ListItemIcon>
|
||||
</ListItemButton>
|
||||
</NavLink>
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
title="Logout"
|
||||
placement="right"
|
||||
followCursor
|
||||
arrow
|
||||
>
|
||||
<NavLink
|
||||
to="/home"
|
||||
className={({
|
||||
isActive,
|
||||
isPending,
|
||||
}) =>
|
||||
isPending
|
||||
? "sidemenu-item-pending sidemenu-item"
|
||||
: isActive
|
||||
? "sidemenu-item-active sidemenu-item"
|
||||
: "sidemenu-item"
|
||||
}
|
||||
>
|
||||
<ListItem disablePadding>
|
||||
<ListItemButton
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
justifyContent: "center",
|
||||
px: 2.5,
|
||||
}}
|
||||
onClick={handleLogout}
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
@@ -238,43 +297,17 @@ export const SideMenu = ({}) => {
|
||||
"center",
|
||||
}}
|
||||
>
|
||||
<MdiHomeVariantOutline></MdiHomeVariantOutline>
|
||||
<MdiLogoutVariant></MdiLogoutVariant>
|
||||
</ListItemIcon>
|
||||
</ListItemButton>
|
||||
</NavLink>
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
title="Logout"
|
||||
placement="right"
|
||||
followCursor
|
||||
arrow
|
||||
>
|
||||
<ListItem disablePadding>
|
||||
<ListItemButton
|
||||
sx={{
|
||||
minHeight: 48,
|
||||
justifyContent: "center",
|
||||
px: 2.5,
|
||||
}}
|
||||
onClick={handleLogout}
|
||||
>
|
||||
<ListItemIcon
|
||||
sx={{
|
||||
minWidth: 0,
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<MdiLogoutVariant></MdiLogoutVariant>
|
||||
</ListItemIcon>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
</List>
|
||||
</>
|
||||
)}
|
||||
</MiniDrawer>
|
||||
);
|
||||
</ListItem>
|
||||
</Tooltip>
|
||||
</List>
|
||||
</>
|
||||
)}
|
||||
</MiniDrawer>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// SideMenu.propTypes = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { MdiTelevision } from "../icons/mdiTelevision";
|
||||
import { MdiFolderOutline } from "../icons/mdiFolderOutline";
|
||||
import { MdiFolderMusicOutline } from "../icons/mdiFolderMusicOutline";
|
||||
import { MdiYoutube } from "../icons/mdiYoutube";
|
||||
import { MdiMultimedia } from "../icons/mdiMultiMedia";
|
||||
import { MdiMultimedia } from "../icons/mdiMultimedia";
|
||||
import { MdiBookMultiple } from "../icons/mdiBookMultiple";
|
||||
import { MdiImageMultiple } from "../icons/mdiImageMultiple";
|
||||
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
&-icon {
|
||||
position: absolute;
|
||||
font-size: 10em !important;
|
||||
font-size: 15em !important;
|
||||
left: 70%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
+505
-434
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,63 @@
|
||||
/** @format */
|
||||
|
||||
.item-detail {
|
||||
&-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: inherit;
|
||||
height: 100%;
|
||||
z-index: -2;
|
||||
opacity: 0.1;
|
||||
}
|
||||
&-header {
|
||||
display: flex;
|
||||
gap: 2em;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
&-backdrop {
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
height: 150%;
|
||||
top: -88px;
|
||||
width: 100vw;
|
||||
right: 0;
|
||||
left: -24px;
|
||||
z-index: -1;
|
||||
filter: brightness(0.5);
|
||||
mask-image: linear-gradient(0deg, transparent, black);
|
||||
-webkit-mask-image: linear-gradient(0deg, transparent, black);
|
||||
}
|
||||
}
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
transition: opacity $transition-time-default;
|
||||
&-blurhash {
|
||||
z-index: -1;
|
||||
}
|
||||
&-container {
|
||||
width: 15%;
|
||||
position: relative;
|
||||
aspect-ratio: 0.666;
|
||||
border-radius: $border-radius-default;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 15px rgb(0 0 0 / 0.4);
|
||||
}
|
||||
&-icon-container {
|
||||
background: $clr-gradient-dark;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
/** @format */
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
||||
import Divider from "@mui/material/Divider";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
import {
|
||||
setBackdrop,
|
||||
showAppBar,
|
||||
showBackButton,
|
||||
} from "../../../utils/slice/appBar";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { MdiStarHalfFull } from "../../../components/icons/mdiStarHalfFull";
|
||||
import { getRuntimeFull } from "../../../utils/date/time";
|
||||
import { TypeIconCollectionCard } from "../../../components/utils/iconsCollection";
|
||||
|
||||
import { Card } from "../../../components/card/card";
|
||||
import { CardScroller } from "../../../components/cardScroller/cardScroller";
|
||||
|
||||
import "./Movie.module.scss";
|
||||
|
||||
const ItemMovie = () => {
|
||||
const { id } = useParams();
|
||||
const dispatch = useDispatch();
|
||||
const appBarVisiblity = useSelector((state) => state.appBar.visible);
|
||||
const [scrollTarget, setScrollTarget] = useState(undefined);
|
||||
const [primageImageLoaded, setPrimaryImageLoaded] = useState(false);
|
||||
const [backdropImageLoaded, setBackdropImageLoaded] = useState(false);
|
||||
|
||||
const trigger = useScrollTrigger({
|
||||
disableHysteresis: true,
|
||||
threshold: 0,
|
||||
target: scrollTarget,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!appBarVisiblity) {
|
||||
dispatch(showAppBar());
|
||||
}
|
||||
dispatch(setBackdrop(trigger));
|
||||
dispatch(showBackButton());
|
||||
}, [trigger]);
|
||||
|
||||
const user = useQuery({
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(window.api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
});
|
||||
|
||||
const item = useQuery({
|
||||
queryKey: ["item,Movie", id],
|
||||
queryFn: async () => {
|
||||
const result = await getUserLibraryApi(window.api).getItem({
|
||||
userId: user.data.Id,
|
||||
itemId: id,
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
});
|
||||
if (item.isLoading) {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<>
|
||||
<Box className="item-detail-backdrop">
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes.Backdrop[
|
||||
item.data.BackdropImageTags[0]
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: "0.666",
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<Box
|
||||
recomponent="main"
|
||||
className="scrollY"
|
||||
sx={{
|
||||
display: "flex",
|
||||
pt: 11,
|
||||
px: 3,
|
||||
pb: 3,
|
||||
position: "relative",
|
||||
flexFlow: "column",
|
||||
gap: 5,
|
||||
}}
|
||||
ref={(node) => {
|
||||
if (node) {
|
||||
setScrollTarget(node);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Box className="item-detail-header">
|
||||
<Box className="item-detail-header-backdrop">
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<img
|
||||
src={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
item.data.Id +
|
||||
"/Images/Backdrop"
|
||||
}
|
||||
style={{
|
||||
opacity: backdropImageLoaded
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
className="item-detail-image"
|
||||
onLoad={() =>
|
||||
setBackdropImageLoaded(true)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes
|
||||
.Backdrop[
|
||||
item.data
|
||||
.BackdropImageTags[0]
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: "0.666",
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
<Box
|
||||
sx={{ fontSize: "4em" }}
|
||||
className="item-detail-image-icon-container"
|
||||
>
|
||||
{TypeIconCollectionCard[item.data.Type]}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box className="item-detail-image-container">
|
||||
{!!item.data.ImageTags.Primary && (
|
||||
<img
|
||||
src={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
item.data.Id +
|
||||
"/Images/Primary"
|
||||
}
|
||||
style={{
|
||||
opacity: primageImageLoaded
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
className="item-detail-image"
|
||||
onLoad={() =>
|
||||
setPrimaryImageLoaded(true)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{!!item.data.ImageBlurHashes.Primary && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes
|
||||
.Primary[
|
||||
item.data.ImageTags
|
||||
.Primary
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: 0.666,
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
<div className="item-detail-image-icon-container">
|
||||
{TypeIconCollectionCard[item.data.Type]}
|
||||
</div>
|
||||
</Box>
|
||||
<Box className="item-detail-info-container">
|
||||
<Box
|
||||
className="item-detail-title-name"
|
||||
sx={{ mb: 2 }}
|
||||
>
|
||||
<Typography variant="h3">
|
||||
{item.data.Name}
|
||||
</Typography>
|
||||
{!!item.data.UserData
|
||||
.PlayedPercentage && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
item.data.UserData
|
||||
.PlayedPercentage
|
||||
}
|
||||
sx={{
|
||||
borderRadius: 1000,
|
||||
width: "75%",
|
||||
mt: 1,
|
||||
mb: 1,
|
||||
}}
|
||||
color="primary"
|
||||
/>
|
||||
)}
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
color="gray"
|
||||
>
|
||||
{item.data.OriginalTitle}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={2}
|
||||
divider={
|
||||
<Divider
|
||||
variant="middle"
|
||||
flexItem
|
||||
orientation="vertical"
|
||||
/>
|
||||
}
|
||||
ex={{ alignItems: "center" }}
|
||||
>
|
||||
<Typography
|
||||
sx={{ flexGrow: 0 }}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{item.data.ProductionYear}
|
||||
</Typography>
|
||||
<Chip
|
||||
variant="outlined"
|
||||
label={
|
||||
!!item.data.OfficialRating
|
||||
? item.data
|
||||
.OfficialRating
|
||||
: "Not Rated"
|
||||
}
|
||||
/>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="item-detail-info-rating"
|
||||
>
|
||||
{!!item.data.CommunityRating ? (
|
||||
<>
|
||||
<MdiStarHalfFull />
|
||||
<Typography variant="subtitle1">
|
||||
{Math.round(
|
||||
item.data
|
||||
.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<Typography variant="subtitle1">
|
||||
No Community Rating
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
<Typography variant="subtitle1">
|
||||
{getRuntimeFull(
|
||||
item.data.RunTimeTicks,
|
||||
)}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box className="item-media-container">
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={1}
|
||||
alignItems="center"
|
||||
>
|
||||
<Typography variant="h5">Genre</Typography>
|
||||
{item.data.Genres.map((genre, index) => {
|
||||
return (
|
||||
<Chip
|
||||
key={index}
|
||||
variant="filled"
|
||||
label={genre}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
</Box>
|
||||
<Typography variant="body1">
|
||||
{item.data.Overview}
|
||||
</Typography>
|
||||
<CardScroller displayCards={8} title="Cast">
|
||||
{item.data.People.map((person, index) => {
|
||||
return (
|
||||
<Card
|
||||
key={index}
|
||||
itemName={person.Name}
|
||||
itemId={person.Id}
|
||||
// imageTags={false}
|
||||
imageTags={
|
||||
!!person.PrimaryImageTag
|
||||
}
|
||||
iconType="Person"
|
||||
subText={person.Role}
|
||||
cardOrientation="sqaure"
|
||||
currentUser={user.data}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
return <h1>{"Something went wrong :("}</h1>;
|
||||
}
|
||||
};
|
||||
|
||||
export default ItemMovie;
|
||||
@@ -0,0 +1,63 @@
|
||||
/** @format */
|
||||
|
||||
.item-detail {
|
||||
&-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: inherit;
|
||||
height: 100%;
|
||||
z-index: -2;
|
||||
opacity: 0.1;
|
||||
}
|
||||
&-header {
|
||||
display: flex;
|
||||
gap: 2em;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
&-backdrop {
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
height: 150%;
|
||||
top: -88px;
|
||||
width: 100vw;
|
||||
right: 0;
|
||||
left: -24px;
|
||||
z-index: -1;
|
||||
filter: brightness(0.5);
|
||||
mask-image: linear-gradient(0deg, transparent, black);
|
||||
-webkit-mask-image: linear-gradient(0deg, transparent, black);
|
||||
}
|
||||
}
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
position: absolute;
|
||||
transition: opacity $transition-time-default;
|
||||
&-blurhash {
|
||||
z-index: -1;
|
||||
}
|
||||
&-container {
|
||||
width: 15%;
|
||||
position: relative;
|
||||
aspect-ratio: 0.666;
|
||||
border-radius: $border-radius-default;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 15px rgb(0 0 0 / 0.4);
|
||||
}
|
||||
&-icon-container {
|
||||
background: $clr-gradient-dark;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
/** @format */
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
||||
import Divider from "@mui/material/Divider";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
import {
|
||||
setBackdrop,
|
||||
showAppBar,
|
||||
showBackButton,
|
||||
} from "../../../utils/slice/appBar";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { MdiStarHalfFull } from "../../../components/icons/mdiStarHalfFull";
|
||||
import { getRuntimeFull } from "../../../utils/date/time";
|
||||
import { TypeIconCollectionCard } from "../../../components/utils/iconsCollection";
|
||||
|
||||
import { Card } from "../../../components/card/card";
|
||||
import { CardScroller } from "../../../components/cardScroller/cardScroller";
|
||||
|
||||
import "./Series.module.scss";
|
||||
|
||||
const ItemSeries = () => {
|
||||
const { id } = useParams();
|
||||
const dispatch = useDispatch();
|
||||
const appBarVisiblity = useSelector((state) => state.appBar.visible);
|
||||
const [scrollTarget, setScrollTarget] = useState(undefined);
|
||||
const [primageImageLoaded, setPrimaryImageLoaded] = useState(false);
|
||||
const [backdropImageLoaded, setBackdropImageLoaded] = useState(false);
|
||||
|
||||
const trigger = useScrollTrigger({
|
||||
disableHysteresis: true,
|
||||
threshold: 0,
|
||||
target: scrollTarget,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!appBarVisiblity) {
|
||||
dispatch(showAppBar());
|
||||
}
|
||||
dispatch(setBackdrop(trigger));
|
||||
dispatch(showBackButton());
|
||||
}, [trigger]);
|
||||
|
||||
const user = useQuery({
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(window.api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
});
|
||||
|
||||
const item = useQuery({
|
||||
queryKey: ["item, Series", id],
|
||||
queryFn: async () => {
|
||||
const result = await getUserLibraryApi(window.api).getItem({
|
||||
userId: user.data.Id,
|
||||
itemId: id,
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
});
|
||||
if (item.isLoading) {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<>
|
||||
<Box className="item-detail-backdrop">
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes.Backdrop[
|
||||
item.data.BackdropImageTags[0]
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: "0.666",
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<Box
|
||||
recomponent="main"
|
||||
className="scrollY"
|
||||
sx={{
|
||||
display: "flex",
|
||||
pt: 11,
|
||||
px: 3,
|
||||
pb: 3,
|
||||
position: "relative",
|
||||
flexFlow: "column",
|
||||
gap: 5,
|
||||
}}
|
||||
ref={(node) => {
|
||||
if (node) {
|
||||
setScrollTarget(node);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Box className="item-detail-header">
|
||||
<Box className="item-detail-header-backdrop">
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<img
|
||||
src={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
item.data.Id +
|
||||
"/Images/Backdrop"
|
||||
}
|
||||
style={{
|
||||
opacity: backdropImageLoaded
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
className="item-detail-image"
|
||||
onLoad={() =>
|
||||
setBackdropImageLoaded(true)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{item.data.BackdropImageTags.length != 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes
|
||||
.Backdrop[
|
||||
item.data
|
||||
.BackdropImageTags[0]
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: "0.666",
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
<Box
|
||||
sx={{ fontSize: "4em" }}
|
||||
className="item-detail-image-icon-container"
|
||||
>
|
||||
{TypeIconCollectionCard[item.data.Type]}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box className="item-detail-image-container">
|
||||
{!!item.data.ImageTags.Primary && (
|
||||
<img
|
||||
src={
|
||||
window.api.basePath +
|
||||
"/Items/" +
|
||||
item.data.Id +
|
||||
"/Images/Primary"
|
||||
}
|
||||
style={{
|
||||
opacity: primageImageLoaded
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
className="item-detail-image"
|
||||
onLoad={() =>
|
||||
setPrimaryImageLoaded(true)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{!!item.data.ImageBlurHashes.Primary && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.data.ImageBlurHashes
|
||||
.Primary[
|
||||
item.data.ImageTags
|
||||
.Primary
|
||||
]
|
||||
}
|
||||
width="100%"
|
||||
height="100%"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
style={{
|
||||
aspectRatio: 0.666,
|
||||
}}
|
||||
className="item-detail-image-blurhash"
|
||||
/>
|
||||
)}
|
||||
<div className="item-detail-image-icon-container">
|
||||
{TypeIconCollectionCard[item.data.Type]}
|
||||
</div>
|
||||
</Box>
|
||||
<Box className="item-detail-info-container">
|
||||
<Box
|
||||
className="item-detail-title-name"
|
||||
sx={{ mb: 2 }}
|
||||
>
|
||||
<Typography variant="h3">
|
||||
{item.data.Name}
|
||||
</Typography>
|
||||
{!!item.data.UserData
|
||||
.PlayedPercentage && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
item.data.UserData
|
||||
.PlayedPercentage
|
||||
}
|
||||
sx={{
|
||||
borderRadius: 1000,
|
||||
width: "75%",
|
||||
mt: 1,
|
||||
mb: 1,
|
||||
}}
|
||||
color="primary"
|
||||
/>
|
||||
)}
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
color="gray"
|
||||
>
|
||||
{item.data.OriginalTitle}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={2}
|
||||
divider={
|
||||
<Divider
|
||||
variant="middle"
|
||||
flexItem
|
||||
orientation="vertical"
|
||||
/>
|
||||
}
|
||||
ex={{ alignItems: "center" }}
|
||||
>
|
||||
<Typography
|
||||
sx={{ flexGrow: 0 }}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{item.data.ProductionYear}
|
||||
</Typography>
|
||||
<Chip
|
||||
variant="outlined"
|
||||
label={
|
||||
!!item.data.OfficialRating
|
||||
? item.data
|
||||
.OfficialRating
|
||||
: "Not Rated"
|
||||
}
|
||||
/>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="item-detail-info-rating"
|
||||
>
|
||||
{!!item.data.CommunityRating ? (
|
||||
<>
|
||||
<MdiStarHalfFull />
|
||||
<Typography variant="subtitle1">
|
||||
{Math.round(
|
||||
item.data
|
||||
.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<Typography variant="subtitle1">
|
||||
No Community Rating
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
<Typography variant="subtitle1">
|
||||
{getRuntimeFull(
|
||||
item.data.RunTimeTicks,
|
||||
)}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box className="item-media-container">
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={1}
|
||||
alignItems="center"
|
||||
>
|
||||
<Typography variant="h5">Genre</Typography>
|
||||
{item.data.Genres.map((genre, index) => {
|
||||
return (
|
||||
<Chip
|
||||
key={index}
|
||||
variant="filled"
|
||||
label={genre}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
</Box>
|
||||
<Typography variant="body1">
|
||||
{item.data.Overview}
|
||||
</Typography>
|
||||
<CardScroller displayCards={8} title="Cast">
|
||||
{item.data.People.map((person, index) => {
|
||||
return (
|
||||
<Card
|
||||
key={index}
|
||||
itemName={person.Name}
|
||||
itemId={person.Id}
|
||||
// imageTags={false}
|
||||
imageTags={
|
||||
!!person.PrimaryImageTag
|
||||
}
|
||||
iconType="Person"
|
||||
subText={person.Role}
|
||||
cardOrientation="sqaure"
|
||||
currentUser={user.data}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
return <h1>{"Something went wrong :("}</h1>;
|
||||
}
|
||||
};
|
||||
|
||||
export default ItemSeries;
|
||||
+822
-2
@@ -1,9 +1,829 @@
|
||||
/** @format */
|
||||
import { useParams } from "react-router-dom";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import {
|
||||
showAppBar,
|
||||
setBackdrop,
|
||||
showBackButton,
|
||||
} from "../../utils/slice/appBar";
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import Grid2 from "@mui/material/Unstable_Grid2";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import Divider from "@mui/material/Divider";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import Checkbox from "@mui/material/Checkbox";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
import { theme } from "../../theme";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||
import { getArtistsApi } from "@jellyfin/sdk/lib/utils/api/artists-api";
|
||||
import { getGenresApi } from "@jellyfin/sdk/lib/utils/api/genres-api";
|
||||
import { getMusicGenresApi } from "@jellyfin/sdk/lib/utils/api/music-genres-api";
|
||||
import { getStudiosApi } from "@jellyfin/sdk/lib/utils/api/studios-api";
|
||||
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
||||
|
||||
import { Card } from "../../components/card/card";
|
||||
import { EmptyNotice } from "../../components/emptyNotice/emptyNotice";
|
||||
|
||||
import { MdiSortDescending } from "../../components/icons/mdiSortDescending";
|
||||
import { MdiSortAscending } from "../../components/icons/mdiSortAscending";
|
||||
import { MdiChevronDown } from "../../components/icons/mdiChevronDown";
|
||||
import { MdiFilterOutline } from "../../components/icons/mdiFilterOutline";
|
||||
|
||||
const LibraryView = () => {
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useDispatch();
|
||||
const appBarVisiblity = useSelector((state) => state.appBar.visible);
|
||||
|
||||
if (!appBarVisiblity) {
|
||||
dispatch(showAppBar());
|
||||
}
|
||||
const { id } = useParams();
|
||||
return <h1>{id}</h1>;
|
||||
|
||||
const user = useQuery({
|
||||
queryKey: ["libraryView", "user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(window.api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
});
|
||||
|
||||
const [sortAscending, setSortAscending] = useState(false);
|
||||
const [sortBy, setSortBy] = useState("SortName");
|
||||
const [sortByData, setSortByData] = useState([
|
||||
{ title: "Name", value: "SortName" },
|
||||
{ title: "Rating", value: "CommunityRating" },
|
||||
{ title: "Release Date", value: "PremiereDate" },
|
||||
]);
|
||||
const handleSortChange = (e) => {
|
||||
setSortAscending(e.target.checked);
|
||||
};
|
||||
const handleSortBy = (e) => {
|
||||
setSortBy(e.target.value);
|
||||
};
|
||||
|
||||
const fetchLib = async (libraryId) => {
|
||||
const result = await getItemsApi(window.api).getItems({
|
||||
userId: user.data.Id,
|
||||
ids: [libraryId],
|
||||
});
|
||||
return result.data;
|
||||
};
|
||||
const currentLib = useQuery({
|
||||
queryKey: ["libraryView", "currentLib", id],
|
||||
queryFn: () => fetchLib(id),
|
||||
enabled: !!user.data,
|
||||
});
|
||||
|
||||
if (currentLib.isSuccess) {
|
||||
dispatch(showBackButton());
|
||||
}
|
||||
|
||||
const [isPlayed, setIsPlayed] = useState(false);
|
||||
const [isUnPlayed, setIsUnPlayed] = useState(false);
|
||||
const [isResumable, setIsResumable] = useState(false);
|
||||
const [isFavourite, setIsFavourite] = useState(false);
|
||||
const [isLiked, setIsLiked] = useState(false);
|
||||
const [isUnliked, setIsUnliked] = useState(false);
|
||||
const availableWatchStatus = [
|
||||
{
|
||||
title: "Played",
|
||||
value: false,
|
||||
state: (val) => setIsPlayed(val),
|
||||
},
|
||||
{
|
||||
title: "Unplayed",
|
||||
value: false,
|
||||
state: (val) => setIsUnPlayed(val),
|
||||
},
|
||||
{
|
||||
title: "Resumable",
|
||||
value: false,
|
||||
state: (val) => setIsResumable(val),
|
||||
},
|
||||
{
|
||||
title: "Favourite",
|
||||
value: false,
|
||||
state: (val) => setIsFavourite(val),
|
||||
},
|
||||
{
|
||||
title: "Liked",
|
||||
value: false,
|
||||
state: (val) => setIsLiked(val),
|
||||
},
|
||||
{
|
||||
title: "UnLiked",
|
||||
value: false,
|
||||
state: (val) => setIsUnliked(val),
|
||||
},
|
||||
];
|
||||
|
||||
const [hasSubtitles, setHasSubtitles] = useState(false);
|
||||
const [hasTrailer, setHasTrailer] = useState(false);
|
||||
const [hasSpecialFeature, setHasSpecialFeature] = useState(false);
|
||||
const [hasThemeSong, setHasThemeSong] = useState(false);
|
||||
const [hasThemeVideo, setHasThemeVideo] = useState(false);
|
||||
const availableFeatureFilters = [
|
||||
{
|
||||
title: "Subtitles",
|
||||
value: false,
|
||||
state: (val) => setHasSubtitles(val),
|
||||
},
|
||||
{
|
||||
title: "Trailer",
|
||||
value: false,
|
||||
state: (val) => setHasTrailer(val),
|
||||
},
|
||||
{
|
||||
title: "Special Feature",
|
||||
value: false,
|
||||
state: (val) => setHasSpecialFeature(val),
|
||||
},
|
||||
{
|
||||
title: "Theme Song",
|
||||
value: false,
|
||||
state: (val) => setHasThemeSong(val),
|
||||
},
|
||||
{
|
||||
title: "Theme Video",
|
||||
vslue: false,
|
||||
state: (val) => setHasThemeVideo(val),
|
||||
},
|
||||
];
|
||||
|
||||
const [isBluRay, setIsBluRay] = useState(false);
|
||||
const [isDVD, setIsDVD] = useState(false);
|
||||
const [isHD, setIsHD] = useState(false);
|
||||
const [is4K, setIs4K] = useState(false);
|
||||
const [is3D, setIs3D] = useState(false);
|
||||
const availableVideoTypeFilters = [
|
||||
{ title: "Blu-Ray", value: false, state: (val) => setIsBluRay(val) },
|
||||
{ title: "DVD", value: false, state: (val) => setIsDVD(val) },
|
||||
{ title: "HD", value: false, state: (val) => setIsHD(val) },
|
||||
{ title: "4K", value: false, state: (val) => setIs4K(val) },
|
||||
{ title: "3D", value: false, state: (val) => setIs3D(val) },
|
||||
];
|
||||
|
||||
const [currentViewType, setCurrentViewType] = useState(undefined);
|
||||
const [viewType, setViewType] = useState([]);
|
||||
useEffect(() => {
|
||||
if (currentLib.isSuccess) {
|
||||
if (currentLib.data.Items[0].CollectionType == "movies") {
|
||||
setViewType([
|
||||
{ title: "Movies", value: "Movie" },
|
||||
{ title: "Collections", value: "BoxSet" },
|
||||
{ title: "Actors", value: "Person" },
|
||||
{ title: "Genres", value: "Genre" },
|
||||
{ title: "Studios", value: "Studio" },
|
||||
]);
|
||||
} else if (currentLib.data.Items[0].CollectionType == "music") {
|
||||
setViewType([
|
||||
{ title: "Albums", value: "MusicAlbum" },
|
||||
{ title: "Artists", value: "MusicArtist" },
|
||||
{ title: "Genres", value: "MusicGenre" },
|
||||
]);
|
||||
} else if (
|
||||
currentLib.data.Items[0].CollectionType == "tvshows"
|
||||
) {
|
||||
setViewType([
|
||||
{ title: "Series", value: "Series" },
|
||||
{ title: "Actors", value: "Person" },
|
||||
{ title: "Genres", value: "Genre" },
|
||||
{ title: "Networks", value: "Studio" },
|
||||
]);
|
||||
} else {
|
||||
setViewType([]);
|
||||
}
|
||||
}
|
||||
}, [currentLib.isSuccess]);
|
||||
|
||||
const fetchLibItems = async (libraryId) => {
|
||||
let result;
|
||||
if (currentViewType == "MusicArtist") {
|
||||
result = await getArtistsApi(window.api).getAlbumArtists({
|
||||
userId: user.data.Id,
|
||||
parentId: libraryId,
|
||||
});
|
||||
} else if (currentViewType == "Person") {
|
||||
result = await getPersonsApi(window.api).getPersons({
|
||||
userId: user.data.Id,
|
||||
personTypes: ["Actor"],
|
||||
});
|
||||
} else if (currentViewType == "Genre") {
|
||||
result = await getGenresApi(window.api).getGenres({
|
||||
userId: user.data.Id,
|
||||
parentId: libraryId,
|
||||
});
|
||||
} else if (currentViewType == "MusicGenre") {
|
||||
result = await getMusicGenresApi(window.api).getMusicGenres({
|
||||
userId: user.data.Id,
|
||||
parentId: libraryId,
|
||||
});
|
||||
} else if (currentViewType == "Studio") {
|
||||
result = await getStudiosApi(window.api).getStudios({
|
||||
userId: user.data.Id,
|
||||
parentId: libraryId,
|
||||
});
|
||||
} else {
|
||||
result = await getItemsApi(window.api).getItems({
|
||||
userId: user.data.Id,
|
||||
parentId: libraryId,
|
||||
recursive: true,
|
||||
includeItemTypes: [currentViewType],
|
||||
sortOrder: [sortAscending ? "Ascending" : "Descending"],
|
||||
sortBy: sortBy,
|
||||
filters: [
|
||||
isPlayed && "IsPlayed",
|
||||
isUnPlayed && "IsUnplayed",
|
||||
isResumable && "IsResumable",
|
||||
isFavourite && "IsFavorite",
|
||||
isLiked && "IsFavoriteOrLikes",
|
||||
isUnliked && "Dislikes",
|
||||
],
|
||||
hasSubtitles: hasSubtitles ? true : undefined,
|
||||
hasTrailer: hasTrailer ? true : undefined,
|
||||
hasSpecialFeature: hasSpecialFeature ? true : undefined,
|
||||
hasThemeSong: hasThemeSong ? true : undefined,
|
||||
hasThemeVideo: hasThemeVideo ? true : undefined,
|
||||
videoTypes: [isBluRay && "BluRay", isDVD && "Dvd"],
|
||||
isHd: isHD ? true : undefined,
|
||||
is4K: is4K ? true : undefined,
|
||||
is3D: is3D ? true : undefined,
|
||||
});
|
||||
}
|
||||
return result.data;
|
||||
};
|
||||
|
||||
const items = useQuery({
|
||||
queryKey: [
|
||||
"libraryView",
|
||||
"currentLibItems",
|
||||
id,
|
||||
[
|
||||
currentViewType,
|
||||
sortAscending,
|
||||
sortBy,
|
||||
[
|
||||
isPlayed,
|
||||
isUnPlayed,
|
||||
isResumable,
|
||||
isFavourite,
|
||||
isLiked,
|
||||
isUnliked,
|
||||
],
|
||||
[
|
||||
hasSubtitles,
|
||||
hasTrailer,
|
||||
hasSpecialFeature,
|
||||
hasThemeSong,
|
||||
hasThemeVideo,
|
||||
],
|
||||
[isBluRay, isDVD, isHD, is4K, is3D],
|
||||
],
|
||||
],
|
||||
queryFn: () => fetchLibItems(id),
|
||||
enabled: !!user.data,
|
||||
});
|
||||
|
||||
dispatch(setBackdrop(true));
|
||||
|
||||
const handleCurrentViewType = (e) => {
|
||||
setCurrentViewType(e.target.value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (viewType.length != 0) setCurrentViewType(viewType[0].value);
|
||||
}, [viewType]);
|
||||
|
||||
const allowedSortViews = ["Movie", "Series", "MusicAlbum"];
|
||||
const allowedFilterViews = ["movies", "tvshows", "music", "books"];
|
||||
const onlyStatusFilterViews = ["books", "music"];
|
||||
|
||||
const [filterButtonAnchorEl, setFilterButtonAnchorEl] = useState(null);
|
||||
const filterMenuOpen = Boolean(filterButtonAnchorEl);
|
||||
const openFiltersMenu = (event) => {
|
||||
setFilterButtonAnchorEl(event.currentTarget);
|
||||
};
|
||||
const closeFiltersMenu = () => {
|
||||
setFilterButtonAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
component="main"
|
||||
className="scrollY"
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
pt: 19,
|
||||
px: 3,
|
||||
pb: 3,
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<AppBar
|
||||
position="fixed"
|
||||
elevation={0}
|
||||
sx={{
|
||||
width: `calc(100vw - ${theme.spacing(7)} - 10px)`,
|
||||
mt: 8,
|
||||
}}
|
||||
>
|
||||
<Divider />
|
||||
<Toolbar sx={{ justifyContent: "space-between" }}>
|
||||
<Stack alignItems="center" direction="row">
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ mr: 2, flexShrink: 0 }}
|
||||
noWrap
|
||||
>
|
||||
{currentLib.isLoading ? (
|
||||
<CircularProgress sx={{ p: 1 }} />
|
||||
) : (
|
||||
currentLib.data.Items[0].Name
|
||||
)}
|
||||
</Typography>
|
||||
<Chip
|
||||
label={
|
||||
items.isLoading ? (
|
||||
<CircularProgress
|
||||
sx={{ p: 1.5 }}
|
||||
/>
|
||||
) : (
|
||||
items.data.TotalRecordCount
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
{/* <InputLabel id="demo-simple-select-label">
|
||||
Age
|
||||
</InputLabel> */}
|
||||
<Stack
|
||||
direction="row"
|
||||
spacing={2}
|
||||
divider={
|
||||
<Divider
|
||||
orientation="vertical"
|
||||
flexItem
|
||||
variant="inset"
|
||||
/>
|
||||
}
|
||||
>
|
||||
{currentLib.isSuccess &&
|
||||
allowedFilterViews.includes(
|
||||
currentLib.data.Items[0]
|
||||
.CollectionType,
|
||||
) && (
|
||||
<>
|
||||
<Button
|
||||
id="basic-button"
|
||||
aria-controls={
|
||||
open
|
||||
? "basic-menu"
|
||||
: undefined
|
||||
}
|
||||
aria-haspopup="true"
|
||||
aria-expanded={
|
||||
open
|
||||
? "true"
|
||||
: undefined
|
||||
}
|
||||
startIcon={
|
||||
<MdiFilterOutline />
|
||||
}
|
||||
endIcon={
|
||||
<MdiChevronDown />
|
||||
}
|
||||
onClick={openFiltersMenu}
|
||||
color="white"
|
||||
// sx={{ p: 1 }}
|
||||
// size="small"
|
||||
>
|
||||
Filter
|
||||
</Button>
|
||||
<Menu
|
||||
id="basic-menu"
|
||||
anchorEl={
|
||||
filterButtonAnchorEl
|
||||
}
|
||||
open={filterMenuOpen}
|
||||
onClose={
|
||||
closeFiltersMenu
|
||||
}
|
||||
MenuListProps={{
|
||||
"aria-labelledby":
|
||||
"basic-button",
|
||||
sx: { p: 1 },
|
||||
}}
|
||||
anchorOrigin={{
|
||||
vertical: "bottom",
|
||||
horizontal:
|
||||
"center",
|
||||
}}
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal:
|
||||
"center",
|
||||
}}
|
||||
sx={{
|
||||
maxHeight: "55%",
|
||||
}}
|
||||
>
|
||||
<Accordion>
|
||||
<AccordionSummary
|
||||
expandIcon={
|
||||
<MdiChevronDown />
|
||||
}
|
||||
aria-controls="panel1bh-content"
|
||||
id="panel1bh-header"
|
||||
>
|
||||
<Typography
|
||||
sx={{
|
||||
width: "33%",
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
Status
|
||||
</Typography>
|
||||
</AccordionSummary>
|
||||
<Divider />
|
||||
<AccordionDetails
|
||||
sx={{
|
||||
maxHeight:
|
||||
"15em",
|
||||
overflow:
|
||||
"auto",
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
{availableWatchStatus.map(
|
||||
(
|
||||
item,
|
||||
index,
|
||||
) => {
|
||||
return (
|
||||
<MenuItem
|
||||
sx={{
|
||||
justifyContent:
|
||||
"space-between",
|
||||
}}
|
||||
key={
|
||||
index
|
||||
}
|
||||
>
|
||||
{
|
||||
item.title
|
||||
}
|
||||
<Checkbox
|
||||
value={
|
||||
item.value
|
||||
}
|
||||
onChange={(
|
||||
e,
|
||||
) =>
|
||||
item.state(
|
||||
e
|
||||
.target
|
||||
.checked,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</MenuItem>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</Stack>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
{!onlyStatusFilterViews.includes(
|
||||
currentLib.data
|
||||
.Items[0]
|
||||
.CollectionType,
|
||||
) && (
|
||||
<Accordion>
|
||||
<AccordionSummary
|
||||
expandIcon={
|
||||
<MdiChevronDown />
|
||||
}
|
||||
aria-controls="panel1bh-content"
|
||||
id="panel1bh-header"
|
||||
>
|
||||
<Typography
|
||||
sx={{
|
||||
width: "33%",
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
Features
|
||||
</Typography>
|
||||
</AccordionSummary>
|
||||
<Divider />
|
||||
<AccordionDetails
|
||||
sx={{
|
||||
maxHeight:
|
||||
"15em",
|
||||
overflow:
|
||||
"auto",
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
{availableFeatureFilters.map(
|
||||
(
|
||||
item,
|
||||
index,
|
||||
) => {
|
||||
return (
|
||||
<MenuItem
|
||||
sx={{
|
||||
justifyContent:
|
||||
"space-between",
|
||||
}}
|
||||
key={
|
||||
index
|
||||
}
|
||||
>
|
||||
{
|
||||
item.title
|
||||
}
|
||||
<Checkbox
|
||||
value={
|
||||
item.value
|
||||
}
|
||||
onChange={(
|
||||
e,
|
||||
) =>
|
||||
item.state(
|
||||
e
|
||||
.target
|
||||
.checked,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</MenuItem>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</Stack>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
)}
|
||||
{!onlyStatusFilterViews.includes(
|
||||
currentLib.data
|
||||
.Items[0]
|
||||
.CollectionType,
|
||||
) && (
|
||||
<Accordion>
|
||||
<AccordionSummary
|
||||
expandIcon={
|
||||
<MdiChevronDown />
|
||||
}
|
||||
aria-controls="panel1bh-content"
|
||||
id="panel1bh-header"
|
||||
>
|
||||
<Typography
|
||||
sx={{
|
||||
flexShrink: 0,
|
||||
}}
|
||||
noWrap
|
||||
>
|
||||
Video
|
||||
Type
|
||||
</Typography>
|
||||
</AccordionSummary>
|
||||
<Divider />
|
||||
<AccordionDetails
|
||||
sx={{
|
||||
maxHeight:
|
||||
"15em",
|
||||
overflow:
|
||||
"auto",
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
{availableVideoTypeFilters.map(
|
||||
(
|
||||
item,
|
||||
index,
|
||||
) => {
|
||||
return (
|
||||
<MenuItem
|
||||
sx={{
|
||||
justifyContent:
|
||||
"space-between",
|
||||
}}
|
||||
key={
|
||||
index
|
||||
}
|
||||
>
|
||||
{
|
||||
item.title
|
||||
}
|
||||
<Checkbox
|
||||
value={
|
||||
item.value
|
||||
}
|
||||
onChange={(
|
||||
e,
|
||||
) =>
|
||||
item.state(
|
||||
e
|
||||
.target
|
||||
.checked,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</MenuItem>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</Stack>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
)}
|
||||
</Menu>
|
||||
</>
|
||||
)}
|
||||
{allowedSortViews.includes(
|
||||
currentViewType,
|
||||
) && (
|
||||
<>
|
||||
<Checkbox
|
||||
icon={<MdiSortDescending />}
|
||||
checkedIcon={
|
||||
<MdiSortAscending />
|
||||
}
|
||||
color="white"
|
||||
onChange={handleSortChange}
|
||||
defaultValue={sortAscending}
|
||||
sx={{
|
||||
color: "white !important",
|
||||
}}
|
||||
/>
|
||||
<TextField
|
||||
select
|
||||
hiddenLabel
|
||||
defaultValue={
|
||||
sortByData[0].value
|
||||
}
|
||||
size="small"
|
||||
variant="filled"
|
||||
onChange={handleSortBy}
|
||||
>
|
||||
{sortByData.map(
|
||||
(item, index) => {
|
||||
return (
|
||||
<MenuItem
|
||||
key={
|
||||
item.value
|
||||
}
|
||||
value={
|
||||
item.value
|
||||
}
|
||||
>
|
||||
{`By ${item.title}`}
|
||||
</MenuItem>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</TextField>
|
||||
</>
|
||||
)}
|
||||
{viewType.length != 0 && (
|
||||
<TextField
|
||||
select
|
||||
hiddenLabel
|
||||
defaultValue={viewType[0].value}
|
||||
size="small"
|
||||
variant="filled"
|
||||
onChange={handleCurrentViewType}
|
||||
>
|
||||
{viewType.map((item, index) => {
|
||||
return (
|
||||
<MenuItem
|
||||
key={item.value}
|
||||
value={item.value}
|
||||
>
|
||||
{item.title}
|
||||
</MenuItem>
|
||||
);
|
||||
})}
|
||||
</TextField>
|
||||
)}
|
||||
</Stack>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
{items.isSuccess &&
|
||||
(items.data.TotalRecordCount == 0 ? (
|
||||
<EmptyNotice />
|
||||
) : (
|
||||
<Grid2
|
||||
container
|
||||
columns={{ xs: 3, sm: 5, md: 8 }}
|
||||
>
|
||||
{items.data.Items.map((item, index) => {
|
||||
return (
|
||||
<Grid2
|
||||
key={index}
|
||||
xs={1}
|
||||
sm={1}
|
||||
md={1}
|
||||
>
|
||||
<Card
|
||||
itemName={item.Name}
|
||||
itemId={item.Id}
|
||||
imageTags={
|
||||
!!item.ImageTags
|
||||
.Primary
|
||||
}
|
||||
subText={
|
||||
item.ProductionYear
|
||||
}
|
||||
iconType={item.Type}
|
||||
playedPercent={
|
||||
!!item.UserData
|
||||
? item.UserData
|
||||
.PlayedPercentage
|
||||
: 0
|
||||
}
|
||||
cardOrientation={
|
||||
item.Type ==
|
||||
"MusicArtist" ||
|
||||
item.Type ==
|
||||
"MusicAlbum" ||
|
||||
item.Type ==
|
||||
"MusicGenre" ||
|
||||
item.Type ==
|
||||
"Playlist"
|
||||
? "square"
|
||||
: "portait"
|
||||
}
|
||||
watchedStatus={
|
||||
!!item.UserData
|
||||
? item.UserData
|
||||
.Played
|
||||
: false
|
||||
}
|
||||
watchedCount={
|
||||
!!item.UserData &&
|
||||
item.UserData
|
||||
.UnplayedItemCount
|
||||
}
|
||||
blurhash={
|
||||
item.ImageBlurHashes ==
|
||||
{}
|
||||
? ""
|
||||
: !!item
|
||||
.ImageTags
|
||||
.Primary
|
||||
? !!item
|
||||
.ImageBlurHashes
|
||||
.Primary
|
||||
? item
|
||||
.ImageBlurHashes
|
||||
.Primary[
|
||||
item
|
||||
.ImageTags
|
||||
.Primary
|
||||
]
|
||||
: ""
|
||||
: ""
|
||||
}
|
||||
currentUser={user.data}
|
||||
onClickEvent={() => {
|
||||
navigate(
|
||||
`/item/${item.Type}/${item.Id}`,
|
||||
);
|
||||
}}
|
||||
></Card>
|
||||
</Grid2>
|
||||
);
|
||||
})}
|
||||
</Grid2>
|
||||
))}
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default LibraryView;
|
||||
@@ -1,15 +1,18 @@
|
||||
/** @format */
|
||||
::-webkit-scrollbar {
|
||||
z-index: 10000;
|
||||
width: 10px;
|
||||
background: $clr-background-dark;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
z-index: 10000;
|
||||
background-color: transparent;
|
||||
&:hover {
|
||||
background: rgb(255 255 255 / 0.25);
|
||||
}
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
z-index: 10000;
|
||||
background: rgb(255 255 255 / 0.25);
|
||||
}
|
||||
|
||||
@@ -26,8 +29,9 @@ body {
|
||||
#root,
|
||||
.root-page {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.centered {
|
||||
@@ -79,6 +83,7 @@ h1 {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: 100vh;
|
||||
width: inherit;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,3 +22,18 @@ export const getRuntime = (ticks) => {
|
||||
}
|
||||
return formatedTime;
|
||||
};
|
||||
|
||||
export const getRuntimeFull = (ticks) => {
|
||||
let time = ticksToMs(ticks);
|
||||
let formatedTime = "";
|
||||
let timeSec = Math.round(time / 1000);
|
||||
let timeMin = Math.round(timeSec / 60);
|
||||
if (timeMin > 60) {
|
||||
let timeHr = Math.floor(timeMin / 60);
|
||||
timeMin -= timeHr * 60;
|
||||
formatedTime = `${timeHr} hour ${timeMin} minutes`;
|
||||
} else {
|
||||
formatedTime = `${timeMin} minutes`;
|
||||
}
|
||||
return formatedTime;
|
||||
};
|
||||
@@ -6,6 +6,7 @@ export const appBarSlice = createSlice({
|
||||
initialState: {
|
||||
visible: false,
|
||||
backdrop: false,
|
||||
backButtonVisible: false,
|
||||
},
|
||||
reducers: {
|
||||
showAppBar: (state) => {
|
||||
@@ -17,8 +18,20 @@ export const appBarSlice = createSlice({
|
||||
setBackdrop: (state, action) => {
|
||||
state.backdrop = action.payload;
|
||||
},
|
||||
showBackButton: (state, action) => {
|
||||
state.backButtonVisible = true;
|
||||
},
|
||||
hideBackButton: (state) => {
|
||||
state.backButtonVisible = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { showAppBar, hideAppBar, setBackdrop } = appBarSlice.actions;
|
||||
export const {
|
||||
showAppBar,
|
||||
hideAppBar,
|
||||
setBackdrop,
|
||||
showBackButton,
|
||||
hideBackButton,
|
||||
} = appBarSlice.actions;
|
||||
export default appBarSlice.reducer;
|
||||
@@ -5,6 +5,7 @@ export const sideBarSlice = createSlice({
|
||||
name: "sidebar",
|
||||
initialState: {
|
||||
visible: false,
|
||||
backdrop: true,
|
||||
},
|
||||
reducers: {
|
||||
showSidemenu: (state) => {
|
||||
@@ -13,8 +14,11 @@ export const sideBarSlice = createSlice({
|
||||
hideSidemenu: (state) => {
|
||||
state.visible = false;
|
||||
},
|
||||
setBackdrop: (state, action) => {
|
||||
state.backdrop = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { showSidemenu, hideSidemenu } = sideBarSlice.actions;
|
||||
export const { showSidemenu, hideSidemenu, setBackdrop } = sideBarSlice.actions;
|
||||
export default sideBarSlice.reducer;
|
||||
Reference in new issue
Block a user