Compare commits
110
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbd636519b | ||
|
|
d053e10b2c | ||
|
|
d675b564ee | ||
|
|
4e673fc376 | ||
|
|
f1b079f224 | ||
|
|
91f4ab00a1 | ||
|
|
04a7ca31f7 | ||
|
|
61a44d44c3 | ||
|
|
9b7a3d5a40 | ||
|
|
9149792ed9 | ||
|
|
9e73421540 | ||
|
|
63b717adfb | ||
|
|
3987ffd4da | ||
|
|
dbb6e272b1 | ||
|
|
89f1a26ea7 | ||
|
|
6cf5dfeb9b | ||
|
|
31458b5062 | ||
|
|
8f375dc645 | ||
|
|
4d5f4b95e5 | ||
|
|
aa1e01b68a | ||
|
|
7db0ef4c00 | ||
|
|
8813937c31 | ||
|
|
31fa615da3 | ||
|
|
90aba45e50 | ||
|
|
482919c35a | ||
|
|
117fc52738 | ||
|
|
79523b2f4b | ||
|
|
b41fcf8969 | ||
|
|
7730ad1858 | ||
|
|
e330b7e2f9 | ||
|
|
9f630e75f5 | ||
|
|
89e1083099 | ||
|
|
605e2be72d | ||
|
|
83ef175444 | ||
|
|
3011eb749f | ||
|
|
1bf6b82384 | ||
|
|
9a5dce5ac9 | ||
|
|
9d78a5ed5d | ||
|
|
98052df94f | ||
|
|
4acf57cfd0 | ||
|
|
1af7428869 | ||
|
|
5feb6c2bb6 | ||
|
|
db6fa1cc91 | ||
|
|
f304f518d3 | ||
|
|
e5a85d787f | ||
|
|
47a2919cb0 | ||
|
|
b6445e2ae6 | ||
|
|
6b3c64073e | ||
|
|
c5c10bd8cb | ||
|
|
049e6bb833 | ||
|
|
e907ddceef | ||
|
|
c0b9d93880 | ||
|
|
96350fa793 | ||
|
|
04bb867d58 | ||
|
|
d727eb7cde | ||
|
|
d3b367b948 | ||
|
|
5bb89c1b08 | ||
|
|
0f9afd5f5b | ||
|
|
f1920b5235 | ||
|
|
d072f7d712 | ||
|
|
07cbf4babe | ||
|
|
8d68eb546d | ||
|
|
dca2a31639 | ||
|
|
13f686a472 | ||
|
|
922ca0ed2a | ||
|
|
6279663f46 | ||
|
|
286d389af0 | ||
|
|
a6a4dfff4d | ||
|
|
87f9eaf8b6 | ||
|
|
73ac8a529e | ||
|
|
6c57b0408b | ||
|
|
ee577157f3 | ||
|
|
4dc71b4c8b | ||
|
|
a31a8920e9 | ||
|
|
da524107f0 | ||
|
|
e397d0cf58 | ||
|
|
65db12192f | ||
|
|
b2d1154354 | ||
|
|
99bee007ac | ||
|
|
3740d24cd1 | ||
|
|
960538a9a6 | ||
|
|
afcc8cfd4d | ||
|
|
bccc19981e | ||
|
|
66f63c6d75 | ||
|
|
722630cf37 | ||
|
|
32e439c495 | ||
|
|
eda16f8cc2 | ||
|
|
1b688fe75e | ||
|
|
3134818ca7 | ||
|
|
2268bca663 | ||
|
|
c1e55c0e3f | ||
|
|
c5922d67c4 | ||
|
|
5799031a34 | ||
|
|
dc226da809 | ||
|
|
3db6249f71 | ||
|
|
2926e845d2 | ||
|
|
ec6d5850d0 | ||
|
|
72a9f2cd39 | ||
|
|
874646a6dc | ||
|
|
d84073ee03 | ||
|
|
abca22763c | ||
|
|
2e62d3d2ee | ||
|
|
c477f62f69 | ||
|
|
0af246cff2 | ||
|
|
e095863afa | ||
|
|
a290e83c19 | ||
|
|
f8545d2182 | ||
|
|
2b3c02b261 | ||
|
|
9ce5f84fc5 | ||
|
|
60f1667dc2 |
No files matched your search
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"react-refresh"
|
||||
],
|
||||
"rules": {
|
||||
"no-mixed-spaces-and-tabs": "off",
|
||||
"react/prop-types": "off",
|
||||
"react-refresh/only-export-components": "warn"
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
# @format
|
||||
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [macos-latest, ubuntu-22.04, windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./src-tauri -> target"
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Sync node version and setup cache
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: "pnpm" # Set this to npm, yarn or pnpm.
|
||||
|
||||
- name: Install app dependencies and build web
|
||||
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
|
||||
run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.
|
||||
|
||||
- name: Build the app
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
|
||||
releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
|
||||
releaseBody: "See the assets to download and install this version."
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
@@ -0,0 +1,120 @@
|
||||
# @format
|
||||
|
||||
name: Continuous Integration
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
build_web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Sync node version and setup cache
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
# - name: Lint
|
||||
# run: pnpm run lint
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
build:
|
||||
needs: build_web
|
||||
# Prevent forked PRs from running the build job which is expensive
|
||||
if: github.repository == 'prayag17/JellyPlayer'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [macos-latest, ubuntu-22.04, windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
environment: TAURI
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./src-tauri -> target"
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Sync node version and setup cache
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Build app
|
||||
run: pnpm run tauri build --bundles "deb" "appimage" "nsis" "app" "dmg"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
|
||||
- name: Upload build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: JellyPlayer-${{ matrix.platform }}-dev${{ github.sha }}
|
||||
path: src-tauri/target/release/bundle/*
|
||||
@@ -0,0 +1,78 @@
|
||||
# @format
|
||||
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [macos-latest, ubuntu-22.04, windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
environment: TAURI
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./src-tauri -> target"
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Sync node version and setup cache
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: "pnpm" # Set this to npm, yarn or pnpm.
|
||||
|
||||
- name: Install app dependencies and build web
|
||||
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
|
||||
run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.
|
||||
|
||||
- name: Build the app
|
||||
uses: tauri-apps/tauri-action@dev
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
|
||||
releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
|
||||
releaseBody: "See the assets to download and install this version."
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"biomejs.biome",
|
||||
"github.vscode-github-actions",
|
||||
"esbenp.prettier-vscode",
|
||||
"swellaby.rust-pack",
|
||||
"1yib.rust-bundle"
|
||||
]
|
||||
}
|
||||
Vendored
+26
-2
@@ -1,3 +1,27 @@
|
||||
{
|
||||
"nuxt.isNuxtApp": false
|
||||
}
|
||||
"editor.defaultFormatter": "biomejs.biome",
|
||||
"editor.codeActionsOnSave": {
|
||||
"quickfix.biome": "always",
|
||||
"source.organizeImports.biome": "explicit"
|
||||
},
|
||||
"[github-actions-workflow]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
},
|
||||
"[javascriptreact]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "biomejs.biome"
|
||||
},
|
||||
"rust-analyzer.linkedProjects": ["./src-tauri/Cargo.toml"],
|
||||
"typescript.tsdk": "node_modules/typescript/lib"
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.5.0/schema.json",
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"style": {
|
||||
"noNonNullAssertion": "off"
|
||||
},
|
||||
"a11y": {
|
||||
"useKeyWithClickEvents": "off"
|
||||
},
|
||||
"correctness": {
|
||||
"useExhaustiveDependencies": "off"
|
||||
},
|
||||
"nursery": {
|
||||
"noUnusedImports": "off"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.jsx",
|
||||
"src/**/*.js",
|
||||
"*.json"
|
||||
],
|
||||
"ignoreUnknown": true
|
||||
}
|
||||
}
|
||||
+8
-3
@@ -5,7 +5,6 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Jellyplayer</title>
|
||||
<script src="http://localhost:8097"></script>
|
||||
<style>
|
||||
.app-loading {
|
||||
position: fixed;
|
||||
@@ -19,6 +18,12 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
transition: opacity 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
.app-loading.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.app-loading-logo {
|
||||
@@ -32,13 +37,13 @@
|
||||
<img src="./assetsStatic/LogoBig.svg" class="app-loading-logo" />
|
||||
</div>
|
||||
<div id="root"></div>
|
||||
<svg style="width:0;height:0;position:absolute;" aria-hidden="true" focusable="false">
|
||||
<svg style="width: 0; height: 0; position: absolute" aria-hidden="true" focusable="false">
|
||||
<linearGradient id="clr-gradient-default" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
|
||||
<stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
|
||||
</linearGradient>
|
||||
</svg>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "0.0.3-dev",
|
||||
"notes": "- Updated home carousel.\n- Removed sidemenu\n- Updated appBar\n- Update Notices",
|
||||
"pub_date": "2023-12-31T11:58:58.485Z",
|
||||
"platforms": {
|
||||
"darwin-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVhtQVFqQmJIbldTQ3F1YktNNWd4MkltMkF1b2pGQmc2Q3RmWlFnZGE0K2FSNmpkczUzNEEzZ1p3dDBBWldSZk15SDYrcE9ub0tUZG1uOVlvMnlwMWdFPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA0MDIzNTA1CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5nego2M0NPUElEZzdjaUdaeDVMYm8rSTVRYTdncFA1YnNOMHpBd0wyS2JOaHhVeWhKM0lUaEN3TWw1RU1vQm5VYlgyQkZma2x1alpKY1pPSHhuSUx5Q1RCUT09Cg==",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_x64.app.tar.gz"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVY2aHRVL0Y2d09SL2sxZGhsUzNxQmF1NVR1c2h2cUpJYVFrRkU2N3JqWGU3aEhBYnJuK0NpdDlpRlBadW9HT1B5MDhjMTE1TURyTnRBQ2FmVUJvd2dBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA0MDIzNjQ4CWZpbGU6amVsbHktcGxheWVyXzAuMC4zLWRldl9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKRXd4dHhGUmd6Rm1ZeGEwcUdHd2NDNTdRS1d0ZWo0aWpwYS85SlFxa3ZyMW9VNm9McCtlRjlmN1N4dWcxck5oMWhoM0Y4L2xHZ2hQOXNockFyL3FYQUE9PQo=",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/jelly-player_0.0.3-dev_amd64.AppImage.tar.gz"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWE3TlYzV1NOK2NMK25lamlCY21RQkFMem9nK0E0bTlITWUyQm1xZzg0aEhwS0dvUURtN2pRcG1iczMwUHhIbU0vOUFaQkFSL1lHT3VLRnh5Q3VZVFFZPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA0MDIzOTMxCWZpbGU6SmVsbHlQbGF5ZXJfMC4wLjMtZGV2X3g2NC1zZXR1cC5uc2lzLnppcApLN1V6aDN4Qndtb0NaQVlGOENIQ0pyTDJRd0NianRYZGxKanR3TU9IUWxTRE5TVW9mNWVPdkdyQkxudkRJY3ZzOU4wSnlmaWVmSWJYNFBKYUdpUG1CZz09Cg==",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_0.0.3-dev_x64-setup.nsis.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
+34
-28
@@ -1,58 +1,64 @@
|
||||
{
|
||||
"name": "jellyplayer",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.4-dev",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri",
|
||||
"lint": "eslint"
|
||||
"lint": "biome check src/**/*",
|
||||
"lint:fix": "biome check --apply src/**/*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/react": "^11.11.3",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.0.18",
|
||||
"@fontsource/noto-sans": "^5.0.17",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.0.19",
|
||||
"@fontsource/noto-sans": "^5.0.18",
|
||||
"@jellyfin/sdk": "0.8.2",
|
||||
"@mdi/js": "^7.3.67",
|
||||
"@mui/lab": "5.0.0-alpha.153",
|
||||
"@mui/material": "^5.14.15",
|
||||
"@tanstack/react-query": "^5.0.5",
|
||||
"@tanstack/react-query-devtools": "^5.4.2",
|
||||
"@tauri-apps/api": "^1.5.1",
|
||||
"axios": "^1.6.0",
|
||||
"axios-tauri-api-adapter": "^0.2.0",
|
||||
"@mui/lab": "5.0.0-alpha.162",
|
||||
"@mui/material": "^5.15.6",
|
||||
"@tanstack/react-query": "^5.17.19",
|
||||
"@tanstack/react-query-devtools": "^5.17.21",
|
||||
"@tauri-apps/api": "^1.5.3",
|
||||
"@types/node": "^20.11.5",
|
||||
"@types/react": "^18.2.48",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"axios": "^1.6.5",
|
||||
"axios-tauri-api-adapter": "^0.2.1",
|
||||
"blurhash": "^2.0.5",
|
||||
"events": "^3.3.0",
|
||||
"framer-motion": "^10.16.4",
|
||||
"material-symbols": "^0.14.0",
|
||||
"framer-motion": "^11.0.2",
|
||||
"material-symbols": "^0.14.5",
|
||||
"notistack": "^3.0.1",
|
||||
"react": "^18.2.0",
|
||||
"react-blurhash": "^0.3.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-error-boundary": "^4.0.11",
|
||||
"react-error-boundary": "^4.0.12",
|
||||
"react-markdown": "^9.0.1",
|
||||
"react-multi-carousel": "^2.8.4",
|
||||
"react-player": "^2.13.0",
|
||||
"react-router-dom": "^6.17.0",
|
||||
"react-player": "^2.14.1",
|
||||
"react-router-dom": "^6.21.3",
|
||||
"react-use-konami": "^1.1.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
"uuid": "^9.0.1",
|
||||
"vite-plugin-svgr": "^4.1.0",
|
||||
"wavesurfer.js": "^7.4.2",
|
||||
"zustand": "^4.4.4"
|
||||
"typescript": "^5.3.3",
|
||||
"vite-plugin-svgr": "^4.2.0",
|
||||
"wavesurfer.js": "^7.6.5",
|
||||
"zustand": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.5.6",
|
||||
"@vitejs/plugin-react": "^4.1.0",
|
||||
"eslint": "^8.52.0",
|
||||
"@biomejs/biome": "^1.5.3",
|
||||
"@tauri-apps/cli": "^1.5.9",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-refresh": "^0.4.3",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"prop-types": "^15.8.1",
|
||||
"sass": "^1.69.5",
|
||||
"vite": "^5.0.0",
|
||||
"sass": "^1.70.0",
|
||||
"vite": "^5.0.12",
|
||||
"vite-plugin-compression": "^0.5.1"
|
||||
},
|
||||
"license": "GPL-3.0-only"
|
||||
|
||||
Generated
+1538
-789
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 503 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
+3
-6
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base",
|
||||
":disableDependencyDashboard"
|
||||
],
|
||||
"labels": ["dependencies"],
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base", ":disableDependencyDashboard"],
|
||||
"labels": ["dependencies"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "jellyplayer"
|
||||
version = "1.0.0"
|
||||
version = "0.0.4-dev"
|
||||
description = "A Modern Jellyfin Client"
|
||||
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
|
||||
license = "GPL-3.0-only"
|
||||
@@ -12,16 +12,16 @@ rust-version = "1.59"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.5.0", features = [] }
|
||||
tauri-build = { version = "1.5.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
log = "^0.4.20"
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.5.2", features = [ "http-all", "devtools", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen", "http-all"] }
|
||||
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
||||
tauri = { version = "1.5.4", features = [ "updater", "http-all", "devtools", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen", "http-all"] }
|
||||
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev", features = ["colored"] }
|
||||
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1", features = ["colored"] }
|
||||
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||
portpicker = "0.1" # used in the example to pick a random free port
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "JellyPlayer",
|
||||
"version": "1.0.0"
|
||||
"version": "0.0.4-dev"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
@@ -27,12 +27,7 @@
|
||||
"http": {
|
||||
"all": true,
|
||||
"request": true,
|
||||
"scope": [
|
||||
"http://**",
|
||||
"http://*",
|
||||
"https://**",
|
||||
"https://*"
|
||||
]
|
||||
"scope": ["http://**", "http://*", "https://**", "https://*"]
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
@@ -61,15 +56,11 @@
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "A Modern Jellyfin Client for Jellyfin",
|
||||
"targets": "all",
|
||||
"targets": ["deb", "appimage", "nsis", "app", "dmg", "updater"],
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": "",
|
||||
"wix": {
|
||||
"bannerPath": "../public/installerBanner.bmp",
|
||||
"dialogImagePath": "../public/installerDialog.bmp"
|
||||
},
|
||||
"nsis": {
|
||||
"sidebarImage": "../public/installerSideBarImage.bmp",
|
||||
"headerImage": "../public/installerHeaderImage.bmp",
|
||||
@@ -100,7 +91,12 @@
|
||||
]
|
||||
},
|
||||
"updater": {
|
||||
"active": false
|
||||
"active": true,
|
||||
"endpoints": [
|
||||
"https://raw.githack.com/prayag17/JellyPlayer/main/latest.json"
|
||||
],
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk5QkE0QjMzOEQyRUI5M0MKUldROHVTNk5NMHU2bVMvS3VNRWZHRzhuWE1TRlg3WHI1VHBtZjFvVy80alZ2UHc4T3BqcHVGOWwK"
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
|
||||
-486
@@ -1,486 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import useKonami from "react-use-konami";
|
||||
|
||||
import { ThemeProvider } from "@mui/material/styles";
|
||||
import { SnackbarProvider } from "notistack";
|
||||
import {
|
||||
Routes,
|
||||
Route,
|
||||
useNavigate,
|
||||
useLocation,
|
||||
Outlet,
|
||||
Navigate,
|
||||
} from "react-router-dom";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
|
||||
// Theming
|
||||
import CssBaseline from "@mui/material/CssBaseline";
|
||||
import { theme } from "./theme";
|
||||
import "./styles/global.scss";
|
||||
|
||||
// MUI
|
||||
import Dialog from "@mui/material/Dialog";
|
||||
import DialogActions from "@mui/material/DialogActions";
|
||||
import DialogContent from "@mui/material/DialogContent";
|
||||
import DialogContentText from "@mui/material/DialogContentText";
|
||||
import DialogTitle from "@mui/material/DialogTitle";
|
||||
import Button from "@mui/material/Button";
|
||||
import Slide from "@mui/material/Slide";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
|
||||
// Routes
|
||||
import { ServerSetup } from "./routes/setup/server";
|
||||
import ServerList from "./routes/setup/serverList/index.jsx";
|
||||
import Home from "./routes/home";
|
||||
import { UserLogin, LoginWithImage, UserLoginManual } from "./routes/login";
|
||||
import LibraryView from "./routes/library";
|
||||
import ItemDetail from "./routes/item";
|
||||
import SeriesTitlePage from "./routes/series/index.jsx";
|
||||
import FavoritePage from "./routes/favorite/index.jsx";
|
||||
import Settings from "./routes/settings";
|
||||
import About from "./routes/about";
|
||||
import SearchPage from "./routes/search";
|
||||
|
||||
import { VideoPlayer } from "./routes/player/videoPlayer.jsx";
|
||||
|
||||
import { SideMenu } from "./components/menu/sidemenu.jsx";
|
||||
import { AppBar } from "./components/appBar/appBar.jsx";
|
||||
|
||||
// Fonts
|
||||
import "@fontsource/noto-sans/100.css";
|
||||
import "@fontsource/noto-sans/100-italic.css";
|
||||
import "@fontsource/noto-sans/200.css";
|
||||
import "@fontsource/noto-sans/200-italic.css";
|
||||
import "@fontsource/noto-sans/300.css";
|
||||
import "@fontsource/noto-sans/300-italic.css";
|
||||
import "@fontsource/noto-sans/400.css";
|
||||
import "@fontsource/noto-sans/400-italic.css";
|
||||
import "@fontsource/noto-sans/500.css";
|
||||
import "@fontsource/noto-sans/500-italic.css";
|
||||
import "@fontsource/noto-sans/600.css";
|
||||
import "@fontsource/noto-sans/600-italic.css";
|
||||
import "@fontsource/noto-sans/700.css";
|
||||
import "@fontsource/noto-sans/700-italic.css";
|
||||
import "@fontsource/noto-sans/800.css";
|
||||
import "@fontsource/noto-sans/800-italic.css";
|
||||
import "@fontsource/noto-sans/900.css";
|
||||
import "@fontsource/noto-sans/900-italic.css";
|
||||
import "material-symbols";
|
||||
import "@fontsource-variable/jetbrains-mono";
|
||||
|
||||
import { useBackdropStore } from "./utils/store/backdrop.js";
|
||||
import { usePlaybackDataLoadStore } from "./utils/store/playback.js";
|
||||
import BoxSetTitlePage from "./routes/boxset/index.jsx";
|
||||
import PersonTitlePage from "./routes/person/index.jsx";
|
||||
import MusicAlbumTitlePage from "./routes/album/index.jsx";
|
||||
import AudioPlayer from "./components/playback/audioPlayer/index.jsx";
|
||||
import { useAudioPlayback } from "./utils/store/audioPlayback.js";
|
||||
import ArtistTitlePage from "./routes/artist/index.jsx";
|
||||
import EpisodeTitlePage from "./routes/episode/index.jsx";
|
||||
import PlaylistTitlePage from "./routes/playlist/index.jsx";
|
||||
|
||||
import { useApi } from "./utils/store/api.js";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { useCentralStore } from "./utils/store/central.js";
|
||||
|
||||
const anim = {
|
||||
initial: {
|
||||
transform: "scale(0.98)",
|
||||
opacity: 0,
|
||||
},
|
||||
animate: {
|
||||
transform: "scale(1)",
|
||||
opacity: 1,
|
||||
},
|
||||
exit: {
|
||||
transform: "sscale(1.02)",
|
||||
opacity: 0,
|
||||
},
|
||||
};
|
||||
|
||||
const LoginRoute = () => {
|
||||
const navigate = useNavigate();
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
|
||||
const usersList = useQuery({
|
||||
queryKey: ["public-users"],
|
||||
queryFn: async () => {
|
||||
const result = await getUserApi(api).getPublicUsers();
|
||||
return result.data;
|
||||
},
|
||||
enabled: Boolean(api),
|
||||
});
|
||||
if (usersList.isSuccess && !usersList.isFetching) {
|
||||
if (usersList.data.length > 0) {
|
||||
navigate("/login/users");
|
||||
} else {
|
||||
navigate("/login/manual");
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
transform: "translate(-50%, -50%)",
|
||||
}}
|
||||
>
|
||||
<CircularProgress size={72} thickness={1.4} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const AnimationWrapper = () => {
|
||||
return (
|
||||
<motion.div
|
||||
className="root-page"
|
||||
variants={anim}
|
||||
initial="initial"
|
||||
animate="animate"
|
||||
exit="exit"
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
>
|
||||
<Outlet />
|
||||
</motion.div>
|
||||
);
|
||||
};
|
||||
|
||||
function App() {
|
||||
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
|
||||
state.isPending,
|
||||
]);
|
||||
|
||||
const handleRelaunch = async (event, reason) => {
|
||||
if (reason && reason == "backdropClick") {
|
||||
return;
|
||||
}
|
||||
await relaunch();
|
||||
};
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, [location.key]);
|
||||
|
||||
const [audioPlayerVisible] = useAudioPlayback((state) => [state.display]);
|
||||
|
||||
const [backdropUrl, backdropId] = useBackdropStore((state) => [
|
||||
state.backdropUrl,
|
||||
state.backdropId,
|
||||
]);
|
||||
|
||||
const [backdropLoading, setBackdropLoading] = useState(true);
|
||||
|
||||
const [easterEgg, setEasterEgg] = useState(false);
|
||||
const sixtyNine = () => {
|
||||
setEasterEgg(true);
|
||||
};
|
||||
|
||||
useKonami(sixtyNine, {
|
||||
code: [
|
||||
"ArrowUp",
|
||||
"ArrowUp",
|
||||
"ArrowDown",
|
||||
"ArrowDown",
|
||||
"ArrowLeft",
|
||||
"ArrowRight",
|
||||
"ArrowLeft",
|
||||
"ArrowRight",
|
||||
"b",
|
||||
"a",
|
||||
],
|
||||
});
|
||||
|
||||
const [initialRoute] = useCentralStore((state) => [state.initialRoute]);
|
||||
|
||||
const navigate = useNavigate();
|
||||
if (!initialRoute) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
transform: "translate(-50%, -50%)",
|
||||
}}
|
||||
>
|
||||
<CircularProgress size={72} thickness={1.4} />
|
||||
</div>
|
||||
);
|
||||
} else if (initialRoute) {
|
||||
return (
|
||||
<SnackbarProvider maxSnack={5}>
|
||||
<ThemeProvider theme={theme}>
|
||||
{playbackDataLoading && (
|
||||
<LinearProgress
|
||||
sx={{
|
||||
position: "fixed",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
width: "100vw",
|
||||
zIndex: 100000,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Dialog
|
||||
open={easterEgg}
|
||||
onClose={() => setEasterEgg(false)}
|
||||
sx={{
|
||||
background: "black",
|
||||
}}
|
||||
>
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&disablekb=1"
|
||||
title="EasterEgg"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
></iframe>
|
||||
</Dialog>
|
||||
<Slide
|
||||
direction="up"
|
||||
in={easterEgg}
|
||||
mountOnEnter
|
||||
unmountOnExit
|
||||
>
|
||||
<img
|
||||
src="https://i.gifer.com/PYh.gif"
|
||||
width={320}
|
||||
height={320}
|
||||
style={{
|
||||
zIndex: "99999999",
|
||||
position: "fixed",
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
objectFit: "cover",
|
||||
}}
|
||||
/>
|
||||
</Slide>
|
||||
|
||||
{/* Show Dialog if server not reachable */}
|
||||
|
||||
<div className="app-backdrop-container">
|
||||
<AnimatePresence>
|
||||
<motion.img
|
||||
key={backdropId}
|
||||
src={backdropUrl}
|
||||
alt=""
|
||||
className="app-backdrop"
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: backdropLoading ? 0 : 0.6,
|
||||
}}
|
||||
exit={{
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.8,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
onLoadCapture={() => {
|
||||
setBackdropLoading(true);
|
||||
}}
|
||||
onLoad={() => {
|
||||
setBackdropLoading(false);
|
||||
}}
|
||||
loading="eager"
|
||||
style={{
|
||||
transition: "opacity 0.8s",
|
||||
}}
|
||||
/>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
audioPlayerVisible ? "audio-playing" : ""
|
||||
}
|
||||
style={{
|
||||
display: "flex",
|
||||
width: "100vw",
|
||||
transition: "padding 250ms",
|
||||
}}
|
||||
>
|
||||
<CssBaseline />
|
||||
<SideMenu />
|
||||
<AppBar />
|
||||
<AudioPlayer key={audioPlayerVisible} />
|
||||
<Routes location={location}>
|
||||
<Route
|
||||
// key={location.key}
|
||||
element={<AnimationWrapper />}
|
||||
>
|
||||
<Route
|
||||
path="/"
|
||||
exact
|
||||
element={
|
||||
<Navigate to={initialRoute} />
|
||||
}
|
||||
// element={<></>}
|
||||
/>
|
||||
<Route
|
||||
path="/error"
|
||||
element={
|
||||
<Dialog
|
||||
open
|
||||
onClose={handleRelaunch}
|
||||
aria-labelledby="alert-dialog-text"
|
||||
aria-describedby="alert-dialog-desc"
|
||||
maxWidth="md"
|
||||
>
|
||||
<DialogTitle id="alert-dialog-text">
|
||||
Unable to reach
|
||||
server
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-desc">
|
||||
Unable to
|
||||
connect to the
|
||||
jellyfin
|
||||
server.
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button
|
||||
onClick={() =>
|
||||
navigate(
|
||||
"/servers/list",
|
||||
)
|
||||
}
|
||||
>
|
||||
Change Server
|
||||
</Button>
|
||||
<Button
|
||||
variant="outlined"
|
||||
onClick={
|
||||
handleRelaunch
|
||||
}
|
||||
>
|
||||
Restart
|
||||
JellyPlayer
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/login/index"
|
||||
exact
|
||||
element={<LoginRoute />}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/home"
|
||||
element={<Home />}
|
||||
/>
|
||||
<Route
|
||||
path="/setup/server"
|
||||
element={<ServerSetup />}
|
||||
/>
|
||||
<Route
|
||||
path="/servers/list"
|
||||
element={<ServerList />}
|
||||
/>
|
||||
<Route
|
||||
path="/login/withImg/:userName/:userId/"
|
||||
element={<LoginWithImage />}
|
||||
/>
|
||||
<Route
|
||||
path="/login/users"
|
||||
element={<UserLogin />}
|
||||
/>
|
||||
<Route
|
||||
path="/login/manual"
|
||||
element={<UserLoginManual />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/library/:id"
|
||||
element={<LibraryView />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/item/:id"
|
||||
element={<ItemDetail />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/musicalbum/:id"
|
||||
element={<MusicAlbumTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/artist/:id"
|
||||
element={<ArtistTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/boxset/:id"
|
||||
element={<BoxSetTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/episode/:id"
|
||||
element={<EpisodeTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/person/:id"
|
||||
element={<PersonTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path="/playlist/:id"
|
||||
element={<PlaylistTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
path="/series/:id"
|
||||
element={<SeriesTitlePage />}
|
||||
/>
|
||||
<Route
|
||||
path="/search"
|
||||
element={<SearchPage />}
|
||||
/>
|
||||
<Route
|
||||
path="/favorite"
|
||||
element={<FavoritePage />}
|
||||
/>
|
||||
<Route
|
||||
path="/settings"
|
||||
element={<Settings />}
|
||||
/>
|
||||
<Route
|
||||
path="/about"
|
||||
element={<About />}
|
||||
/>
|
||||
<Route
|
||||
path="/player"
|
||||
element={<VideoPlayer />}
|
||||
/>
|
||||
</Route>
|
||||
</Routes>
|
||||
</div>
|
||||
<ReactQueryDevtools buttonPosition="bottom-left" />
|
||||
</ThemeProvider>
|
||||
</SnackbarProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
+514
@@ -0,0 +1,514 @@
|
||||
import React, { useState, useEffect, useLayoutEffect } from "react";
|
||||
|
||||
import { ThemeProvider } from "@mui/material/styles";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import { SnackbarProvider } from "notistack";
|
||||
import {
|
||||
Navigate,
|
||||
Route,
|
||||
Routes,
|
||||
useLocation,
|
||||
useNavigate,
|
||||
} from "react-router-dom";
|
||||
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
import {
|
||||
UpdateManifest,
|
||||
checkUpdate,
|
||||
installUpdate,
|
||||
} from "@tauri-apps/api/updater";
|
||||
|
||||
// Theming
|
||||
import CssBaseline from "@mui/material/CssBaseline";
|
||||
import "./styles/global.scss";
|
||||
import { theme } from "./theme";
|
||||
|
||||
import LoadingButton from "@mui/lab/LoadingButton";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
// MUI
|
||||
import {
|
||||
Chip,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle,
|
||||
IconButton,
|
||||
LinearProgress,
|
||||
SvgIcon,
|
||||
} from "@mui/material";
|
||||
|
||||
// Routes
|
||||
import About from "./routes/about";
|
||||
import MusicAlbumTitlePage from "./routes/album/index.jsx";
|
||||
import ArtistTitlePage from "./routes/artist/index.jsx";
|
||||
import BoxSetTitlePage from "./routes/boxset/index.jsx";
|
||||
import EpisodeTitlePage from "./routes/episode/index.jsx";
|
||||
import FavoritePage from "./routes/favorite/index.jsx";
|
||||
import Home from "./routes/home";
|
||||
import ItemDetail from "./routes/item";
|
||||
import LibraryView from "./routes/library";
|
||||
import {
|
||||
LoginRoute,
|
||||
LoginWithImage,
|
||||
UserLogin,
|
||||
UserLoginManual,
|
||||
} from "./routes/login";
|
||||
import PersonTitlePage from "./routes/person/index.jsx";
|
||||
import { VideoPlayer } from "./routes/player/videoPlayer.jsx";
|
||||
import PlaylistTitlePage from "./routes/playlist/index.jsx";
|
||||
import SearchPage from "./routes/search";
|
||||
import SeriesTitlePage from "./routes/series/index.jsx";
|
||||
import Settings from "./routes/settings";
|
||||
import { ServerSetup } from "./routes/setup/server";
|
||||
import ServerList from "./routes/setup/serverList/index.jsx";
|
||||
|
||||
import Markdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
// Fonts
|
||||
import "@fontsource-variable/jetbrains-mono";
|
||||
import "@fontsource/noto-sans/100-italic.css";
|
||||
import "@fontsource/noto-sans/100.css";
|
||||
import "@fontsource/noto-sans/200-italic.css";
|
||||
import "@fontsource/noto-sans/200.css";
|
||||
import "@fontsource/noto-sans/300-italic.css";
|
||||
import "@fontsource/noto-sans/300.css";
|
||||
import "@fontsource/noto-sans/400-italic.css";
|
||||
import "@fontsource/noto-sans/400.css";
|
||||
import "@fontsource/noto-sans/500-italic.css";
|
||||
import "@fontsource/noto-sans/500.css";
|
||||
import "@fontsource/noto-sans/600-italic.css";
|
||||
import "@fontsource/noto-sans/600.css";
|
||||
import "@fontsource/noto-sans/700-italic.css";
|
||||
import "@fontsource/noto-sans/700.css";
|
||||
import "@fontsource/noto-sans/800-italic.css";
|
||||
import "@fontsource/noto-sans/800.css";
|
||||
import "@fontsource/noto-sans/900-italic.css";
|
||||
import "@fontsource/noto-sans/900.css";
|
||||
|
||||
import "material-symbols/rounded.scss";
|
||||
|
||||
// Components
|
||||
import { AppBar } from "./components/appBar/appBar.jsx";
|
||||
import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
|
||||
import AudioPlayer from "./components/playback/audioPlayer/index.jsx";
|
||||
|
||||
// Utils
|
||||
import { useAudioPlayback } from "./utils/store/audioPlayback.js";
|
||||
import { useBackdropStore } from "./utils/store/backdrop.js";
|
||||
import { setInitialRoute, useCentralStore } from "./utils/store/central.js";
|
||||
import { usePlaybackDataLoadStore } from "./utils/store/playback";
|
||||
|
||||
// 3rd Party
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
|
||||
import { EasterEgg } from "./components/utils/easterEgg.jsx";
|
||||
import { handleRelaunch } from "./utils/misc/relaunch";
|
||||
import {
|
||||
delServer,
|
||||
getAllServers,
|
||||
getDefaultServer,
|
||||
getServer,
|
||||
setDefaultServer,
|
||||
} from "./utils/storage/servers";
|
||||
import { UserStore, delUser, getUser } from "./utils/storage/user";
|
||||
import { createApi, useApi } from "./utils/store/api";
|
||||
|
||||
const handleAuthError = async () => {
|
||||
await delUser();
|
||||
setInitialRoute("/login/index");
|
||||
};
|
||||
|
||||
const authenticateUser = async (address: string, user: UserStore["user"]) => {
|
||||
try {
|
||||
createApi(address, user.AccessToken);
|
||||
setInitialRoute("/home");
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
setInitialRoute("/error");
|
||||
}
|
||||
};
|
||||
|
||||
const init = async () => {
|
||||
if (window.location.pathname !== "/") {
|
||||
window.location.href = "/";
|
||||
return;
|
||||
}
|
||||
|
||||
const defaultServerOnDisk = await getDefaultServer();
|
||||
|
||||
if (defaultServerOnDisk) {
|
||||
const defaultServerInfo = await getServer(defaultServerOnDisk);
|
||||
if (!defaultServerInfo) {
|
||||
await setDefaultServer(null);
|
||||
await delServer(defaultServerOnDisk);
|
||||
|
||||
const servers = await getAllServers();
|
||||
|
||||
setInitialRoute(servers.length > 0 ? "/servers/list" : "/setup/server");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const userOnDisk = await getUser();
|
||||
createApi(defaultServerInfo.address, "");
|
||||
|
||||
if (userOnDisk) {
|
||||
try {
|
||||
let authApi = useApi.getState().api;
|
||||
|
||||
if (!authApi) {
|
||||
handleAuthError();
|
||||
return;
|
||||
}
|
||||
|
||||
await authenticateUser(defaultServerInfo.address, userOnDisk);
|
||||
|
||||
authApi = useApi.getState().api!;
|
||||
|
||||
const user = await getUserApi(authApi).getCurrentUser();
|
||||
|
||||
if (!user) {
|
||||
await delUser();
|
||||
handleAuthError();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
handleAuthError();
|
||||
}
|
||||
} else {
|
||||
setInitialRoute("/login/index");
|
||||
}
|
||||
} else {
|
||||
setInitialRoute("/setup/server");
|
||||
}
|
||||
};
|
||||
|
||||
function App() {
|
||||
const [appReady, setAppReady] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
init().then(() => {
|
||||
setAppReady(true);
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!appReady) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
transform: "translate(-50%, -50%)",
|
||||
}}
|
||||
>
|
||||
<CircularProgress size={72} thickness={1.4} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return <AppReady />;
|
||||
}
|
||||
|
||||
function AppReady() {
|
||||
const [audioPlayerVisible] = useAudioPlayback((state) => [state.display]);
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const [initialRoute] = useCentralStore((state) => [state.initialRoute]);
|
||||
const [backdropUrl, backdropId] = useBackdropStore((state) => [
|
||||
state.backdropUrl,
|
||||
state.backdropId,
|
||||
]);
|
||||
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
|
||||
state.isPending,
|
||||
]);
|
||||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [updateDialog, setUpdateDialog] = useState(false);
|
||||
const [updateDialogButton, setUpdateDialogButton] = useState(false);
|
||||
const [backdropLoading, setBackdropLoading] = useState(true);
|
||||
const [updateInfo, setUpdateInfo] = useState<UpdateManifest | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, [location.key]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const { shouldUpdate, manifest } = await checkUpdate();
|
||||
|
||||
if (shouldUpdate) {
|
||||
setUpdateInfo(manifest);
|
||||
setUpdateDialog(true);
|
||||
|
||||
console.log(`Update found : ${manifest?.version}, ${manifest?.date}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
checkForUpdates();
|
||||
}, []);
|
||||
|
||||
if (!initialRoute) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "fixed",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
transform: "translate(-50%, -50%)",
|
||||
}}
|
||||
>
|
||||
<CircularProgress size={72} thickness={1.4} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<SnackbarProvider maxSnack={5}>
|
||||
<ThemeProvider theme={theme}>
|
||||
{playbackDataLoading && (
|
||||
<LinearProgress
|
||||
sx={{
|
||||
position: "fixed",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
width: "100vw",
|
||||
zIndex: 100000,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Dialog
|
||||
open={updateDialog}
|
||||
fullWidth
|
||||
PaperProps={{
|
||||
style: {
|
||||
borderRadius: "14px",
|
||||
background: "rgb(0 0 0 / 0.5)",
|
||||
backdropFilter: "blur(10px)",
|
||||
border: "1px solid rgb(255 255 255 / 0.2)",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{updateInfo !== undefined && (
|
||||
<>
|
||||
<DialogTitle
|
||||
variant="h5"
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "flex-start",
|
||||
gap: "0.4em",
|
||||
}}
|
||||
>
|
||||
Update Available!
|
||||
<Chip
|
||||
icon={
|
||||
<span className="material-symbols-rounded">update</span>
|
||||
}
|
||||
label={`v${updateInfo.version}`}
|
||||
color="success"
|
||||
/>
|
||||
</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
<DialogContentText>
|
||||
<Markdown remarkPlugins={[remarkGfm]}>
|
||||
{updateInfo.body}
|
||||
</Markdown>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions
|
||||
style={{
|
||||
padding: "1em",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
disabled={updateDialogButton}
|
||||
target="_blank"
|
||||
href={`https://github.com/prayag17/JellyPlayer/releases/${updateInfo.version}`}
|
||||
>
|
||||
<SvgIcon>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<title>Update</title>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8" />
|
||||
</svg>
|
||||
</SvgIcon>
|
||||
</IconButton>
|
||||
<Button
|
||||
size="large"
|
||||
color="error"
|
||||
variant="outlined"
|
||||
disabled={updateDialogButton}
|
||||
onClick={() => setUpdateDialog(false)}
|
||||
>
|
||||
close
|
||||
</Button>
|
||||
<LoadingButton
|
||||
size="large"
|
||||
color="success"
|
||||
variant="contained"
|
||||
loading={updateDialogButton}
|
||||
loadingIndicator="Updating..."
|
||||
onClick={async () => {
|
||||
setUpdateDialogButton(true);
|
||||
await installUpdate();
|
||||
enqueueSnackbar(
|
||||
"Update has been installed! You need to relaunch JellyPlayer.",
|
||||
{
|
||||
variant: "success",
|
||||
},
|
||||
);
|
||||
await relaunch();
|
||||
}}
|
||||
>
|
||||
Update
|
||||
</LoadingButton>
|
||||
</DialogActions>
|
||||
</>
|
||||
)}
|
||||
</Dialog>
|
||||
<EasterEgg />
|
||||
|
||||
{/* Show Dialog if server not reachable */}
|
||||
|
||||
<div className="app-backdrop-container">
|
||||
<AnimatePresence>
|
||||
<motion.img
|
||||
key={backdropId}
|
||||
src={backdropUrl}
|
||||
alt=""
|
||||
className="app-backdrop"
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: backdropLoading ? 0 : 1,
|
||||
}}
|
||||
exit={{
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.8,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
onLoadCapture={() => {
|
||||
setBackdropLoading(true);
|
||||
}}
|
||||
onLoad={() => {
|
||||
setBackdropLoading(false);
|
||||
}}
|
||||
loading="eager"
|
||||
style={{
|
||||
transition: "opacity 0.8s",
|
||||
}}
|
||||
/>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
<div
|
||||
className={audioPlayerVisible ? "audio-playing" : ""}
|
||||
style={{
|
||||
display: "flex",
|
||||
width: "100vw",
|
||||
transition: "padding 250ms",
|
||||
}}
|
||||
>
|
||||
<CssBaseline />
|
||||
{/* <SideMenu /> */}
|
||||
<AppBar />
|
||||
<AudioPlayer key={audioPlayerVisible} />
|
||||
<ErrorBoundary FallbackComponent={ErrorNotice} key={location.key}>
|
||||
<Routes location={location}>
|
||||
{/* <Route
|
||||
// key={location.key}
|
||||
element={<AnimationWrapper />}
|
||||
> */}
|
||||
<Route path="/" element={<Navigate to={initialRoute} />} />
|
||||
<Route
|
||||
path="/error"
|
||||
element={
|
||||
<Dialog
|
||||
open
|
||||
onClose={handleRelaunch}
|
||||
aria-labelledby="alert-dialog-text"
|
||||
aria-describedby="alert-dialog-desc"
|
||||
maxWidth="md"
|
||||
>
|
||||
<DialogTitle id="alert-dialog-text">
|
||||
Unable to reach server
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-desc">
|
||||
Unable to connect to the jellyfin server.
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => navigate("/servers/list")}>
|
||||
Change Server
|
||||
</Button>
|
||||
<Button variant="outlined" onClick={handleRelaunch}>
|
||||
Restart JellyPlayer
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
}
|
||||
/>
|
||||
<Route path="/login/index" element={<LoginRoute />} />
|
||||
|
||||
<Route path="/home" element={<Home />} />
|
||||
<Route path="/setup/server" element={<ServerSetup />} />
|
||||
<Route path="/servers/list" element={<ServerList />} />
|
||||
<Route
|
||||
path="/login/withImg/:userName/:userId/"
|
||||
element={<LoginWithImage />}
|
||||
/>
|
||||
<Route path="/login/users" element={<UserLogin />} />
|
||||
<Route path="/login/manual" element={<UserLoginManual />} />
|
||||
<Route path="/library/:id" element={<LibraryView />} />
|
||||
<Route path="/item/:id" element={<ItemDetail />} />
|
||||
<Route
|
||||
path="/musicalbum/:id"
|
||||
element={<MusicAlbumTitlePage />}
|
||||
errorElement={<div>Error</div>}
|
||||
/>
|
||||
<Route path="/artist/:id" element={<ArtistTitlePage />} />
|
||||
<Route path="/boxset/:id" element={<BoxSetTitlePage />} />
|
||||
<Route path="/episode/:id" element={<EpisodeTitlePage />} />
|
||||
<Route path="/person/:id" element={<PersonTitlePage />} />
|
||||
<Route path="/playlist/:id" element={<PlaylistTitlePage />} />
|
||||
<Route path="/series/:id" element={<SeriesTitlePage />} />
|
||||
<Route path="/search" element={<SearchPage />} />
|
||||
<Route path="/favorite" element={<FavoritePage />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/about" element={<About />} />
|
||||
<Route path="/player" element={<VideoPlayer />} />
|
||||
{/* </Route> */}
|
||||
</Routes>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
<ReactQueryDevtools buttonPosition="bottom-left" />
|
||||
</ThemeProvider>
|
||||
</SnackbarProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
+292
-106
@@ -1,40 +1,57 @@
|
||||
/** @format */
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
|
||||
import MuiAppBar from "@mui/material/AppBar";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import Avatar from "@mui/material/Avatar";
|
||||
import Button from "@mui/material/Button";
|
||||
import Grow from "@mui/material/Grow";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import ListItemIcon from "@mui/material/ListItemIcon";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Popper from "@mui/material/Popper";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
||||
|
||||
import { red } from "@mui/material/colors";
|
||||
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { NavLink, useLocation, useNavigate } from "react-router-dom";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import "./appBar.module.scss";
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
import { MdiCog } from "../icons/mdiCog";
|
||||
import { MdiInformation } from "../icons/mdiInformation";
|
||||
import { MdiMenu } from "../icons/mdiMenu";
|
||||
import { useDrawerStore } from "../../utils/store/drawer";
|
||||
import { delServer } from "../../utils/storage/servers";
|
||||
import { delUser } from "../../utils/storage/user";
|
||||
import { MdiDelete } from "../icons/mdiDelete";
|
||||
import { useDrawerStore } from "../../utils/store/drawer";
|
||||
import "./appBar.module.scss";
|
||||
|
||||
import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
|
||||
import { EventEmitter as event } from "../../eventEmitter";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||
|
||||
import logo from "../../assets/icon.svg";
|
||||
|
||||
const forwardRefNavLink = React.forwardRef({
|
||||
displayName: "NavLink",
|
||||
render: (props, ref) => (
|
||||
<NavLink
|
||||
ref={ref}
|
||||
to={props.to}
|
||||
className={({ isActive }) =>
|
||||
`${props.className} ${isActive ? props.activeClassName : ""}`
|
||||
}
|
||||
>
|
||||
{props.children}
|
||||
</NavLink>
|
||||
),
|
||||
});
|
||||
|
||||
export const AppBar = () => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
const navigate = useNavigate();
|
||||
@@ -47,12 +64,23 @@ export const AppBar = () => {
|
||||
const user = useQuery({
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(api).getCurrentUser();
|
||||
const usr = await getUserApi(api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
enabled: display,
|
||||
networkMode: "always",
|
||||
});
|
||||
const libraries = useQuery({
|
||||
queryKey: ["libraries"],
|
||||
queryFn: async () => {
|
||||
const libs = await getUserViewsApi(api).getUserViews({
|
||||
userId: user.data.Id,
|
||||
});
|
||||
return libs.data;
|
||||
},
|
||||
enabled: !!user.data,
|
||||
networkMode: "always",
|
||||
});
|
||||
useEffect(() => {
|
||||
if (user.isError) {
|
||||
console.error(user.error);
|
||||
@@ -91,6 +119,19 @@ export const AppBar = () => {
|
||||
navigate("/login/index");
|
||||
};
|
||||
|
||||
const [librariesPopper, setLibrariesPopper] = useState(false);
|
||||
const librariesText = useRef(null);
|
||||
|
||||
const handlePopper = (event) => {
|
||||
if (librariesPopper) {
|
||||
setLibrariesPopper(null);
|
||||
} else {
|
||||
setLibrariesPopper(event.currentTarget);
|
||||
}
|
||||
};
|
||||
|
||||
const [isBrowsingLibrary, setIsBrowsingLibrary] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
location.pathname.includes("login") ||
|
||||
@@ -104,14 +145,18 @@ export const AppBar = () => {
|
||||
} else {
|
||||
setDisplay(true);
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
useEffect(() => {
|
||||
if (location.pathname == "/home") {
|
||||
if (location.pathname === "/home") {
|
||||
setBackButtonVisible(false);
|
||||
} else {
|
||||
setBackButtonVisible(true);
|
||||
}
|
||||
|
||||
if (location.pathname.includes("library")) {
|
||||
setIsBrowsingLibrary(true);
|
||||
} else {
|
||||
setIsBrowsingLibrary(false);
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
if (!display) {
|
||||
@@ -123,109 +168,250 @@ export const AppBar = () => {
|
||||
style={{
|
||||
backgroundColor: "transparent",
|
||||
paddingRight: "0 !important",
|
||||
width: "fit-content",
|
||||
}}
|
||||
className={trigger ? "appBar backdropVisible" : "appBar"}
|
||||
elevation={0}
|
||||
elevation={trigger ? 4 : 0}
|
||||
color="transparent"
|
||||
>
|
||||
<Toolbar
|
||||
sx={{
|
||||
justifyContent: "space-between",
|
||||
padding: "13px !important",
|
||||
display: "flex",
|
||||
gap: "1.2em",
|
||||
display: "grid",
|
||||
gap: "0.6em",
|
||||
gridTemplateColumns: "30% 1fr 30%",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() => navigate(-1)}
|
||||
disabled={!backButtonVisible}
|
||||
style={{
|
||||
justifySelf: "left",
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
arrow_back
|
||||
</div>
|
||||
<div className="material-symbols-rounded">arrow_back</div>
|
||||
</IconButton>
|
||||
|
||||
<IconButton onClick={() => navigate("/search")}>
|
||||
<div className="material-symbols-rounded">
|
||||
search
|
||||
</div>
|
||||
</IconButton>
|
||||
<IconButton onClick={() => navigate("/favorite")}>
|
||||
<div className="material-symbols-rounded">
|
||||
favorite
|
||||
</div>
|
||||
</IconButton>
|
||||
<IconButton sx={{ p: 0 }} onClick={handleMenuOpen}>
|
||||
{user.isSuccess &&
|
||||
(user.data.PrimaryImageTag == undefined ? (
|
||||
<Avatar
|
||||
className="appBar-avatar"
|
||||
alt={user.data.Name}
|
||||
>
|
||||
<MdiAccount className="appBar-avatar-icon" />
|
||||
</Avatar>
|
||||
) : (
|
||||
<Avatar
|
||||
className="appBar-avatar"
|
||||
src={
|
||||
api.basePath +
|
||||
"/Users/" +
|
||||
user.data.Id +
|
||||
"/Images/Primary"
|
||||
}
|
||||
alt={user.data.Name}
|
||||
>
|
||||
<MdiAccount className="appBar-avatar-icon" />
|
||||
</Avatar>
|
||||
))}
|
||||
</IconButton>
|
||||
<Menu
|
||||
anchorEl={anchorEl}
|
||||
open={openMenu}
|
||||
onClose={handleMenuClose}
|
||||
sx={{ mt: 1 }}
|
||||
disableScrollLock
|
||||
<div
|
||||
className="flex flex-row flex-center"
|
||||
style={{
|
||||
gap: "2.6em",
|
||||
}}
|
||||
>
|
||||
<MenuItem
|
||||
onClick={() => navigate("/settings")}
|
||||
disabled
|
||||
<NavLink to="/home">
|
||||
{({ isActive }) =>
|
||||
isActive ? (
|
||||
<Button
|
||||
style={{
|
||||
textTransform: "none",
|
||||
}}
|
||||
size="large"
|
||||
className="appBar-text active"
|
||||
>
|
||||
<Typography variant="subtitle1" fontWeight={600}>
|
||||
Home
|
||||
</Typography>
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
style={{
|
||||
textTransform: "none",
|
||||
}}
|
||||
className="appBar-text"
|
||||
size="large"
|
||||
color="white"
|
||||
>
|
||||
<Typography variant="subtitle1" fontWeight={600}>
|
||||
Home
|
||||
</Typography>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
</NavLink>
|
||||
<Button
|
||||
variant="text"
|
||||
// disableRipple
|
||||
disableElevation
|
||||
onClick={handlePopper}
|
||||
style={{ textTransform: "none" }}
|
||||
size="large"
|
||||
disableFocusRipple={false}
|
||||
color={isBrowsingLibrary ? "primary" : "white"}
|
||||
className={
|
||||
isBrowsingLibrary ? "appBar-text active" : "appBar-text"
|
||||
}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">
|
||||
settings
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
Settings
|
||||
</MenuItem>
|
||||
<MenuItem onClick={() => navigate("/about")}>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">
|
||||
info
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
About
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleLogout}>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">
|
||||
logout
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
Logout
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={async () => {
|
||||
navigate("/servers/list");
|
||||
}}
|
||||
<Typography variant="subtitle1" fontWeight={600}>
|
||||
Libraries
|
||||
</Typography>
|
||||
</Button>
|
||||
{/* <Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={600}
|
||||
onMouseEnter={popoverEnter}
|
||||
onFocus={popoverEnter}
|
||||
tabIndex={0}
|
||||
className={
|
||||
isBrowsingLibrary
|
||||
? "appBar-text active"
|
||||
: "appBar-text"
|
||||
}
|
||||
// onMouseLeave={popoverLeave}
|
||||
></Typography> */}
|
||||
|
||||
<Popper
|
||||
open={Boolean(librariesPopper)}
|
||||
anchorEl={librariesPopper}
|
||||
placement="bottom"
|
||||
disablePortal
|
||||
modifiers={[
|
||||
{
|
||||
name: "flip",
|
||||
enabled: true,
|
||||
options: {
|
||||
altBoundary: true,
|
||||
rootBoundary: "document",
|
||||
padding: 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "preventOverflow",
|
||||
enabled: true,
|
||||
options: {
|
||||
altAxis: true,
|
||||
altBoundary: true,
|
||||
tether: true,
|
||||
rootBoundary: "document",
|
||||
padding: 8,
|
||||
},
|
||||
},
|
||||
]}
|
||||
transition
|
||||
>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded appBar-icon">
|
||||
dns
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
Select Server
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
{({ TransitionProps }) => (
|
||||
<Grow
|
||||
{...TransitionProps}
|
||||
style={{
|
||||
transformOrigin: "50% 0 0",
|
||||
}}
|
||||
timeout={250}
|
||||
>
|
||||
<Paper
|
||||
sx={{
|
||||
mt: "1.1em",
|
||||
maxHeight: "72em",
|
||||
}}
|
||||
style={{
|
||||
boxShadow:
|
||||
"0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)",
|
||||
overflow: "hidden",
|
||||
borderRadius: "25px",
|
||||
}}
|
||||
>
|
||||
<div className="appBar-library-scrollContainer">
|
||||
{libraries.isPending
|
||||
? "loading..."
|
||||
: libraries.data.Items.map((library) => (
|
||||
<NavLink
|
||||
key={library.Id}
|
||||
className="appBar-library"
|
||||
to={`library/${library.Id}`}
|
||||
style={{
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
>
|
||||
{Object.keys(library.ImageTags).includes(
|
||||
"Primary",
|
||||
) ? (
|
||||
<img
|
||||
alt={library.Name}
|
||||
src={`${api.basePath}/Items/${library.Id}/Images/Primary?quality=90&fillHeight=226&fillWidth=127`}
|
||||
/>
|
||||
) : (
|
||||
<div className="appBar-library-icon">
|
||||
{" "}
|
||||
{getTypeIcon(library.CollectionType)}{" "}
|
||||
<Typography variant="h6">
|
||||
{library.Name}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
</NavLink>
|
||||
))}
|
||||
</div>
|
||||
</Paper>
|
||||
</Grow>
|
||||
)}
|
||||
</Popper>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="flex flex-row"
|
||||
style={{ justifySelf: "right", gap: "0.6em" }}
|
||||
>
|
||||
<IconButton onClick={() => navigate("/search")}>
|
||||
<div className="material-symbols-rounded">search</div>
|
||||
</IconButton>
|
||||
<IconButton onClick={() => navigate("/favorite")}>
|
||||
<div className="material-symbols-rounded">favorite</div>
|
||||
</IconButton>
|
||||
<IconButton sx={{ p: 0 }} onClick={handleMenuOpen}>
|
||||
{user.isSuccess &&
|
||||
(user.data.PrimaryImageTag === undefined ? (
|
||||
<Avatar className="appBar-avatar" alt={user.data.Name}>
|
||||
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</Avatar>
|
||||
) : (
|
||||
<Avatar
|
||||
className="appBar-avatar"
|
||||
src={`${api.basePath}/Users/${user.data.Id}/Images/Primary`}
|
||||
alt={user.data.Name}
|
||||
>
|
||||
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</Avatar>
|
||||
))}
|
||||
</IconButton>
|
||||
<Menu
|
||||
anchorEl={anchorEl}
|
||||
open={openMenu}
|
||||
onClose={handleMenuClose}
|
||||
sx={{ mt: 2 }}
|
||||
disableScrollLock
|
||||
>
|
||||
<MenuItem onClick={() => navigate("/settings")} disabled>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">settings</div>
|
||||
</ListItemIcon>
|
||||
Settings
|
||||
</MenuItem>
|
||||
<MenuItem onClick={() => navigate("/about")}>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">info</div>
|
||||
</ListItemIcon>
|
||||
About
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleLogout}>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded">logout</div>
|
||||
</ListItemIcon>
|
||||
Logout
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={async () => {
|
||||
navigate("/servers/list");
|
||||
}}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<div className="material-symbols-rounded appBar-icon">
|
||||
dns
|
||||
</div>
|
||||
</ListItemIcon>
|
||||
Select Server
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</div>
|
||||
</Toolbar>
|
||||
</MuiAppBar>
|
||||
);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
/** @format */
|
||||
|
||||
.appBar {
|
||||
top: 8px !important;
|
||||
right: 8px !important;
|
||||
border-radius: 10000px;
|
||||
transition: background-color $transition-time-fast,
|
||||
backdrop-filter $transition-time-fast,
|
||||
box-shadow $transition-time-default !important;
|
||||
@@ -17,8 +13,116 @@
|
||||
fill: url(#clr-gradient-default) !important;
|
||||
}
|
||||
}
|
||||
&-logo {
|
||||
height: 1.8em !important;
|
||||
&-text {
|
||||
opacity: 0.7;
|
||||
transition: opacity $transition-time-fast;
|
||||
position: relative;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
&::after {
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 1.2px;
|
||||
background: white;
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
bottom: 4.6px;
|
||||
left: 0;
|
||||
transform: scaleX(0);
|
||||
transition: transform $transition-time-fast,
|
||||
background $transition-time-fast,
|
||||
opacity $transition-time-fast;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
&::after {
|
||||
transform: scaleX(0.25);
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
opacity: 1;
|
||||
color: $clr-accent-default;
|
||||
&::after {
|
||||
transform: scaleX(0.5);
|
||||
opacity: 1;
|
||||
background: $clr-accent-default;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-library {
|
||||
position: relative;
|
||||
width: 20rem;
|
||||
text-decoration: none;
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 5px;
|
||||
background: rgb(0 0 0 / 0.3);
|
||||
opacity: 0;
|
||||
transition: opacity $transition-time-fast;
|
||||
border-radius: 5px;
|
||||
}
|
||||
> img {
|
||||
border: 0px solid white;
|
||||
width: inherit;
|
||||
object-fit: cover;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
transition: border $transition-time-fast;
|
||||
}
|
||||
&-icon {
|
||||
height: 100%;
|
||||
width: inherit;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: white !important;
|
||||
background: rgb(255 255 255 / 0.1);
|
||||
border: 0px solid white;
|
||||
border-radius: 10px;
|
||||
transition: border $transition-time-fast;
|
||||
.material-symbols-rounded {
|
||||
font-size: 3em;
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
> img {
|
||||
border: 5px solid white;
|
||||
}
|
||||
.material-symbols-rounded {
|
||||
font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 25,
|
||||
"opsz" 40;
|
||||
}
|
||||
.appBar-library-icon {
|
||||
border: 5px solid white;
|
||||
}
|
||||
}
|
||||
&-scrollContainer {
|
||||
display: flex;
|
||||
max-width: 35vw;
|
||||
overflow: auto;
|
||||
gap: 1em;
|
||||
height: inherit;
|
||||
padding: 15px;
|
||||
|
||||
// Magic scrollbar
|
||||
&::-webkit-scrollbar {
|
||||
&-thumb {
|
||||
width: 150px;
|
||||
max-width: 33%;
|
||||
}
|
||||
&-track {
|
||||
margin-left: 25px;
|
||||
margin-right: 25px;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/** @format */
|
||||
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
export const AppBarBackOnly = () => {
|
||||
@@ -24,7 +21,7 @@ export const AppBarBackOnly = () => {
|
||||
onClick={handleBack}
|
||||
sx={{ mr: 2 }}
|
||||
>
|
||||
<MdiArrowLeft />
|
||||
<span className="material-symbols-rounded">arrow_back</span>
|
||||
</IconButton>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
|
||||
import "./avatar.module.scss";
|
||||
|
||||
import { useApi } from "../../utils/store/api";
|
||||
@@ -17,26 +14,19 @@ export const AvatarImage = ({ userId }) => {
|
||||
<div
|
||||
className="avatar-image"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"url('" +
|
||||
api.basePath +
|
||||
"/Users/" +
|
||||
userId +
|
||||
"/Images/Primary')",
|
||||
backgroundImage: `url('${api.basePath}/Users/${userId}/Images/Primary')`,
|
||||
}}
|
||||
></div>
|
||||
/>
|
||||
|
||||
<div className="avatar-image-icon-container">
|
||||
<MdiAccount className="avatar-image-icon" />
|
||||
<span className="material-symbols-rounded avatar-image-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</div>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export const AvatarSideMenu = ({ userName }) => {
|
||||
return <div></div>;
|
||||
};
|
||||
|
||||
AvatarImage.propType = {
|
||||
userId: PropTypes.string.isRequired,
|
||||
userImageTags: PropTypes.any,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
|
||||
.avatar-image {
|
||||
aspect-ratio: 1;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import React from "react";
|
||||
@@ -6,23 +5,14 @@ import React from "react";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
|
||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { pink } from "@mui/material/colors";
|
||||
import { MdiHeart } from "../icons/mdiHeart";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
import { useSnackbar } from "notistack";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import { pink } from "@mui/material/colors";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { useSnackbar } from "notistack";
|
||||
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
const LikeButton = ({
|
||||
itemId,
|
||||
isFavorite,
|
||||
queryKey,
|
||||
userId,
|
||||
itemName,
|
||||
color = "white",
|
||||
}) => {
|
||||
const LikeButton = ({ itemId, isFavorite, queryKey, userId, itemName }) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
const queryClient = useQueryClient();
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
@@ -46,12 +36,9 @@ const LikeButton = ({
|
||||
enqueueSnackbar(`${error}`, {
|
||||
variant: "error",
|
||||
});
|
||||
enqueueSnackbar(
|
||||
`An error occured while updating "${itemName}"`,
|
||||
{
|
||||
variant: "error",
|
||||
},
|
||||
);
|
||||
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||
variant: "error",
|
||||
});
|
||||
console.error(error);
|
||||
},
|
||||
onSettled: async () => {
|
||||
@@ -75,6 +62,7 @@ const LikeButton = ({
|
||||
opacity: mutation.isPending ? 1 : 0,
|
||||
transition: "opacity 200ms",
|
||||
}}
|
||||
thickness={2}
|
||||
/>
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
/** @format */
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import React from "react";
|
||||
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { green } from "@mui/material/colors";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
@@ -39,12 +37,9 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
||||
enqueueSnackbar(`${error}`, {
|
||||
variant: "error",
|
||||
});
|
||||
enqueueSnackbar(
|
||||
`An error occured while updating "${itemName}"`,
|
||||
{
|
||||
variant: "error",
|
||||
},
|
||||
);
|
||||
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||
variant: "error",
|
||||
});
|
||||
console.error(error);
|
||||
},
|
||||
onSettled: async () => {
|
||||
@@ -67,6 +62,7 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
||||
opacity: mutation.isPending ? 1 : 0,
|
||||
transition: "opacity 200ms",
|
||||
}}
|
||||
thickness={2}
|
||||
/>
|
||||
<IconButton
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -1,31 +1,39 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react";
|
||||
|
||||
import Button from "@mui/material/Button";
|
||||
import Button, {
|
||||
ButtonProps,
|
||||
ButtonPropsSizeOverrides,
|
||||
} from "@mui/material/Button";
|
||||
import Fab from "@mui/material/Fab";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import {
|
||||
usePlaybackDataLoadStore,
|
||||
usePlaybackStore,
|
||||
} from "../../utils/store/playback";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||
import {
|
||||
BaseItemDto,
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
SortOrder,
|
||||
UserItemDataDto,
|
||||
} from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
||||
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import {
|
||||
setItem,
|
||||
usePlaybackDataLoadStore,
|
||||
usePlaybackStore,
|
||||
} from "../../utils/store/playback";
|
||||
|
||||
import { SxProps } from "@mui/material";
|
||||
|
||||
const PlayButton = ({
|
||||
item,
|
||||
itemId,
|
||||
itemUserData,
|
||||
userId,
|
||||
@@ -35,7 +43,6 @@ const PlayButton = ({
|
||||
currentVideoTrack,
|
||||
className,
|
||||
sx,
|
||||
iconProps,
|
||||
buttonProps,
|
||||
iconOnly,
|
||||
audio = false,
|
||||
@@ -43,6 +50,24 @@ const PlayButton = ({
|
||||
playlistItem,
|
||||
playlistItemId = "",
|
||||
trackIndex,
|
||||
}: {
|
||||
item: BaseItemDto;
|
||||
itemId: string;
|
||||
itemUserData: UserItemDataDto;
|
||||
userId: string;
|
||||
itemType: BaseItemKind;
|
||||
currentAudioTrack: number;
|
||||
currentVideoTrack: number;
|
||||
currentSubTrack: number;
|
||||
className: string;
|
||||
sx: SxProps;
|
||||
buttonProps: ButtonProps;
|
||||
iconOnly: boolean;
|
||||
audio: boolean;
|
||||
size: ButtonPropsSizeOverrides;
|
||||
playlistItem: BaseItemDto;
|
||||
playlistItemId: string;
|
||||
trackIndex: number;
|
||||
}) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
|
||||
@@ -97,11 +122,11 @@ const PlayButton = ({
|
||||
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const item = useMutation({
|
||||
const itemQuery = useMutation({
|
||||
mutationKey: ["playButton", itemId, userId],
|
||||
mutationFn: async () => {
|
||||
setPlaybackDataLoading(true);
|
||||
let result;
|
||||
let result: any;
|
||||
if (playlistItem) {
|
||||
result = await getPlaylistsApi(api).getPlaylistItems({
|
||||
userId: userId,
|
||||
@@ -113,18 +138,13 @@ const PlayButton = ({
|
||||
result = await getTvShowsApi(api).getEpisodes({
|
||||
seriesId: itemId,
|
||||
limit: 1,
|
||||
startIndex: 0,
|
||||
fields: [
|
||||
ItemFields.MediaSources,
|
||||
ItemFields.MediaStreams,
|
||||
],
|
||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||
enableUserData: true,
|
||||
userId: userId,
|
||||
});
|
||||
break;
|
||||
case BaseItemKind.Playlist:
|
||||
result = await getPlaylistsApi(
|
||||
api,
|
||||
).getPlaylistItems({
|
||||
result = await getPlaylistsApi(api).getPlaylistItems({
|
||||
userId: userId,
|
||||
playlistId: playlistItemId,
|
||||
});
|
||||
@@ -133,12 +153,9 @@ const PlayButton = ({
|
||||
result = await getItemsApi(api).getItems({
|
||||
parentId: itemId,
|
||||
userId: userId,
|
||||
fields: [
|
||||
ItemFields.MediaSources,
|
||||
ItemFields.MediaStreams,
|
||||
],
|
||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||
sortOrder: SortOrder.Ascending,
|
||||
sortBy: "IndexNumber",
|
||||
sortBy: ["IndexNumber"],
|
||||
});
|
||||
break;
|
||||
case BaseItemKind.MusicArtist:
|
||||
@@ -147,26 +164,25 @@ const PlayButton = ({
|
||||
recursive: true,
|
||||
includeItemTypes: [BaseItemKind.Audio],
|
||||
userId: userId,
|
||||
fields: [
|
||||
ItemFields.MediaSources,
|
||||
ItemFields.MediaStreams,
|
||||
],
|
||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||
sortOrder: SortOrder.Ascending,
|
||||
sortBy: [
|
||||
"PremiereDate",
|
||||
"ProductionYear",
|
||||
"SortName",
|
||||
],
|
||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||
});
|
||||
break;
|
||||
case BaseItemKind.BoxSet:
|
||||
result = await getItemsApi(api).getItems({
|
||||
parentId: itemId,
|
||||
userId,
|
||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||
sortOrder: SortOrder.Ascending,
|
||||
sortBy: "IndexNumber",
|
||||
});
|
||||
break;
|
||||
default:
|
||||
result = await getItemsApi(api).getItems({
|
||||
ids: [itemId],
|
||||
userId: userId,
|
||||
fields: [
|
||||
ItemFields.MediaSources,
|
||||
ItemFields.MediaStreams,
|
||||
],
|
||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||
sortOrder: SortOrder.Ascending,
|
||||
sortBy: "IndexNumber",
|
||||
});
|
||||
@@ -175,49 +191,51 @@ const PlayButton = ({
|
||||
}
|
||||
return result.data;
|
||||
},
|
||||
onSuccess: (item) => {
|
||||
console.log(item.Items[0].MediaSources);
|
||||
onSuccess: (result) => {
|
||||
console.log(result.Items[0].MediaSources);
|
||||
if (trackIndex) {
|
||||
setPlaylistItemId(playlistItemId);
|
||||
setCurrentTrack(trackIndex);
|
||||
setAudioTracks(item.Items);
|
||||
setAudioTracks(result.Items);
|
||||
setAudioUrl(
|
||||
`${api.basePath}/Audio/${item.Items[trackIndex].Id}/universal?deviceId=${api.deviceInfo.id}&userId=${userId}&api_key=${api.accessToken}`,
|
||||
`${api.basePath}/Audio/${result.Items[trackIndex].Id}/universal?deviceId=${api.deviceInfo.id}&userId=${userId}&api_key=${api.accessToken}`,
|
||||
);
|
||||
setAudioItem(item.Items[trackIndex]);
|
||||
setAudioItem(result.Items[trackIndex]);
|
||||
setAudioDisplay(true);
|
||||
} else if (audio) {
|
||||
setAudioItem(item.Items[0]);
|
||||
setAudioTracks(item.Items);
|
||||
setAudioItem(result.Items[0]);
|
||||
setAudioTracks(result.Items);
|
||||
setAudioUrl(
|
||||
`${api.basePath}/Audio/${item.Items[0].Id}/universal?deviceId=${api.deviceInfo.id}&userId=${userId}&api_key=${api.accessToken}`,
|
||||
`${api.basePath}/Audio/${result.Items[0].Id}/universal?deviceId=${api.deviceInfo.id}&userId=${userId}&api_key=${api.accessToken}`,
|
||||
);
|
||||
setAudioDisplay(true);
|
||||
} else {
|
||||
setUserId(userId);
|
||||
setItemId(item.Items[0].Id);
|
||||
setDuration(item.Items[0].RunTimeTicks);
|
||||
setItemId(result.Items[0].Id);
|
||||
setDuration(result.Items[0].RunTimeTicks);
|
||||
|
||||
if (item.Items[0].Type == BaseItemKind.Episode) {
|
||||
setSeriesId(item.Items[0].SeriesId);
|
||||
// setEpisodeIndex(item.Ite)
|
||||
if (result.Items[0].Type === BaseItemKind.Episode) {
|
||||
setSeriesId(result.Items[0].SeriesId);
|
||||
// setEpisodeIndex(result.Ite)
|
||||
}
|
||||
|
||||
setMediaContainer(item.Items[0].MediaSources[0].Container);
|
||||
setMediaContainer(result.Items[0].MediaSources[0].Container);
|
||||
// Set all required stream index
|
||||
setAudioStreamIndex(currentAudioTrack);
|
||||
setVideoStreamIndex(currentVideoTrack);
|
||||
setSubtitleStreamIndex(currentSubTrack);
|
||||
|
||||
setMediaSourceId(item.Items[0].Id);
|
||||
setMediaSourceId(result.Items[0].Id);
|
||||
setItem(result.Items[0]);
|
||||
|
||||
switch (item.Items[0].Type) {
|
||||
switch (result.Items[0].Type) {
|
||||
case BaseItemKind.Movie:
|
||||
if (item.Items[0].ImageBlurHashes.Logo) {
|
||||
if (result.Items[0].ImageBlurHashes.Logo) {
|
||||
setItemName(
|
||||
<div className="video-osd-name">
|
||||
<img
|
||||
src={`${api.basePath}/Items/${item.Items[0].Id}/Images/Logo`}
|
||||
alt={result.Items[0].Name}
|
||||
src={`${api.basePath}/Items/${result.Items[0].Id}/Images/Logo`}
|
||||
className="video-osd-name-logo"
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
@@ -228,35 +246,27 @@ const PlayButton = ({
|
||||
} else {
|
||||
setItemName(
|
||||
<div className="video-osd-name">
|
||||
<Typography variant="h6">
|
||||
{item.Items[0].Name}
|
||||
</Typography>
|
||||
<Typography variant="h6">{result.Items[0].Name}</Typography>
|
||||
</div>,
|
||||
);
|
||||
}
|
||||
break;
|
||||
case BaseItemKind.Episode:
|
||||
if (item.Items[0].ImageBlurHashes.Logo) {
|
||||
if (result.Items[0].ImageBlurHashes.Logo) {
|
||||
setItemName(
|
||||
<div className="video-osd-name">
|
||||
<img
|
||||
src={`${api.basePath}/Items/${item.Items[0].SeriesId}/Images/Logo`}
|
||||
alt={result.Items[0].SeriesName}
|
||||
src={`${api.basePath}/Items/${result.Items[0].SeriesId}/Images/Logo`}
|
||||
className="video-osd-name-logo"
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
/>
|
||||
<Typography variant="subtitle1">
|
||||
S
|
||||
{
|
||||
item.Items[0]
|
||||
.ParentIndexNumber
|
||||
}
|
||||
S{result.Items[0].ParentIndexNumber}
|
||||
:E
|
||||
{
|
||||
item.Items[0].IndexNumber
|
||||
}{" "}
|
||||
{item.Items[0].Name}
|
||||
{result.Items[0].IndexNumber} {result.Items[0].Name}
|
||||
</Typography>
|
||||
</div>,
|
||||
);
|
||||
@@ -264,19 +274,12 @@ const PlayButton = ({
|
||||
setItemName(
|
||||
<div className="video-osd-name">
|
||||
<Typography variant="h6">
|
||||
{item.Items[0].SeriesName}
|
||||
{result.Items[0].SeriesName}
|
||||
</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
S
|
||||
{
|
||||
item.Items[0]
|
||||
.ParentIndexNumber
|
||||
}
|
||||
S{result.Items[0].ParentIndexNumber}
|
||||
:E
|
||||
{
|
||||
item.Items[0].IndexNumber
|
||||
}{" "}
|
||||
{item.Items[0].Name}
|
||||
{result.Items[0].IndexNumber} {result.Items[0].Name}
|
||||
</Typography>
|
||||
</div>,
|
||||
);
|
||||
@@ -286,22 +289,20 @@ const PlayButton = ({
|
||||
default:
|
||||
setItemName(
|
||||
<div className="video-osd-name">
|
||||
<Typography variant="h6">
|
||||
{item.Items[0].Name}
|
||||
</Typography>
|
||||
<Typography variant="h6">{result.Items[0].Name}</Typography>
|
||||
</div>,
|
||||
);
|
||||
break;
|
||||
}
|
||||
setPosition(item.Items[0].UserData?.PlaybackPositionTicks);
|
||||
setPosition(result.Items[0].UserData?.PlaybackPositionTicks);
|
||||
|
||||
setUrl(
|
||||
`${api.basePath}/Videos/${item.Items[0].Id}/stream.
|
||||
${item.Items[0].MediaSources[0].Container}
|
||||
?Static=true&mediaSourceId=${item.Items[0].Id}&deviceId=${api.deviceInfo.id}&api_key=${api.accessToken}&Tag=${item.Items[0].MediaSources[0].ETag}&videoStreamIndex=${currentVideoTrack}&audioStreamIndex=${currentAudioTrack}`,
|
||||
`${api.basePath}/Videos/${result.Items[0].Id}/stream.
|
||||
${result.Items[0].MediaSources[0].Container}
|
||||
?Static=true&mediaSourceId=${result.Items[0].Id}&deviceId=${api.deviceInfo.id}&api_key=${api.accessToken}&Tag=${result.Items[0].MediaSources[0].ETag}&videoStreamIndex=${currentVideoTrack}&audioStreamIndex=${currentAudioTrack}`,
|
||||
);
|
||||
|
||||
navigate(`/player`);
|
||||
navigate("/player");
|
||||
}
|
||||
},
|
||||
onSettled: () => {
|
||||
@@ -315,7 +316,7 @@ const PlayButton = ({
|
||||
});
|
||||
const handleClick = (e) => {
|
||||
e.stopPropagation();
|
||||
item.mutate();
|
||||
itemQuery.mutate();
|
||||
};
|
||||
if (iconOnly) {
|
||||
return (
|
||||
@@ -338,53 +339,52 @@ const PlayButton = ({
|
||||
</div>
|
||||
</Fab>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Button
|
||||
className={className}
|
||||
variant="contained"
|
||||
onClick={handleClick}
|
||||
startIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
play_arrow
|
||||
</div>
|
||||
}
|
||||
{...buttonProps}
|
||||
sx={{
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
size={size}
|
||||
>
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
100 > itemUserData.PlayedPercentage > 0
|
||||
? itemUserData.PlayedPercentage
|
||||
: 0
|
||||
}
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
height: "100%",
|
||||
background: "transparent",
|
||||
opacity: 0.2,
|
||||
zIndex: 0,
|
||||
}}
|
||||
color="white"
|
||||
/>
|
||||
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Button
|
||||
className={className}
|
||||
variant="contained"
|
||||
onClick={handleClick}
|
||||
startIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
play_arrow
|
||||
</div>
|
||||
}
|
||||
{...buttonProps}
|
||||
sx={{
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
size={size}
|
||||
>
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
100 > itemUserData.PlayedPercentage > 0
|
||||
? itemUserData.PlayedPercentage
|
||||
: 0
|
||||
}
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
height: "100%",
|
||||
background: "transparent",
|
||||
opacity: 0.2,
|
||||
zIndex: 0,
|
||||
}}
|
||||
color="white"
|
||||
/>
|
||||
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default PlayButton;
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
@@ -7,11 +6,8 @@ import CardActionArea from "@mui/material/CardActionArea";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
||||
|
||||
import "./card.module.scss";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import "./card.module.scss";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
@@ -70,11 +66,10 @@ export const ActorCard = ({
|
||||
/>
|
||||
)}
|
||||
<div className="card-image-icon-container">
|
||||
<div className="material-symbols-rounded">
|
||||
person
|
||||
</div>
|
||||
<div className="material-symbols-rounded">person</div>
|
||||
</div>
|
||||
<img
|
||||
alt={item.Name}
|
||||
src={api.getItemImageUrl(
|
||||
seriesId ? item.SeriesId : item.Id,
|
||||
"Primary",
|
||||
@@ -90,7 +85,9 @@ export const ActorCard = ({
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
className="card-image"
|
||||
/>
|
||||
</div>
|
||||
|
||||
+119
-138
@@ -1,24 +1,19 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import MuiCard from "@mui/material/Card";
|
||||
import CardActionArea from "@mui/material/CardActionArea";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { getTypeIcon } from "../utils/iconsCollection";
|
||||
import "./card.module.scss";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import ErrorBoundary from "../errorBoundary";
|
||||
|
||||
const cardImageAspectRatios = {
|
||||
thumb: 1.777,
|
||||
@@ -63,7 +58,6 @@ export const Card = ({
|
||||
cardTitle,
|
||||
cardCaption,
|
||||
imageType = "Primary",
|
||||
imageBlurhash,
|
||||
cardType,
|
||||
queryKey,
|
||||
userId,
|
||||
@@ -71,7 +65,6 @@ export const Card = ({
|
||||
hideText,
|
||||
onClick,
|
||||
disableOverlay = false,
|
||||
disablePadding,
|
||||
overrideIcon,
|
||||
}) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
@@ -79,9 +72,9 @@ export const Card = ({
|
||||
const defaultOnClick = () => {
|
||||
if (availableSpecialRoutes.includes(item.Type)) {
|
||||
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
||||
} else if (!!item.Role || item.Type == BaseItemKind.Person) {
|
||||
} else if (!!item.Role || item.Type === BaseItemKind.Person) {
|
||||
navigate(`/person/${item.Id}`);
|
||||
} else if (item.Type == BaseItemKind.MusicArtist) {
|
||||
} else if (item.Type === BaseItemKind.MusicArtist) {
|
||||
navigate(`/artist/${item.Id}`);
|
||||
} else {
|
||||
navigate(`/item/${item.Id}`);
|
||||
@@ -91,50 +84,39 @@ export const Card = ({
|
||||
<div
|
||||
className="card"
|
||||
elevation={0}
|
||||
tabIndex={0}
|
||||
onClick={onClick ? onClick : defaultOnClick}
|
||||
>
|
||||
<div className="card-box">
|
||||
<div
|
||||
className="card-image-container"
|
||||
style={{
|
||||
aspectRatio: cardImageAspectRatios[cardType],
|
||||
}}
|
||||
>
|
||||
{/* {!!item.UserData && (
|
||||
<>
|
||||
<div
|
||||
className="card-indicator check"
|
||||
style={{
|
||||
opacity: item.UserData?.Played
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`card-indicator text`}
|
||||
style={{
|
||||
opacity: item.UserData
|
||||
?.UnplayedItemCount
|
||||
? 1
|
||||
: 0,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
padding="0.1em 0.4em"
|
||||
fontWeight={400}
|
||||
>
|
||||
{item.UserData?.UnplayedItemCount}
|
||||
</Typography>
|
||||
</div>
|
||||
</>
|
||||
)} */}
|
||||
{/* {!!imageBlurhash && (
|
||||
<div
|
||||
className="card-image-container"
|
||||
style={{
|
||||
aspectRatio: cardImageAspectRatios[cardType],
|
||||
}}
|
||||
>
|
||||
<ErrorBoundary fallback>
|
||||
<div
|
||||
className="card-indicator check"
|
||||
style={{
|
||||
opacity: item.UserData?.Played ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">done</div>
|
||||
</div>
|
||||
<div
|
||||
className={"card-indicator text"}
|
||||
style={{
|
||||
opacity: item.UserData?.UnplayedItemCount ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
padding="0.1em 0.4em"
|
||||
fontWeight={400}
|
||||
>
|
||||
{item.UserData?.UnplayedItemCount}
|
||||
</Typography>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
{/* {!!imageBlurhash && (
|
||||
<Blurhash
|
||||
hash={imageBlurhash}
|
||||
width={128}
|
||||
@@ -144,40 +126,44 @@ export const Card = ({
|
||||
className="card-image-blurhash"
|
||||
/>
|
||||
)} */}
|
||||
<div className="card-image-icon-container">
|
||||
{overrideIcon
|
||||
? getTypeIcon(overrideIcon)
|
||||
: getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
overrideIcon == "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 85,
|
||||
fillHeight: 462,
|
||||
fillWidth: 462,
|
||||
},
|
||||
)
|
||||
}
|
||||
style={{
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||
className="card-image"
|
||||
/>
|
||||
<div className="card-image-icon-container">
|
||||
{overrideIcon ? getTypeIcon(overrideIcon) : getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<img
|
||||
alt={item.Name}
|
||||
src={
|
||||
overrideIcon === "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 90,
|
||||
fillHeight: 226,
|
||||
fillWidth: Math.floor(
|
||||
226 / cardImageAspectRatios[cardType],
|
||||
),
|
||||
},
|
||||
)
|
||||
}
|
||||
style={{
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
className="card-image"
|
||||
/>
|
||||
<div className="card-overlay">
|
||||
{!disableOverlay && (
|
||||
<div className="card-overlay">
|
||||
<>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={userId}
|
||||
@@ -191,16 +177,12 @@ export const Card = ({
|
||||
}}
|
||||
iconOnly
|
||||
audio={
|
||||
item.Type ==
|
||||
BaseItemKind.MusicAlbum ||
|
||||
item.Type == BaseItemKind.Audio ||
|
||||
item.Type ==
|
||||
BaseItemKind.AudioBook ||
|
||||
item.Type == BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={
|
||||
item.Type == BaseItemKind.Playlist
|
||||
item.Type === BaseItemKind.MusicAlbum ||
|
||||
item.Type === BaseItemKind.Audio ||
|
||||
item.Type === BaseItemKind.AudioBook ||
|
||||
item.Type === BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||
playlistItemId={item.Id}
|
||||
/>
|
||||
<LikeButton
|
||||
@@ -217,50 +199,49 @@ export const Card = ({
|
||||
queryKey={queryKey}
|
||||
userId={userId}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={item.UserData?.PlayedPercentage}
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
zIndex: 2,
|
||||
height: "6px",
|
||||
background:
|
||||
"rgb(5 5 5 / 0.5) !important",
|
||||
backdropFilter: "blur(5px)",
|
||||
}}
|
||||
color="primary"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className="card-text-container"
|
||||
style={{ display: hideText ? "none" : "block" }}
|
||||
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={item.UserData?.PlayedPercentage}
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
zIndex: 2,
|
||||
height: "6px",
|
||||
background: "rgb(5 5 5 / 0.5) !important",
|
||||
backdropFilter: "blur(5px)",
|
||||
}}
|
||||
color="primary"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className="card-text-container"
|
||||
style={{ display: hideText ? "none" : "block" }}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.9 }}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.9 }}
|
||||
>
|
||||
{cardTitle}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.6 }}
|
||||
lineHeight="auto"
|
||||
>
|
||||
{cardCaption}
|
||||
</Typography>
|
||||
</div>
|
||||
{cardTitle}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
noWrap
|
||||
textAlign="center"
|
||||
style={{ opacity: 0.6 }}
|
||||
lineHeight="auto"
|
||||
>
|
||||
{cardCaption}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
.card {
|
||||
height: 100%;
|
||||
overflow: visible !important;
|
||||
@@ -61,7 +60,6 @@
|
||||
left: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
@@ -78,17 +76,11 @@
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5em;
|
||||
border-radius: 8px;
|
||||
background: rgb(0 0 0 / 0.4);
|
||||
}
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
.card-image {
|
||||
filter: brightness(0.6);
|
||||
}
|
||||
.card-image-icon-container {
|
||||
filter: brightness(0.6);
|
||||
}
|
||||
.card-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import MuiCard from "@mui/material/Card";
|
||||
import CardActionArea from "@mui/material/CardActionArea";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import "./card.module.scss";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
@@ -70,9 +67,7 @@ export const EpisodeCard = ({
|
||||
opacity: item.UserData?.Played ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
<div className="material-symbols-rounded">done</div>
|
||||
</div>
|
||||
)}
|
||||
{!!imageBlurhash && (
|
||||
@@ -86,11 +81,10 @@ export const EpisodeCard = ({
|
||||
/>
|
||||
)}
|
||||
<div className="card-image-icon-container">
|
||||
<div className="material-symbols-rounded">
|
||||
tv_gen
|
||||
</div>
|
||||
<div className="material-symbols-rounded">tv_gen</div>
|
||||
</div>
|
||||
<img
|
||||
alt={item.Name}
|
||||
src={api.getItemImageUrl(item.Id, "Primary", {
|
||||
quality: 90,
|
||||
fillHeight: 512,
|
||||
@@ -102,7 +96,9 @@ export const EpisodeCard = ({
|
||||
opacity: 0,
|
||||
}}
|
||||
loading="lazy"
|
||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
className="card-image"
|
||||
/>
|
||||
|
||||
@@ -146,8 +142,7 @@ export const EpisodeCard = ({
|
||||
bottom: 0,
|
||||
zIndex: 2,
|
||||
height: "6px",
|
||||
background:
|
||||
"rgb(5 5 5 / 0.5) !important",
|
||||
background: "rgb(5 5 5 / 0.5) !important",
|
||||
backdropFilter: "blur(5px)",
|
||||
}}
|
||||
color="primary"
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
/** @format */
|
||||
|
||||
import React, { useState } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import React, { useState } from "react";
|
||||
|
||||
import Carousel from "react-multi-carousel";
|
||||
import "react-multi-carousel/lib/styles.css";
|
||||
|
||||
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import "./cardScroller.module.scss";
|
||||
export const CardScroller = ({
|
||||
@@ -32,23 +27,29 @@ export const CardScroller = ({
|
||||
partialVisibilityGutter: 40,
|
||||
},
|
||||
desktop: {
|
||||
breakpoint: { max: 3000, min: 625 },
|
||||
breakpoint: { max: 3000, min: 925 },
|
||||
items: displayCards,
|
||||
slidesToSlide: displayCards, // optional, default to 1.
|
||||
partialVisibilityGutter: 30,
|
||||
},
|
||||
tablet: {
|
||||
breakpoint: { max: 624, min: 464 },
|
||||
items: displayCards - 2,
|
||||
slidesToSlide: displayCards - 2, // optional, default to 1.
|
||||
breakpoint: { max: 925, min: 600 },
|
||||
items: displayCards - 3,
|
||||
slidesToSlide: displayCards - 3, // optional, default to 1.
|
||||
partialVisibilityGutter: 20,
|
||||
},
|
||||
mobile: {
|
||||
breakpoint: { max: 464, min: 0 },
|
||||
breakpoint: { max: 600, min: 424 },
|
||||
items: displayCards - 5,
|
||||
slidesToSlide: displayCards - 5, // optional, default to 1.
|
||||
partialVisibilityGutter: 10,
|
||||
},
|
||||
smallScreen: {
|
||||
breakpoint: { max: 424, min: 0 },
|
||||
items: 1,
|
||||
slidesToSlide: 1, // optional, default to 1.
|
||||
partialVisibilityGutter: 10,
|
||||
},
|
||||
};
|
||||
|
||||
const [carouselRef, setCarouselRef] = useState();
|
||||
@@ -59,8 +60,8 @@ export const CardScroller = ({
|
||||
sx={{ mb: 1 }}
|
||||
className={
|
||||
disableDecoration
|
||||
? `card-scroller-header-container hidden-decoration`
|
||||
: `card-scroller-header-container`
|
||||
? "card-scroller-header-container hidden-decoration"
|
||||
: "card-scroller-header-container"
|
||||
}
|
||||
>
|
||||
<Typography
|
||||
@@ -69,25 +70,20 @@ export const CardScroller = ({
|
||||
className="card-scroller-heading"
|
||||
{...headingProps}
|
||||
>
|
||||
<div className="card-scroller-heading-decoration"></div>{" "}
|
||||
{title}
|
||||
<div className="card-scroller-heading-decoration" /> {title}
|
||||
</Typography>
|
||||
<ButtonGroup className="card-scroller-button-group">
|
||||
<IconButton
|
||||
className="card-scroller-button"
|
||||
onClick={() => carouselRef.previous()}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
chevron_left
|
||||
</div>
|
||||
<div className="material-symbols-rounded">chevron_left</div>
|
||||
</IconButton>
|
||||
<IconButton
|
||||
className="card-scroller-button"
|
||||
onClick={() => carouselRef.next()}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
chevron_right
|
||||
</div>
|
||||
<div className="material-symbols-rounded">chevron_right</div>
|
||||
</IconButton>
|
||||
</ButtonGroup>
|
||||
</Box>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
|
||||
.card-scroller {
|
||||
// height: 20em;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** @format */
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
height: 70vh;
|
||||
margin: 0.6em 1.6em 1.6em 1.6em;
|
||||
&-button {
|
||||
position: absolute !important;
|
||||
top: 50%;
|
||||
@@ -12,33 +12,34 @@
|
||||
right: 0.5em;
|
||||
}
|
||||
&.left {
|
||||
left: 0;
|
||||
left: 0.5em;
|
||||
}
|
||||
}
|
||||
&-indicator {
|
||||
height: 2px;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
transition: background $transition-time-fast,
|
||||
height $transition-time-fast;
|
||||
background: rgb(255 255 255 / 0.5);
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
height: 5px;
|
||||
height: 6px;
|
||||
background: rgb(255 255 255 / 0.8) !important;
|
||||
}
|
||||
&-container {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
width: calc(100vw - 8em);
|
||||
left: 1em;
|
||||
right: 1em;
|
||||
bottom: -1.5em;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
gap: 1em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
&.active {
|
||||
height: 5px;
|
||||
height: 6px;
|
||||
background: white !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
/** @format */
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
|
||||
import "./carousel.scss";
|
||||
import { useCarouselStore } from "../../utils/store/carousel";
|
||||
import "./carousel.scss";
|
||||
|
||||
const swipeConfidenceThreshold = 8000;
|
||||
const swipePower = (offset, velocity) => {
|
||||
@@ -21,15 +18,21 @@ const Carousel = ({ content, onChange }) => {
|
||||
state.setDirection,
|
||||
state.direction,
|
||||
]);
|
||||
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
||||
useEffect(() => {
|
||||
onChange(currentSlide);
|
||||
}, [content[currentSlide].key]);
|
||||
}, [content[currentSlide]?.key]);
|
||||
|
||||
return (
|
||||
<div className="carousel">
|
||||
<IconButton
|
||||
className="carousel-button left"
|
||||
onClick={() => {
|
||||
if (currentSlide === 0) {
|
||||
setDirection("left");
|
||||
setCurrentSlide(content.length - 1);
|
||||
}
|
||||
if (currentSlide > 0) {
|
||||
setDirection("left");
|
||||
setCurrentSlide((init) => init - 1);
|
||||
@@ -38,11 +41,11 @@ const Carousel = ({ content, onChange }) => {
|
||||
sx={{
|
||||
background: " rgb(200 200 200 / 0.05)",
|
||||
}}
|
||||
disabled={currentSlide == 0}
|
||||
// disabled={currentSlide == 0}
|
||||
>
|
||||
<div className="material-symbols-rounded">arrow_left</div>
|
||||
</IconButton>
|
||||
<AnimatePresence>
|
||||
<AnimatePresence mode="sync">
|
||||
<motion.div
|
||||
key={currentSlide}
|
||||
initial={{ opacity: 0 }}
|
||||
@@ -50,7 +53,7 @@ const Carousel = ({ content, onChange }) => {
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
ease: "linear",
|
||||
}}
|
||||
drag={"x"}
|
||||
dragConstraints={{ left: 0, right: 0 }}
|
||||
@@ -58,22 +61,19 @@ const Carousel = ({ content, onChange }) => {
|
||||
onDragEnd={(e, { offset, velocity }) => {
|
||||
const swipe = swipePower(offset.x, velocity.x);
|
||||
if (
|
||||
currentSlide != content.length - 1 &&
|
||||
currentSlide !== content.length - 1 &&
|
||||
swipe < -swipeConfidenceThreshold
|
||||
) {
|
||||
setDirection("right");
|
||||
setCurrentSlide((init) => init + 1);
|
||||
} else if (
|
||||
currentSlide != 0 &&
|
||||
swipe > swipeConfidenceThreshold
|
||||
) {
|
||||
} else if (currentSlide !== 0 && swipe > swipeConfidenceThreshold) {
|
||||
setDirection("left");
|
||||
setCurrentSlide((init) => init - 1);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
height: "100vh",
|
||||
width: "100vw",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
position: "absolute",
|
||||
}}
|
||||
>
|
||||
@@ -83,12 +83,15 @@ const Carousel = ({ content, onChange }) => {
|
||||
<IconButton
|
||||
className="carousel-button right"
|
||||
onClick={() => {
|
||||
if (currentSlide < content.length - 1) {
|
||||
if (currentSlide === content.length - 1) {
|
||||
setDirection("right");
|
||||
setCurrentSlide(0);
|
||||
} else if (currentSlide < content.length - 1) {
|
||||
setDirection("right");
|
||||
setCurrentSlide((init) => init + 1);
|
||||
}
|
||||
}}
|
||||
disabled={currentSlide == content.length - 1}
|
||||
// disabled={currentSlide == content.length - 1}
|
||||
sx={{
|
||||
background: " rgb(200 200 200 / 0.05)",
|
||||
}}
|
||||
@@ -99,17 +102,11 @@ const Carousel = ({ content, onChange }) => {
|
||||
{content.map((item, index) => (
|
||||
<div
|
||||
className={
|
||||
currentSlide == index
|
||||
currentSlide === index
|
||||
? "carousel-indicator active"
|
||||
: "carousel-indicator"
|
||||
}
|
||||
key={index}
|
||||
style={{
|
||||
background:
|
||||
currentSlide == index
|
||||
? "white"
|
||||
: "rgb(255 255 255 / 0.5)",
|
||||
}}
|
||||
key={item.Id}
|
||||
onClick={() => {
|
||||
if (currentSlide > index) {
|
||||
setDirection("left");
|
||||
|
||||
@@ -1,33 +1,29 @@
|
||||
/** @format */
|
||||
import React, { memo } from "react";
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import Button from "@mui/material/Button";
|
||||
import Chip from "@mui/material/Chip";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { yellow } from "@mui/material/colors";
|
||||
import ErrorBoundary from "../errorBoundary";
|
||||
|
||||
import CarouselSlideError from "../errors/carousel";
|
||||
import { MdiStar } from "../icons/mdiStar";
|
||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
import { green, red } from "@mui/material/colors";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||
import { getTypeIcon } from "../utils/iconsCollection";
|
||||
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { useCarouselStore } from "../../utils/store/carousel";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import { useCarouselStore } from "../../utils/store/carousel";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
const availableSpecialRoutes = [
|
||||
BaseItemKind.Series,
|
||||
@@ -52,7 +48,7 @@ const CarouselSlide = ({ item }) => {
|
||||
const user = useQuery({
|
||||
queryKey: ["user"],
|
||||
queryFn: async () => {
|
||||
let usr = await getUserApi(api).getCurrentUser();
|
||||
const usr = await getUserApi(api).getCurrentUser();
|
||||
return usr.data;
|
||||
},
|
||||
networkMode: "always",
|
||||
@@ -68,68 +64,64 @@ const CarouselSlide = ({ item }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const [animationDirection] = useCarouselStore((state) => [
|
||||
state.direction,
|
||||
]);
|
||||
const [animationDirection] = useCarouselStore((state) => [state.direction]);
|
||||
|
||||
return (
|
||||
<ErrorBoundary fallback={<CarouselSlideError itemName={item.Name} />}>
|
||||
<Paper
|
||||
className="hero-carousel-slide"
|
||||
sx={{
|
||||
background: "transparent",
|
||||
px: 3,
|
||||
boxShadow: "none !important",
|
||||
}}
|
||||
>
|
||||
<div className="hero-carousel-background-container">
|
||||
{!!item.ImageBlurHashes.Backdrop && (
|
||||
<>
|
||||
{Object.keys(item.ImageBlurHashes.Backdrop)
|
||||
.length != 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.ImageBlurHashes.Backdrop[
|
||||
Object.keys(
|
||||
item.ImageBlurHashes
|
||||
.Backdrop,
|
||||
)[0]
|
||||
]
|
||||
}
|
||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||
width="1080"
|
||||
height="720"
|
||||
resolutionX={64}
|
||||
resolutionY={96}
|
||||
className="hero-carousel-background-blurhash"
|
||||
punch={1}
|
||||
/>
|
||||
)}
|
||||
<img
|
||||
className="hero-carousel-background-image"
|
||||
src={
|
||||
item.ParentBackdropItemId
|
||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop`
|
||||
<Paper
|
||||
className="hero-carousel-slide"
|
||||
sx={{
|
||||
background: "transparent",
|
||||
px: 3,
|
||||
}}
|
||||
elevation={10}
|
||||
>
|
||||
<div className="hero-carousel-background-container">
|
||||
{!!item.ImageBlurHashes.Backdrop && (
|
||||
<>
|
||||
{Object.keys(item.ImageBlurHashes.Backdrop).length !== 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.ImageBlurHashes.Backdrop[
|
||||
Object.keys(item.ImageBlurHashes.Backdrop)[0]
|
||||
]
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
}}
|
||||
onLoad={(e) =>
|
||||
(e.target.style.opacity = 1)
|
||||
}
|
||||
loading="eager"
|
||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||
width="256"
|
||||
height="179.2"
|
||||
resolutionX={64}
|
||||
resolutionY={45}
|
||||
className="hero-carousel-background-blurhash"
|
||||
punch={1.2}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<div className="hero-carousel-background-icon-container">
|
||||
{getTypeIcon(item.Type)}
|
||||
</div>
|
||||
)}
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-background-image"
|
||||
src={
|
||||
item.ParentBackdropItemId
|
||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
loading="eager"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<div className="hero-carousel-background-icon-container">
|
||||
{getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<motion.div
|
||||
</div>
|
||||
<div className="hero-carousel-detail">
|
||||
<Typography
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection == "right"
|
||||
animationDirection === "right"
|
||||
? "translateX(60px)"
|
||||
: "translateX(-60px)",
|
||||
opacity: 0,
|
||||
@@ -140,9 +132,59 @@ const CarouselSlide = ({ item }) => {
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection == "right"
|
||||
animationDirection === "right"
|
||||
? "translateX(-60px)"
|
||||
: "translateX(60px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
key={item.Id}
|
||||
variant="h2"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
mb: "5px",
|
||||
}}
|
||||
overflow="visible"
|
||||
>
|
||||
{!item.ImageTags.Logo ? (
|
||||
item.Name
|
||||
) : (
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-text-logo"
|
||||
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
||||
style={{
|
||||
opacity: 0,
|
||||
transition: "opacity 0.2s",
|
||||
objectFit: "contain",
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Typography>
|
||||
<Stack
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
@@ -150,65 +192,19 @@ const CarouselSlide = ({ item }) => {
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="hero-carousel-detail"
|
||||
direction="row"
|
||||
gap={2}
|
||||
className="hero-carousel-info"
|
||||
mt={1}
|
||||
justifyItems="flex-start"
|
||||
alignItems="center"
|
||||
>
|
||||
<Typography
|
||||
key={item.Id}
|
||||
variant="h2"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
mb: 2.5,
|
||||
}}
|
||||
overflow="visible"
|
||||
>
|
||||
{!item.ImageTags.Logo ? (
|
||||
item.Name
|
||||
) : (
|
||||
<img
|
||||
className="hero-carousel-text-logo"
|
||||
src={
|
||||
api.basePath +
|
||||
"/Items/" +
|
||||
item.Id +
|
||||
"/Images/Logo?quality=80&tag=" +
|
||||
item.ImageTags.Logo
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
transition: "opacity 0.2s",
|
||||
}}
|
||||
onLoad={(e) =>
|
||||
(e.target.style.opacity = 1)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{item.ProductionYear ? item.ProductionYear : "Unknown"}
|
||||
</Typography>
|
||||
<Stack
|
||||
direction="row"
|
||||
gap={1}
|
||||
divider={
|
||||
<div
|
||||
style={{
|
||||
width: "4px",
|
||||
height: "4px",
|
||||
background: "white",
|
||||
alignSelf: "center",
|
||||
aspectRatio: 1,
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
></div>
|
||||
}
|
||||
className="hero-carousel-info"
|
||||
>
|
||||
<Typography variant="subtitle1">
|
||||
{item.ProductionYear
|
||||
? item.ProductionYear
|
||||
: "Unknown"}
|
||||
</Typography>
|
||||
<Chip
|
||||
variant="filled"
|
||||
label={item.OfficialRating ?? "Not Rated"}
|
||||
/>
|
||||
<Chip variant="filled" label={item.OfficialRating ?? "Not Rated"} />
|
||||
|
||||
{item.CommunityRating && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
@@ -217,122 +213,174 @@ const CarouselSlide = ({ item }) => {
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
{item.CommunityRating ? (
|
||||
<>
|
||||
<MdiStar
|
||||
sx={{
|
||||
color: yellow[700],
|
||||
}}
|
||||
/>
|
||||
<Typography variant="subtitle1">
|
||||
{Math.round(
|
||||
item.CommunityRating *
|
||||
10,
|
||||
) / 10}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<Typography variant="subtitle1">
|
||||
No Community Rating
|
||||
</Typography>
|
||||
)}
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{Math.round(item.CommunityRating * 10) / 10}
|
||||
</Typography>
|
||||
</div>
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography variant="subtitle1">
|
||||
{getRuntime(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography variant="subtitle1">
|
||||
{endsAt(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
display: "-webkit-box",
|
||||
maxWidth: "70%",
|
||||
maxHeight: "50%",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: "4",
|
||||
WebkitBoxOrient: "vertical",
|
||||
}}
|
||||
>
|
||||
{item.Overview}
|
||||
</Typography>
|
||||
|
||||
<Stack
|
||||
mt={3}
|
||||
direction="row"
|
||||
gap={3}
|
||||
width="100%"
|
||||
className="hero-carousel-button-container"
|
||||
alignItems="center"
|
||||
>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={user.data.Id}
|
||||
itemType={item.Type}
|
||||
currentAudioTrack={0}
|
||||
currentSubTrack={0}
|
||||
currentVideoTrack={0}
|
||||
buttonProps={{
|
||||
size: "large",
|
||||
)}
|
||||
{Boolean(item.CriticRating) && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
itemUserData={item.UserData}
|
||||
audio={
|
||||
item.Type == BaseItemKind.MusicAlbum ||
|
||||
item.Type == BaseItemKind.Audio ||
|
||||
item.Type == BaseItemKind.AudioBook ||
|
||||
item.Type == BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={
|
||||
item.Type == BaseItemKind.Playlist
|
||||
}
|
||||
playlistItemId={item.Id}
|
||||
/>
|
||||
|
||||
<Button
|
||||
size="large"
|
||||
color="white"
|
||||
variant="outlined"
|
||||
endIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
chevron_right
|
||||
</div>
|
||||
}
|
||||
onClick={handleMoreInfo}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
More info
|
||||
</Button>
|
||||
<Stack direction="row" gap={1}>
|
||||
<LikeButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isFavorite={item.UserData.IsFavorite}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isPlayed={item.UserData.Played}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
</Stack>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
color: item.CriticRating > 50 ? green[400] : red[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
{item.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{item.CriticRating}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{getRuntime(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{endsAt(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
<Typography
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
display: "-webkit-box",
|
||||
maxWidth: "70%",
|
||||
maxHeight: "50%",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: "4",
|
||||
WebkitBoxOrient: "vertical",
|
||||
}}
|
||||
>
|
||||
{item.Overview}
|
||||
</Typography>
|
||||
|
||||
<Stack
|
||||
mt={3}
|
||||
direction="row"
|
||||
gap={3}
|
||||
width="100%"
|
||||
className="hero-carousel-button-container"
|
||||
alignItems="center"
|
||||
>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={user.data.Id}
|
||||
itemType={item.Type}
|
||||
currentAudioTrack={0}
|
||||
currentSubTrack={0}
|
||||
currentVideoTrack={0}
|
||||
buttonProps={{
|
||||
size: "large",
|
||||
}}
|
||||
itemUserData={item.UserData}
|
||||
audio={
|
||||
item.Type === BaseItemKind.MusicAlbum ||
|
||||
item.Type === BaseItemKind.Audio ||
|
||||
item.Type === BaseItemKind.AudioBook ||
|
||||
item.Type === BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||
playlistItemId={item.Id}
|
||||
/>
|
||||
|
||||
<Button
|
||||
size="large"
|
||||
color="white"
|
||||
variant="outlined"
|
||||
endIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
chevron_right
|
||||
</div>
|
||||
}
|
||||
onClick={handleMoreInfo}
|
||||
>
|
||||
More info
|
||||
</Button>
|
||||
<Stack direction="row" gap={1}>
|
||||
<LikeButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isFavorite={item.UserData.IsFavorite}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isPlayed={item.UserData.Played}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
</Stack>
|
||||
</motion.div>
|
||||
</Paper>
|
||||
</ErrorBoundary>
|
||||
</Stack>
|
||||
</div>
|
||||
</Paper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
class ErrorBoundary extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -17,6 +16,7 @@ class ErrorBoundary extends React.Component {
|
||||
// in ErrorBoundary (created by App)
|
||||
// in div (created by App)
|
||||
// in App
|
||||
this.setState;
|
||||
console.error(`Err in ${info} - ${error}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/** @format */
|
||||
import React from "react";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { MdiEmoticonDead } from "../icons/mdiEmoticonDead";
|
||||
|
||||
import slideBackground from "../../assets/errorbg.png";
|
||||
|
||||
const CarouselSlideError = ({ itemName }) => {
|
||||
return (
|
||||
<Paper className="hero-carousel-slide">
|
||||
<Stack
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: `url(${slideBackground})`,
|
||||
backgroundSize: "cover",
|
||||
}}
|
||||
>
|
||||
<MdiEmoticonDead
|
||||
sx={{ fontSize: "10em", opacity: "0.8" }}
|
||||
/>
|
||||
<Typography mb={2} variant="h4" sx={{ opacity: "0.5" }}>
|
||||
Error caused by
|
||||
</Typography>
|
||||
<Typography
|
||||
mt={2}
|
||||
variant="h3"
|
||||
sx={{
|
||||
background: "rgb(255 255 255 /0.1)",
|
||||
padding: 1,
|
||||
borderRadius: 3,
|
||||
}}
|
||||
>
|
||||
{itemName}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Paper>
|
||||
);
|
||||
};
|
||||
|
||||
export default CarouselSlideError;
|
||||
@@ -1,15 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import React from "react";
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
const Icon = (icon, extraProps) => {
|
||||
return (
|
||||
<SvgIcon {...extraProps}>
|
||||
<path d={icon}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
|
||||
export default Icon;
|
||||
@@ -1,15 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAccount } from "@mdi/js";
|
||||
|
||||
export const MdiAccount = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccount}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAccountMusic } from "@mdi/js";
|
||||
|
||||
export const MdiAccountMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccountMusic}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAccountTie } from "@mdi/js";
|
||||
|
||||
export const MdiAccountTie = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccountTie}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAlbum } from "@mdi/js";
|
||||
|
||||
export const MdiAlbum = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAlbum}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAlertDecagram } from "@mdi/js";
|
||||
|
||||
export const MdiAlertDecagram = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAlertDecagram}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiArrowLeft } from "@mdi/js";
|
||||
|
||||
export const MdiArrowLeft = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiArrowLeft}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBackburger } from "@mdi/js";
|
||||
|
||||
export const MdiBackburger = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBackburger}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBook } from "@mdi/js";
|
||||
|
||||
export const MdiBook = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBook}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBookMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiBookMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBookMultiple}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBookMusic } from "@mdi/js";
|
||||
|
||||
export const MdiBookMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBookMusic}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCheck } from "@mdi/js";
|
||||
|
||||
export const MdiCheck = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCheck}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronDown } from "@mdi/js";
|
||||
|
||||
export const MdiChevronDown = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronDown}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronLeft } from "@mdi/js";
|
||||
|
||||
export const MdiChevronLeft = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronLeft}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronRight } from "@mdi/js";
|
||||
|
||||
export const MdiChevronRight = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronRight}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiClockOutline } from "@mdi/js";
|
||||
|
||||
export const MdiClockOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiClockOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiClose } from "@mdi/js";
|
||||
|
||||
export const MdiClose = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiClose}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCog } from "@mdi/js";
|
||||
|
||||
export const MdiCog = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCog}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCogSync } from "@mdi/js";
|
||||
|
||||
export const MdiCogSync = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCogSync}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiDelete } from "@mdi/js";
|
||||
|
||||
export const MdiDelete = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiDelete}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiDramaMasks } from "@mdi/js";
|
||||
|
||||
export const MdiDramaMasks = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiDramaMasks}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonCry } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonCry = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonCry}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonCryOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonCryOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonCryOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonDead } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonDead = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonDead}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEyeOffOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEyeOffOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEyeOffOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEyeOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEyeOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEyeOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFastForward } from "@mdi/js";
|
||||
|
||||
export const MdiFastForward = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFastForward}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilmstrip } from "@mdi/js";
|
||||
|
||||
export const MdiFilmstrip = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilmstrip}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilmstripBoxMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiFilmstripBoxMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilmstripBoxMultiple}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilterOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFilterOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilterOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiFolderMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderMultiple}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderMusicOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFolderMusicOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderMusicOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFolderOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFullscreen } from "@mdi/js";
|
||||
|
||||
export const MdiFullscreen = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFullscreen}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFullscreenExit } from "@mdi/js";
|
||||
|
||||
export const MdiFullscreenExit = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFullscreenExit}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHdr } from "@mdi/js";
|
||||
|
||||
export const MdiHdr = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHdr}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHeart } from "@mdi/js";
|
||||
|
||||
export const MdiHeart = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHeart}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHeartOutline } from "@mdi/js";
|
||||
|
||||
export const MdiHeartOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHeartOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHomeVariant } from "@mdi/js";
|
||||
|
||||
export const MdiHomeVariant = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHomeVariant}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHomeVariantOutline } from "@mdi/js";
|
||||
|
||||
export const MdiHomeVariantOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHomeVariantOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiImage } from "@mdi/js";
|
||||
|
||||
export const MdiImage = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiImage}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiImageMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiImageMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiImageMultiple}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiInformation } from "@mdi/js";
|
||||
|
||||
export const MdiInformation = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiInformation}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiLogoutVariant } from "@mdi/js";
|
||||
|
||||
export const MdiLogoutVariant = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiLogoutVariant}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMagnify } from "@mdi/js";
|
||||
|
||||
export const MdiMagnify = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMagnify}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMenu } from "@mdi/js";
|
||||
|
||||
export const MdiMenu = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMenu}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMicrophone } from "@mdi/js";
|
||||
|
||||
export const MdiMicrophone = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMicrophone}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMovieOutline } from "@mdi/js";
|
||||
|
||||
export const MdiMovieOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMovieOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMultimedia } from "@mdi/js";
|
||||
|
||||
export const MdiMultimedia = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMultimedia}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMusic } from "@mdi/js";
|
||||
|
||||
export const MdiMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMusic}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMusicBoxMultipleOutline } from "@mdi/js";
|
||||
|
||||
export const MdiMusicBoxMultipleOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMusicBoxMultipleOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPause } from "@mdi/js";
|
||||
|
||||
export const MdiPause = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPause}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPictureInPictureBottomRight } from "@mdi/js";
|
||||
|
||||
export const MdiPictureInPictureBottomRight = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPictureInPictureBottomRight}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlay } from "@mdi/js";
|
||||
|
||||
export const MdiPlay = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlay}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlayBoxMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiPlayBoxMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlayBoxMultiple}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlayOutline } from "@mdi/js";
|
||||
|
||||
export const MdiPlayOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlayOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlaySpeed } from "@mdi/js";
|
||||
|
||||
export const MdiPlaySpeed = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlaySpeed}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/** @format */
|
||||
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlaylistMusicOutline } from "@mdi/js";
|
||||
|
||||
export const MdiPlaylistMusicOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlaylistMusicOutline}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiRewind } from "@mdi/js";
|
||||
|
||||
export const MdiRewind = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiRewind}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSkipNext } from "@mdi/js";
|
||||
|
||||
export const MdiSkipNext = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSkipNext}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSkipPrevious } from "@mdi/js";
|
||||
|
||||
export const MdiSkipPrevious = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSkipPrevious}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortAscending } from "@mdi/js";
|
||||
|
||||
export const MdiSortAscending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortAscending}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/** @format */
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortDescending } from "@mdi/js";
|
||||
|
||||
export const MdiSortDescending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortDescending}></path>
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
Loaded 100 of 197 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user