Compare commits
72
Commits
v0.0.3-dev
...
v0.0.4-dev
| 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 |
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,78 +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 }}
|
|
||||||
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@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@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
|
|
||||||
@@ -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
+25
-1
@@ -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 charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Jellyplayer</title>
|
<title>Jellyplayer</title>
|
||||||
<script src="http://localhost:8097"></script>
|
|
||||||
<style>
|
<style>
|
||||||
.app-loading {
|
.app-loading {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -19,6 +18,12 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
transition: opacity 0.25s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-loading.hidden {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-loading-logo {
|
.app-loading-logo {
|
||||||
@@ -32,13 +37,13 @@
|
|||||||
<img src="./assetsStatic/LogoBig.svg" class="app-loading-logo" />
|
<img src="./assetsStatic/LogoBig.svg" class="app-loading-logo" />
|
||||||
</div>
|
</div>
|
||||||
<div id="root"></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">
|
<linearGradient id="clr-gradient-default" x2="1" y2="1">
|
||||||
<stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
|
<stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
|
||||||
<stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
|
<stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</svg>
|
</svg>
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+10
-6
@@ -1,15 +1,19 @@
|
|||||||
{
|
{
|
||||||
"version": "0.0.3-dev",
|
"version": "0.0.3-dev",
|
||||||
"notes": "See the assets to download and install this version.",
|
"notes": "- Updated home carousel.\n- Removed sidemenu\n- Updated appBar\n- Update Notices",
|
||||||
"pub_date": "2023-12-30T13:19:40.566Z",
|
"pub_date": "2023-12-31T11:58:58.485Z",
|
||||||
"platforms": {
|
"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": {
|
"linux-x86_64": {
|
||||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVUxMlNNMXNqRUJzbTlxQTVSeldOcG1QNnROYUpVbWx1dVJabHFzUFRTVnpSdlhPMnNMWlNZaW1RTFZ1NUhhYmtsNFBVa3cwWDVqWmU0R3JFNnJjVHdNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzI3CWZpbGU6amVsbHktcGxheWVyXzAuMC4zLWRldl9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKbnpNR2VkeFB4eDZpd25JZDBDVjJFRVNFYndXM0hmeVRtZ3dJdmlRMldHRVpxeDBKL3AyTzZld21rbzYwanJwcUkzenpUQXNPSURETmdZZHBXNCtqREE9PQo=",
|
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVY2aHRVL0Y2d09SL2sxZGhsUzNxQmF1NVR1c2h2cUpJYVFrRkU2N3JqWGU3aEhBYnJuK0NpdDlpRlBadW9HT1B5MDhjMTE1TURyTnRBQ2FmVUJvd2dBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA0MDIzNjQ4CWZpbGU6amVsbHktcGxheWVyXzAuMC4zLWRldl9hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKRXd4dHhGUmd6Rm1ZeGEwcUdHd2NDNTdRS1d0ZWo0aWpwYS85SlFxa3ZyMW9VNm9McCtlRjlmN1N4dWcxck5oMWhoM0Y4L2xHZ2hQOXNockFyL3FYQUE9PQo=",
|
||||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/jelly-player_0.0.3-dev_amd64.AppImage.tar.gz"
|
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/jelly-player_0.0.3-dev_amd64.AppImage.tar.gz"
|
||||||
},
|
},
|
||||||
"darwin-x86_64": {
|
"windows-x86_64": {
|
||||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVFSd2o2eGdKZUFuQ09ucXF6amJaYU1TVXRCaDBzTVJZM0xBZDVMNkRnL0N2WDJtclpBYTYwamthTGFVWERaUXVpRzdEZ3oyT2N1azFoamJ2RENZZFFvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAzOTQyMzc0CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5negpycDN3eWRlR1IyZXo0djlmSjJMVkpHUWNRVUhqbmFsSHFnbzNQM2VGc21uOTRESjJxaUNlbEl6K2hnSU41T0lPQ292VWFjYlVRM2YyM1BNM0NWOTJEUT09Cg==",
|
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWE3TlYzV1NOK2NMK25lamlCY21RQkFMem9nK0E0bTlITWUyQm1xZzg0aEhwS0dvUURtN2pRcG1iczMwUHhIbU0vOUFaQkFSL1lHT3VLRnh5Q3VZVFFZPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA0MDIzOTMxCWZpbGU6SmVsbHlQbGF5ZXJfMC4wLjMtZGV2X3g2NC1zZXR1cC5uc2lzLnppcApLN1V6aDN4Qndtb0NaQVlGOENIQ0pyTDJRd0NianRYZGxKanR3TU9IUWxTRE5TVW9mNWVPdkdyQkxudkRJY3ZzOU4wSnlmaWVmSWJYNFBKYUdpUG1CZz09Cg==",
|
||||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_x64.app.tar.gz"
|
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.3-dev/JellyPlayer_0.0.3-dev_x64-setup.nsis.zip"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+28
-23
@@ -1,59 +1,64 @@
|
|||||||
{
|
{
|
||||||
"name": "jellyplayer",
|
"name": "jellyplayer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.3-dev",
|
"version": "0.0.4-dev",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"lint": "eslint"
|
"lint": "biome check src/**/*",
|
||||||
|
"lint:fix": "biome check --apply src/**/*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.3",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource-variable/jetbrains-mono": "^5.0.19",
|
"@fontsource-variable/jetbrains-mono": "^5.0.19",
|
||||||
"@fontsource/noto-sans": "^5.0.18",
|
"@fontsource/noto-sans": "^5.0.18",
|
||||||
"@jellyfin/sdk": "0.8.2",
|
"@jellyfin/sdk": "0.8.2",
|
||||||
"@mdi/js": "^7.3.67",
|
"@mui/lab": "5.0.0-alpha.162",
|
||||||
"@mui/lab": "5.0.0-alpha.158",
|
"@mui/material": "^5.15.6",
|
||||||
"@mui/material": "^5.14.20",
|
"@tanstack/react-query": "^5.17.19",
|
||||||
"@tanstack/react-query": "^5.13.4",
|
"@tanstack/react-query-devtools": "^5.17.21",
|
||||||
"@tanstack/react-query-devtools": "^5.13.5",
|
"@tauri-apps/api": "^1.5.3",
|
||||||
"@tauri-apps/api": "^1.5.1",
|
"@types/node": "^20.11.5",
|
||||||
"axios": "^1.6.2",
|
"@types/react": "^18.2.48",
|
||||||
"axios-tauri-api-adapter": "^0.2.0",
|
"@types/react-dom": "^18.2.18",
|
||||||
|
"axios": "^1.6.5",
|
||||||
|
"axios-tauri-api-adapter": "^0.2.1",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"framer-motion": "^10.16.16",
|
"framer-motion": "^11.0.2",
|
||||||
"material-symbols": "^0.14.2",
|
"material-symbols": "^0.14.5",
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-blurhash": "^0.3.0",
|
"react-blurhash": "^0.3.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-error-boundary": "^4.0.11",
|
"react-error-boundary": "^4.0.12",
|
||||||
"react-markdown": "^9.0.1",
|
"react-markdown": "^9.0.1",
|
||||||
"react-multi-carousel": "^2.8.4",
|
"react-multi-carousel": "^2.8.4",
|
||||||
"react-player": "^2.13.0",
|
"react-player": "^2.14.1",
|
||||||
"react-router-dom": "^6.20.1",
|
"react-router-dom": "^6.21.3",
|
||||||
"react-use-konami": "^1.1.0",
|
"react-use-konami": "^1.1.0",
|
||||||
|
"remark-gfm": "^4.0.0",
|
||||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||||
"uuid": "^9.0.1",
|
"typescript": "^5.3.3",
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"wavesurfer.js": "^7.5.1",
|
"wavesurfer.js": "^7.6.5",
|
||||||
"zustand": "^4.4.7"
|
"zustand": "^4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.5.7",
|
"@biomejs/biome": "^1.5.3",
|
||||||
|
"@tauri-apps/cli": "^1.5.9",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
"eslint": "^8.55.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"eslint-plugin-react-refresh": "^0.4.5",
|
"eslint-plugin-react-refresh": "^0.4.5",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.70.0",
|
||||||
"vite": "^5.0.7",
|
"vite": "^5.0.12",
|
||||||
"vite-plugin-compression": "^0.5.1"
|
"vite-plugin-compression": "^0.5.1"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
|
|||||||
Generated
+587
-290
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 |
+2
-5
@@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends": ["config:base", ":disableDependencyDashboard"],
|
||||||
"config:base",
|
"labels": ["dependencies"]
|
||||||
":disableDependencyDashboard"
|
|
||||||
],
|
|
||||||
"labels": ["dependencies"],
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "jellyplayer"
|
name = "jellyplayer"
|
||||||
version = "0.0.3-dev"
|
version = "0.0.4-dev"
|
||||||
description = "A Modern Jellyfin Client"
|
description = "A Modern Jellyfin Client"
|
||||||
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
|
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "JellyPlayer",
|
"productName": "JellyPlayer",
|
||||||
"version": "0.0.3-dev"
|
"version": "0.0.4-dev"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
@@ -27,12 +27,7 @@
|
|||||||
"http": {
|
"http": {
|
||||||
"all": true,
|
"all": true,
|
||||||
"request": true,
|
"request": true,
|
||||||
"scope": [
|
"scope": ["http://**", "http://*", "https://**", "https://*"]
|
||||||
"http://**",
|
|
||||||
"http://*",
|
|
||||||
"https://**",
|
|
||||||
"https://*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
|
|||||||
-630
@@ -1,630 +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 {
|
|
||||||
checkUpdate,
|
|
||||||
installUpdate,
|
|
||||||
onUpdaterEvent,
|
|
||||||
} from "@tauri-apps/api/updater";
|
|
||||||
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";
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
|
||||||
|
|
||||||
// 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 Markdown from "react-markdown";
|
|
||||||
|
|
||||||
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";
|
|
||||||
import { useSnackbar } from "notistack";
|
|
||||||
import { ErrorBoundary } from "react-error-boundary";
|
|
||||||
import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
|
|
||||||
|
|
||||||
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>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// const unlisten = await onUpdaterEvent(({ error, status }) => {
|
|
||||||
// // This will log all updater events, including status updates and errors.
|
|
||||||
// console.log("Updater event", error, status);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// // you need to call unlisten if your handler goes out of scope, for example if the component is unmounted.
|
|
||||||
// unlisten();
|
|
||||||
|
|
||||||
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 { enqueueSnackbar } = useSnackbar();
|
|
||||||
|
|
||||||
const [updateDialog, setUpdateDialog] = useState(false);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {[import("@tauri-apps/api/updater.js").UpdateManifest, React.Dispatch<import("@tauri-apps/api/updater.js").UpdateManifest>]}
|
|
||||||
*/
|
|
||||||
const [updateInfo, setUpdateInfo] = useState(null);
|
|
||||||
|
|
||||||
const [updateDialogButton, setUpdateDialogButton] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
async function checkForUpdates() {
|
|
||||||
try {
|
|
||||||
const { shouldUpdate, manifest } = await checkUpdate();
|
|
||||||
|
|
||||||
if (shouldUpdate) {
|
|
||||||
setUpdateInfo(manifest);
|
|
||||||
setUpdateDialog(true);
|
|
||||||
// You could show a dialog asking the user if they want to install the update here.
|
|
||||||
console.log(
|
|
||||||
`Update found : ${manifest?.version}, ${manifest?.date}`,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Install the update. This will also restart the app on Windows!
|
|
||||||
// await installUpdate();
|
|
||||||
|
|
||||||
// On macOS and Linux you will need to restart the app manually.
|
|
||||||
// You could use this step to display another confirmation dialog.
|
|
||||||
// await relaunch();
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
checkForUpdates();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
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={true}
|
|
||||||
open={updateDialog}
|
|
||||||
// onClose={}
|
|
||||||
// maxWidth="md"
|
|
||||||
fullWidth
|
|
||||||
>
|
|
||||||
{Boolean(updateInfo) && (
|
|
||||||
<>
|
|
||||||
<DialogTitle>
|
|
||||||
Update Available!
|
|
||||||
<Typography
|
|
||||||
style={{
|
|
||||||
opacity: "0.5",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
v{updateInfo.version}
|
|
||||||
</Typography>
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogContent dividers>
|
|
||||||
<DialogContentText>
|
|
||||||
<Markdown>
|
|
||||||
{updateInfo.body}
|
|
||||||
</Markdown>
|
|
||||||
</DialogContentText>
|
|
||||||
</DialogContent>
|
|
||||||
<DialogActions
|
|
||||||
style={{
|
|
||||||
padding: "1em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconButton
|
|
||||||
disabled={updateDialogButton}
|
|
||||||
>
|
|
||||||
<SvgIcon>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="16"
|
|
||||||
height="16"
|
|
||||||
fill="currentColor"
|
|
||||||
viewBox="0 0 16 16"
|
|
||||||
>
|
|
||||||
<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>
|
|
||||||
<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} />
|
|
||||||
<ErrorBoundary FallbackComponent={ErrorNotice}>
|
|
||||||
<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 />}
|
|
||||||
errorElement={<div>Error</div>}
|
|
||||||
/>
|
|
||||||
<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>
|
|
||||||
</ErrorBoundary>
|
|
||||||
</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;
|
||||||
+170
-125
@@ -1,47 +1,56 @@
|
|||||||
/** @format */
|
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
import { relaunch } from "@tauri-apps/api/process";
|
import { relaunch } from "@tauri-apps/api/process";
|
||||||
|
|
||||||
import MuiAppBar from "@mui/material/AppBar";
|
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 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 ListItemIcon from "@mui/material/ListItemIcon";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
import Paper from "@mui/material/Paper";
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import Popper from "@mui/material/Popper";
|
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 { red } from "@mui/material/colors";
|
||||||
|
|
||||||
import { useLocation, useNavigate, NavLink } from "react-router-dom";
|
import { NavLink, useLocation, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||||
|
|
||||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
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 { delServer } from "../../utils/storage/servers";
|
||||||
import { delUser } from "../../utils/storage/user";
|
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 { EventEmitter as event } from "../../eventEmitter";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
|
|
||||||
import logo from "../../assets/logo.svg";
|
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 = () => {
|
export const AppBar = () => {
|
||||||
const [api] = useApi((state) => [state.api]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
@@ -55,16 +64,16 @@ export const AppBar = () => {
|
|||||||
const user = useQuery({
|
const user = useQuery({
|
||||||
queryKey: ["user"],
|
queryKey: ["user"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
let usr = await getUserApi(api).getCurrentUser();
|
const usr = await getUserApi(api).getCurrentUser();
|
||||||
return usr.data;
|
return usr.data;
|
||||||
},
|
},
|
||||||
enabled: display,
|
enabled: display,
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
let libraries = useQuery({
|
const libraries = useQuery({
|
||||||
queryKey: ["libraries"],
|
queryKey: ["libraries"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
let libs = await getUserViewsApi(api).getUserViews({
|
const libs = await getUserViewsApi(api).getUserViews({
|
||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
});
|
});
|
||||||
return libs.data;
|
return libs.data;
|
||||||
@@ -110,16 +119,15 @@ export const AppBar = () => {
|
|||||||
navigate("/login/index");
|
navigate("/login/index");
|
||||||
};
|
};
|
||||||
|
|
||||||
const [librariesPopover, setLibrariesPopover] = useState(false);
|
const [librariesPopper, setLibrariesPopper] = useState(false);
|
||||||
const librariesText = useRef(null);
|
const librariesText = useRef(null);
|
||||||
const popoverEnter = (event) => {
|
|
||||||
if (anchorEl !== event.currentTarget) {
|
|
||||||
setLibrariesPopover(event.currentTarget);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const popoverLeave = () => {
|
const handlePopper = (event) => {
|
||||||
setLibrariesPopover(null);
|
if (librariesPopper) {
|
||||||
|
setLibrariesPopper(null);
|
||||||
|
} else {
|
||||||
|
setLibrariesPopper(event.currentTarget);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const [isBrowsingLibrary, setIsBrowsingLibrary] = useState(false);
|
const [isBrowsingLibrary, setIsBrowsingLibrary] = useState(false);
|
||||||
@@ -138,7 +146,7 @@ export const AppBar = () => {
|
|||||||
setDisplay(true);
|
setDisplay(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location.pathname == "/home") {
|
if (location.pathname === "/home") {
|
||||||
setBackButtonVisible(false);
|
setBackButtonVisible(false);
|
||||||
} else {
|
} else {
|
||||||
setBackButtonVisible(true);
|
setBackButtonVisible(true);
|
||||||
@@ -171,13 +179,6 @@ export const AppBar = () => {
|
|||||||
gap: "0.6em",
|
gap: "0.6em",
|
||||||
gridTemplateColumns: "30% 1fr 30%",
|
gridTemplateColumns: "30% 1fr 30%",
|
||||||
}}
|
}}
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="flex flex-row flex-center"
|
|
||||||
style={{
|
|
||||||
gap: "1.2em",
|
|
||||||
justifySelf: "start",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => navigate(-1)}
|
onClick={() => navigate(-1)}
|
||||||
@@ -186,12 +187,8 @@ export const AppBar = () => {
|
|||||||
justifySelf: "left",
|
justifySelf: "left",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">arrow_back</div>
|
||||||
arrow_back
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<img src={logo} className="appBar-logo" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="flex flex-row flex-center"
|
className="flex flex-row flex-center"
|
||||||
@@ -199,16 +196,54 @@ export const AppBar = () => {
|
|||||||
gap: "2.6em",
|
gap: "2.6em",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NavLink to="/home" className="appBar-text">
|
<NavLink to="/home">
|
||||||
<Typography
|
{({ isActive }) =>
|
||||||
variant="subtitle1"
|
isActive ? (
|
||||||
fontWeight={600}
|
<Button
|
||||||
|
style={{
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
|
size="large"
|
||||||
|
className="appBar-text active"
|
||||||
>
|
>
|
||||||
|
<Typography variant="subtitle1" fontWeight={600}>
|
||||||
Home
|
Home
|
||||||
</Typography>
|
</Typography>
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
style={{
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
|
className="appBar-text"
|
||||||
|
size="large"
|
||||||
|
color="white"
|
||||||
|
>
|
||||||
|
<Typography variant="subtitle1" fontWeight={600}>
|
||||||
|
Home
|
||||||
|
</Typography>
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<Typography
|
<Button
|
||||||
ref={librariesText}
|
variant="text"
|
||||||
|
// disableRipple
|
||||||
|
disableElevation
|
||||||
|
onClick={handlePopper}
|
||||||
|
style={{ textTransform: "none" }}
|
||||||
|
size="large"
|
||||||
|
disableFocusRipple={false}
|
||||||
|
color={isBrowsingLibrary ? "primary" : "white"}
|
||||||
|
className={
|
||||||
|
isBrowsingLibrary ? "appBar-text active" : "appBar-text"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Typography variant="subtitle1" fontWeight={600}>
|
||||||
|
Libraries
|
||||||
|
</Typography>
|
||||||
|
</Button>
|
||||||
|
{/* <Typography
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
fontWeight={600}
|
fontWeight={600}
|
||||||
onMouseEnter={popoverEnter}
|
onMouseEnter={popoverEnter}
|
||||||
@@ -220,61 +255,92 @@ export const AppBar = () => {
|
|||||||
: "appBar-text"
|
: "appBar-text"
|
||||||
}
|
}
|
||||||
// onMouseLeave={popoverLeave}
|
// onMouseLeave={popoverLeave}
|
||||||
>
|
></Typography> */}
|
||||||
Libraries
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Menu
|
<Popper
|
||||||
open={Boolean(librariesPopover)}
|
open={Boolean(librariesPopper)}
|
||||||
anchorEl={librariesPopover}
|
anchorEl={librariesPopper}
|
||||||
anchorOrigin={{
|
placement="bottom"
|
||||||
horizontal: "center",
|
disablePortal
|
||||||
vertical: "bottom",
|
modifiers={[
|
||||||
}}
|
{
|
||||||
transformOrigin={{
|
name: "flip",
|
||||||
horizontal: "center",
|
enabled: true,
|
||||||
vertical: "top",
|
options: {
|
||||||
|
altBoundary: true,
|
||||||
|
rootBoundary: "document",
|
||||||
|
padding: 8,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "preventOverflow",
|
||||||
|
enabled: true,
|
||||||
|
options: {
|
||||||
|
altAxis: true,
|
||||||
|
altBoundary: true,
|
||||||
|
tether: true,
|
||||||
|
rootBoundary: "document",
|
||||||
|
padding: 8,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
transition
|
||||||
|
>
|
||||||
|
{({ TransitionProps }) => (
|
||||||
|
<Grow
|
||||||
|
{...TransitionProps}
|
||||||
|
style={{
|
||||||
|
transformOrigin: "50% 0 0",
|
||||||
}}
|
}}
|
||||||
|
timeout={250}
|
||||||
|
>
|
||||||
|
<Paper
|
||||||
sx={{
|
sx={{
|
||||||
mt: 3,
|
mt: "1.1em",
|
||||||
maxHeight: "72em",
|
maxHeight: "72em",
|
||||||
}}
|
}}
|
||||||
onClose={popoverLeave}
|
style={{
|
||||||
MenuListProps={{
|
boxShadow:
|
||||||
onMouseLeave: popoverLeave,
|
"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",
|
||||||
}}
|
}}
|
||||||
disableScrollLock
|
|
||||||
hideBackdrop
|
|
||||||
>
|
>
|
||||||
|
<div className="appBar-library-scrollContainer">
|
||||||
{libraries.isPending
|
{libraries.isPending
|
||||||
? "loading..."
|
? "loading..."
|
||||||
: libraries.data.Items.map(
|
: libraries.data.Items.map((library) => (
|
||||||
(library) => (
|
<NavLink
|
||||||
<MenuItem
|
|
||||||
component={NavLink}
|
|
||||||
to={
|
|
||||||
"/library/" +
|
|
||||||
library.Id
|
|
||||||
}
|
|
||||||
key={library.Id}
|
key={library.Id}
|
||||||
// onClick={() =>
|
|
||||||
// navigate(
|
|
||||||
// `/library/${library.Id}`,
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
tabIndex={0}
|
|
||||||
className="appBar-library"
|
className="appBar-library"
|
||||||
|
to={`library/${library.Id}`}
|
||||||
|
style={{
|
||||||
|
borderRadius: "10px",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ListItemIcon>
|
{Object.keys(library.ImageTags).includes(
|
||||||
{getTypeIcon(
|
"Primary",
|
||||||
library.CollectionType,
|
) ? (
|
||||||
)}
|
<img
|
||||||
</ListItemIcon>
|
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}
|
{library.Name}
|
||||||
</MenuItem>
|
</Typography>
|
||||||
),
|
</div>
|
||||||
)}
|
)}
|
||||||
</Menu>
|
</NavLink>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</Paper>
|
||||||
|
</Grow>
|
||||||
|
)}
|
||||||
|
</Popper>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -282,40 +348,28 @@ export const AppBar = () => {
|
|||||||
style={{ justifySelf: "right", gap: "0.6em" }}
|
style={{ justifySelf: "right", gap: "0.6em" }}
|
||||||
>
|
>
|
||||||
<IconButton onClick={() => navigate("/search")}>
|
<IconButton onClick={() => navigate("/search")}>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">search</div>
|
||||||
search
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton onClick={() => navigate("/favorite")}>
|
<IconButton onClick={() => navigate("/favorite")}>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">favorite</div>
|
||||||
favorite
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton
|
<IconButton sx={{ p: 0 }} onClick={handleMenuOpen}>
|
||||||
sx={{ p: 0 }}
|
|
||||||
onClick={handleMenuOpen}
|
|
||||||
>
|
|
||||||
{user.isSuccess &&
|
{user.isSuccess &&
|
||||||
(user.data.PrimaryImageTag ==
|
(user.data.PrimaryImageTag === undefined ? (
|
||||||
undefined ? (
|
<Avatar className="appBar-avatar" alt={user.data.Name}>
|
||||||
<Avatar
|
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||||
className="appBar-avatar"
|
account_circle
|
||||||
alt={user.data.Name}
|
</span>
|
||||||
>
|
|
||||||
<MdiAccount className="appBar-avatar-icon" />
|
|
||||||
</Avatar>
|
</Avatar>
|
||||||
) : (
|
) : (
|
||||||
<Avatar
|
<Avatar
|
||||||
className="appBar-avatar"
|
className="appBar-avatar"
|
||||||
src={
|
src={`${api.basePath}/Users/${user.data.Id}/Images/Primary`}
|
||||||
api.basePath +
|
|
||||||
"/Users/" +
|
|
||||||
user.data.Id +
|
|
||||||
"/Images/Primary"
|
|
||||||
}
|
|
||||||
alt={user.data.Name}
|
alt={user.data.Name}
|
||||||
>
|
>
|
||||||
<MdiAccount className="appBar-avatar-icon" />
|
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||||
|
account_circle
|
||||||
|
</span>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
))}
|
))}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -326,30 +380,21 @@ export const AppBar = () => {
|
|||||||
sx={{ mt: 2 }}
|
sx={{ mt: 2 }}
|
||||||
disableScrollLock
|
disableScrollLock
|
||||||
>
|
>
|
||||||
<MenuItem
|
<MenuItem onClick={() => navigate("/settings")} disabled>
|
||||||
onClick={() => navigate("/settings")}
|
|
||||||
disabled
|
|
||||||
>
|
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">settings</div>
|
||||||
settings
|
|
||||||
</div>
|
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
Settings
|
Settings
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem onClick={() => navigate("/about")}>
|
<MenuItem onClick={() => navigate("/about")}>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">info</div>
|
||||||
info
|
|
||||||
</div>
|
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
About
|
About
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem onClick={handleLogout}>
|
<MenuItem onClick={handleLogout}>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">logout</div>
|
||||||
logout
|
|
||||||
</div>
|
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
Logout
|
Logout
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
|
|
||||||
.appBar {
|
.appBar {
|
||||||
transition: background-color $transition-time-fast,
|
transition: background-color $transition-time-fast,
|
||||||
@@ -14,11 +13,7 @@
|
|||||||
fill: url(#clr-gradient-default) !important;
|
fill: url(#clr-gradient-default) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-logo {
|
|
||||||
height: 1.8em !important;
|
|
||||||
}
|
|
||||||
&-text {
|
&-text {
|
||||||
cursor: default;
|
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
transition: opacity $transition-time-fast;
|
transition: opacity $transition-time-fast;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -31,7 +26,7 @@
|
|||||||
background: white;
|
background: white;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -2.6px;
|
bottom: 4.6px;
|
||||||
left: 0;
|
left: 0;
|
||||||
transform: scaleX(0);
|
transform: scaleX(0);
|
||||||
transition: transform $transition-time-fast,
|
transition: transform $transition-time-fast,
|
||||||
@@ -41,7 +36,7 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
&::after {
|
&::after {
|
||||||
transform: scaleX(0.5);
|
transform: scaleX(0.25);
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,21 +44,84 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
color: $clr-accent-default;
|
color: $clr-accent-default;
|
||||||
&::after {
|
&::after {
|
||||||
transform: scaleX(0.75);
|
transform: scaleX(0.5);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
background: $clr-accent-default;
|
background: $clr-accent-default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-logo {
|
|
||||||
width: 20em;
|
|
||||||
object-fit: contain;
|
|
||||||
object-position: center;
|
|
||||||
}
|
|
||||||
&-library {
|
&-library {
|
||||||
transition: all 0.2s;
|
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 {
|
&.active {
|
||||||
background: $clr-gradient-default;
|
&::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 AppBar from "@mui/material/AppBar";
|
||||||
import Toolbar from "@mui/material/Toolbar";
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
import Toolbar from "@mui/material/Toolbar";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
export const AppBarBackOnly = () => {
|
export const AppBarBackOnly = () => {
|
||||||
@@ -24,7 +21,7 @@ export const AppBarBackOnly = () => {
|
|||||||
onClick={handleBack}
|
onClick={handleBack}
|
||||||
sx={{ mr: 2 }}
|
sx={{ mr: 2 }}
|
||||||
>
|
>
|
||||||
<MdiArrowLeft />
|
<span className="material-symbols-rounded">arrow_back</span>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
|
|
||||||
import { MdiAccount } from "../icons/mdiAccount";
|
|
||||||
|
|
||||||
import "./avatar.module.scss";
|
import "./avatar.module.scss";
|
||||||
|
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
@@ -17,26 +14,19 @@ export const AvatarImage = ({ userId }) => {
|
|||||||
<div
|
<div
|
||||||
className="avatar-image"
|
className="avatar-image"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage:
|
backgroundImage: `url('${api.basePath}/Users/${userId}/Images/Primary')`,
|
||||||
"url('" +
|
|
||||||
api.basePath +
|
|
||||||
"/Users/" +
|
|
||||||
userId +
|
|
||||||
"/Images/Primary')",
|
|
||||||
}}
|
}}
|
||||||
></div>
|
/>
|
||||||
|
|
||||||
<div className="avatar-image-icon-container">
|
<div className="avatar-image-icon-container">
|
||||||
<MdiAccount className="avatar-image-icon" />
|
<span className="material-symbols-rounded avatar-image-icon">
|
||||||
|
account_circle
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AvatarSideMenu = ({ userName }) => {
|
|
||||||
return <div></div>;
|
|
||||||
};
|
|
||||||
|
|
||||||
AvatarImage.propType = {
|
AvatarImage.propType = {
|
||||||
userId: PropTypes.string.isRequired,
|
userId: PropTypes.string.isRequired,
|
||||||
userImageTags: PropTypes.any,
|
userImageTags: PropTypes.any,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
|
|
||||||
.avatar-image {
|
.avatar-image {
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -6,23 +5,14 @@ import React from "react";
|
|||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
|
||||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
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 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";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
|
||||||
const LikeButton = ({
|
const LikeButton = ({ itemId, isFavorite, queryKey, userId, itemName }) => {
|
||||||
itemId,
|
|
||||||
isFavorite,
|
|
||||||
queryKey,
|
|
||||||
userId,
|
|
||||||
itemName,
|
|
||||||
color = "white",
|
|
||||||
}) => {
|
|
||||||
const [api] = useApi((state) => [state.api]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
@@ -46,12 +36,9 @@ const LikeButton = ({
|
|||||||
enqueueSnackbar(`${error}`, {
|
enqueueSnackbar(`${error}`, {
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
enqueueSnackbar(
|
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||||
`An error occured while updating "${itemName}"`,
|
|
||||||
{
|
|
||||||
variant: "error",
|
variant: "error",
|
||||||
},
|
});
|
||||||
);
|
|
||||||
console.error(error);
|
console.error(error);
|
||||||
},
|
},
|
||||||
onSettled: async () => {
|
onSettled: async () => {
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
/** @format */
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
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 { green } from "@mui/material/colors";
|
||||||
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
import { MdiCheck } from "../icons/mdiCheck";
|
|
||||||
import { useSnackbar } from "notistack";
|
import { useSnackbar } from "notistack";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
|
||||||
@@ -39,12 +37,9 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
|||||||
enqueueSnackbar(`${error}`, {
|
enqueueSnackbar(`${error}`, {
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
enqueueSnackbar(
|
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||||
`An error occured while updating "${itemName}"`,
|
|
||||||
{
|
|
||||||
variant: "error",
|
variant: "error",
|
||||||
},
|
});
|
||||||
);
|
|
||||||
console.error(error);
|
console.error(error);
|
||||||
},
|
},
|
||||||
onSettled: async () => {
|
onSettled: async () => {
|
||||||
|
|||||||
@@ -1,32 +1,39 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
|
||||||
import PropTypes from "prop-types";
|
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 Fab from "@mui/material/Fab";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemDto,
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
SortOrder,
|
||||||
|
UserItemDataDto,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
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 {
|
import {
|
||||||
setItem,
|
setItem,
|
||||||
usePlaybackDataLoadStore,
|
usePlaybackDataLoadStore,
|
||||||
usePlaybackStore,
|
usePlaybackStore,
|
||||||
} from "../../utils/store/playback";
|
} from "../../utils/store/playback";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import { useMutation } from "@tanstack/react-query";
|
import { SxProps } from "@mui/material";
|
||||||
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
|
||||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
|
||||||
import {
|
|
||||||
BaseItemKind,
|
|
||||||
ItemFields,
|
|
||||||
SortOrder,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useSnackbar } from "notistack";
|
|
||||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
|
||||||
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
|
||||||
|
|
||||||
const PlayButton = ({
|
const PlayButton = ({
|
||||||
|
item,
|
||||||
itemId,
|
itemId,
|
||||||
itemUserData,
|
itemUserData,
|
||||||
userId,
|
userId,
|
||||||
@@ -36,7 +43,6 @@ const PlayButton = ({
|
|||||||
currentVideoTrack,
|
currentVideoTrack,
|
||||||
className,
|
className,
|
||||||
sx,
|
sx,
|
||||||
iconProps,
|
|
||||||
buttonProps,
|
buttonProps,
|
||||||
iconOnly,
|
iconOnly,
|
||||||
audio = false,
|
audio = false,
|
||||||
@@ -44,6 +50,24 @@ const PlayButton = ({
|
|||||||
playlistItem,
|
playlistItem,
|
||||||
playlistItemId = "",
|
playlistItemId = "",
|
||||||
trackIndex,
|
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]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
|
|
||||||
@@ -98,11 +122,11 @@ const PlayButton = ({
|
|||||||
|
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
const item = useMutation({
|
const itemQuery = useMutation({
|
||||||
mutationKey: ["playButton", itemId, userId],
|
mutationKey: ["playButton", itemId, userId],
|
||||||
mutationFn: async () => {
|
mutationFn: async () => {
|
||||||
setPlaybackDataLoading(true);
|
setPlaybackDataLoading(true);
|
||||||
let result;
|
let result: any;
|
||||||
if (playlistItem) {
|
if (playlistItem) {
|
||||||
result = await getPlaylistsApi(api).getPlaylistItems({
|
result = await getPlaylistsApi(api).getPlaylistItems({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
@@ -114,18 +138,13 @@ const PlayButton = ({
|
|||||||
result = await getTvShowsApi(api).getEpisodes({
|
result = await getTvShowsApi(api).getEpisodes({
|
||||||
seriesId: itemId,
|
seriesId: itemId,
|
||||||
limit: 1,
|
limit: 1,
|
||||||
startIndex: 0,
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
fields: [
|
|
||||||
ItemFields.MediaSources,
|
|
||||||
ItemFields.MediaStreams,
|
|
||||||
],
|
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
|
userId: userId,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.Playlist:
|
case BaseItemKind.Playlist:
|
||||||
result = await getPlaylistsApi(
|
result = await getPlaylistsApi(api).getPlaylistItems({
|
||||||
api,
|
|
||||||
).getPlaylistItems({
|
|
||||||
userId: userId,
|
userId: userId,
|
||||||
playlistId: playlistItemId,
|
playlistId: playlistItemId,
|
||||||
});
|
});
|
||||||
@@ -134,12 +153,9 @@ const PlayButton = ({
|
|||||||
result = await getItemsApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
parentId: itemId,
|
parentId: itemId,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
ItemFields.MediaSources,
|
|
||||||
ItemFields.MediaStreams,
|
|
||||||
],
|
|
||||||
sortOrder: SortOrder.Ascending,
|
sortOrder: SortOrder.Ascending,
|
||||||
sortBy: "IndexNumber",
|
sortBy: ["IndexNumber"],
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.MusicArtist:
|
case BaseItemKind.MusicArtist:
|
||||||
@@ -148,26 +164,25 @@ const PlayButton = ({
|
|||||||
recursive: true,
|
recursive: true,
|
||||||
includeItemTypes: [BaseItemKind.Audio],
|
includeItemTypes: [BaseItemKind.Audio],
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
ItemFields.MediaSources,
|
|
||||||
ItemFields.MediaStreams,
|
|
||||||
],
|
|
||||||
sortOrder: SortOrder.Ascending,
|
sortOrder: SortOrder.Ascending,
|
||||||
sortBy: [
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
"PremiereDate",
|
});
|
||||||
"ProductionYear",
|
break;
|
||||||
"SortName",
|
case BaseItemKind.BoxSet:
|
||||||
],
|
result = await getItemsApi(api).getItems({
|
||||||
|
parentId: itemId,
|
||||||
|
userId,
|
||||||
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: "IndexNumber",
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = await getItemsApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
ids: [itemId],
|
ids: [itemId],
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
ItemFields.MediaSources,
|
|
||||||
ItemFields.MediaStreams,
|
|
||||||
],
|
|
||||||
sortOrder: SortOrder.Ascending,
|
sortOrder: SortOrder.Ascending,
|
||||||
sortBy: "IndexNumber",
|
sortBy: "IndexNumber",
|
||||||
});
|
});
|
||||||
@@ -176,50 +191,51 @@ const PlayButton = ({
|
|||||||
}
|
}
|
||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
onSuccess: (item) => {
|
onSuccess: (result) => {
|
||||||
console.log(item.Items[0].MediaSources);
|
console.log(result.Items[0].MediaSources);
|
||||||
if (trackIndex) {
|
if (trackIndex) {
|
||||||
setPlaylistItemId(playlistItemId);
|
setPlaylistItemId(playlistItemId);
|
||||||
setCurrentTrack(trackIndex);
|
setCurrentTrack(trackIndex);
|
||||||
setAudioTracks(item.Items);
|
setAudioTracks(result.Items);
|
||||||
setAudioUrl(
|
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);
|
setAudioDisplay(true);
|
||||||
} else if (audio) {
|
} else if (audio) {
|
||||||
setAudioItem(item.Items[0]);
|
setAudioItem(result.Items[0]);
|
||||||
setAudioTracks(item.Items);
|
setAudioTracks(result.Items);
|
||||||
setAudioUrl(
|
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);
|
setAudioDisplay(true);
|
||||||
} else {
|
} else {
|
||||||
setUserId(userId);
|
setUserId(userId);
|
||||||
setItemId(item.Items[0].Id);
|
setItemId(result.Items[0].Id);
|
||||||
setDuration(item.Items[0].RunTimeTicks);
|
setDuration(result.Items[0].RunTimeTicks);
|
||||||
|
|
||||||
if (item.Items[0].Type == BaseItemKind.Episode) {
|
if (result.Items[0].Type === BaseItemKind.Episode) {
|
||||||
setSeriesId(item.Items[0].SeriesId);
|
setSeriesId(result.Items[0].SeriesId);
|
||||||
// setEpisodeIndex(item.Ite)
|
// setEpisodeIndex(result.Ite)
|
||||||
}
|
}
|
||||||
|
|
||||||
setMediaContainer(item.Items[0].MediaSources[0].Container);
|
setMediaContainer(result.Items[0].MediaSources[0].Container);
|
||||||
// Set all required stream index
|
// Set all required stream index
|
||||||
setAudioStreamIndex(currentAudioTrack);
|
setAudioStreamIndex(currentAudioTrack);
|
||||||
setVideoStreamIndex(currentVideoTrack);
|
setVideoStreamIndex(currentVideoTrack);
|
||||||
setSubtitleStreamIndex(currentSubTrack);
|
setSubtitleStreamIndex(currentSubTrack);
|
||||||
|
|
||||||
setMediaSourceId(item.Items[0].Id);
|
setMediaSourceId(result.Items[0].Id);
|
||||||
setItem(item.Items[0]);
|
setItem(result.Items[0]);
|
||||||
|
|
||||||
switch (item.Items[0].Type) {
|
switch (result.Items[0].Type) {
|
||||||
case BaseItemKind.Movie:
|
case BaseItemKind.Movie:
|
||||||
if (item.Items[0].ImageBlurHashes.Logo) {
|
if (result.Items[0].ImageBlurHashes.Logo) {
|
||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<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"
|
className="video-osd-name-logo"
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
e.target.style.opacity = 1;
|
e.target.style.opacity = 1;
|
||||||
@@ -230,35 +246,27 @@ const PlayButton = ({
|
|||||||
} else {
|
} else {
|
||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">{result.Items[0].Name}</Typography>
|
||||||
{item.Items[0].Name}
|
|
||||||
</Typography>
|
|
||||||
</div>,
|
</div>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.Episode:
|
case BaseItemKind.Episode:
|
||||||
if (item.Items[0].ImageBlurHashes.Logo) {
|
if (result.Items[0].ImageBlurHashes.Logo) {
|
||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<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"
|
className="video-osd-name-logo"
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
e.target.style.opacity = 1;
|
e.target.style.opacity = 1;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
S
|
S{result.Items[0].ParentIndexNumber}
|
||||||
{
|
|
||||||
item.Items[0]
|
|
||||||
.ParentIndexNumber
|
|
||||||
}
|
|
||||||
:E
|
:E
|
||||||
{
|
{result.Items[0].IndexNumber} {result.Items[0].Name}
|
||||||
item.Items[0].IndexNumber
|
|
||||||
}{" "}
|
|
||||||
{item.Items[0].Name}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>,
|
</div>,
|
||||||
);
|
);
|
||||||
@@ -266,19 +274,12 @@ const PlayButton = ({
|
|||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">
|
||||||
{item.Items[0].SeriesName}
|
{result.Items[0].SeriesName}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
S
|
S{result.Items[0].ParentIndexNumber}
|
||||||
{
|
|
||||||
item.Items[0]
|
|
||||||
.ParentIndexNumber
|
|
||||||
}
|
|
||||||
:E
|
:E
|
||||||
{
|
{result.Items[0].IndexNumber} {result.Items[0].Name}
|
||||||
item.Items[0].IndexNumber
|
|
||||||
}{" "}
|
|
||||||
{item.Items[0].Name}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>,
|
</div>,
|
||||||
);
|
);
|
||||||
@@ -288,22 +289,20 @@ const PlayButton = ({
|
|||||||
default:
|
default:
|
||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">{result.Items[0].Name}</Typography>
|
||||||
{item.Items[0].Name}
|
|
||||||
</Typography>
|
|
||||||
</div>,
|
</div>,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
setPosition(item.Items[0].UserData?.PlaybackPositionTicks);
|
setPosition(result.Items[0].UserData?.PlaybackPositionTicks);
|
||||||
|
|
||||||
setUrl(
|
setUrl(
|
||||||
`${api.basePath}/Videos/${item.Items[0].Id}/stream.
|
`${api.basePath}/Videos/${result.Items[0].Id}/stream.
|
||||||
${item.Items[0].MediaSources[0].Container}
|
${result.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}`,
|
?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: () => {
|
onSettled: () => {
|
||||||
@@ -317,7 +316,7 @@ const PlayButton = ({
|
|||||||
});
|
});
|
||||||
const handleClick = (e) => {
|
const handleClick = (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
item.mutate();
|
itemQuery.mutate();
|
||||||
};
|
};
|
||||||
if (iconOnly) {
|
if (iconOnly) {
|
||||||
return (
|
return (
|
||||||
@@ -340,7 +339,7 @@ const PlayButton = ({
|
|||||||
</div>
|
</div>
|
||||||
</Fab>
|
</Fab>
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className={className}
|
className={className}
|
||||||
@@ -386,7 +385,6 @@ const PlayButton = ({
|
|||||||
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PlayButton;
|
export default PlayButton;
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
@@ -7,11 +6,8 @@ import CardActionArea from "@mui/material/CardActionArea";
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
|
||||||
|
|
||||||
import "./card.module.scss";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
import "./card.module.scss";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Props
|
* @typedef {Object} Props
|
||||||
@@ -70,11 +66,10 @@ export const ActorCard = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">person</div>
|
||||||
person
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
seriesId ? item.SeriesId : item.Id,
|
seriesId ? item.SeriesId : item.Id,
|
||||||
"Primary",
|
"Primary",
|
||||||
@@ -90,7 +85,9 @@ export const ActorCard = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
import "./card.module.scss";
|
import "./card.module.scss";
|
||||||
|
|
||||||
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { useApi } from "../../utils/store/api";
|
||||||
import LikeButton from "../buttons/likeButton";
|
import LikeButton from "../buttons/likeButton";
|
||||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import PlayButton from "../buttons/playButton";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
|
||||||
import ErrorBoundary from "../errorBoundary";
|
import ErrorBoundary from "../errorBoundary";
|
||||||
|
|
||||||
const cardImageAspectRatios = {
|
const cardImageAspectRatios = {
|
||||||
@@ -73,9 +72,9 @@ export const Card = ({
|
|||||||
const defaultOnClick = () => {
|
const defaultOnClick = () => {
|
||||||
if (availableSpecialRoutes.includes(item.Type)) {
|
if (availableSpecialRoutes.includes(item.Type)) {
|
||||||
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
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}`);
|
navigate(`/person/${item.Id}`);
|
||||||
} else if (item.Type == BaseItemKind.MusicArtist) {
|
} else if (item.Type === BaseItemKind.MusicArtist) {
|
||||||
navigate(`/artist/${item.Id}`);
|
navigate(`/artist/${item.Id}`);
|
||||||
} else {
|
} else {
|
||||||
navigate(`/item/${item.Id}`);
|
navigate(`/item/${item.Id}`);
|
||||||
@@ -85,7 +84,6 @@ export const Card = ({
|
|||||||
<div
|
<div
|
||||||
className="card"
|
className="card"
|
||||||
elevation={0}
|
elevation={0}
|
||||||
tabIndex={0}
|
|
||||||
onClick={onClick ? onClick : defaultOnClick}
|
onClick={onClick ? onClick : defaultOnClick}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -94,23 +92,19 @@ export const Card = ({
|
|||||||
aspectRatio: cardImageAspectRatios[cardType],
|
aspectRatio: cardImageAspectRatios[cardType],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ErrorBoundary fallback={<></>}>
|
<ErrorBoundary fallback>
|
||||||
<div
|
<div
|
||||||
className="card-indicator check"
|
className="card-indicator check"
|
||||||
style={{
|
style={{
|
||||||
opacity: item.UserData?.Played ? 1 : 0,
|
opacity: item.UserData?.Played ? 1 : 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">done</div>
|
||||||
done
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`card-indicator text`}
|
className={"card-indicator text"}
|
||||||
style={{
|
style={{
|
||||||
opacity: item.UserData?.UnplayedItemCount
|
opacity: item.UserData?.UnplayedItemCount ? 1 : 0,
|
||||||
? 1
|
|
||||||
: 0,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -133,13 +127,12 @@ export const Card = ({
|
|||||||
/>
|
/>
|
||||||
)} */}
|
)} */}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
{overrideIcon
|
{overrideIcon ? getTypeIcon(overrideIcon) : getTypeIcon(item.Type)}
|
||||||
? getTypeIcon(overrideIcon)
|
|
||||||
: getTypeIcon(item.Type)}
|
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={
|
src={
|
||||||
overrideIcon == "User"
|
overrideIcon === "User"
|
||||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||||
: api.getItemImageUrl(
|
: api.getItemImageUrl(
|
||||||
seriesId
|
seriesId
|
||||||
@@ -152,10 +145,7 @@ export const Card = ({
|
|||||||
quality: 90,
|
quality: 90,
|
||||||
fillHeight: 226,
|
fillHeight: 226,
|
||||||
fillWidth: Math.floor(
|
fillWidth: Math.floor(
|
||||||
226 /
|
226 / cardImageAspectRatios[cardType],
|
||||||
cardImageAspectRatios[
|
|
||||||
cardType
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -166,7 +156,9 @@ export const Card = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
<div className="card-overlay">
|
<div className="card-overlay">
|
||||||
@@ -185,16 +177,12 @@ export const Card = ({
|
|||||||
}}
|
}}
|
||||||
iconOnly
|
iconOnly
|
||||||
audio={
|
audio={
|
||||||
item.Type ==
|
item.Type === BaseItemKind.MusicAlbum ||
|
||||||
BaseItemKind.MusicAlbum ||
|
item.Type === BaseItemKind.Audio ||
|
||||||
item.Type == BaseItemKind.Audio ||
|
item.Type === BaseItemKind.AudioBook ||
|
||||||
item.Type ==
|
item.Type === BaseItemKind.Playlist
|
||||||
BaseItemKind.AudioBook ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
}
|
|
||||||
playlistItem={
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
}
|
}
|
||||||
|
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||||
playlistItemId={item.Id}
|
playlistItemId={item.Id}
|
||||||
/>
|
/>
|
||||||
<LikeButton
|
<LikeButton
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
.card {
|
.card {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
|
|||||||
@@ -1,23 +1,20 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import MuiCard from "@mui/material/Card";
|
import MuiCard from "@mui/material/Card";
|
||||||
import CardActionArea from "@mui/material/CardActionArea";
|
import CardActionArea from "@mui/material/CardActionArea";
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import "./card.module.scss";
|
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 LikeButton from "../buttons/likeButton";
|
||||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import PlayButton from "../buttons/playButton";
|
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
|
* @typedef {Object} Props
|
||||||
@@ -70,9 +67,7 @@ export const EpisodeCard = ({
|
|||||||
opacity: item.UserData?.Played ? 1 : 0,
|
opacity: item.UserData?.Played ? 1 : 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">done</div>
|
||||||
done
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!!imageBlurhash && (
|
{!!imageBlurhash && (
|
||||||
@@ -86,11 +81,10 @@ export const EpisodeCard = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">tv_gen</div>
|
||||||
tv_gen
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={api.getItemImageUrl(item.Id, "Primary", {
|
src={api.getItemImageUrl(item.Id, "Primary", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
fillHeight: 512,
|
fillHeight: 512,
|
||||||
@@ -102,7 +96,9 @@ export const EpisodeCard = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -146,8 +142,7 @@ export const EpisodeCard = ({
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
height: "6px",
|
height: "6px",
|
||||||
background:
|
background: "rgb(5 5 5 / 0.5) !important",
|
||||||
"rgb(5 5 5 / 0.5) !important",
|
|
||||||
backdropFilter: "blur(5px)",
|
backdropFilter: "blur(5px)",
|
||||||
}}
|
}}
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
/** @format */
|
|
||||||
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
|
||||||
import Carousel from "react-multi-carousel";
|
import Carousel from "react-multi-carousel";
|
||||||
import "react-multi-carousel/lib/styles.css";
|
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 Box from "@mui/material/Box";
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import "./cardScroller.module.scss";
|
import "./cardScroller.module.scss";
|
||||||
export const CardScroller = ({
|
export const CardScroller = ({
|
||||||
@@ -65,8 +60,8 @@ export const CardScroller = ({
|
|||||||
sx={{ mb: 1 }}
|
sx={{ mb: 1 }}
|
||||||
className={
|
className={
|
||||||
disableDecoration
|
disableDecoration
|
||||||
? `card-scroller-header-container hidden-decoration`
|
? "card-scroller-header-container hidden-decoration"
|
||||||
: `card-scroller-header-container`
|
: "card-scroller-header-container"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -75,25 +70,20 @@ export const CardScroller = ({
|
|||||||
className="card-scroller-heading"
|
className="card-scroller-heading"
|
||||||
{...headingProps}
|
{...headingProps}
|
||||||
>
|
>
|
||||||
<div className="card-scroller-heading-decoration"></div>{" "}
|
<div className="card-scroller-heading-decoration" /> {title}
|
||||||
{title}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<ButtonGroup className="card-scroller-button-group">
|
<ButtonGroup className="card-scroller-button-group">
|
||||||
<IconButton
|
<IconButton
|
||||||
className="card-scroller-button"
|
className="card-scroller-button"
|
||||||
onClick={() => carouselRef.previous()}
|
onClick={() => carouselRef.previous()}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">chevron_left</div>
|
||||||
chevron_left
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton
|
<IconButton
|
||||||
className="card-scroller-button"
|
className="card-scroller-button"
|
||||||
onClick={() => carouselRef.next()}
|
onClick={() => carouselRef.next()}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">chevron_right</div>
|
||||||
chevron_right
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
|
|
||||||
.card-scroller {
|
.card-scroller {
|
||||||
// height: 20em;
|
// height: 20em;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
/** @format */
|
|
||||||
|
|
||||||
.carousel {
|
.carousel {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 70vh;
|
height: 70vh;
|
||||||
margin: 4.4em 1.6em 1.6em 1.6em;
|
margin: 0.6em 1.6em 1.6em 1.6em;
|
||||||
&-button {
|
&-button {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
@@ -31,9 +30,9 @@
|
|||||||
&-container {
|
&-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -1em;
|
bottom: -1.5em;
|
||||||
left: 1em;
|
left: 10px;
|
||||||
right: 1em;
|
right: 10px;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/** @format */
|
|
||||||
import React, { useEffect, useState } from "react";
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
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 { useCarouselStore } from "../../utils/store/carousel";
|
||||||
|
import "./carousel.scss";
|
||||||
|
|
||||||
const swipeConfidenceThreshold = 8000;
|
const swipeConfidenceThreshold = 8000;
|
||||||
const swipePower = (offset, velocity) => {
|
const swipePower = (offset, velocity) => {
|
||||||
@@ -21,16 +18,18 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
state.setDirection,
|
state.setDirection,
|
||||||
state.direction,
|
state.direction,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onChange(currentSlide);
|
onChange(currentSlide);
|
||||||
}, [content[currentSlide].key]);
|
}, [content[currentSlide]?.key]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="carousel">
|
<div className="carousel">
|
||||||
<IconButton
|
<IconButton
|
||||||
className="carousel-button left"
|
className="carousel-button left"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (currentSlide == 0) {
|
if (currentSlide === 0) {
|
||||||
setDirection("left");
|
setDirection("left");
|
||||||
setCurrentSlide(content.length - 1);
|
setCurrentSlide(content.length - 1);
|
||||||
}
|
}
|
||||||
@@ -46,7 +45,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">arrow_left</div>
|
<div className="material-symbols-rounded">arrow_left</div>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<AnimatePresence>
|
<AnimatePresence mode="sync">
|
||||||
<motion.div
|
<motion.div
|
||||||
key={currentSlide}
|
key={currentSlide}
|
||||||
initial={{ opacity: 0 }}
|
initial={{ opacity: 0 }}
|
||||||
@@ -54,6 +53,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
exit={{ opacity: 0 }}
|
exit={{ opacity: 0 }}
|
||||||
transition={{
|
transition={{
|
||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
|
ease: "linear",
|
||||||
}}
|
}}
|
||||||
drag={"x"}
|
drag={"x"}
|
||||||
dragConstraints={{ left: 0, right: 0 }}
|
dragConstraints={{ left: 0, right: 0 }}
|
||||||
@@ -61,15 +61,12 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
onDragEnd={(e, { offset, velocity }) => {
|
onDragEnd={(e, { offset, velocity }) => {
|
||||||
const swipe = swipePower(offset.x, velocity.x);
|
const swipe = swipePower(offset.x, velocity.x);
|
||||||
if (
|
if (
|
||||||
currentSlide != content.length - 1 &&
|
currentSlide !== content.length - 1 &&
|
||||||
swipe < -swipeConfidenceThreshold
|
swipe < -swipeConfidenceThreshold
|
||||||
) {
|
) {
|
||||||
setDirection("right");
|
setDirection("right");
|
||||||
setCurrentSlide((init) => init + 1);
|
setCurrentSlide((init) => init + 1);
|
||||||
} else if (
|
} else if (currentSlide !== 0 && swipe > swipeConfidenceThreshold) {
|
||||||
currentSlide != 0 &&
|
|
||||||
swipe > swipeConfidenceThreshold
|
|
||||||
) {
|
|
||||||
setDirection("left");
|
setDirection("left");
|
||||||
setCurrentSlide((init) => init - 1);
|
setCurrentSlide((init) => init - 1);
|
||||||
}
|
}
|
||||||
@@ -86,7 +83,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
<IconButton
|
<IconButton
|
||||||
className="carousel-button right"
|
className="carousel-button right"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (currentSlide == content.length - 1) {
|
if (currentSlide === content.length - 1) {
|
||||||
setDirection("right");
|
setDirection("right");
|
||||||
setCurrentSlide(0);
|
setCurrentSlide(0);
|
||||||
} else if (currentSlide < content.length - 1) {
|
} else if (currentSlide < content.length - 1) {
|
||||||
@@ -105,11 +102,11 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
{content.map((item, index) => (
|
{content.map((item, index) => (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
currentSlide == index
|
currentSlide === index
|
||||||
? "carousel-indicator active"
|
? "carousel-indicator active"
|
||||||
: "carousel-indicator"
|
: "carousel-indicator"
|
||||||
}
|
}
|
||||||
key={index}
|
key={item.Id}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (currentSlide > index) {
|
if (currentSlide > index) {
|
||||||
setDirection("left");
|
setDirection("left");
|
||||||
|
|||||||
@@ -1,34 +1,29 @@
|
|||||||
/** @format */
|
|
||||||
import React, { memo } from "react";
|
import React, { memo } from "react";
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import { motion } from "framer-motion";
|
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 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 { yellow } from "@mui/material/colors";
|
||||||
import ErrorBoundary from "../errorBoundary";
|
|
||||||
|
|
||||||
import CarouselSlideError from "../errors/carousel";
|
import { green, red } from "@mui/material/colors";
|
||||||
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 { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { red } from "@mui/material/colors";
|
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 { 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 LikeButton from "../buttons/likeButton";
|
||||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import { useCarouselStore } from "../../utils/store/carousel";
|
|
||||||
import PlayButton from "../buttons/playButton";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
|
||||||
|
|
||||||
const availableSpecialRoutes = [
|
const availableSpecialRoutes = [
|
||||||
BaseItemKind.Series,
|
BaseItemKind.Series,
|
||||||
@@ -53,7 +48,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
const user = useQuery({
|
const user = useQuery({
|
||||||
queryKey: ["user"],
|
queryKey: ["user"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
let usr = await getUserApi(api).getCurrentUser();
|
const usr = await getUserApi(api).getCurrentUser();
|
||||||
return usr.data;
|
return usr.data;
|
||||||
},
|
},
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
@@ -69,56 +64,50 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const [animationDirection] = useCarouselStore((state) => [
|
const [animationDirection] = useCarouselStore((state) => [state.direction]);
|
||||||
state.direction,
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ErrorBoundary fallback={<CarouselSlideError itemName={item.Name} />}>
|
|
||||||
<Paper
|
<Paper
|
||||||
className="hero-carousel-slide"
|
className="hero-carousel-slide"
|
||||||
sx={{
|
sx={{
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
px: 3,
|
px: 3,
|
||||||
}}
|
}}
|
||||||
elevation={6}
|
elevation={10}
|
||||||
>
|
>
|
||||||
<div className="hero-carousel-background-container">
|
<div className="hero-carousel-background-container">
|
||||||
{!!item.ImageBlurHashes.Backdrop && (
|
{!!item.ImageBlurHashes.Backdrop && (
|
||||||
<>
|
<>
|
||||||
{Object.keys(item.ImageBlurHashes.Backdrop)
|
{Object.keys(item.ImageBlurHashes.Backdrop).length !== 0 && (
|
||||||
.length != 0 && (
|
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={
|
hash={
|
||||||
item.ImageBlurHashes.Backdrop[
|
item.ImageBlurHashes.Backdrop[
|
||||||
Object.keys(
|
Object.keys(item.ImageBlurHashes.Backdrop)[0]
|
||||||
item.ImageBlurHashes
|
|
||||||
.Backdrop,
|
|
||||||
)[0]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||||
width="108"
|
width="256"
|
||||||
height="72"
|
height="179.2"
|
||||||
resolutionX={64}
|
resolutionX={64}
|
||||||
resolutionY={96}
|
resolutionY={45}
|
||||||
className="hero-carousel-background-blurhash"
|
className="hero-carousel-background-blurhash"
|
||||||
punch={1}
|
punch={1.2}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
className="hero-carousel-background-image"
|
className="hero-carousel-background-image"
|
||||||
src={
|
src={
|
||||||
item.ParentBackdropItemId
|
item.ParentBackdropItemId
|
||||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop`
|
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop`
|
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||||
}
|
}
|
||||||
style={{
|
style={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
onLoad={(e) =>
|
onLoad={(e) => {
|
||||||
(e.target.style.opacity = 1)
|
e.target.style.opacity = 1;
|
||||||
}
|
}}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -127,37 +116,12 @@ const CarouselSlide = ({ item }) => {
|
|||||||
{getTypeIcon(item.Type)}
|
{getTypeIcon(item.Type)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<motion.div
|
<div className="hero-carousel-detail">
|
||||||
// initial={{
|
|
||||||
// transform:
|
|
||||||
// animationDirection == "right"
|
|
||||||
// ? "translateX(60px)"
|
|
||||||
// : "translateX(-60px)",
|
|
||||||
// opacity: 0,
|
|
||||||
// }}
|
|
||||||
// animate={{
|
|
||||||
// transform: "translateX(0px)",
|
|
||||||
// opacity: 1,
|
|
||||||
// }}
|
|
||||||
// exit={{
|
|
||||||
// transform:
|
|
||||||
// animationDirection == "right"
|
|
||||||
// ? "translateX(-60px)"
|
|
||||||
// : "translateX(60px)",
|
|
||||||
|
|
||||||
// opacity: 0,
|
|
||||||
// }}
|
|
||||||
// transition={{
|
|
||||||
// duration: 0.25,
|
|
||||||
// ease: "easeInOut",
|
|
||||||
// }}
|
|
||||||
className="hero-carousel-detail"
|
|
||||||
>
|
|
||||||
<Typography
|
<Typography
|
||||||
component={motion.div}
|
component={motion.div}
|
||||||
initial={{
|
initial={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(60px)"
|
? "translateX(60px)"
|
||||||
: "translateX(-60px)",
|
: "translateX(-60px)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -168,10 +132,9 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}}
|
}}
|
||||||
exit={{
|
exit={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(-60px)"
|
? "translateX(-60px)"
|
||||||
: "translateX(60px)",
|
: "translateX(60px)",
|
||||||
|
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
transition={{
|
transition={{
|
||||||
@@ -190,22 +153,17 @@ const CarouselSlide = ({ item }) => {
|
|||||||
item.Name
|
item.Name
|
||||||
) : (
|
) : (
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
className="hero-carousel-text-logo"
|
className="hero-carousel-text-logo"
|
||||||
src={
|
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
||||||
api.basePath +
|
|
||||||
"/Items/" +
|
|
||||||
item.Id +
|
|
||||||
"/Images/Logo?quality=90&tag=" +
|
|
||||||
item.ImageTags.Logo
|
|
||||||
}
|
|
||||||
style={{
|
style={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
transition: "opacity 0.2s",
|
transition: "opacity 0.2s",
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
}}
|
}}
|
||||||
onLoad={(e) =>
|
onLoad={(e) => {
|
||||||
(e.target.style.opacity = 1)
|
e.target.style.opacity = 1;
|
||||||
}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -213,7 +171,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
component={motion.div}
|
component={motion.div}
|
||||||
initial={{
|
initial={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(20px)"
|
? "translateX(20px)"
|
||||||
: "translateX(-20px)",
|
: "translateX(-20px)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -224,7 +182,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}}
|
}}
|
||||||
exit={{
|
exit={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(-20px)"
|
? "translateX(-20px)"
|
||||||
: "translateX(20px)",
|
: "translateX(20px)",
|
||||||
|
|
||||||
@@ -241,19 +199,12 @@ const CarouselSlide = ({ item }) => {
|
|||||||
justifyItems="flex-start"
|
justifyItems="flex-start"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
{item.ProductionYear ? item.ProductionYear : "Unknown"}
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{item.ProductionYear
|
|
||||||
? item.ProductionYear
|
|
||||||
: "Unknown"}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<Chip
|
<Chip variant="filled" label={item.OfficialRating ?? "Not Rated"} />
|
||||||
variant="filled"
|
|
||||||
label={item.OfficialRating ?? "Not Rated"}
|
{item.CommunityRating && (
|
||||||
/>
|
|
||||||
<ErrorBoundary fallback={<></>}>
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@@ -279,12 +230,10 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}}
|
}}
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
>
|
>
|
||||||
{Math.round(
|
{Math.round(item.CommunityRating * 10) / 10}
|
||||||
item.CommunityRating * 10,
|
|
||||||
) / 10}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</ErrorBoundary>
|
)}
|
||||||
{Boolean(item.CriticRating) && (
|
{Boolean(item.CriticRating) && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -297,12 +246,12 @@ const CarouselSlide = ({ item }) => {
|
|||||||
<div
|
<div
|
||||||
className="material-symbols-rounded "
|
className="material-symbols-rounded "
|
||||||
style={{
|
style={{
|
||||||
color: red[400],
|
color: item.CriticRating > 50 ? green[400] : red[400],
|
||||||
fontVariationSettings:
|
fontVariationSettings:
|
||||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
thumb_up
|
{item.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography
|
||||||
style={{
|
style={{
|
||||||
@@ -316,18 +265,12 @@ const CarouselSlide = ({ item }) => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{!!item.RunTimeTicks && (
|
{!!item.RunTimeTicks && (
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{getRuntime(item.RunTimeTicks)}
|
{getRuntime(item.RunTimeTicks)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{!!item.RunTimeTicks && (
|
{!!item.RunTimeTicks && (
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{endsAt(item.RunTimeTicks)}
|
{endsAt(item.RunTimeTicks)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
@@ -336,7 +279,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
component={motion.div}
|
component={motion.div}
|
||||||
initial={{
|
initial={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(20px)"
|
? "translateX(20px)"
|
||||||
: "translateX(-20px)",
|
: "translateX(-20px)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -347,7 +290,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}}
|
}}
|
||||||
exit={{
|
exit={{
|
||||||
transform:
|
transform:
|
||||||
animationDirection == "right"
|
animationDirection === "right"
|
||||||
? "translateX(-20px)"
|
? "translateX(-20px)"
|
||||||
: "translateX(20px)",
|
: "translateX(20px)",
|
||||||
|
|
||||||
@@ -392,14 +335,12 @@ const CarouselSlide = ({ item }) => {
|
|||||||
}}
|
}}
|
||||||
itemUserData={item.UserData}
|
itemUserData={item.UserData}
|
||||||
audio={
|
audio={
|
||||||
item.Type == BaseItemKind.MusicAlbum ||
|
item.Type === BaseItemKind.MusicAlbum ||
|
||||||
item.Type == BaseItemKind.Audio ||
|
item.Type === BaseItemKind.Audio ||
|
||||||
item.Type == BaseItemKind.AudioBook ||
|
item.Type === BaseItemKind.AudioBook ||
|
||||||
item.Type == BaseItemKind.Playlist
|
item.Type === BaseItemKind.Playlist
|
||||||
}
|
|
||||||
playlistItem={
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
}
|
}
|
||||||
|
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||||
playlistItemId={item.Id}
|
playlistItemId={item.Id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -438,9 +379,8 @@ const CarouselSlide = ({ item }) => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</motion.div>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
</ErrorBoundary>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/** @format */
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
class ErrorBoundary extends React.Component {
|
class ErrorBoundary extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|||||||
@@ -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