A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
prettier
aminnausin76dc0a5a5129
diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.ymlindex b87ab96d..9545783b 100755--- a/.github/workflows/laravel.yml+++ b/.github/workflows/laravel.yml@@ -1,75 +1,75 @@name: Laravelon:- push:- branches: ["dev","main"]- pull_request:- branches: ["dev","main"]+ push:+ branches: ['dev', 'main']+ pull_request:+ branches: ['dev', 'main']jobs:- laravel-tests:- runs-on: ubuntu-latest- env:- DB_CONNECTION: pgsql- DB_HOST: localhost- DB_PASSWORD: postgres- DB_USERNAME: postgres- DB_DATABASE: postgres-- services:- postgres:- image: postgres:latest+ laravel-tests:+ runs-on: ubuntu-latestenv:- POSTGRES_USER: postgres- POSTGRES_PASSWORD: postgres- POSTGRES_DB: postgres-- ports:- - 5432/tcp- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3+ DB_CONNECTION: pgsql+ DB_HOST: localhost+ DB_PASSWORD: postgres+ DB_USERNAME: postgres+ DB_DATABASE: postgres- steps:- - name: Set up Node.js- uses: actions/setup-node@v3+ services:+ postgres:+ image: postgres:latest+ env:+ POSTGRES_USER: postgres+ POSTGRES_PASSWORD: postgres+ POSTGRES_DB: postgres- - name: Set up PHP- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e- with:- php-version: "8.2"- extensions: pgsql+ ports:+ - 5432/tcp+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3- - uses: actions/checkout@v4+ steps:+ - name: Set up Node.js+ uses: actions/setup-node@v3- - name: Copy .env- run: php -r "file_exists('.env') || copy('.env.example', '.env');"+ - name: Set up PHP+ uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e+ with:+ php-version: '8.2'+ extensions: pgsql- - name: Install Dependencies- run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist+ - uses: actions/checkout@v4- - name: Install node dependencies- run: npm ci+ - name: Copy .env+ run: php -r "file_exists('.env') || copy('.env.example', '.env');"- - name: Generate key- run: php artisan key:generate+ - name: Install Dependencies+ run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist- - name: Directory Permissions- run: chmod -R 777 storage bootstrap/cache+ - name: Install node dependencies+ run: npm ci- # - name: Clear Config- # run: php artisan config:clear+ - name: Generate key+ run: php artisan key:generate- - name: Run Migration- run: php artisan migrate -v- env:- DB_PORT: ${{ job.services.postgres.ports[5432] }}-- - name: Build- run: npm run build+ - name: Directory Permissions+ run: chmod -R 777 storage bootstrap/cache- - name: Lint- run: npm run lint+ # - name: Clear Config+ # run: php artisan config:clear- - name: Execute tests (Unit and Feature tests) via PHPUnit/Pest- env:- DB_PORT: ${{ job.services.postgres.ports[5432] }}- run: php artisan test\ No newline at end of file+ - name: Run Migration+ run: php artisan migrate -v+ env:+ DB_PORT: ${{ job.services.postgres.ports[5432] }}++ - name: Build+ run: npm run build++ - name: Lint+ run: npm run lint++ - name: Execute tests (Unit and Feature tests) via PHPUnit/Pest+ env:+ DB_PORT: ${{ job.services.postgres.ports[5432] }}+ run: php artisan testdiff --git a/README.md b/README.mdindex e25c060c..e2a3f89e 100755--- a/README.md+++ b/README.md@@ -1,27 +1,29 @@# Web based Media hosting website/serverBuilt with:-- Laravel-- Vue.js-- Tailwind-- Nginx-- Postgresql++- Laravel+- Vue.js+- Tailwind+- Nginx+- PostgresqlFeatures to add:-- User profiles-- Uploadable images (With supabase or local storage based on admin preference)-- User access levels (Admin, Contributor, General)-- User friends system-- Synchronised playback with a user party system-- Automatic scrubbing of metadata with admin selected source API-- Category management-- Video playback statistics and heatmaps-- Video player UI-- Tags system++- User profiles+- Uploadable images (With supabase or local storage based on admin preference)+- User access levels (Admin, Contributor, General)+- User friends system+- Synchronised playback with a user party system+- Automatic scrubbing of metadata with admin selected source API+- Category management+- Video playback statistics and heatmaps+- Video player UI+- Tags system## Overview-This is a fast and easily accessible all in one media player for your home server.+This is a fast and easily accessible all in one media player for your home server.It automatically scans and indexes your videos and serves them in a minimalistic and easy to use interface.The main benefit is that you host content yourself and thus control the speed at which videos can load. No more buffering !@@ -32,28 +34,29 @@ Extra features include watch history, ambient mode, editable video metadata andRequires Apache or NGINX, PostgreSQL, A build of Vue and Tailwind with Node, FFmpeg and PHP 8. You can use Laragon to run in a single application.To connect to your file server, create a Symbolic link between your remote location and ./storage/app/public/media-To see any of your videos, you must INDEX FILES from the user dropdown menu or start the Laravel CRON job which scans-every 6 hours. Sync files will synchronise local cache json files with the database. The verify job will pull metadata+To see any of your videos, you must INDEX FILES from the user dropdown menu or start the Laravel CRON job which scans+every 6 hours. Sync files will synchronise local cache json files with the database. The verify job will pull metadatafrom the files using FFprobe.Different folders are accessed via url/folder/subfolder. Using just URL/folder will open the first subfolder scanned.You can share direct links to both videos and folders with the share buttons in the UI. Access to any category requires-you to know its name by design.+you to know its name by design.Supported File Types:-- MP4-- MKV++- MP4+- MKV## DemoBelow are screenshots of the current webpage on Desktop and Android.-<!--  --><!--  --><!-- (https://github.com/aminnausin/mediaServer/assets/83550431/bdd531b0-85f9-499e-8f96-5d853f080cad)--><!-- (https://github.com/aminnausin/mediaServer/assets/83550431/5e99db0d-ca0d-477e-add4-fd2144790165)--><!-- ||| -->-|||-|:-:|:-:|-|Dark Mode on Desktop|Light Mode on Android|++|  |  |+| :--------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------: |+| Dark Mode on Desktop | Light Mode on Android |diff --git a/composer.json b/composer.jsonindex dff9156e..1158d860 100755--- a/composer.json+++ b/composer.json@@ -2,7 +2,10 @@"name": "laravel/laravel","type": "project","description": "The skeleton application for the Laravel framework.",- "keywords": ["laravel", "framework"],+ "keywords": [+ "laravel",+ "framework"+ ],"license": "MIT","require": {"php": "^8.2.12",diff --git a/composer.lock b/composer.lockindex f2ca1291..16132437 100755--- a/composer.lock+++ b/composer.lock@@ -32,9 +32,7 @@"type": "library","extra": {"laravel": {- "providers": [- "Appstract\\Opcache\\OpcacheServiceProvider"- ]+ "providers": ["Appstract\\Opcache\\OpcacheServiceProvider"]}},"autoload": {@@ -43,9 +41,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Olav van Schie",@@ -56,12 +52,7 @@],"description": "PHP OPcache Artisan commands for Laravel.","homepage": "https://github.com/appstract/laravel-opcache",- "keywords": [- "Opcache",- "appstract",- "laravel",- "php"- ],+ "keywords": ["Opcache", "appstract", "laravel", "php"],"support": {"issues": "https://github.com/appstract/laravel-opcache/issues","source": "https://github.com/appstract/laravel-opcache/tree/4.0.2"@@ -97,9 +88,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"description": "Arbitrary-precision arithmetic library","keywords": ["Arbitrary-precision",@@ -160,9 +149,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "KyleKatarn",@@ -170,13 +157,7 @@}],"description": "Types to use Carbon in Doctrine",- "keywords": [- "carbon",- "date",- "datetime",- "doctrine",- "time"- ],+ "keywords": ["carbon", "date", "datetime", "doctrine", "time"],"support": {"issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues","source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0"@@ -233,9 +214,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Dragonfly Development Inc.",@@ -260,12 +239,7 @@],"description": "Given a deep data structure, access data by dot notation.","homepage": "https://github.com/dflydev/dflydev-dot-access-data",- "keywords": [- "access",- "data",- "dot",- "notation"- ],+ "keywords": ["access", "data", "dot", "notation"],"support": {"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues","source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3"@@ -304,9 +278,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Guilherme Blanco",@@ -394,9 +366,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Guilherme Blanco",@@ -413,13 +383,7 @@],"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.","homepage": "https://www.doctrine-project.org/projects/lexer.html",- "keywords": [- "annotations",- "docblock",- "lexer",- "parser",- "php"- ],+ "keywords": ["annotations", "docblock", "lexer", "parser", "php"],"support": {"issues": "https://github.com/doctrine/lexer/issues","source": "https://github.com/doctrine/lexer/tree/3.0.1"@@ -474,9 +438,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Chris Tankersley",@@ -485,10 +447,7 @@}],"description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due",- "keywords": [- "cron",- "schedule"- ],+ "keywords": ["cron", "schedule"],"support": {"issues": "https://github.com/dragonmantank/cron-expression/issues","source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3"@@ -539,9 +498,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Eduardo Gulias Davis"@@ -549,13 +506,7 @@],"description": "A library for validating emails against several RFCs","homepage": "https://github.com/egulias/EmailValidator",- "keywords": [- "email",- "emailvalidation",- "emailvalidator",- "validation",- "validator"- ],+ "keywords": ["email", "emailvalidation", "emailvalidator", "validation", "validator"],"support": {"issues": "https://github.com/egulias/EmailValidator/issues","source": "https://github.com/egulias/EmailValidator/tree/4.0.2"@@ -595,9 +546,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Igor Wiedler",@@ -605,10 +554,7 @@}],"description": "Événement is a very simple event dispatching library for PHP",- "keywords": [- "event-dispatcher",- "event-emitter"- ],+ "keywords": ["event-dispatcher", "event-emitter"],"support": {"issues": "https://github.com/igorw/evenement/issues","source": "https://github.com/igorw/evenement/tree/v3.0.2"@@ -650,9 +596,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fruitcake",@@ -665,11 +609,7 @@],"description": "Cross-origin resource sharing library for the Symfony HttpFoundation","homepage": "https://github.com/fruitcake/php-cors",- "keywords": [- "cors",- "laravel",- "symfony"- ],+ "keywords": ["cors", "laravel", "symfony"],"support": {"issues": "https://github.com/fruitcake/php-cors/issues","source": "https://github.com/fruitcake/php-cors/tree/v1.3.0"@@ -714,9 +654,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Graham Campbell",@@ -725,13 +663,7 @@}],"description": "An Implementation Of The Result Type",- "keywords": [- "Graham Campbell",- "GrahamCampbell",- "Result Type",- "Result-Type",- "result"- ],+ "keywords": ["Graham Campbell", "GrahamCampbell", "Result Type", "Result-Type", "result"],"support": {"issues": "https://github.com/GrahamCampbell/Result-Type/issues","source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3"@@ -794,17 +726,13 @@}},"autoload": {- "files": [- "src/functions_include.php"- ],+ "files": ["src/functions_include.php"],"psr-4": {"GuzzleHttp\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Graham Campbell",@@ -843,17 +771,7 @@}],"description": "Guzzle is a PHP HTTP client library",- "keywords": [- "client",- "curl",- "framework",- "http",- "http client",- "psr-18",- "psr-7",- "rest",- "web service"- ],+ "keywords": ["client", "curl", "framework", "http", "http client", "psr-18", "psr-7", "rest", "web service"],"support": {"issues": "https://github.com/guzzle/guzzle/issues","source": "https://github.com/guzzle/guzzle/tree/7.9.2"@@ -908,9 +826,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Graham Campbell",@@ -934,9 +850,7 @@}],"description": "Guzzle promises library",- "keywords": [- "promise"- ],+ "keywords": ["promise"],"support": {"issues": "https://github.com/guzzle/promises/issues","source": "https://github.com/guzzle/promises/tree/2.0.3"@@ -1002,9 +916,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Graham Campbell",@@ -1043,16 +955,7 @@}],"description": "PSR-7 message implementation that also provides common utility methods",- "keywords": [- "http",- "message",- "psr-7",- "request",- "response",- "stream",- "uri",- "url"- ],+ "keywords": ["http", "message", "psr-7", "request", "response", "stream", "uri", "url"],"support": {"issues": "https://github.com/guzzle/psr7/issues","source": "https://github.com/guzzle/psr7/tree/2.7.0"@@ -1109,9 +1012,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Graham Campbell",@@ -1135,10 +1036,7 @@}],"description": "A polyfill class for uri_template of PHP",- "keywords": [- "guzzlehttp",- "uri-template"- ],+ "keywords": ["guzzlehttp", "uri-template"],"support": {"issues": "https://github.com/guzzle/uri-template/issues","source": "https://github.com/guzzle/uri-template/tree/v1.0.3"@@ -1336,17 +1234,11 @@],"psr-4": {"Illuminate\\": "src/Illuminate/",- "Illuminate\\Support\\": [- "src/Illuminate/Macroable/",- "src/Illuminate/Collections/",- "src/Illuminate/Conditionable/"- ]+ "Illuminate\\Support\\": ["src/Illuminate/Macroable/", "src/Illuminate/Collections/", "src/Illuminate/Conditionable/"]}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Taylor Otwell",@@ -1355,10 +1247,7 @@],"description": "The Laravel Framework.","homepage": "https://laravel.com",- "keywords": [- "framework",- "laravel"- ],+ "keywords": ["framework", "laravel"],"support": {"issues": "https://github.com/laravel/framework/issues","source": "https://github.com/laravel/framework"@@ -1405,17 +1294,13 @@}},"autoload": {- "files": [- "src/helpers.php"- ],+ "files": ["src/helpers.php"],"psr-4": {"Laravel\\Prompts\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"description": "Add beautiful and user-friendly forms to your command-line applications.","support": {"issues": "https://github.com/laravel/prompts/issues",@@ -1455,9 +1340,7 @@"type": "library","extra": {"laravel": {- "providers": [- "Laravel\\Sanctum\\SanctumServiceProvider"- ]+ "providers": ["Laravel\\Sanctum\\SanctumServiceProvider"]}},"autoload": {@@ -1466,9 +1349,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Taylor Otwell",@@ -1476,11 +1357,7 @@}],"description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.",- "keywords": [- "auth",- "laravel",- "sanctum"- ],+ "keywords": ["auth", "laravel", "sanctum"],"support": {"issues": "https://github.com/laravel/sanctum/issues","source": "https://github.com/laravel/sanctum"@@ -1523,9 +1400,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Taylor Otwell",@@ -1537,11 +1412,7 @@}],"description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.",- "keywords": [- "closure",- "laravel",- "serializable"- ],+ "keywords": ["closure", "laravel", "serializable"],"support": {"issues": "https://github.com/laravel/serializable-closure/issues","source": "https://github.com/laravel/serializable-closure"@@ -1581,9 +1452,7 @@"type": "library","extra": {"laravel": {- "providers": [- "Laravel\\Tinker\\TinkerServiceProvider"- ]+ "providers": ["Laravel\\Tinker\\TinkerServiceProvider"]}},"autoload": {@@ -1592,9 +1461,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Taylor Otwell",@@ -1602,12 +1469,7 @@}],"description": "Powerful REPL for the Laravel framework.",- "keywords": [- "REPL",- "Tinker",- "laravel",- "psysh"- ],+ "keywords": ["REPL", "Tinker", "laravel", "psysh"],"support": {"issues": "https://github.com/laravel/tinker/issues","source": "https://github.com/laravel/tinker/tree/v2.9.0"@@ -1670,9 +1532,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Colin O'Dell",@@ -1683,16 +1543,7 @@],"description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)","homepage": "https://commonmark.thephpleague.com",- "keywords": [- "commonmark",- "flavored",- "gfm",- "github",- "github-flavored",- "markdown",- "md",- "parser"- ],+ "keywords": ["commonmark", "flavored", "gfm", "github", "github-flavored", "markdown", "md", "parser"],"support": {"docs": "https://commonmark.thephpleague.com/","forum": "https://github.com/thephpleague/commonmark/discussions",@@ -1758,9 +1609,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Colin O'Dell",@@ -1771,15 +1620,7 @@],"description": "Define configuration arrays with strict schemas and access values with dot notation","homepage": "https://config.thephpleague.com",- "keywords": [- "array",- "config",- "configuration",- "dot",- "dot-access",- "nested",- "schema"- ],+ "keywords": ["array", "config", "configuration", "dot", "dot-access", "nested", "schema"],"support": {"docs": "https://config.thephpleague.com/","issues": "https://github.com/thephpleague/config/issues",@@ -1856,9 +1697,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Frank de Jonge",@@ -1866,19 +1705,7 @@}],"description": "File storage abstraction for PHP",- "keywords": [- "WebDAV",- "aws",- "cloud",- "file",- "files",- "filesystem",- "filesystems",- "ftp",- "s3",- "sftp",- "storage"- ],+ "keywords": ["WebDAV", "aws", "cloud", "file", "files", "filesystem", "filesystems", "ftp", "s3", "sftp", "storage"],"support": {"issues": "https://github.com/thephpleague/flysystem/issues","source": "https://github.com/thephpleague/flysystem/tree/3.28.0"@@ -1912,9 +1739,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Frank de Jonge",@@ -1922,13 +1747,7 @@}],"description": "Local filesystem adapter for Flysystem.",- "keywords": [- "Flysystem",- "file",- "files",- "filesystem",- "local"- ],+ "keywords": ["Flysystem", "file", "files", "filesystem", "local"],"support": {"source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0"},@@ -1964,9 +1783,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Frank de Jonge",@@ -2058,9 +1875,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Jordi Boggiano",@@ -2070,11 +1885,7 @@],"description": "Sends your logs to files, sockets, inboxes, databases and various web services","homepage": "https://github.com/Seldaek/monolog",- "keywords": [- "log",- "logging",- "psr-3"- ],+ "keywords": ["log", "logging", "psr-3"],"support": {"issues": "https://github.com/Seldaek/monolog/issues","source": "https://github.com/Seldaek/monolog/tree/3.7.0"@@ -2129,9 +1940,7 @@"phpunit/phpunit": "^10.5.20","squizlabs/php_codesniffer": "^3.9.0"},- "bin": [- "bin/carbon"- ],+ "bin": ["bin/carbon"],"type": "library","extra": {"branch-alias": {@@ -2139,14 +1948,10 @@"dev-2.x": "2.x-dev"},"laravel": {- "providers": [- "Carbon\\Laravel\\ServiceProvider"- ]+ "providers": ["Carbon\\Laravel\\ServiceProvider"]},"phpstan": {- "includes": [- "extension.neon"- ]+ "includes": ["extension.neon"]}},"autoload": {@@ -2155,9 +1960,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Brian Nesbitt",@@ -2171,11 +1974,7 @@],"description": "An API extension for DateTime that supports 281 different languages.","homepage": "https://carbon.nesbot.com",- "keywords": [- "date",- "datetime",- "time"- ],+ "keywords": ["date", "datetime", "time"],"support": {"docs": "https://carbon.nesbot.com/docs","issues": "https://github.com/briannesbitt/Carbon/issues",@@ -2227,16 +2026,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause",- "GPL-2.0-only",- "GPL-3.0-only"- ],+ "license": ["BSD-3-Clause", "GPL-2.0-only", "GPL-3.0-only"],"authors": [{"name": "David Grudl",@@ -2249,10 +2042,7 @@],"description": "📐 Nette Schema: validating data structures against a given Schema.","homepage": "https://nette.org",- "keywords": [- "config",- "nette"- ],+ "keywords": ["config", "nette"],"support": {"issues": "https://github.com/nette/schema/issues","source": "https://github.com/nette/schema/tree/v1.3.0"@@ -2301,16 +2091,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause",- "GPL-2.0-only",- "GPL-3.0-only"- ],+ "license": ["BSD-3-Clause", "GPL-2.0-only", "GPL-3.0-only"],"authors": [{"name": "David Grudl",@@ -2369,9 +2153,7 @@"ircmaxell/php-yacc": "^0.0.7","phpunit/phpunit": "^9.0"},- "bin": [- "bin/php-parse"- ],+ "bin": ["bin/php-parse"],"type": "library","extra": {"branch-alias": {@@ -2384,19 +2166,14 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Nikita Popov"}],"description": "A PHP parser written in PHP",- "keywords": [- "parser",- "php"- ],+ "keywords": ["parser", "php"],"support": {"issues": "https://github.com/nikic/PHP-Parser/issues","source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0"@@ -2436,26 +2213,20 @@"type": "library","extra": {"laravel": {- "providers": [- "Termwind\\Laravel\\TermwindServiceProvider"- ]+ "providers": ["Termwind\\Laravel\\TermwindServiceProvider"]},"branch-alias": {"dev-2.x": "2.x-dev"}},"autoload": {- "files": [- "src/Functions.php"- ],+ "files": ["src/Functions.php"],"psr-4": {"Termwind\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nuno Maduro",@@ -2463,14 +2234,7 @@}],"description": "Its like Tailwind CSS, but for the console.",- "keywords": [- "cli",- "console",- "css",- "package",- "php",- "style"- ],+ "keywords": ["cli", "console", "css", "package", "php", "style"],"support": {"issues": "https://github.com/nunomaduro/termwind/issues","source": "https://github.com/nunomaduro/termwind/tree/v2.0.1"@@ -2523,9 +2287,7 @@"type": "library","extra": {"laravel": {- "providers": [- "ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider"- ],+ "providers": ["ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider"],"aliases": {"FFMpeg": "ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg"}@@ -2537,9 +2299,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Pascal Baljet",@@ -2550,13 +2310,7 @@],"description": "FFMpeg for Laravel","homepage": "https://github.com/protonemedia/laravel-ffmpeg",- "keywords": [- "ffmpeg",- "laravel",- "laravel-ffmpeg",- "protone media",- "protonemedia"- ],+ "keywords": ["ffmpeg", "laravel", "laravel-ffmpeg", "protone media", "protonemedia"],"support": {"issues": "https://github.com/protonemedia/laravel-ffmpeg/issues","source": "https://github.com/protonemedia/laravel-ffmpeg/tree/8.5.0"@@ -2606,9 +2360,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Romain Neutron",@@ -2642,16 +2394,7 @@}],"description": "FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg",- "keywords": [- "audio",- "audio processing",- "avconv",- "avprobe",- "ffmpeg",- "ffprobe",- "video",- "video processing"- ],+ "keywords": ["audio", "audio processing", "avconv", "avprobe", "ffmpeg", "ffprobe", "video", "video processing"],"support": {"issues": "https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues","source": "https://github.com/PHP-FFMpeg/PHP-FFMpeg/tree/v1.2.0"@@ -2695,9 +2438,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "Apache-2.0"- ],+ "license": ["Apache-2.0"],"authors": [{"name": "Johannes M. Schmitt",@@ -2711,12 +2452,7 @@}],"description": "Option Type for PHP",- "keywords": [- "language",- "option",- "php",- "type"- ],+ "keywords": ["language", "option", "php", "type"],"support": {"issues": "https://github.com/schmittjoh/php-option/issues","source": "https://github.com/schmittjoh/php-option/tree/1.9.3"@@ -2762,9 +2498,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -2772,11 +2506,7 @@}],"description": "Common interface for caching libraries",- "keywords": [- "cache",- "psr",- "psr-6"- ],+ "keywords": ["cache", "psr", "psr-6"],"support": {"source": "https://github.com/php-fig/cache/tree/3.0.0"},@@ -2806,9 +2536,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -2817,13 +2545,7 @@],"description": "Common interface for reading the clock.","homepage": "https://github.com/php-fig/clock",- "keywords": [- "clock",- "now",- "psr",- "psr-20",- "time"- ],+ "keywords": ["clock", "now", "psr", "psr-20", "time"],"support": {"issues": "https://github.com/php-fig/clock/issues","source": "https://github.com/php-fig/clock/tree/1.0.0"@@ -2859,9 +2581,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -2870,13 +2590,7 @@],"description": "Common Container Interface (PHP FIG PSR-11)","homepage": "https://github.com/php-fig/container",- "keywords": [- "PSR-11",- "container",- "container-interface",- "container-interop",- "psr"- ],+ "keywords": ["PSR-11", "container", "container-interface", "container-interop", "psr"],"support": {"issues": "https://github.com/php-fig/container/issues","source": "https://github.com/php-fig/container/tree/2.0.2"@@ -2912,9 +2626,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -2922,11 +2634,7 @@}],"description": "Standard interfaces for event handling.",- "keywords": [- "events",- "psr",- "psr-14"- ],+ "keywords": ["events", "psr", "psr-14"],"support": {"issues": "https://github.com/php-fig/event-dispatcher/issues","source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"@@ -2963,9 +2671,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -2974,12 +2680,7 @@],"description": "Common interface for HTTP clients","homepage": "https://github.com/php-fig/http-client",- "keywords": [- "http",- "http-client",- "psr",- "psr-18"- ],+ "keywords": ["http", "http-client", "psr", "psr-18"],"support": {"source": "https://github.com/php-fig/http-client"},@@ -3015,9 +2716,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -3025,16 +2724,7 @@}],"description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",- "keywords": [- "factory",- "http",- "message",- "psr",- "psr-17",- "psr-7",- "request",- "response"- ],+ "keywords": ["factory", "http", "message", "psr", "psr-17", "psr-7", "request", "response"],"support": {"source": "https://github.com/php-fig/http-factory"},@@ -3069,9 +2759,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -3080,14 +2768,7 @@],"description": "Common interface for HTTP messages","homepage": "https://github.com/php-fig/http-message",- "keywords": [- "http",- "http-message",- "psr",- "psr-7",- "request",- "response"- ],+ "keywords": ["http", "http-message", "psr", "psr-7", "request", "response"],"support": {"source": "https://github.com/php-fig/http-message/tree/2.0"},@@ -3122,9 +2803,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -3133,11 +2812,7 @@],"description": "Common interface for logging libraries","homepage": "https://github.com/php-fig/log",- "keywords": [- "log",- "psr",- "psr-3"- ],+ "keywords": ["log", "psr", "psr-3"],"support": {"source": "https://github.com/php-fig/log/tree/3.0.0"},@@ -3172,9 +2847,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "PHP-FIG",@@ -3182,13 +2855,7 @@}],"description": "Common interfaces for simple caching",- "keywords": [- "cache",- "caching",- "psr",- "psr-16",- "simple-cache"- ],+ "keywords": ["cache", "caching", "psr", "psr-16", "simple-cache"],"support": {"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"},@@ -3227,9 +2894,7 @@"ext-pdo-sqlite": "The doc command requires SQLite to work.","ext-posix": "If you have PCNTL, you'll want the POSIX extension as well."},- "bin": [- "bin/psysh"- ],+ "bin": ["bin/psysh"],"type": "library","extra": {"branch-alias": {@@ -3241,17 +2906,13 @@}},"autoload": {- "files": [- "src/functions.php"- ],+ "files": ["src/functions.php"],"psr-4": {"Psy\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Justin Hileman",@@ -3261,12 +2922,7 @@],"description": "An interactive shell for modern PHP.","homepage": "http://psysh.org",- "keywords": [- "REPL",- "console",- "interactive",- "shell"- ],+ "keywords": ["REPL", "console", "interactive", "shell"],"support": {"issues": "https://github.com/bobthecow/psysh/issues","source": "https://github.com/bobthecow/psysh/tree/v0.12.4"@@ -3296,14 +2952,10 @@},"type": "library","autoload": {- "files": [- "src/getallheaders.php"- ]+ "files": ["src/getallheaders.php"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Ralph Khattar",@@ -3371,9 +3023,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Ben Ramsey",@@ -3382,14 +3032,7 @@}],"description": "A PHP library for representing and manipulating collections.",- "keywords": [- "array",- "collection",- "hash",- "map",- "queue",- "set"- ],+ "keywords": ["array", "collection", "hash", "map", "queue", "set"],"support": {"issues": "https://github.com/ramsey/collection/issues","source": "https://github.com/ramsey/collection/tree/2.0.0"@@ -3465,23 +3108,15 @@}},"autoload": {- "files": [- "src/functions.php"- ],+ "files": ["src/functions.php"],"psr-4": {"Ramsey\\Uuid\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",- "keywords": [- "guid",- "identifier",- "uuid"- ],+ "keywords": ["guid", "identifier", "uuid"],"support": {"issues": "https://github.com/ramsey/uuid/issues","source": "https://github.com/ramsey/uuid/tree/4.7.6"@@ -3525,9 +3160,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Alex Vanderbist",@@ -3538,11 +3171,7 @@],"description": "Easily create, use and destroy temporary directories","homepage": "https://github.com/spatie/temporary-directory",- "keywords": [- "php",- "spatie",- "temporary-directory"- ],+ "keywords": ["php", "spatie", "temporary-directory"],"support": {"issues": "https://github.com/spatie/temporary-directory/issues","source": "https://github.com/spatie/temporary-directory/tree/2.2.1"@@ -3610,17 +3239,11 @@"psr-4": {"Symfony\\Component\\Cache\\": ""},- "classmap": [- "Traits/ValueWrapper.php"- ],- "exclude-from-classmap": [- "/Tests/"- ]+ "classmap": ["Traits/ValueWrapper.php"],+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -3633,10 +3256,7 @@],"description": "Provides extended PSR-6, PSR-16 (and tags) implementations","homepage": "https://symfony.com",- "keywords": [- "caching",- "psr6"- ],+ "keywords": ["caching", "psr6"],"support": {"source": "https://github.com/symfony/cache/tree/v7.1.3"},@@ -3690,9 +3310,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -3705,14 +3323,7 @@],"description": "Generic abstractions related to caching","homepage": "https://symfony.com",- "keywords": [- "abstractions",- "contracts",- "decoupling",- "interfaces",- "interoperability",- "standards"- ],+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],"support": {"source": "https://github.com/symfony/cache-contracts/tree/v3.5.0"},@@ -3756,20 +3367,14 @@},"type": "library","autoload": {- "files": [- "Resources/now.php"- ],+ "files": ["Resources/now.php"],"psr-4": {"Symfony\\Component\\Clock\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -3782,11 +3387,7 @@],"description": "Decouples applications from the system clock","homepage": "https://symfony.com",- "keywords": [- "clock",- "psr20",- "time"- ],+ "keywords": ["clock", "psr20", "time"],"support": {"source": "https://github.com/symfony/clock/tree/v7.1.1"},@@ -3854,14 +3455,10 @@"psr-4": {"Symfony\\Component\\Console\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -3874,12 +3471,7 @@],"description": "Eases the creation of beautiful and testable command line interfaces","homepage": "https://symfony.com",- "keywords": [- "cli",- "command-line",- "console",- "terminal"- ],+ "keywords": ["cli", "command-line", "console", "terminal"],"support": {"source": "https://github.com/symfony/console/tree/v7.1.3"},@@ -3921,14 +3513,10 @@"psr-4": {"Symfony\\Component\\CssSelector\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -3992,14 +3580,10 @@}},"autoload": {- "files": [- "function.php"- ]+ "files": ["function.php"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -4059,22 +3643,16 @@"symfony/http-kernel": "^6.4|^7.0","symfony/serializer": "^6.4|^7.0"},- "bin": [- "Resources/bin/patch-type-declarations"- ],+ "bin": ["Resources/bin/patch-type-declarations"],"type": "library","autoload": {"psr-4": {"Symfony\\Component\\ErrorHandler\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4147,14 +3725,10 @@"psr-4": {"Symfony\\Component\\EventDispatcher\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4220,9 +3794,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -4235,14 +3807,7 @@],"description": "Generic abstractions related to dispatching event","homepage": "https://symfony.com",- "keywords": [- "abstractions",- "contracts",- "decoupling",- "interfaces",- "interoperability",- "standards"- ],+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],"support": {"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0"},@@ -4287,14 +3852,10 @@"psr-4": {"Symfony\\Component\\Finder\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4364,14 +3925,10 @@"psr-4": {"Symfony\\Component\\HttpFoundation\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4478,14 +4035,10 @@"psr-4": {"Symfony\\Component\\HttpKernel\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4558,14 +4111,10 @@"psr-4": {"Symfony\\Component\\Mailer\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4638,14 +4187,10 @@"psr-4": {"Symfony\\Component\\Mime\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -4658,10 +4203,7 @@],"description": "Allows manipulating MIME messages","homepage": "https://symfony.com",- "keywords": [- "mime",- "mime-type"- ],+ "keywords": ["mime", "mime-type"],"support": {"source": "https://github.com/symfony/mime/tree/v7.1.2"},@@ -4712,17 +4254,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Ctype\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Gert de Pagter",@@ -4735,12 +4273,7 @@],"description": "Symfony polyfill for ctype functions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "ctype",- "polyfill",- "portable"- ],+ "keywords": ["compatibility", "ctype", "polyfill", "portable"],"support": {"source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0"},@@ -4788,17 +4321,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Intl\\Grapheme\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -4811,14 +4340,7 @@],"description": "Symfony polyfill for intl's grapheme_* functions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "grapheme",- "intl",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "grapheme", "intl", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0"},@@ -4868,17 +4390,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Intl\\Idn\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Laurent Bassin",@@ -4895,14 +4413,7 @@],"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "idn",- "intl",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "idn", "intl", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0"},@@ -4950,20 +4461,14 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Intl\\Normalizer\\": ""},- "classmap": [- "Resources/stubs"- ]+ "classmap": ["Resources/stubs"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -4976,14 +4481,7 @@],"description": "Symfony polyfill for intl's Normalizer class and related functions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "intl",- "normalizer",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "intl", "normalizer", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0"},@@ -5034,17 +4532,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Mbstring\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5057,13 +4551,7 @@],"description": "Symfony polyfill for the Mbstring extension","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "mbstring",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "mbstring", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0"},@@ -5108,17 +4596,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Php72\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5131,12 +4615,7 @@],"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0"},@@ -5181,20 +4660,14 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Php80\\": ""},- "classmap": [- "Resources/stubs"- ]+ "classmap": ["Resources/stubs"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Ion Bazan",@@ -5211,12 +4684,7 @@],"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0"},@@ -5261,20 +4729,14 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Php83\\": ""},- "classmap": [- "Resources/stubs"- ]+ "classmap": ["Resources/stubs"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5287,12 +4749,7 @@],"description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "polyfill",- "portable",- "shim"- ],+ "keywords": ["compatibility", "polyfill", "portable", "shim"],"support": {"source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0"},@@ -5343,17 +4800,13 @@}},"autoload": {- "files": [- "bootstrap.php"- ],+ "files": ["bootstrap.php"],"psr-4": {"Symfony\\Polyfill\\Uuid\\": ""}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Grégoire Pineau",@@ -5366,12 +4819,7 @@],"description": "Symfony polyfill for uuid functions","homepage": "https://symfony.com",- "keywords": [- "compatibility",- "polyfill",- "portable",- "uuid"- ],+ "keywords": ["compatibility", "polyfill", "portable", "uuid"],"support": {"source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0"},@@ -5413,14 +4861,10 @@"psr-4": {"Symfony\\Component\\Process\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -5488,14 +4932,10 @@"psr-4": {"Symfony\\Component\\Routing\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -5508,12 +4948,7 @@],"description": "Maps an HTTP request to a set of configuration variables","homepage": "https://symfony.com",- "keywords": [- "router",- "routing",- "uri",- "url"- ],+ "keywords": ["router", "routing", "uri", "url"],"support": {"source": "https://github.com/symfony/routing/tree/v7.1.3"},@@ -5569,14 +5004,10 @@"psr-4": {"Symfony\\Contracts\\Service\\": ""},- "exclude-from-classmap": [- "/Test/"- ]+ "exclude-from-classmap": ["/Test/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5589,14 +5020,7 @@],"description": "Generic abstractions related to writing services","homepage": "https://symfony.com",- "keywords": [- "abstractions",- "contracts",- "decoupling",- "interfaces",- "interoperability",- "standards"- ],+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],"support": {"source": "https://github.com/symfony/service-contracts/tree/v3.5.0"},@@ -5650,20 +5074,14 @@},"type": "library","autoload": {- "files": [- "Resources/functions.php"- ],+ "files": ["Resources/functions.php"],"psr-4": {"Symfony\\Component\\String\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5676,14 +5094,7 @@],"description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way","homepage": "https://symfony.com",- "keywords": [- "grapheme",- "i18n",- "string",- "unicode",- "utf-8",- "utf8"- ],+ "keywords": ["grapheme", "i18n", "string", "unicode", "utf-8", "utf8"],"support": {"source": "https://github.com/symfony/string/tree/v7.1.3"},@@ -5752,20 +5163,14 @@},"type": "library","autoload": {- "files": [- "Resources/functions.php"- ],+ "files": ["Resources/functions.php"],"psr-4": {"Symfony\\Component\\Translation\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -5828,14 +5233,10 @@"psr-4": {"Symfony\\Contracts\\Translation\\": ""},- "exclude-from-classmap": [- "/Test/"- ]+ "exclude-from-classmap": ["/Test/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -5848,14 +5249,7 @@],"description": "Generic abstractions related to translation","homepage": "https://symfony.com",- "keywords": [- "abstractions",- "contracts",- "decoupling",- "interfaces",- "interoperability",- "standards"- ],+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],"support": {"source": "https://github.com/symfony/translation-contracts/tree/v3.5.0"},@@ -5901,14 +5295,10 @@"psr-4": {"Symfony\\Component\\Uid\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Grégoire Pineau",@@ -5925,11 +5315,7 @@],"description": "Provides an object-oriented API to generate and represent UIDs","homepage": "https://symfony.com",- "keywords": [- "UID",- "ulid",- "uuid"- ],+ "keywords": ["UID", "ulid", "uuid"],"support": {"source": "https://github.com/symfony/uid/tree/v7.1.1"},@@ -5978,25 +5364,17 @@"symfony/uid": "^6.4|^7.0","twig/twig": "^3.0.4"},- "bin": [- "Resources/bin/var-dump-server"- ],+ "bin": ["Resources/bin/var-dump-server"],"type": "library","autoload": {- "files": [- "Resources/functions/dump.php"- ],+ "files": ["Resources/functions/dump.php"],"psr-4": {"Symfony\\Component\\VarDumper\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -6009,10 +5387,7 @@],"description": "Provides mechanisms for walking through any arbitrary PHP variable","homepage": "https://symfony.com",- "keywords": [- "debug",- "dump"- ],+ "keywords": ["debug", "dump"],"support": {"source": "https://github.com/symfony/var-dumper/tree/v7.1.3"},@@ -6059,14 +5434,10 @@"psr-4": {"Symfony\\Component\\VarExporter\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nicolas Grekas",@@ -6079,16 +5450,7 @@],"description": "Allows exporting any serializable PHP data structure to plain PHP code","homepage": "https://symfony.com",- "keywords": [- "clone",- "construct",- "export",- "hydrate",- "instantiate",- "lazy-loading",- "proxy",- "serialize"- ],+ "keywords": ["clone", "construct", "export", "hydrate", "instantiate", "lazy-loading", "proxy", "serialize"],"support": {"source": "https://github.com/symfony/var-exporter/tree/v7.1.2"},@@ -6143,9 +5505,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Tijs Verkoyen",@@ -6208,9 +5568,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Graham Campbell",@@ -6224,11 +5582,7 @@}],"description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",- "keywords": [- "dotenv",- "env",- "environment"- ],+ "keywords": ["dotenv", "env", "environment"],"support": {"issues": "https://github.com/vlucas/phpdotenv/issues","source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1"@@ -6275,9 +5629,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Lars Moelleken",@@ -6286,11 +5638,7 @@],"description": "Portable ASCII library - performance optimized (ascii) string functions for php.","homepage": "https://github.com/voku/portable-ascii",- "keywords": [- "ascii",- "clean",- "php"- ],+ "keywords": ["ascii", "clean", "php"],"support": {"issues": "https://github.com/voku/portable-ascii/issues","source": "https://github.com/voku/portable-ascii/tree/2.0.1"@@ -6356,9 +5704,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Bernhard Schussek",@@ -6366,11 +5712,7 @@}],"description": "Assertions to validate method input/output with nice error messages.",- "keywords": [- "assert",- "check",- "validate"- ],+ "keywords": ["assert", "check", "validate"],"support": {"issues": "https://github.com/webmozarts/assert/issues","source": "https://github.com/webmozarts/assert/tree/1.11.0"@@ -6413,26 +5755,20 @@"dev-master": "3.13-dev"},"laravel": {- "providers": [- "Barryvdh\\Debugbar\\ServiceProvider"- ],+ "providers": ["Barryvdh\\Debugbar\\ServiceProvider"],"aliases": {"Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar"}}},"autoload": {- "files": [- "src/helpers.php"- ],+ "files": ["src/helpers.php"],"psr-4": {"Barryvdh\\Debugbar\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Barry vd. Heuvel",@@ -6440,13 +5776,7 @@}],"description": "PHP Debugbar integration for Laravel",- "keywords": [- "debug",- "debugbar",- "laravel",- "profiler",- "webprofiler"- ],+ "keywords": ["debug", "debugbar", "laravel", "profiler", "webprofiler"],"support": {"issues": "https://github.com/barryvdh/laravel-debugbar/issues","source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.13.5"@@ -6506,20 +5836,14 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "François Zaninotto"}],"description": "Faker is a PHP library that generates fake data for you.",- "keywords": [- "data",- "faker",- "fixtures"- ],+ "keywords": ["data", "faker", "fixtures"],"support": {"issues": "https://github.com/FakerPHP/Faker/issues","source": "https://github.com/FakerPHP/Faker/tree/v1.23.1"@@ -6565,9 +5889,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Filipe Dobreira",@@ -6577,14 +5899,7 @@],"description": "php error handling for cool kids","homepage": "https://filp.github.io/whoops/",- "keywords": [- "error",- "exception",- "handling",- "library",- "throwable",- "whoops"- ],+ "keywords": ["error", "exception", "handling", "library", "throwable", "whoops"],"support": {"issues": "https://github.com/filp/whoops/issues","source": "https://github.com/filp/whoops/tree/2.15.4"@@ -6630,18 +5945,12 @@}},"autoload": {- "classmap": [- "hamcrest"- ]+ "classmap": ["hamcrest"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"description": "This is the PHP port of Hamcrest Matchers",- "keywords": [- "test"- ],+ "keywords": ["test"],"support": {"issues": "https://github.com/hamcrest/hamcrest-php/issues","source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1"@@ -6678,9 +5987,7 @@"nunomaduro/termwind": "^1.15.1","pestphp/pest": "^2.35.0"},- "bin": [- "builds/pint"- ],+ "bin": ["builds/pint"],"type": "project","autoload": {"psr-4": {@@ -6690,9 +5997,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nuno Maduro",@@ -6701,13 +6006,7 @@],"description": "An opinionated code formatter for PHP.","homepage": "https://laravel.com",- "keywords": [- "format",- "formatter",- "lint",- "linter",- "php"- ],+ "keywords": ["format", "formatter", "lint", "linter", "php"],"support": {"issues": "https://github.com/laravel/pint/issues","source": "https://github.com/laravel/pint"@@ -6740,15 +6039,11 @@"orchestra/testbench": "^7.0|^8.0|^9.0","phpstan/phpstan": "^1.10"},- "bin": [- "bin/sail"- ],+ "bin": ["bin/sail"],"type": "library","extra": {"laravel": {- "providers": [- "Laravel\\Sail\\SailServiceProvider"- ]+ "providers": ["Laravel\\Sail\\SailServiceProvider"]}},"autoload": {@@ -6757,9 +6052,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Taylor Otwell",@@ -6767,10 +6060,7 @@}],"description": "Docker files for running a basic Laravel application.",- "keywords": [- "docker",- "laravel"- ],+ "keywords": ["docker", "laravel"],"support": {"issues": "https://github.com/laravel/sail/issues","source": "https://github.com/laravel/sail"@@ -6819,9 +6109,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Maxime Bouroumeau-Fuseau",@@ -6835,10 +6123,7 @@],"description": "Debug bar in the browser for php application","homepage": "https://github.com/maximebf/php-debugbar",- "keywords": [- "debug",- "debugbar"- ],+ "keywords": ["debug", "debugbar"],"support": {"issues": "https://github.com/maximebf/php-debugbar/issues","source": "https://github.com/maximebf/php-debugbar/tree/v1.22.3"@@ -6873,18 +6158,13 @@},"type": "library","autoload": {- "files": [- "library/helpers.php",- "library/Mockery.php"- ],+ "files": ["library/helpers.php", "library/Mockery.php"],"psr-4": {"Mockery\\": "library/Mockery"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Pádraic Brady",@@ -6907,18 +6187,7 @@],"description": "Mockery is a simple yet flexible PHP mock object framework","homepage": "https://github.com/mockery/mockery",- "keywords": [- "BDD",- "TDD",- "library",- "mock",- "mock objects",- "mockery",- "stub",- "test",- "test double",- "testing"- ],+ "keywords": ["BDD", "TDD", "library", "mock", "mock objects", "mockery", "stub", "test", "test double", "testing"],"support": {"docs": "https://docs.mockery.io/","issues": "https://github.com/mockery/mockery/issues",@@ -6957,25 +6226,15 @@},"type": "library","autoload": {- "files": [- "src/DeepCopy/deep_copy.php"- ],+ "files": ["src/DeepCopy/deep_copy.php"],"psr-4": {"DeepCopy\\": "src/DeepCopy/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"description": "Create deep copies (clones) of your objects",- "keywords": [- "clone",- "copy",- "duplicate",- "object",- "object graph"- ],+ "keywords": ["clone", "copy", "duplicate", "object", "object graph"],"support": {"issues": "https://github.com/myclabs/DeepCopy/issues","source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"@@ -7026,26 +6285,20 @@"type": "library","extra": {"laravel": {- "providers": [- "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"- ]+ "providers": ["NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"]},"branch-alias": {"dev-8.x": "8.x-dev"}},"autoload": {- "files": [- "./src/Adapters/Phpunit/Autoload.php"- ],+ "files": ["./src/Adapters/Phpunit/Autoload.php"],"psr-4": {"NunoMaduro\\Collision\\": "src/"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Nuno Maduro",@@ -7053,18 +6306,7 @@}],"description": "Cli error handling for console/command-line PHP applications.",- "keywords": [- "artisan",- "cli",- "command-line",- "console",- "error",- "handling",- "laravel",- "laravel-zero",- "php",- "symfony"- ],+ "keywords": ["artisan", "cli", "command-line", "console", "error", "handling", "laravel", "laravel-zero", "php", "symfony"],"support": {"issues": "https://github.com/nunomaduro/collision/issues","source": "https://github.com/nunomaduro/collision"@@ -7114,14 +6356,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Arne Blankerts",@@ -7171,14 +6409,10 @@},"type": "library","autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Arne Blankerts",@@ -7246,14 +6480,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7263,11 +6493,7 @@],"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.","homepage": "https://github.com/sebastianbergmann/php-code-coverage",- "keywords": [- "coverage",- "testing",- "xunit"- ],+ "keywords": ["coverage", "testing", "xunit"],"support": {"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues","security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",@@ -7308,14 +6534,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7325,10 +6547,7 @@],"description": "FilterIterator implementation that filters files based on a list of suffixes.","homepage": "https://github.com/sebastianbergmann/php-file-iterator/",- "keywords": [- "filesystem",- "iterator"- ],+ "keywords": ["filesystem", "iterator"],"support": {"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues","security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",@@ -7373,14 +6592,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7390,9 +6605,7 @@],"description": "Invoke callables with a timeout","homepage": "https://github.com/sebastianbergmann/php-invoker/",- "keywords": [- "process"- ],+ "keywords": ["process"],"support": {"issues": "https://github.com/sebastianbergmann/php-invoker/issues","security": "https://github.com/sebastianbergmann/php-invoker/security/policy",@@ -7433,14 +6646,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7450,9 +6659,7 @@],"description": "Simple template engine.","homepage": "https://github.com/sebastianbergmann/php-text-template/",- "keywords": [- "template"- ],+ "keywords": ["template"],"support": {"issues": "https://github.com/sebastianbergmann/php-text-template/issues","security": "https://github.com/sebastianbergmann/php-text-template/security/policy",@@ -7493,14 +6700,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7510,9 +6713,7 @@],"description": "Utility class for timing","homepage": "https://github.com/sebastianbergmann/php-timer/",- "keywords": [- "timer"- ],+ "keywords": ["timer"],"support": {"issues": "https://github.com/sebastianbergmann/php-timer/issues","security": "https://github.com/sebastianbergmann/php-timer/security/policy",@@ -7570,9 +6771,7 @@"suggest": {"ext-soap": "To be able to generate mocks based on WSDL files"},- "bin": [- "phpunit"- ],+ "bin": ["phpunit"],"type": "library","extra": {"branch-alias": {@@ -7580,17 +6779,11 @@}},"autoload": {- "files": [- "src/Framework/Assert/Functions.php"- ],- "classmap": [- "src/"- ]+ "files": ["src/Framework/Assert/Functions.php"],+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7600,11 +6793,7 @@],"description": "The PHP Unit Testing framework.","homepage": "https://phpunit.de/",- "keywords": [- "phpunit",- "testing",- "xunit"- ],+ "keywords": ["phpunit", "testing", "xunit"],"support": {"issues": "https://github.com/sebastianbergmann/phpunit/issues","security": "https://github.com/sebastianbergmann/phpunit/security/policy",@@ -7653,14 +6842,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7710,14 +6895,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7767,14 +6948,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7827,14 +7004,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7855,11 +7028,7 @@],"description": "Provides the functionality to compare PHP values for equality","homepage": "https://github.com/sebastianbergmann/comparator",- "keywords": [- "comparator",- "compare",- "equality"- ],+ "keywords": ["comparator", "compare", "equality"],"support": {"issues": "https://github.com/sebastianbergmann/comparator/issues","security": "https://github.com/sebastianbergmann/comparator/security/policy",@@ -7901,14 +7070,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7959,14 +7124,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -7979,12 +7140,7 @@],"description": "Diff implementation","homepage": "https://github.com/sebastianbergmann/diff",- "keywords": [- "diff",- "udiff",- "unidiff",- "unified diff"- ],+ "keywords": ["diff", "udiff", "unidiff", "unified diff"],"support": {"issues": "https://github.com/sebastianbergmann/diff/issues","security": "https://github.com/sebastianbergmann/diff/security/policy",@@ -8028,14 +7184,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8044,11 +7196,7 @@],"description": "Provides functionality to handle HHVM/PHP environments","homepage": "https://github.com/sebastianbergmann/environment",- "keywords": [- "Xdebug",- "environment",- "hhvm"- ],+ "keywords": ["Xdebug", "environment", "hhvm"],"support": {"issues": "https://github.com/sebastianbergmann/environment/issues","security": "https://github.com/sebastianbergmann/environment/security/policy",@@ -8091,14 +7239,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8123,10 +7267,7 @@],"description": "Provides the functionality to export PHP variables for visualization","homepage": "https://www.github.com/sebastianbergmann/exporter",- "keywords": [- "export",- "exporter"- ],+ "keywords": ["export", "exporter"],"support": {"issues": "https://github.com/sebastianbergmann/exporter/issues","security": "https://github.com/sebastianbergmann/exporter/security/policy",@@ -8170,14 +7311,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8186,9 +7323,7 @@],"description": "Snapshotting of global state","homepage": "https://www.github.com/sebastianbergmann/global-state",- "keywords": [- "global state"- ],+ "keywords": ["global state"],"support": {"issues": "https://github.com/sebastianbergmann/global-state/issues","security": "https://github.com/sebastianbergmann/global-state/security/policy",@@ -8230,14 +7365,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8289,14 +7420,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8345,14 +7472,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8401,14 +7524,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8465,14 +7584,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8519,14 +7634,10 @@}},"autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Sebastian Bergmann",@@ -8580,9 +7691,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Freek Van de Herten",@@ -8593,10 +7702,7 @@],"description": "A better backtrace","homepage": "https://github.com/spatie/backtrace",- "keywords": [- "Backtrace",- "spatie"- ],+ "keywords": ["Backtrace", "spatie"],"support": {"source": "https://github.com/spatie/backtrace/tree/1.6.2"},@@ -8658,9 +7764,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Ruben Van Assche",@@ -8670,10 +7774,7 @@],"description": "This is my package error-solutions","homepage": "https://github.com/spatie/error-solutions",- "keywords": [- "error-solutions",- "spatie"- ],+ "keywords": ["error-solutions", "spatie"],"support": {"issues": "https://github.com/spatie/error-solutions/issues","source": "https://github.com/spatie/error-solutions/tree/1.1.1"@@ -8724,25 +7825,16 @@}},"autoload": {- "files": [- "src/helpers.php"- ],+ "files": ["src/helpers.php"],"psr-4": {"Spatie\\FlareClient\\": "src"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"description": "Send PHP errors to Flare","homepage": "https://github.com/spatie/flare-client-php",- "keywords": [- "exception",- "flare",- "reporting",- "spatie"- ],+ "keywords": ["exception", "flare", "reporting", "spatie"],"support": {"issues": "https://github.com/spatie/flare-client-php/issues","source": "https://github.com/spatie/flare-client-php/tree/1.8.0"@@ -8806,9 +7898,7 @@}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Spatie",@@ -8818,12 +7908,7 @@],"description": "A beautiful error page for PHP applications.","homepage": "https://flareapp.io/ignition",- "keywords": [- "error",- "flare",- "laravel",- "page"- ],+ "keywords": ["error", "flare", "laravel", "page"],"support": {"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction","forum": "https://twitter.com/flareappio",@@ -8880,26 +7965,20 @@"type": "library","extra": {"laravel": {- "providers": [- "Spatie\\LaravelIgnition\\IgnitionServiceProvider"- ],+ "providers": ["Spatie\\LaravelIgnition\\IgnitionServiceProvider"],"aliases": {"Flare": "Spatie\\LaravelIgnition\\Facades\\Flare"}}},"autoload": {- "files": [- "src/helpers.php"- ],+ "files": ["src/helpers.php"],"psr-4": {"Spatie\\LaravelIgnition\\": "src"}},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Spatie",@@ -8909,12 +7988,7 @@],"description": "A beautiful error page for Laravel applications.","homepage": "https://flareapp.io/ignition",- "keywords": [- "error",- "flare",- "laravel",- "page"- ],+ "keywords": ["error", "flare", "laravel", "page"],"support": {"docs": "https://flareapp.io/docs/ignition-for-laravel/introduction","forum": "https://twitter.com/flareappio",@@ -8953,22 +8027,16 @@"require-dev": {"symfony/console": "^6.4|^7.0"},- "bin": [- "Resources/bin/yaml-lint"- ],+ "bin": ["Resources/bin/yaml-lint"],"type": "library","autoload": {"psr-4": {"Symfony\\Component\\Yaml\\": ""},- "exclude-from-classmap": [- "/Tests/"- ]+ "exclude-from-classmap": ["/Tests/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],+ "license": ["MIT"],"authors": [{"name": "Fabien Potencier",@@ -9022,14 +8090,10 @@},"type": "library","autoload": {- "classmap": [- "src/"- ]+ "classmap": ["src/"]},"notification-url": "https://packagist.org/downloads/",- "license": [- "BSD-3-Clause"- ],+ "license": ["BSD-3-Clause"],"authors": [{"name": "Arne Blankerts",diff --git a/eslint.config.js b/eslint.config.jsindex 2f04d146..ade53dfa 100755--- a/eslint.config.js+++ b/eslint.config.js@@ -1,10 +1,10 @@-import pluginJs from "@eslint/js";-import pluginVue from "eslint-plugin-vue";+import pluginJs from '@eslint/js';+import pluginVue from 'eslint-plugin-vue';export default [- {- files: ["resources/*.{js,mjs,cjs,vue}"],+ {+ files: ['resources/*.{js,mjs,cjs,vue}'],},pluginJs.configs.recommended,- ...pluginVue.configs["flat/essential"],+ ...pluginVue.configs['flat/essential'],];diff --git a/package.json b/package.jsonindex a60ce469..e8633749 100755--- a/package.json+++ b/package.json@@ -5,7 +5,7 @@"dev": "vite","build": "vite build","lint": "eslint ./resources/js --ext .js,.vue --ignore-path .gitignore --fix src",- "format": "prettier . --write"+ "format": "prettier . --write ./resources/js/**/*.{js,ts,vue,json}"},"devDependencies": {"@eslint/js": "^9.7.0",diff --git a/postcss.config.js b/postcss.config.jsindex 2e7af2b7..49c0612d 100755--- a/postcss.config.js+++ b/postcss.config.js@@ -1,6 +1,6 @@export default {- plugins: {- tailwindcss: {},- autoprefixer: {},- },-}+ plugins: {+ tailwindcss: {},+ autoprefixer: {},+ },+};diff --git a/public/css/main.css b/public/css/main.cssindex b98a4c3b..a5bc5782 100755--- a/public/css/main.css+++ b/public/css/main.css@@ -68,7 +68,7 @@}.slider::before {- content: "";+ content: '';position: absolute;top: 6px;left: 6px;@@ -99,4 +99,4 @@/* .light{background: #f2f2f2;background-color: #e2e0e2;"-} */\ No newline at end of file+} */diff --git a/resources/css/app.css b/resources/css/app.cssindex d77416b6..dae5b42d 100755--- a/resources/css/app.css+++ b/resources/css/app.css@@ -3,16 +3,16 @@@tailwind utilities;@layer utilities {- input[type="number"]::-webkit-inner-spin-button,- input[type="number"]::-webkit-outer-spin-button {- -webkit-appearance: none;- margin: 0;+ input[type='number']::-webkit-inner-spin-button,+ input[type='number']::-webkit-outer-spin-button {+ -webkit-appearance: none;+ margin: 0;}-- input[type="number"] {- -moz-appearance: textfield;++ input[type='number'] {+ -moz-appearance: textfield;}- }+}@layer base {.toggle-switch {@@ -61,12 +61,13 @@transition: 0.3s;}- .checkbox:checked ~ .slider, .checkbox:checked ~ .sliderBase {+ .checkbox:checked ~ .slider,+ .checkbox:checked ~ .sliderBase {background-color: var(--light);}.slider::before {- content: "";+ content: '';position: absolute;top: 6px;left: 6px;@@ -81,7 +82,7 @@}.sliderBase::before {- content: "";+ content: '';position: absolute;top: 6px;left: 6px;@@ -95,7 +96,8 @@transition: 0.3s;}- .checkbox:checked ~ .slider::before, .checkbox:checked ~ .sliderBase::before {+ .checkbox:checked ~ .slider::before,+ .checkbox:checked ~ .sliderBase::before {-webkit-transform: translateX(30px);-ms-transform: translateX(30px);transform: translateX(30px);@@ -120,4 +122,4 @@box-shadow: 0 0 0px 1000px #8a8274c7 inset;background-color: #645c4cc7;} */-}\ No newline at end of file+}diff --git a/resources/js/App.vue b/resources/js/App.vueindex 81bf7096..40ed4c7f 100755--- a/resources/js/App.vue+++ b/resources/js/App.vue@@ -2,11 +2,10 @@import ToastController from './components/pinesUI/ToastController.vue';import { onMounted, watch } from 'vue';-import { RouterView } from 'vue-router'+import { RouterView } from 'vue-router';import { storeToRefs } from 'pinia';import { useAppStore } from './stores/AppStore';-const appStore = useAppStore();const { lightMode, ambientMode } = storeToRefs(appStore);const { toggleDarkMode, initDarkMode, initAmbientMode, setAmbientMode } = appStore;@@ -17,10 +16,10 @@ onMounted(async () => {});watch(() => ambientMode.value, setAmbientMode, { immediate: false });-watch(lightMode, toggleDarkMode, { immediate: false })+watch(lightMode, toggleDarkMode, { immediate: false });</script><template><ToastController /><RouterView />-</template>\ No newline at end of file+</template>diff --git a/resources/js/app.js b/resources/js/app.jsindex ca67fa1e..a8720391 100755--- a/resources/js/app.js+++ b/resources/js/app.js@@ -2,13 +2,13 @@ import './bootstrap';import { createApp } from 'vue';import { createPinia } from 'pinia';import ToastService from './service/toastService';-import router from './router'+import router from './router';import App from './App.vue';const application = createApp(App);-const pinia = createPinia()+const pinia = createPinia();application.use(router);application.use(pinia);application.use(ToastService);-application.mount('#app')\ No newline at end of file+application.mount('#app');diff --git a/resources/js/components/cards/FolderCard.vue b/resources/js/components/cards/FolderCard.vueindex 4eafa859..40595ebb 100755--- a/resources/js/components/cards/FolderCard.vue+++ b/resources/js/components/cards/FolderCard.vue@@ -7,28 +7,35 @@ import { RouterLink } from 'vue-router';import { ref } from 'vue';const props = defineProps(['folder', 'categoryName', 'stateFolderName']);-const folderLink = ref(`/${props.categoryName}/${props.folder.attributes.name}`)+const folderLink = ref(`/${props.categoryName}/${props.folder.attributes.name}`);</script><template>- <RouterLink :to="folderLink"- class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400">+ <RouterLink+ :to="folderLink"+ class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"+ ><section class="flex justify-between gap-4 w-full"><h2 class="text-xl w-full truncate" :title="props.folder.attributes.name">{{ props.folder.attributes.name }}</h2><div class="flex justify-end gap-1">- <ButtonCorner :positionClasses="'w-7 h-7'"+ <ButtonCorner+ :positionClasses="'w-7 h-7'":textClasses="'hover:text-neutral-900 dark:hover:text-violet-400'":colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'":label="'Share Folder'"- @click.stop.prevent="$emit('clickAction', folderLink)">+ @click.stop.prevent="$emit('clickAction', folderLink)"+ ><template #icon><CircumShare1 width="20" height="20" /></template></ButtonCorner>- <ButtonCorner :positionClasses="'w-7 h-7'"+ <ButtonCorner+ :positionClasses="'w-7 h-7'":textClasses="`${props.folder.attributes.name === props.stateFolderName ? 'text-violet-600' : 'hover:text-violet-600'} dark:hover:text-violet-500`"- :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'" :to="''"- :label="'Open Folder'">+ :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'"+ :to="''"+ :label="'Open Folder'"+ ><template #icon><CircumFolderOn width="20" height="20" /></template>@@ -36,7 +43,10 @@ const folderLink = ref(`/${props.categoryName}/${props.folder.attributes.name}`)</div></section><section class="flex flex-col sm:flex-row sm:justify-between w-full">- <h3 class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap" :title="`${props.folder.attributes.file_count} Episode${props.folder.attributes.file_count !== 1 ? 's' : ''}`">+ <h3+ class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap"+ :title="`${props.folder.attributes.file_count} Episode${props.folder.attributes.file_count !== 1 ? 's' : ''}`"+ >{{ props.folder.attributes.file_count }} Episode{{ props.folder.attributes.file_count !== 1 ? 's' : '' }}</h3><h3 class="truncate text-nowrap sm:text-right text-neutral-500 w-fit">@@ -44,4 +54,4 @@ const folderLink = ref(`/${props.categoryName}/${props.folder.attributes.name}`)</h3></section></RouterLink>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/cards/RecordCard.vue b/resources/js/components/cards/RecordCard.vueindex f881f102..9d826467 100755--- a/resources/js/components/cards/RecordCard.vue+++ b/resources/js/components/cards/RecordCard.vue@@ -5,38 +5,45 @@ import CircumPlay1 from '~icons/circum/play-1';import { toTimeSpan } from '../../service/util';import { computed } from 'vue';-+const props = defineProps(['record']);const rawDate = new Date(props.record.attributes.created_at.replace(' ', 'T'));const timeSpan = toTimeSpan(rawDate);const videoLink = computed(() => {- if(!props.record.relationships.video_id) return false;- return (`/${encodeURIComponent(props.record.relationships.category_name)}/${encodeURIComponent(props.record.relationships.folder_name)}?video=${props.record.relationships.video_id}`);-})+ if (!props.record.relationships.video_id) return false;+ return `/${encodeURIComponent(props.record.relationships.category_name)}/${encodeURIComponent(props.record.relationships.folder_name)}?video=${props.record.relationships.video_id}`;+});</script><template>--- <div- class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400">+ <div+ class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"+ ><section class="flex justify-between gap-4 w-full">- <h2 class="text-xl w-full truncate" :title=(props.record.relationships.video_name)>{{ props.record.relationships.video_name }}</h2>+ <h2 class="text-xl w-full truncate" :title="props.record.relationships.video_name">+ {{ props.record.relationships.video_name }}+ </h2><div class="flex justify-end gap-1">- <ButtonCorner :positionClasses="'w-7 h-7'"+ <ButtonCorner+ :positionClasses="'w-7 h-7'":textClasses="'hover:text-neutral-900 dark:hover:text-violet-400'":colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'":label="'Share Folder'"- @click.stop.prevent="$emit('clickAction', videoLink)">+ @click.stop.prevent="$emit('clickAction', videoLink)"+ ><template #icon><CircumShare1 width="20" height="20" /></template></ButtonCorner>- <ButtonCorner v-if="videoLink" :positionClasses="'w-7 h-7'"+ <ButtonCorner+ v-if="videoLink"+ :positionClasses="'w-7 h-7'":textClasses="`hover:text-violet-600 dark:hover:text-violet-500`"- :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'" :to="videoLink"- :label="'Watch Video'">+ :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'"+ :to="videoLink"+ :label="'Watch Video'"+ ><template #icon><CircumPlay1 width="20" height="20" /></template>@@ -54,13 +61,17 @@ const videoLink = computed(() => {{{ props.record.relationships.folder_name }} · {{ timeSpan }}</h3><h3 class="lg:hidden truncate sm:text-right text-neutral-500 w-full line-clamp-2">- {{+ {{`${rawDate.toLocaleDateString('en-ca', {- year: "numeric",- month: '2-digit', day: '2-digit', hour: '2-digit', hour12: false, minute: '2-digit'- })}`+ year: 'numeric',+ month: '2-digit',+ day: '2-digit',+ hour: '2-digit',+ hour12: false,+ minute: '2-digit',+ })}`}}</h3></section></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/cards/RecordCardDetails.vue b/resources/js/components/cards/RecordCardDetails.vueindex cf02af26..2ef7ff2c 100755--- a/resources/js/components/cards/RecordCardDetails.vue+++ b/resources/js/components/cards/RecordCardDetails.vue@@ -11,25 +11,34 @@ const rawDate = new Date(props.data.attributes.created_at.replace(' ', 'T'));const timeSpan = toTimeSpan(rawDate);const videoLink = computed(() => {- return (`/${encodeURIComponent(props.data.relationships.category_name)}/${encodeURIComponent(props.data.relationships.folder_name)}?video=${props.data.relationships.video_id}`);-})+ return `/${encodeURIComponent(props.data.relationships.category_name)}/${encodeURIComponent(props.data.relationships.folder_name)}?video=${props.data.relationships.video_id}`;+});</script><template>- <button @click.stop.prevent="$emit('clickAction')"- class="text-left relative flex flex-col gap-4 sm:flex-row flex-wrap rounded-xl dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-neutral-400">+ <button+ @click.stop.prevent="$emit('clickAction')"+ class="text-left relative flex flex-col gap-4 sm:flex-row flex-wrap rounded-xl dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-neutral-400"+ ><section class="flex justify-between gap-4 w-full"><h2 class="text-xl w-full truncate">{{ props.data.relationships.video_name }}</h2><div class="flex justify-end gap-1">- <ButtonCorner :positionClasses="'w-7 h-7'"+ <ButtonCorner+ :positionClasses="'w-7 h-7'":textClasses="'hover:text-violet-600 dark:hover:text-violet-500'"- :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'" :to="videoLink">+ :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'"+ :to="videoLink"+ ><template #icon>- <CircumPlay1 width="20" height="20"/>+ <CircumPlay1 width="20" height="20" /></template></ButtonCorner>- <ButtonCorner :positionClasses="'w-7 h-7'" :textClasses="'text-rose-700'"- :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'" @click.stop.prevent="$emit('clickAction')" />+ <ButtonCorner+ :positionClasses="'w-7 h-7'"+ :textClasses="'text-rose-700'"+ :colourClasses="'dark:hover:bg-neutral-800 hover:bg-gray-300'"+ @click.stop.prevent="$emit('clickAction')"+ /></div></section><section class="flex flex-col sm:flex-row sm:justify-between w-full">@@ -37,13 +46,17 @@ const videoLink = computed(() => {{{ props.data.relationships.folder_name }} · {{ timeSpan }}</h3><h3 class="truncate sm:text-right text-neutral-500 w-full line-clamp-2">- {{+ {{`${rawDate.toLocaleDateString('en-ca', {- year: "numeric",- month: '2-digit', day: '2-digit', hour: '2-digit', hour12: false, minute: '2-digit'- })}`+ year: 'numeric',+ month: '2-digit',+ day: '2-digit',+ hour: '2-digit',+ hour12: false,+ minute: '2-digit',+ })}`}}</h3></section></button>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/cards/VideoCard.vue b/resources/js/components/cards/VideoCard.vueindex c8af4a89..e5a657da 100755--- a/resources/js/components/cards/VideoCard.vue+++ b/resources/js/components/cards/VideoCard.vue@@ -9,21 +9,24 @@ const metaData = useMetaData({ ...props.data?.attributes, id: props.data.id, skiconst emit = defineEmits(['clickAction']);const handlePlay = () => {emit('clickAction', props.data?.id);-}+};const handlePropsUpdate = () => {metaData.updateData({ ...props.data?.attributes, id: props.data.id, skipBaseURL: true });-}+};watch(props, handlePropsUpdate, { immediate: true });</script><template>- <RouterLink :class="{ 'ring-violet-600/70 ring-[0.125rem]': (props?.currentID === props.data?.id) }"+ <RouterLink+ :class="{ 'ring-violet-600/70 ring-[0.125rem]': props?.currentID === props.data?.id }":to="metaData.fields.url"class="flex flex-wrap flex-col gap-x-8 gap-y-4 p-3 w-full shadow rounded-md ring-inset cursor-pointer dark:bg-primary-dark-800/70 dark:hover:bg-violet-700/70 bg-gray-100 hover:bg-violet-400/30 odd:bg-violet-100 dark:odd:bg-primary-dark-600"- :data-id="props.data?.id" :data-path="`../${props.data?.attributes.path}`"- @click.left.stop.prevent.capture="handlePlay">+ :data-id="props.data?.id"+ :data-path="`../${props.data?.attributes.path}`"+ @click.left.stop.prevent.capture="handlePlay"+ ><section class="flex justify-between gap-4 w-full items-start"><h3 class="w-full line-clamp-2 sm:line-clamp-1">{{ metaData?.fields?.title }}@@ -32,15 +35,14 @@ watch(props, handlePropsUpdate, { immediate: true });{{ metaData?.fields?.duration }}</h3></section>- <section- class="text-sm sm:text-base flex justify-between sm:w-auto items-center text-neutral-500 dark:text-neutral-400 gap-8">+ <section class="text-sm sm:text-base flex justify-between sm:w-auto items-center text-neutral-500 dark:text-neutral-400 gap-8"><h3 class="text-sm sm:text-base flex justify-end text-nowrap">{{ metaData?.fields?.views }}</h3>-+<h3 class="line-clamp-1 sm:min-w-40">{{ props.data?.attributes.date }}</h3></section></RouterLink>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/forms/EditFolder.vue b/resources/js/components/forms/EditFolder.vueindex 6208488d..080f7df7 100644--- a/resources/js/components/forms/EditFolder.vue+++ b/resources/js/components/forms/EditFolder.vue@@ -15,151 +15,150 @@ const props = defineProps(['folder']);const toast = useToast();--'title',-'description',-'studio',-'seasons',-'episodes',-'films',-'date_start',-'date_end',-'thumbnail_url',-'editor_id'+'title', 'description', 'studio', 'seasons', 'episodes', 'films', 'date_start', 'date_end', 'thumbnail_url', 'editor_id';const fields = reactive([- {- name: 'title',- text: 'Title',- type: 'text',- required: true,+ {+ name: 'title',+ text: 'Title',+ type: 'text',+ required: true,value: props.folder?.series?.title,default: props.folder?.series?.title,- max: 255+ max: 255,},- {- name: 'description',- text: 'Description',- type: 'textArea',+ {+ name: 'description',+ text: 'Description',+ type: 'textArea',value: props.folder?.series?.description,- default: ''+ default: '',},- {- name: 'studio',- text: 'Studio',- type: 'text',+ {+ name: 'studio',+ text: 'Studio',+ type: 'text',value: props.folder?.series?.studio,subtext: 'The producer studio',- default: ''+ default: '',},- {- name: 'episodes',- text: 'Episodes',- type: 'number',- value: props.folder?.series?.episodes ?? 1,+ {+ name: 'episodes',+ text: 'Episodes',+ type: 'number',+ value: props.folder?.series?.episodes ?? 1,subtext: 'The number of episodes in the series',default: 0,min: 0,},- {- name: 'seasons',- text: 'Seasons',- type: 'number',- value: props.folder?.series?.seasons ?? 1,+ {+ name: 'seasons',+ text: 'Seasons',+ type: 'number',+ value: props.folder?.series?.seasons ?? 1,subtext: 'The number of seasons in the series',default: 0,min: 0,},- {- name: 'films',- text: 'Films',- type: 'number',- value: props.folder?.series?.films ?? 1,+ {+ name: 'films',+ text: 'Films',+ type: 'number',+ value: props.folder?.series?.films ?? 1,subtext: 'The number of films in the series',default: 0,min: 0,},- {- name: 'date_start',- text: 'Start Date',- type: 'date',- value: props.folder?.series?.date_start,+ {+ name: 'date_start',+ text: 'Start Date',+ type: 'date',+ value: props.folder?.series?.date_start,subtext: 'The release date of the first video in the series',default: null,},- {- name: 'date_end',- text: 'End Date',- type: 'date',- value: props.folder?.series?.date_end,+ {+ name: 'date_end',+ text: 'End Date',+ type: 'date',+ value: props.folder?.series?.date_end,subtext: 'The release date of the last video in the series',default: null,},{- name: 'thumbnail_url',- text: 'Folder Thumbnail URL',- type: 'url',- value: props.folder?.series?.thumbnail_url,+ name: 'thumbnail_url',+ text: 'Folder Thumbnail URL',+ type: 'url',+ value: props.folder?.series?.thumbnail_url,subtext: 'A thumbnail associated with the series',default: null,- }+ },]);-const form = useForm({+const form = useForm({folder_id: props.folder.id,- title: props.folder?.series?.title ?? props.folder?.name,- description: props.folder?.series?.description ?? '',- studio: props.folder?.series?.studio ?? '',- episodes: props.folder?.series?.episodes ?? null,+ title: props.folder?.series?.title ?? props.folder?.name,+ description: props.folder?.series?.description ?? '',+ studio: props.folder?.series?.studio ?? '',+ episodes: props.folder?.series?.episodes ?? null,seasons: props.folder?.series?.seasons ?? null,films: props.folder?.series?.films ?? null,date_start: props.folder?.series?.date_start ?? null,date_end: props.folder?.series?.date_end ?? null,- thumbnail_url: props.folder?.series?.thumbnail_url ?? null+ thumbnail_url: props.folder?.series?.thumbnail_url ?? null,});const handleSubmit = async () => {form.submit(async (fields) => {- if(!props.folder?.series?.id){+ if (!props.folder?.series?.id) {return mediaAPI.createSeries(fields);}-+return mediaAPI.updateSeries(props.folder?.series?.id, fields);},{onSuccess: (response) => {emit('handleFinish', response?.data);- toast.add({ type: 'success', title:'Success', description:'Edit submitted!', life: 3000});+ toast.add({ type: 'success', title: 'Success', description: 'Edit submitted!', life: 3000 });},onError: () => {- toast.add({ type: 'danger', title:'Error', description:'Unable to update video details.', life: 3000});+ toast.add({ type: 'danger', title: 'Error', description: 'Unable to update video details.', life: 3000 });},- }- )-}+ },+ );+};</script><template><form class="flex flex-col sm:flex-row sm:justify-between flex-wrap gap-4" @submit.prevent="handleSubmit">- <div v-for="(field, index) in fields" :key="index" class='w-full' :class="field.class">-- <FormInputLabel :field="field"/>+ <div v-for="(field, index) in fields" :key="index" class="w-full" :class="field.class">+ <FormInputLabel :field="field" />- <FormTextArea v-if="field.type === 'textArea'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>- <DatePicker v-else-if="field.type === 'date'"/>- <FormInputNumber v-else-if="field.type === 'number'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>- <FormInput v-else v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>+ <FormTextArea v-if="field.type === 'textArea'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" />+ <DatePicker v-else-if="field.type === 'date'" />+ <FormInputNumber v-else-if="field.type === 'number'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" />+ <FormInput v-else v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" /><ul class="text-sm text-red-600 dark:text-red-400"><li v-for="(item, index) in form.errors[field.name]" :key="index">{{ item }}</li></ul></div><div class="relative flex flex-col-reverse sm:flex-row sm:justify-end gap-2 pt-1 w-full">- <button @click="$emit('handleFinish')" type="button"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'">Cancel</button>- <button @click="handleSubmit" type="button"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '">Submit Details</button>+ <button+ @click="$emit('handleFinish')"+ type="button"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'"+ >+ Cancel+ </button>+ <button+ @click="handleSubmit"+ type="button"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '"+ >+ Submit Details+ </button></div></form>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/forms/EditVideo.vue b/resources/js/components/forms/EditVideo.vueindex a809ebc6..ec2776ae 100755--- a/resources/js/components/forms/EditVideo.vue+++ b/resources/js/components/forms/EditVideo.vue@@ -16,112 +16,121 @@ const props = defineProps(['video']);const toast = useToast();const fields = reactive([- {- name: 'title',- text: 'Title',- type: 'text',- required: true,+ {+ name: 'title',+ text: 'Title',+ type: 'text',+ required: true,value: props.video?.attributes.title,default: props.video?.attributes.name,subtext: 'The intended title of the episode',- max: 255+ max: 255,},- {- name: 'description',- text: 'Description',- type: 'textArea',+ {+ name: 'description',+ text: 'Description',+ type: 'textArea',value: props.video?.attributes.description,- default: ''+ default: '',},- {- name: 'episode',- text: 'Episode',- type: 'number',- value: props.video?.attributes.episode ?? 1,+ {+ name: 'episode',+ text: 'Episode',+ type: 'number',+ value: props.video?.attributes.episode ?? 1,default: 0,min: 0,},- {- name: 'season',- text: 'Season',- type: 'number',- value: props.video?.attributes.season ?? 1,+ {+ name: 'season',+ text: 'Season',+ type: 'number',+ value: props.video?.attributes.season ?? 1,default: 0,min: 0,},- {- name: 'release_date',- text: 'Release Date',- type: 'date',- value: props.video?.attributes?.release_date ?? null,+ {+ name: 'release_date',+ text: 'Release Date',+ type: 'date',+ value: props.video?.attributes?.release_date ?? null,default: null,},- {- name: 'tags',- text: 'Tags',- type: 'text',+ {+ name: 'tags',+ text: 'Tags',+ type: 'text',value: props.video?.attributes.tags,default: props.video?.attributes.tags,subtext: 'Tags that describe the video',- max: 128+ max: 128,},]);-const form = useForm({- title: props.video?.attributes.title ?? props.video?.attributes.name,- description: props.video?.attributes.description ?? '',- episode: props.video?.attributes.episode ?? null,+const form = useForm({+ title: props.video?.attributes.title ?? props.video?.attributes.name,+ description: props.video?.attributes.description ?? '',+ episode: props.video?.attributes.episode ?? null,season: props.video?.attributes.season ?? null,date_released: props.video?.attributes.date_released ?? null,- tags: props.video?.attributes.tags ?? null+ tags: props.video?.attributes.tags ?? null,});const handleSubmit = async () => {form.submit(async (fields) => {console.log(props.video);-+// return mediaAPI.updateMetadata(props.video.relationships.metadata.id, fields);- if(props.video.relationships?.metadata?.id){+ if (props.video.relationships?.metadata?.id) {return mediaAPI.updateMetadata(props.video.relationships.metadata.id, fields);- }-- else return mediaAPI.createMetadata({...fields, video_id: props.video.id});+ } else return mediaAPI.createMetadata({ ...fields, video_id: props.video.id });},{onSuccess: (response) => {emit('handleFinish', response?.data);- toast.add({ type: 'success', title:'Success', description:'Edit submitted!', life: 3000});+ toast.add({ type: 'success', title: 'Success', description: 'Edit submitted!', life: 3000 });},onError: () => {- toast.add({ type: 'danger', title:'Error', description:'Unable to update video details.', life: 3000});+ toast.add({ type: 'danger', title: 'Error', description: 'Unable to update video details.', life: 3000 });},- }- )-}+ },+ );+};</script><template><form class="flex flex-col sm:flex-row sm:justify-between flex-wrap gap-4" @submit.prevent="handleSubmit">- <div v-for="(field, index) in fields" :key="index" class='w-full' :class="field.class">-- <FormInputLabel :field="field"/>+ <div v-for="(field, index) in fields" :key="index" class="w-full" :class="field.class">+ <FormInputLabel :field="field" />- <FormTextArea v-if="field.type === 'textArea'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>- <DatePicker v-else-if="field.type === 'date'" v-model="form.fields[field.name]"/>- <FormInputNumber v-else-if="field.type === 'number'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>- <FormInput v-else v-model="form.fields[field.name]" :field="field" :tabindex="index + 1"/>+ <FormTextArea v-if="field.type === 'textArea'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" />+ <DatePicker v-else-if="field.type === 'date'" v-model="form.fields[field.name]" />+ <FormInputNumber v-else-if="field.type === 'number'" v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" />+ <FormInput v-else v-model="form.fields[field.name]" :field="field" :tabindex="index + 1" /><ul class="text-sm text-red-600 dark:text-red-400"><li v-for="(item, index) in form.errors[field.name]" :key="index">{{ item }}</li></ul></div><div class="relative flex flex-col-reverse sm:flex-row sm:justify-end gap-2 pt-1 w-full">- <button @click="$emit('handleFinish')" type="button" tabindex="97"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'">Cancel</button>- <button @click="handleSubmit" type="button" tabindex="98"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '">Submit Details</button>+ <button+ @click="$emit('handleFinish')"+ type="button"+ tabindex="97"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'"+ >+ Cancel+ </button>+ <button+ @click="handleSubmit"+ type="button"+ tabindex="98"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '"+ >+ Submit Details+ </button></div></form>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/icons/IconDelete.vue b/resources/js/components/icons/IconDelete.vueindex c03c686e..2006caf1 100755--- a/resources/js/components/icons/IconDelete.vue+++ b/resources/js/components/icons/IconDelete.vue@@ -1,6 +1,5 @@<template>- <svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"- stroke="currentColor">+ <svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/ButtonCorner.vue b/resources/js/components/inputs/ButtonCorner.vueindex 4dfc9660..efcde37e 100755--- a/resources/js/components/inputs/ButtonCorner.vue+++ b/resources/js/components/inputs/ButtonCorner.vue@@ -4,18 +4,27 @@ const props = defineProps(['positionClasses', 'colourClasses', 'textClasses', 't</script><template>- <router-link v-if="props?.to" :aria-label="props?.label ?? 'Link'" :title="props?.label ?? 'Link'" :to="props?.to ?? '/'"+ <router-link+ v-if="props?.to"+ :aria-label="props?.label ?? 'Link'"+ :title="props?.label ?? 'Link'"+ :to="props?.to ?? '/'"class="flex items-center justify-center rounded-full"- :class="`${props?.positionClasses ?? 'absolute top-0 right-0 w-8 h-8 mt-5 mr-5'} ${props?.colourClasses ?? 'hover:bg-gray-50 hover:dark:bg-gray-700'} ${ props?.textClasses ?? 'text-gray-600 dark:text-gray-400 hover:text-gray-800 hover:dark:text-gray-200'}`">+ :class="`${props?.positionClasses ?? 'absolute top-0 right-0 w-8 h-8 mt-5 mr-5'} ${props?.colourClasses ?? 'hover:bg-gray-50 hover:dark:bg-gray-700'} ${props?.textClasses ?? 'text-gray-600 dark:text-gray-400 hover:text-gray-800 hover:dark:text-gray-200'}`"+ ><slot name="icon">- <IconDelete/>+ <IconDelete /></slot></router-link>- <button v-else :aria-label="props?.label ?? 'Close Modal'" :title="props?.label ?? 'Close Modal'"+ <button+ v-else+ :aria-label="props?.label ?? 'Close Modal'"+ :title="props?.label ?? 'Close Modal'"class="flex items-center justify-center rounded-full"- :class="`${props?.positionClasses ?? 'absolute top-0 right-0 w-8 h-8 mt-5 mr-5'} ${props?.colourClasses ?? 'hover:bg-gray-50 hover:dark:bg-gray-700'} ${ props?.textClasses ?? 'text-gray-600 dark:text-gray-400 hover:text-gray-800 hover:dark:text-gray-200'}`">+ :class="`${props?.positionClasses ?? 'absolute top-0 right-0 w-8 h-8 mt-5 mr-5'} ${props?.colourClasses ?? 'hover:bg-gray-50 hover:dark:bg-gray-700'} ${props?.textClasses ?? 'text-gray-600 dark:text-gray-400 hover:text-gray-800 hover:dark:text-gray-200'}`"+ ><slot name="icon">- <IconDelete/>+ <IconDelete /></slot></button>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/ButtonIcon.vue b/resources/js/components/inputs/ButtonIcon.vueindex e2b3dfbf..9501a69d 100755--- a/resources/js/components/inputs/ButtonIcon.vue+++ b/resources/js/components/inputs/ButtonIcon.vue@@ -1,6 +1,7 @@<template>- <button class="p-2 flex items-center justify-center h-10 w-10 shadow-sm rounded-md cursor-pointer focus:outline-none ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 hover:ring-violet-400 hover:dark:ring-violet-700 text-gray-900 dark:text-neutral-100 bg-white dark:bg-primary-dark-800">- <slot name="icon">- </slot>+ <button+ class="p-2 flex items-center justify-center h-10 w-10 shadow-sm rounded-md cursor-pointer focus:outline-none ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 hover:ring-violet-400 hover:dark:ring-violet-700 text-gray-900 dark:text-neutral-100 bg-white dark:bg-primary-dark-800"+ >+ <slot name="icon"> </slot></button>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/ButtonText.vue b/resources/js/components/inputs/ButtonText.vueindex dc419293..f1241b93 100755--- a/resources/js/components/inputs/ButtonText.vue+++ b/resources/js/components/inputs/ButtonText.vue@@ -1,6 +1,7 @@<template>- <button class="p-2 flex items-center justify-center h-full shadow-sm rounded-md focus:outline-none cursor-pointer ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 hover:ring-violet-400 hover:dark:ring-violet-700 text-gray-900 dark:text-neutral-100 bg-white dark:bg-primary-dark-800">- <slot name="text">- </slot>+ <button+ class="p-2 flex items-center justify-center h-full shadow-sm rounded-md focus:outline-none cursor-pointer ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 hover:ring-violet-400 hover:dark:ring-violet-700 text-gray-900 dark:text-neutral-100 bg-white dark:bg-primary-dark-800"+ >+ <slot name="text"> </slot></button>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/FormInput.vue b/resources/js/components/inputs/FormInput.vueindex 51c41da3..71746f27 100755--- a/resources/js/components/inputs/FormInput.vue+++ b/resources/js/components/inputs/FormInput.vue@@ -4,22 +4,24 @@ const model = defineModel();</script><template>- <input- :class="'rounded-md shadow-sm block mt-1 w-full ' ++ <input+ :class="+ 'rounded-md shadow-sm block mt-1 w-full ' +'focus:outline-none border-none ' +'disabled:cursor-not-allowed disabled:opacity-50 ' +'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' +'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' +- 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'"- :name="field.name"+ 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'+ "+ :name="field.name":title="field.name"- :type="field.type"+ :type="field.type":required="field.required":placeholder="field.placeholder"- :autocomplete="field.autocomplete"+ :autocomplete="field.autocomplete":aria-autocomplete="field.autocomplete ? 'list' : 'none'":min="field.min ?? ''":max="field.max ?? ''"v-model="model"- >-</template>\ No newline at end of file+ />+</template>diff --git a/resources/js/components/inputs/FormInputNumber.vue b/resources/js/components/inputs/FormInputNumber.vueindex b2f54a29..47658b1a 100644--- a/resources/js/components/inputs/FormInputNumber.vue+++ b/resources/js/components/inputs/FormInputNumber.vue@@ -8,49 +8,57 @@ const model = defineModel();const incrementNumber = () => {if (model.value === field?.max) return;model.value++;-}+};const decrementNumber = () => {if (model.value === field?.min) return;if (!model.value) {- model.value = 0;+ model.value = 0;return;}model.value--;-}+};</script><template><span class="inline-flex relative w-full mt-1">- <input :class="'rounded-md shadow-sm block w-full pe-12' +- 'focus:outline-none border-none ' +- 'disabled:cursor-not-allowed disabled:opacity-50 ' +- 'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' +- 'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' +- 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'"+ <input+ :class="+ 'rounded-md shadow-sm block w-full pe-12' ++ 'focus:outline-none border-none ' ++ 'disabled:cursor-not-allowed disabled:opacity-50 ' ++ 'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' ++ 'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' ++ 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'+ ":name="field.name"- :title="field.name"- type="number"- :required="field.required"+ :title="field.name"+ type="number"+ :required="field.required":placeholder="field.placeholder"- :aria-autocomplete="field.autocomplete ? 'list' : 'none'"- :min="field.min ?? ''"+ :aria-autocomplete="field.autocomplete ? 'list' : 'none'"+ :min="field.min ?? ''":max="field.max ?? ''"- :tabindex="tabindex ?? 0"- v-model="model">+ :tabindex="tabindex ?? 0"+ v-model="model"+ /><span class="absolute top-0 right-0 h-full flex flex-col w-12">- <button @click.prevent.stop="incrementNumber" :tabindex="tabindex ?? 0"- class="h-1/2 items-center justify-center flex hover:bg-neutral-200/50 hover:dark:bg-neutral-600 rounded-tr-md ring-inset focus:outline-none focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500"- :title="'Increment ' + field.name">- <LucideChevronUp width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"- class="w-4 h-4" />+ <button+ @click.prevent.stop="incrementNumber"+ :tabindex="tabindex ?? 0"+ class="h-1/2 items-center justify-center flex hover:bg-neutral-200/50 hover:dark:bg-neutral-600 rounded-tr-md ring-inset focus:outline-none focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500"+ :title="'Increment ' + field.name"+ >+ <LucideChevronUp width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" class="w-4 h-4" /></button>- <button @click.prevent.stop="decrementNumber" :tabindex="tabindex ?? 0"+ <button+ @click.prevent.stop="decrementNumber"+ :tabindex="tabindex ?? 0"class="h-1/2 items-center justify-center flex hover:bg-neutral-200/50 hover:dark:bg-neutral-600 rounded-br-md ring-inset focus:outline-none focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500"- :title="'Decrement ' + field.name">- <LucideChevronDown width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"- class="w-4 h-4" />+ :title="'Decrement ' + field.name"+ >+ <LucideChevronDown width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" class="w-4 h-4" /></button></span></span>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/FormTextArea.vue b/resources/js/components/inputs/FormTextArea.vueindex bfe34506..02fc6351 100755--- a/resources/js/components/inputs/FormTextArea.vue+++ b/resources/js/components/inputs/FormTextArea.vue@@ -3,28 +3,32 @@ import { ref } from 'vue';const { field, tabindex } = defineProps(['field', 'tabindex']);const model = defineModel();-const $el = ref(null)+const $el = ref(null);-const resize = () => {- $el.value.style.height = '0px';- $el.value.style.height = $el.value.scrollHeight + 'px'-}+const resize = () => {+ $el.value.style.height = '0px';+ $el.value.style.height = $el.value.scrollHeight + 'px';+};</script><template><div class="block mt-1 w-full">- <textarea @input="resize()" type="text" ref="$el"+ <textarea+ @input="resize()"+ type="text"+ ref="$el":class="`flex w-full h-auto min-h-[80px] px-3 py-2 text-sm rounded-md focus:outline-none border-nonedisabled:cursor-not-allowed disabled:opacity-50text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500`"- :name="field.name"+ :name="field.name":title="field.name":required="field.required":placeholder="field.placeholder ?? 'Type your message here. I will resize based on the height content.'":tabindex="tabindex ?? 0"- v-model="model">+ v-model="model"+ ></textarea></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/NavButton.vue b/resources/js/components/inputs/NavButton.vueindex 5ef419d5..ca89699a 100755--- a/resources/js/components/inputs/NavButton.vue+++ b/resources/js/components/inputs/NavButton.vue@@ -1,14 +1,16 @@<script setup>import { ref } from 'vue';-const props = defineProps(['label', 'colour','active'])-const activeColour = ref(`ring ring-inset ring-[0.1rem] dark:ring-0 ring-violet-500 dark:bg-violet-600/60 bg-white`) ;+const props = defineProps(['label', 'colour', 'active']);+const activeColour = ref(`ring ring-inset ring-[0.1rem] dark:ring-0 ring-violet-500 dark:bg-violet-600/60 bg-white`);</script><template>- <button :id="'btn-nav-' + props.label"+ <button+ :id="'btn-nav-' + props.label":class="`${props.active ? activeColour : `bg-neutral-100 dark:bg-primary-dark-800 hover:bg-neutral-200 hover:dark:bg-violet-600/60 `} dark:text-neutral-200 flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg`"- :aria-label="props.label">+ :aria-label="props.label"+ ><slot name="icon"></slot><span :class="`hidden ${activeColour}`"></span></button>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/NavLink.vue b/resources/js/components/inputs/NavLink.vueindex 0b38e313..3d78cc44 100755--- a/resources/js/components/inputs/NavLink.vue+++ b/resources/js/components/inputs/NavLink.vue@@ -1,14 +1,16 @@<script setup>import { RouterLink } from 'vue-router';-const props = defineProps(['label', 'colour', 'URL', 'active'])-const activeColour = `bg-neutral-300 dark:bg-violet-600/60` ;+const props = defineProps(['label', 'colour', 'URL', 'active']);+const activeColour = `bg-neutral-300 dark:bg-violet-600/60`;</script><template>- <router-link :id="'btn-nav-' + props.label"- :to="props.URL"- :class="`${props.active ? activeColour : 'bg-neutral-100 dark:bg-primary-dark-800 hover:bg-neutral-200 hover:dark:bg-violet-600/60'} dark:text-neutral-200 flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg`" :aria-label="props.label">+ <router-link+ :id="'btn-nav-' + props.label"+ :to="props.URL"+ :class="`${props.active ? activeColour : 'bg-neutral-100 dark:bg-primary-dark-800 hover:bg-neutral-200 hover:dark:bg-violet-600/60'} dark:text-neutral-200 flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg`"+ :aria-label="props.label"+ ><slot name="icon"></slot></router-link></template>-diff --git a/resources/js/components/inputs/TextInputLabelled.vue b/resources/js/components/inputs/TextInputLabelled.vueindex c899752d..fc924085 100755--- a/resources/js/components/inputs/TextInputLabelled.vue+++ b/resources/js/components/inputs/TextInputLabelled.vue@@ -2,19 +2,23 @@import FormInputLabel from '../labels/FormInputLabel.vue';const model = defineModel();-const { text, placeholder, id } = defineProps(['text', 'placeholder', 'id'])+const { text, placeholder, id } = defineProps(['text', 'placeholder', 'id']);</script><template><div class="flex flex-col justify-center gap-2 text-sm">- <FormInputLabel :field="{name: id, text}"/>- <input type="text" v-model="model" :name="id" :id="id" :placeholder="placeholder"- :class="`h-10 p-2 shadow-sm rounded-md w-full text-sm+ <FormInputLabel :field="{ name: id, text }" />+ <input+ type="text"+ v-model="model"+ :name="id"+ :id="id"+ :placeholder="placeholder"+ :class="`h-10 p-2 shadow-sm rounded-md w-full text-smborder-none outline-nonedisabled:cursor-not-allowed disabled:opacity-50text-gray-900 dark:text-neutral-100 bg-white dark:bg-primary-dark-800 placeholder:text-neutral-400ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700hocus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 hover:ring-violet-400 hover:dark:ring-violet-700`"- >-+ /></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/ToggleBase.vue b/resources/js/components/inputs/ToggleBase.vueindex 36129655..5ce4fb57 100755--- a/resources/js/components/inputs/ToggleBase.vue+++ b/resources/js/components/inputs/ToggleBase.vue@@ -1,13 +1,13 @@<script setup>const model = defineModel();-const {name} = defineProps(['name']);+const { name } = defineProps(['name']);</script><template><section class="toggle-switch shrink-0 flex flex-col"><label class="switch-label" :for="name">- <input type="checkbox" class="checkbox invisible text-white" :name="name" v-model="model" v-bind:checked="model" >+ <input type="checkbox" class="checkbox invisible text-white" :name="name" v-model="model" v-bind:checked="model" /><span class="sliderBase"></span></label></section>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/inputs/ToggleLightMode.vue b/resources/js/components/inputs/ToggleLightMode.vueindex 84b12515..29d50c91 100755--- a/resources/js/components/inputs/ToggleLightMode.vue+++ b/resources/js/components/inputs/ToggleLightMode.vue@@ -7,10 +7,17 @@ const { lightMode } = storeToRefs(appStore);</script><template>- <section class="toggle-switch shrink-0 flex flex-col" title="Toggle Light Mode" >+ <section class="toggle-switch shrink-0 flex flex-col" title="Toggle Light Mode"><label class="switch-label" for="light-mode-toggle">- <input type="checkbox" class="checkbox invisible text-white" id="light-mode-toggle" name="light-mode-toggle" v-model="lightMode" v-bind:checked="lightMode" >+ <input+ type="checkbox"+ class="checkbox invisible text-white"+ id="light-mode-toggle"+ name="light-mode-toggle"+ v-model="lightMode"+ v-bind:checked="lightMode"+ /><span class="slider"></span></label></section>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/labels/FormInputLabel.vue b/resources/js/components/labels/FormInputLabel.vueindex 32f3aaa6..70574a98 100755--- a/resources/js/components/labels/FormInputLabel.vue+++ b/resources/js/components/labels/FormInputLabel.vue@@ -3,8 +3,12 @@ const { field, textSize } = defineProps(['field', 'textSize']);</script><template>- <label class="block font-medium text-gray-700 dark:text-neutral-200" :for="field?.name" :class="{textSize : textSize, 'text-sm': !textSize}">+ <label+ class="block font-medium text-gray-700 dark:text-neutral-200"+ :for="field?.name"+ :class="{ textSize: textSize, 'text-sm': !textSize }"+ >{{ field?.text }}</label><p v-if="field?.subtext" class="text-sm/6 text-gray-500 dark:text-gray-400">{{ field.subtext }}</p>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/panels/HistoryPanel.vue b/resources/js/components/panels/HistoryPanel.vueindex 899ff9c0..10d83f9c 100755--- a/resources/js/components/panels/HistoryPanel.vue+++ b/resources/js/components/panels/HistoryPanel.vue@@ -1,3 +1,3 @@<template>- <section id="content-history" class=" space-y-2 cursor-pointer min-h-[80vh] pt-8"></section>-</template>\ No newline at end of file+ <section id="content-history" class="space-y-2 cursor-pointer min-h-[80vh] pt-8"></section>+</template>diff --git a/resources/js/components/panels/NavBar.vue b/resources/js/components/panels/NavBar.vueindex 1e5a3a46..cb9b3236 100755--- a/resources/js/components/panels/NavBar.vue+++ b/resources/js/components/panels/NavBar.vue@@ -11,10 +11,9 @@ import CircumInboxIn from '~icons/circum/inbox-in';import { ref, onMounted, watch } from 'vue';import { storeToRefs } from 'pinia';-import { useAuthStore } from '../../stores/AuthStore'+import { useAuthStore } from '../../stores/AuthStore';import { useAppStore } from '../../stores/AppStore';-const appStore = useAppStore();const authStore = useAuthStore();const { pageTitle, selectedSideBar } = storeToRefs(appStore);@@ -23,16 +22,15 @@ const { cycleSideBar } = appStore;const { auth } = authStore;const showDropdown = ref(false);-const username = ref('')-+const username = ref('');const toggleDropdown = () => {showDropdown.value = !showDropdown.value;-}+};window.addEventListener('click', function (e) {try {- if (!this.document.querySelector("#user-options")?.contains(e.target)) {+ if (!this.document.querySelector('#user-options')?.contains(e.target)) {showDropdown.value = false;}} catch (error) {@@ -42,11 +40,11 @@ window.addEventListener('click', function (e) {const handleAuthEvent = (newUserData) => {username.value = newUserData?.name ?? '';-}+};onMounted(async () => {- if (await auth()) handleAuthEvent(userData.value)-})+ if (await auth()) handleAuthEvent(userData.value);+});watch(userData, handleAuthEvent, { immediate: false });</script>@@ -57,41 +55,63 @@ watch(userData, handleAuthEvent, { immediate: false });<span class="flex items-end sm:items-center gap-2 justify-between w-full"><h1 id="title" class="text-2xl line-clamp-2 sm:line-clamp-1 capitalize">{{ pageTitle }}</h1>- <section id="user-options" class="group inline-block relative shrink-0" data-dropdown-toggle="user-dropdown"- aria-haspopup="true">- <button id="user-header"+ <section+ id="user-options"+ class="group inline-block relative shrink-0"+ data-dropdown-toggle="user-dropdown"+ aria-haspopup="true"+ >+ <button+ id="user-header"class="flex gap-2 text-2xl text-slate-900 dark:text-white hover:text-violet-500 dark:hover:text-violet-500 items-center justify-center capitalize"- @click="toggleDropdown">-+ @click="toggleDropdown"+ ><span id="user-name" class="hidden sm:block" v-if="username">{{ username }}</span><span id="user-name-unauth" v-else class="text-right hidden sm:block">Guest</span>- <img :src="userData?.value?.avatar ?? '/storage/avatars/12345.jpg'"+ <img+ :src="userData?.value?.avatar ?? '/storage/avatars/12345.jpg'"class="h-7 w-7 rounded-full ring-2 ring-violet-600/60 object-cover aspect-square"- alt="profile picture">+ alt="profile picture"+ /></button>- <DropdownMenu :dropdownOpen="showDropdown" @toggleDropdown="dropdownOpen = false"/>+ <DropdownMenu :dropdownOpen="showDropdown" @toggleDropdown="dropdownOpen = false" /></section></span>- <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-1 sm:shrink-0 justify-end sm:justify-normal w-full sm:w-auto">+ <span+ class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-1 sm:shrink-0 justify-end sm:justify-normal w-full sm:w-auto"+ ><section id="navbar-video" class="flex items-center gap-1 text-slate-900 antialiased"><NavButton v-if="username" @click="cycleSideBar('notifications')" :label="'notifications'" class="hidden"><template #icon><CircumInboxIn height="24" width="24" /></template></NavButton>- <NavButton v-if="$route.name === 'home'" @click="cycleSideBar('folders')" :label="'folders'" :active="selectedSideBar === 'folders'">+ <NavButton+ v-if="$route.name === 'home'"+ @click="cycleSideBar('folders')"+ :label="'folders'"+ :active="selectedSideBar === 'folders'"+ ><template #icon><CircumFolderOn height="24" width="24" /></template></NavButton>- <NavButton v-if="username && $route.name === 'home'" @click="cycleSideBar('history')"- :label="'history'" :active="selectedSideBar === 'history'">+ <NavButton+ v-if="username && $route.name === 'home'"+ @click="cycleSideBar('history')"+ :label="'history'"+ :active="selectedSideBar === 'history'"+ ><template #icon><MaterialSymbolsLightHistory height="24" width="24" /></template></NavButton>- <NavLink v-if="$route.name === 'history' || $route.name === 'settings' || $route.name === 'profile'" :label="'home'" :URL="'/'">+ <NavLink+ v-if="$route.name === 'history' || $route.name === 'settings' || $route.name === 'profile'"+ :label="'home'"+ :URL="'/'"+ ><template #icon><CircumMonitor height="24" width="24" /></template>@@ -102,4 +122,4 @@ watch(userData, handleAuthEvent, { immediate: false });</div><hr class="mt-2" /></nav>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/panels/VideoSidebar.vue b/resources/js/components/panels/VideoSidebar.vueindex 6f1131ca..02fdae2c 100755--- a/resources/js/components/panels/VideoSidebar.vue+++ b/resources/js/components/panels/VideoSidebar.vue@@ -20,11 +20,11 @@ const { selectedSideBar } = storeToRefs(appStore);const { folders, records, stateDirectory, stateFolder } = storeToRefs(contentStore);const handleShare = (link) => {- if(!link || link[0] !=='/') return;+ if (!link || link[0] !== '/') return;shareLink.value = window.location.origin + link;shareModal.toggleModal(true);-}+};</script><template>@@ -32,22 +32,27 @@ const handleShare = (link) => {<h1 id="sidebar-title" class="text-2xl w-full capitalize dark:text-white">{{ selectedSideBar }}</h1></div>- <hr class="mt-2 mb-3">+ <hr class="mt-2 mb-3" /><section v-if="selectedSideBar === 'folders'" id="list-content-folders" class="flex space-y-2 flex-wrap">- <FolderCard v-for="folder in folders" :key="folder.id" :folder="folder" :categoryName="stateDirectory.name" :stateFolderName="stateFolder?.name" @clickAction="handleShare"/>+ <FolderCard+ v-for="folder in folders"+ :key="folder.id"+ :folder="folder"+ :categoryName="stateDirectory.name"+ :stateFolderName="stateFolder?.name"+ @clickAction="handleShare"+ /></section><section v-if="selectedSideBar === 'history'" id="list-content-history" class="flex space-y-2 flex-wrap">- <RecordCard v-for="record in records.slice(0, 10)" :key="record.id" :record="record"/>+ <RecordCard v-for="record in records.slice(0, 10)" :key="record.id" :record="record" /><RouterLink to="/history" class="text-center text-sm dark:text-neutral-400 mx-auto p-3 hover:underline">View More</RouterLink></section><ModalBase :modalData="shareModal"><template #content>- <div class="py-3">- Copy link to clipboard to share it.- </div>+ <div class="py-3">Copy link to clipboard to share it.</div></template><template #controls><ButtonClipboard :text="shareLink" /></template></ModalBase>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/ButtonClipboard.vue b/resources/js/components/pinesUI/ButtonClipboard.vueindex 3fb1f2df..f81fb1c6 100755--- a/resources/js/components/pinesUI/ButtonClipboard.vue+++ b/resources/js/components/pinesUI/ButtonClipboard.vue@@ -1,29 +1,30 @@<script setup>import useClipboard from '../../composables/useClipboard';-import ButtonIcon from '../inputs/ButtonIcon.vue'+import ButtonIcon from '../inputs/ButtonIcon.vue';const props = defineProps(['text', 'tabindex']);-const clipboard = useClipboard(props.text)+const clipboard = useClipboard(props.text);</script><template><div class="flex justify-between gap-4">- <input :value="props.text" disabled- class="h-8 w-full rounded-md shadow-sm block p-2- border-none outline-none- text-gray-900 dark:text-gray-300 bg-white dark:bg-neutral-700 placeholder:text-neutral-400- ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700"- >- <div class="relative z-20 flex items-center ">- <Transition+ <input+ :value="props.text"+ disabled+ class="h-8 w-full rounded-md shadow-sm block p-2 border-none outline-none text-gray-900 dark:text-gray-300 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700"+ />+ <div class="relative z-20 flex items-center">+ <Transitionenter-active-class="transition ease-out duration-300"enter-from-class="opacity-0 translate-x-2"enter-to-class="opacity-100 translate-x-0"leave-active-class="transition ease-in duration-300"leave-from-class="opacity-100 translate-x-0"- leave-to-class="opacity-0 translate-x-2">- <div v-if="clipboard.copyNotification"- class="absolute left-0" v-cloak>- <div class="px-3 h-7 -ml-1.5 items-center flex text-xs bg-green-500 border-r border-green-500 -translate-x-full text-white rounded">+ leave-to-class="opacity-0 translate-x-2"+ >+ <div v-if="clipboard.copyNotification" class="absolute left-0" v-cloak>+ <div+ class="px-3 h-7 -ml-1.5 items-center flex text-xs bg-green-500 border-r border-green-500 -translate-x-full text-white rounded"+ ><span>Copied!</span><div class="absolute right-0 inline-block h-full -mt-px overflow-hidden translate-x-3 -translate-y-2 top-1/2"><div class="w-3 h-3 origin-top-left transform rotate-45 bg-green-500 border border-transparent"></div>@@ -31,26 +32,49 @@ const clipboard = useClipboard(props.text)</div></div></Transition>- <ButtonIcon @click="clipboard.copyToClipboard();" :tabindex="props.tabindex ?? 1" class="flex items-center justify-center h-8 w-9 text-xs group text-neutral-500 hover:text-neutral-600 dark:text-gray-300 dark:hover:text-gray-400 hover:bg-neutral-100 focus:!ring-green-600/50">+ <ButtonIcon+ @click="clipboard.copyToClipboard()"+ :tabindex="props.tabindex ?? 1"+ class="flex items-center justify-center h-8 w-9 text-xs group text-neutral-500 hover:text-neutral-600 dark:text-gray-300 dark:hover:text-gray-400 hover:bg-neutral-100 focus:!ring-green-600/50"+ ><template #icon>- <svg v-if="clipboard.copyNotification" class="w-4 h-4 text-green-500 stroke-current"- xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"- stroke="currentColor" x-cloak>+ <svg+ v-if="clipboard.copyNotification"+ class="w-4 h-4 text-green-500 stroke-current"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ stroke-width="1.5"+ stroke="currentColor"+ x-cloak+ ><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5" /></svg>- <svg v-if="!clipboard.copyNotification" class="w-4 h-4 stroke-current" viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg">+ <svg+ v-if="!clipboard.copyNotification"+ class="w-4 h-4 stroke-current"+ viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"+ ><g fill="none" stroke="none">- <path d="M7.75 7.757V6.75a3 3 0 0 1 3-3h6.5a3 3 0 0 1 3 3v6.5a3 3 0 0 1-3 3h-.992"- stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">- </path>- <path d="M3.75 10.75a3 3 0 0 1 3-3h6.5a3 3 0 0 1 3 3v6.5a3 3 0 0 1-3 3h-6.5a3 3 0 0 1-3-3v-6.5z"- stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">- </path>+ <path+ d="M7.75 7.757V6.75a3 3 0 0 1 3-3h6.5a3 3 0 0 1 3 3v6.5a3 3 0 0 1-3 3h-.992"+ stroke="currentColor"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ ></path>+ <path+ d="M3.75 10.75a3 3 0 0 1 3-3h6.5a3 3 0 0 1 3 3v6.5a3 3 0 0 1-3 3h-6.5a3 3 0 0 1-3-3v-6.5z"+ stroke="currentColor"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ ></path></g></svg></template></ButtonIcon></div></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/DatePicker.vue b/resources/js/components/pinesUI/DatePicker.vueindex 91abd99e..d14283b1 100644--- a/resources/js/components/pinesUI/DatePicker.vue+++ b/resources/js/components/pinesUI/DatePicker.vue@@ -4,42 +4,69 @@ import useDatePicker from '../../composables/useDatePicker';import { ref, watch } from 'vue';import { OnClickOutside } from '@vueuse/components';-const {field, tabindex} = defineProps(['field', 'tabindex'])+const { field, tabindex } = defineProps(['field', 'tabindex']);-const model = defineModel()+const model = defineModel();const datePickerInput = ref(null);const datePickerCalendar = ref(null);const datePicker = useDatePicker({ model: model }, { datePickerInput, datePickerCalendar });-watch(datePickerInput, () => { datePicker.datePickerInput = datePickerInput; }, { immediate: true })-watch(datePickerCalendar, () => { datePicker.selectableItemsList = datePickerCalendar; }, { immediate: true })+watch(+ datePickerInput,+ () => {+ datePicker.datePickerInput = datePickerInput;+ },+ { immediate: true },+);+watch(+ datePickerCalendar,+ () => {+ datePicker.selectableItemsList = datePickerCalendar;+ },+ { immediate: true },+);</script><template><OnClickOutside class="relative z-30" @trigger="datePicker.toggleDatePicker(false)">- <input ref="datePickerInput"- :class="'h-10 px-3 py-2 rounded-md shadow-sm block mt-1 w-full ' ++ <input+ ref="datePickerInput"+ :class="+ 'h-10 px-3 py-2 rounded-md shadow-sm block mt-1 w-full ' +'focus:outline-none border-none ' +'disabled:cursor-not-allowed disabled:opacity-50 ' +'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' +'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' +- 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'"+ 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500'+ "@click="datePicker.toggleDatePicker()"@keydown.esc="datePicker.toggleDatePicker(false)":name="field?.name"- :title="field?.name"- type="text"- :required="field?.required"+ :title="field?.name"+ type="text"+ :required="field?.required":placeholder="field?.placeholder ?? 'Select Date'"- :aria-autocomplete="field?.autocomplete ? 'list' : 'none'"- :tabindex="tabindex ?? 0"- v-model="model"- readonly />- <div @click="datePicker.toggleDatePicker(); if (datePicker.datePickerOpen) { datePickerInput.focus() }"- class="absolute top-0 right-0 px-3 py-2 cursor-pointer text-neutral-400 hover:text-neutral-500">+ :aria-autocomplete="field?.autocomplete ? 'list' : 'none'"+ :tabindex="tabindex ?? 0"+ v-model="model"+ readonly+ />+ <div+ @click="+ datePicker.toggleDatePicker();+ if (datePicker.datePickerOpen) {+ datePickerInput.focus();+ }+ "+ class="absolute top-0 right-0 px-3 py-2 cursor-pointer text-neutral-400 hover:text-neutral-500"+ ><svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"- d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"+ /></svg></div><Transition@@ -49,16 +76,21 @@ watch(datePickerCalendar, () => { datePicker.selectableItemsList = datePickerCalleave-from-class="opacity-1 scale-100"leave-active-class="opacity-0 transform scale-95 duration-75 ease-in-out"leave-to-class="opacity-0 scale-95"+ >+ <div+ v-if="datePicker.datePickerOpen"+ :class="+ 'absolute left-0 rounded-md shadow-sm ' ++ 'p-4 antialiased max-w-[17rem] w-full' ++ 'focus:outline-none border shadow border-neutral-200/70 dark:border-neutral-600 ' ++ 'disabled:cursor-not-allowed disabled:opacity-50 ' ++ 'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' ++ 'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' ++ 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 ' ++ `${datePicker.datePickerPosition === 'top' ? 'bottom-0 mb-12' : 'top-0 mt-12'}`+ "+ ref="datePickerCalendar">- <div v-if="datePicker.datePickerOpen" :class="'absolute left-0 rounded-md shadow-sm ' +- 'p-4 antialiased max-w-[17rem] w-full' +- 'focus:outline-none border shadow border-neutral-200/70 dark:border-neutral-600 ' +- 'disabled:cursor-not-allowed disabled:opacity-50 ' +- 'text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-700 placeholder:text-neutral-400 ' +- 'ring-inset focus:ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 ' +- 'focus:ring-[0.125rem] focus:ring-indigo-400 dark:focus:ring-indigo-500 ' +- `${datePicker.datePickerPosition === 'top' ? 'bottom-0 mb-12' : 'top-0 mt-12'}`"- ref="datePickerCalendar"><div class="flex items-center justify-between mb-2"><div><span class="text-lg font-bold dark:text-neutral-100">@@ -69,20 +101,32 @@ watch(datePickerCalendar, () => { datePicker.selectableItemsList = datePickerCal</span></div><div>- <button @click="datePicker.datePickerPreviousMonth()" type="button"- class="inline-flex p-1 transition duration-100 ease-in-out rounded-full cursor-pointer focus:outline-none focus:shadow-outline hover:bg-gray-100 dark:hover:bg-neutral-900">- <svg class="inline-flex w-6 h-6 text-gray-400 dark:text-neutral-200" fill="none" viewBox="0 0 24 24"- stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"- d="M15 19l-7-7 7-7" />+ <button+ @click="datePicker.datePickerPreviousMonth()"+ type="button"+ class="inline-flex p-1 transition duration-100 ease-in-out rounded-full cursor-pointer focus:outline-none focus:shadow-outline hover:bg-gray-100 dark:hover:bg-neutral-900"+ >+ <svg+ class="inline-flex w-6 h-6 text-gray-400 dark:text-neutral-200"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" /></svg></button>- <button @click="datePicker.datePickerNextMonth()" type="button"- class="inline-flex p-1 transition duration-100 ease-in-out rounded-full cursor-pointer focus:outline-none focus:shadow-outline hover:bg-gray-100 dark:hover:bg-neutral-900">- <svg class="inline-flex w-6 h-6 text-gray-400 dark:text-neutral-200" fill="none" viewBox="0 0 24 24"- stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"- d="M9 5l7 7-7 7" />+ <button+ @click="datePicker.datePickerNextMonth()"+ type="button"+ class="inline-flex p-1 transition duration-100 ease-in-out rounded-full cursor-pointer focus:outline-none focus:shadow-outline hover:bg-gray-100 dark:hover:bg-neutral-900"+ >+ <svg+ class="inline-flex w-6 h-6 text-gray-400 dark:text-neutral-200"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /></svg></button></div>@@ -93,17 +137,24 @@ watch(datePickerCalendar, () => { datePicker.selectableItemsList = datePickerCal</div></div><div class="grid grid-cols-7">- <div v-for="(blankDay, index) in datePicker.datePickerBlankDaysInMonth" :key="index"- class="p-1 text-sm text-center border border-transparent"></div>- <div v-for="(day, dayIndex) in datePicker.datePickerDaysInMonth" :key="dayIndex"- class="px-0.5 mb-1 aspect-square">- <div @click="datePicker.datePickerDayClicked(day)"+ <div+ v-for="(blankDay, index) in datePicker.datePickerBlankDaysInMonth"+ :key="index"+ class="p-1 text-sm text-center border border-transparent"+ ></div>+ <div v-for="(day, dayIndex) in datePicker.datePickerDaysInMonth" :key="dayIndex" class="px-0.5 mb-1 aspect-square">+ <div+ @click="datePicker.datePickerDayClicked(day)":class="{- 'bg-neutral-200 dark:bg-neutral-800/70 dark:hover:bg-neutral-900': datePicker.datePickerIsToday(day) == true,- 'text-gray-600 dark:text-neutral-400 hover:bg-neutral-200 dark:hover:text-neutral-100 dark:hover:bg-neutral-900': datePicker.datePickerIsToday(day) == false && datePicker.datePickerIsSelectedDate(day) == false,- 'bg-neutral-800 dark:bg-violet-700 text-white hover:bg-opacity-75 dark:bg-opacity-60': datePicker.datePickerIsSelectedDate(day) == true+ 'bg-neutral-200 dark:bg-neutral-800/70 dark:hover:bg-neutral-900':+ datePicker.datePickerIsToday(day) == true,+ 'text-gray-600 dark:text-neutral-400 hover:bg-neutral-200 dark:hover:text-neutral-100 dark:hover:bg-neutral-900':+ datePicker.datePickerIsToday(day) == false && datePicker.datePickerIsSelectedDate(day) == false,+ 'bg-neutral-800 dark:bg-violet-700 text-white hover:bg-opacity-75 dark:bg-opacity-60':+ datePicker.datePickerIsSelectedDate(day) == true,}"- class="flex items-center justify-center text-sm leading-none text-center rounded-full cursor-pointer h-7 w-7">+ class="flex items-center justify-center text-sm leading-none text-center rounded-full cursor-pointer h-7 w-7"+ >{{ day }}</div></div>@@ -111,4 +162,4 @@ watch(datePickerCalendar, () => { datePicker.selectableItemsList = datePickerCal</div></Transition></OnClickOutside>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/DropdownItem.vue b/resources/js/components/pinesUI/DropdownItem.vueindex bca16c84..9e261c4b 100755--- a/resources/js/components/pinesUI/DropdownItem.vue+++ b/resources/js/components/pinesUI/DropdownItem.vue@@ -1,29 +1,53 @@<script setup>import { RouterLink } from 'vue-router';-const { linkData, selected, external } = defineProps(['linkData', 'selected', 'external'])+const { linkData, selected, external } = defineProps(['linkData', 'selected', 'external']);</script><template>- <a v-if="external"- :class="{ 'font-bold text-violet-500': selected}" :href="linkData.url" target="_blank"- class="cursor-pointer relative w-full flex select-none hover:bg-neutral-100 dark:hover:bg-neutral-900 items-center rounded px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50">+ <a+ v-if="external"+ :class="{ 'font-bold text-violet-500': selected }"+ :href="linkData.url"+ target="_blank"+ class="cursor-pointer relative w-full flex select-none hover:bg-neutral-100 dark:hover:bg-neutral-900 items-center rounded px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50"+ ><slot name="icon">- <span width="24" height="24" viewBox="0 0 24 24"- fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"- stroke-linejoin="round" class="w-4 h-4 mr-2">+ <span+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ class="w-4 h-4 mr-2"+ ></span></slot>- <span class="text-nowrap">{{ linkData.text }}</span><span class="ml-auto text-xs tracking-widest opacity-60">{{ linkData.shortcut ?? '' }}</span>+ <span class="text-nowrap">{{ linkData.text }}</span+ ><span class="ml-auto text-xs tracking-widest opacity-60">{{ linkData.shortcut ?? '' }}</span></a>- <RouterLink v-else- :class="{ 'font-bold text-violet-500': selected}" :to="linkData.url"- class="cursor-pointer relative w-full flex select-none hover:bg-neutral-100 dark:hover:bg-neutral-900 items-center rounded px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50">+ <RouterLink+ v-else+ :class="{ 'font-bold text-violet-500': selected }"+ :to="linkData.url"+ class="cursor-pointer relative w-full flex select-none hover:bg-neutral-100 dark:hover:bg-neutral-900 items-center rounded px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50"+ ><slot name="icon">- <span width="24" height="24" viewBox="0 0 24 24"- fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"- stroke-linejoin="round" class="w-4 h-4 mr-2">+ <span+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ class="w-4 h-4 mr-2"+ ></span></slot><span class="text-nowrap">{{ linkData.text }}</span><span class="ml-auto text-xs tracking-widest opacity-60">{{ linkData.shortcut ?? '' }}</span></RouterLink>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/DropdownMenu.vue b/resources/js/components/pinesUI/DropdownMenu.vueindex a55b0351..03416b1b 100755--- a/resources/js/components/pinesUI/DropdownMenu.vue+++ b/resources/js/components/pinesUI/DropdownMenu.vue@@ -14,22 +14,19 @@ import LucideFolderSearch from '~icons/lucide/folder-search';import LucideFolderCheck from '~icons/lucide/folder-check';import LucideLayoutDashboard from '~icons/lucide/layout-dashboard';-import { OnClickOutside } from '@vueuse/components'-import { useAuthStore } from '../../stores/AuthStore'+import { OnClickOutside } from '@vueuse/components';+import { useAuthStore } from '../../stores/AuthStore';import { storeToRefs } from 'pinia';-const authStore = useAuthStore();const { userData } = storeToRefs(authStore);const dropDownItems = [- [- { name: 'settings', url: '/settings', text: 'Settings', icon: LucideSettings },- ],+ [{ name: 'settings', url: '/settings', text: 'Settings', icon: LucideSettings }],[{ name: 'login', url: '/login', text: 'Log in', icon: LucideLogIn },- { name: 'register', url: '/register', text: 'Sign up', icon: LucideUserPlus }- ]+ { name: 'register', url: '/register', text: 'Sign up', icon: LucideUserPlus },+ ],];const dropDownItemsAuth = [[@@ -41,56 +38,87 @@ const dropDownItemsAuth = [{ name: 'friends', url: '/friends', text: 'Friends', icon: LucideUsers },{ name: 'history', url: '/history', text: 'Full History', icon: LucideHistory },{ name: 'dashboard', url: '/Dashboard', text: 'Dashboard', icon: LucideLayoutDashboard },-],[{ name: 'index', url: '/jobs/indexFiles', text: 'Index Files', external: true, icon: LucideFolderSearch },{ name: 'sync', url: '/jobs/syncFiles', text: 'Sync Files', external: true, icon: LucideFolderSync },{ name: 'verify', url: '/jobs/verifyFiles', text: 'Verify Files', external: true, icon: LucideFolderCheck },],- [- { name: 'logout', url: '/logout', text: 'Log out', icon: LucideLogOut, shortcut: '⇧⌘Q' },- ],-+ [{ name: 'logout', url: '/logout', text: 'Log out', icon: LucideLogOut, shortcut: '⇧⌘Q' }],];-const props = defineProps(['dropdownOpen'])+const props = defineProps(['dropdownOpen']);</script><template><OnClickOutside @trigger="$emit('toggleDropdown', false)">- <Transition enter-active-class="ease-out duration-200" enter-from-class="-translate-y-2"- enter-to-class="translate-y-0">+ <Transition enter-active-class="ease-out duration-200" enter-from-class="-translate-y-2" enter-to-class="translate-y-0"><div v-show="props.dropdownOpen" class="absolute top-0 z-50 max-w-screen mt-12 -right-[0.25rem]" v-cloak id="userDropdown">- <div class="w-56 mx-auto ">- <div v-if="userData"- class="p-1 mt-1 bg-white dark:bg-neutral-800/70 backdrop-blur-lg border rounded-md shadow-md border-neutral-200/70 dark:border-neutral-700 text-neutral-700 dark:text-neutral-100">+ <div class="w-56 mx-auto">+ <div+ v-if="userData"+ class="p-1 mt-1 bg-white dark:bg-neutral-800/70 backdrop-blur-lg border rounded-md shadow-md border-neutral-200/70 dark:border-neutral-700 text-neutral-700 dark:text-neutral-100"+ ><div class="px-2 py-1.5 text-sm font-semibold">My Account</div><div class="h-px my-1 -mx-1 bg-neutral-200 dark:bg-neutral-500"></div><section v-for="(group, groupIndex) in dropDownItemsAuth" :key="groupIndex">- <div v-if="groupIndex !== 0 && groupIndex !== dropDownItemsAuth.length"- class="h-px my-1 -mx-1 bg-neutral-200 dark:bg-neutral-500"></div>- <DropdownItem v-for="(item, index) in dropDownItemsAuth[groupIndex]" :key="index"- :linkData="item" :selected="$route.name === item.name" :external="item?.external">+ <div+ v-if="groupIndex !== 0 && groupIndex !== dropDownItemsAuth.length"+ class="h-px my-1 -mx-1 bg-neutral-200 dark:bg-neutral-500"+ ></div>+ <DropdownItem+ v-for="(item, index) in dropDownItemsAuth[groupIndex]"+ :key="index"+ :linkData="item"+ :selected="$route.name === item.name"+ :external="item?.external"+ ><template #icon>- <component :is="item.icon" width="24" height="24" viewBox="0 0 24 24" fill="none"- stroke="currentColor" stroke-width="2" stroke-linecap="round"- stroke-linejoin="round" class="w-4 h-4 mr-2" />+ <component+ :is="item.icon"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ class="w-4 h-4 mr-2"+ /></template></DropdownItem></section></div>- <div v-else- class="p-1 mt-1 bg-white dark:bg-neutral-800/70 backdrop-blur-lg border rounded-md shadow-md border-neutral-200/70 dark:border-neutral-700 text-neutral-700 dark:text-neutral-100">+ <div+ v-else+ class="p-1 mt-1 bg-white dark:bg-neutral-800/70 backdrop-blur-lg border rounded-md shadow-md border-neutral-200/70 dark:border-neutral-700 text-neutral-700 dark:text-neutral-100"+ ><section v-for="(group, groupIndex) in dropDownItems" :key="groupIndex">- <div v-if="groupIndex !== 0 && groupIndex !== dropDownItems.length"- class="h-px my-1 -mx-1 bg-neutral-200 dark:bg-neutral-500"></div>- <DropdownItem v-for="(item, index) in dropDownItems[groupIndex]" :key="index" :linkData="item"- :selected="$route.name === item.name" :external="item?.external">+ <div+ v-if="groupIndex !== 0 && groupIndex !== dropDownItems.length"+ class="h-px my-1 -mx-1 bg-neutral-200 dark:bg-neutral-500"+ ></div>+ <DropdownItem+ v-for="(item, index) in dropDownItems[groupIndex]"+ :key="index"+ :linkData="item"+ :selected="$route.name === item.name"+ :external="item?.external"+ ><template #icon>- <component :is="item.icon" width="24" height="24" viewBox="0 0 24 24" fill="none"- stroke="currentColor" stroke-width="2" stroke-linecap="round"- stroke-linejoin="round" class="w-4 h-4 mr-2" />+ <component+ :is="item.icon"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ class="w-4 h-4 mr-2"+ /></template></DropdownItem></section>@@ -107,4 +135,4 @@ const props = defineProps(['dropdownOpen'])border-top-color: transparent;border-bottom-color: rgba(60, 60, 60, 0.26);}-</style>\ No newline at end of file+</style>diff --git a/resources/js/components/pinesUI/InputSelect.vue b/resources/js/components/pinesUI/InputSelect.vueindex 60a06610..7b66f69d 100755--- a/resources/js/components/pinesUI/InputSelect.vue+++ b/resources/js/components/pinesUI/InputSelect.vue@@ -2,16 +2,16 @@import useSelect from '../../composables/useSelect';import { onMounted, ref, watch } from 'vue';-import { OnClickOutside } from '@vueuse/components'+import { OnClickOutside } from '@vueuse/components';const props = defineProps({placeholder: {type: String,- default: 'Select Item'+ default: 'Select Item',},defaultItem: {type: Number,- default: null+ default: null,},options: {type: Array,@@ -19,33 +19,33 @@ const props = defineProps({return [{title: 'Title',- value: "title",- disabled: false+ value: 'title',+ disabled: false,},{title: 'Date Uploaded',- value: "date",- disabled: false+ value: 'date',+ disabled: false,},{title: 'Date released',- value: "date_released",- disabled: false+ value: 'date_released',+ disabled: false,},{title: 'Episode',- value: "episode",- disabled: true+ value: 'episode',+ disabled: true,},{title: 'Season',- value: "season",- disabled: true+ value: 'season',+ disabled: true,},];- }+ },},-})+});const emit = defineEmits(['selectItem']);const selectButton = ref(null);@@ -53,71 +53,134 @@ const selectableItemsList = ref(null);const select = useSelect(props.options, { selectableItemsList, selectButton });const handleItemClick = (item, setFocus = true) => {- select.selectedItem = item;- select.toggleSelect(false);- if(setFocus) selectButton.value?.focus();+ select.selectedItem = item;+ select.toggleSelect(false);+ if (setFocus) selectButton.value?.focus();emit('selectItem', select.selectedItem);-}+};onMounted(() => {- if(props.defaultItem != undefined && props.defaultItem < props.options.length && props.defaultItem >=0){+ if (props.defaultItem != undefined && props.defaultItem < props.options.length && props.defaultItem >= 0) {handleItemClick(props.options[props.defaultItem], false);}-})+});-watch(selectButton, () => { select.selectButton = selectButton; }, { immediate: true })-watch(selectableItemsList, () => { select.selectableItemsList = selectableItemsList; }, { immediate: true })+watch(+ selectButton,+ () => {+ select.selectButton = selectButton;+ },+ { immediate: true },+);+watch(+ selectableItemsList,+ () => {+ select.selectableItemsList = selectableItemsList;+ },+ { immediate: true },+);</script><template>- <div @keydown.esc="if (select.selectOpen) { select.toggleSelect(false); }"- @keydown.down="if (select.selectOpen) { select.selectableItemActiveNext(); } else { select.toggleSelect(true); } event.preventDefault();"- @keydown.up="if (select.selectOpen) { select.selectableItemActivePrevious(); } else { select.toggleSelect(true); } event.preventDefault();"- @keydown.enter="select.selectedItem = select.selectableItemActive; select.toggleSelect(false);"- @keydown="select.selectKeydown($event);" class="relative">-- <OnClickOutside @trigger="select.toggleSelect(false);">- <button ref="selectButton" @click="select.toggleSelect();"+ <div+ @keydown.esc="+ if (select.selectOpen) {+ select.toggleSelect(false);+ }+ "+ @keydown.down="+ if (select.selectOpen) {+ select.selectableItemActiveNext();+ } else {+ select.toggleSelect(true);+ }+ event.preventDefault();+ "+ @keydown.up="+ if (select.selectOpen) {+ select.selectableItemActivePrevious();+ } else {+ select.toggleSelect(true);+ }+ event.preventDefault();+ "+ @keydown.enter="+ select.selectedItem = select.selectableItemActive;+ select.toggleSelect(false);+ "+ @keydown="select.selectKeydown($event)"+ class="relative"+ >+ <OnClickOutside @trigger="select.toggleSelect(false)">+ <button+ ref="selectButton"+ @click="select.toggleSelect()":class="{ 'hocus:ring-0': select.selectOpen }"- class="relative h-10 flex items-center justify-between w-full py-2 pl-3 pr-10 text-left rounded-md shadow-sm cursor-pointer text-sm border-none focus:outline-none ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] hover:ring-violet-400 hover:dark:ring-violet-700 focus:ring-indigo-400 dark:focus:ring-indigo-500 text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-800">+ class="relative h-10 flex items-center justify-between w-full py-2 pl-3 pr-10 text-left rounded-md shadow-sm cursor-pointer text-sm border-none focus:outline-none ring-inset ring-[1px] ring-neutral-200 dark:ring-neutral-700 hocus:ring-[0.125rem] hover:ring-violet-400 hover:dark:ring-violet-700 focus:ring-indigo-400 dark:focus:ring-indigo-500 text-gray-900 dark:text-neutral-100 bg-white dark:bg-neutral-800"+ ><span class="truncate">{{ select.selectedItem ? select.selectedItem.title : placeholder }}</span><span class="absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"- class="w-5 h-5 text-gray-400">- <path fill-rule="evenodd"+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 20 20"+ fill="currentColor"+ aria-hidden="true"+ class="w-5 h-5 text-gray-400"+ >+ <path+ fill-rule="evenodd"d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z"- clip-rule="evenodd"></path>+ clip-rule="evenodd"+ ></path></svg></span></button>- <Transition- enter-active-class="transition ease-out duration-50"+ <Transition+ enter-active-class="transition ease-out duration-50"enter-from-class="opacity-0 -translate-y-1"- enter-to-class="opacity-100">- <ul v-show="select.selectOpen" ref="selectableItemsList"-- :class="{ 'bottom-0 mb-10': select.selectDropdownPosition == 'top', 'top-0 mt-10': select.selectDropdownPosition == 'bottom' }"+ enter-to-class="opacity-100"+ >+ <ul+ v-show="select.selectOpen"+ ref="selectableItemsList"+ :class="{+ 'bottom-0 mb-10': select.selectDropdownPosition == 'top',+ 'top-0 mt-10': select.selectDropdownPosition == 'bottom',+ }"class="z-30 absolute w-full mt-1 overflow-auto text-sm rounded-md shadow-md max-h-56 focus:outline-none ring-1 ring-opacity-5 ring-black dark:ring-neutral-700 bg-white dark:bg-neutral-800/70 backdrop-blur-lg"- v-cloak>-+ v-cloak+ ><template v-for="item in select.selectableItems" :key="item.value">- <li @click="handleItemClick(item)" :id="item.value + '-' + select.selectId"+ <li+ @click="handleItemClick(item)"+ :id="item.value + '-' + select.selectId":data-disabled="item.disabled ? item.disabled : ''"- :class="{ 'bg-neutral-100 dark:bg-neutral-900/70 text-gray-900 dark:text-neutral-100': select.selectableItemIsActive(item), 'text-gray-700 dark:text-neutral-300': !select.selectableItemIsActive(item) }"+ :class="{+ 'bg-neutral-100 dark:bg-neutral-900/70 text-gray-900 dark:text-neutral-100':+ select.selectableItemIsActive(item),+ 'text-gray-700 dark:text-neutral-300': !select.selectableItemIsActive(item),+ }"@mousemove="select.selectableItemActive = item"- class="relative flex items-center h-full py-2 pl-8 cursor-pointer select-none data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none">- <svg v-if="select.selectedItem.value == item.value"+ class="relative flex items-center h-full py-2 pl-8 cursor-pointer select-none data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"+ >+ <svg+ v-if="select.selectedItem.value == item.value"class="absolute left-0 w-4 h-4 ml-2 stroke-current text-neutral-400"- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"- stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ ><polyline points="20 6 9 17 4 12"></polyline></svg><span class="block font-medium truncate">{{ item.title }}</span></li></template>-</ul></Transition></OnClickOutside></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/ModalBase.vue b/resources/js/components/pinesUI/ModalBase.vueindex 057c4546..758be2f6 100755--- a/resources/js/components/pinesUI/ModalBase.vue+++ b/resources/js/components/pinesUI/ModalBase.vue@@ -8,19 +8,19 @@ import { watch } from 'vue';const props = defineProps({modalData: {- required: true+ required: true,},action: {require: false,type: Function,- default: () => {}+ default: () => {},},useControls: {type: Boolean,required: false,- default: true- }-})+ default: true,+ },+});const AppStore = useAppStore();const { setScrollLock } = AppStore;@@ -28,50 +28,86 @@ const { setScrollLock } = AppStore;const submitModal = async (action, modalData) => {await action();modalData.toggleModal(false);-}+};-watch(() => props.modalData.isAnimating, (value) => {- if((props.modalData.modalOpen && value) || !value){- setScrollLock(props.modalData.modalOpen);- }-})+watch(+ () => props.modalData.isAnimating,+ (value) => {+ if ((props.modalData.modalOpen && value) || !value) {+ setScrollLock(props.modalData.modalOpen);+ }+ },+);</script><template><Teleport to="body">- <div v-show="modalData.modalOpen || modalData.isAnimating"+ <div+ v-show="modalData.modalOpen || modalData.isAnimating"class="fixed top-0 left-0 z-[25] flex items-center justify-center w-full h-screen text-neutral-900 dark:text-neutral-200"- v-cloak>- <Transition enter-active-class="ease-out duration-300" enter-from-class="opacity-0" enter-to-class="opacity-100" leave-active-class="ease-in duration-300" leave-from-class="opacity-100" leave-to-class="opacity-0">+ v-cloak+ >+ <Transition+ enter-active-class="ease-out duration-300"+ enter-from-class="opacity-0"+ enter-to-class="opacity-100"+ leave-active-class="ease-in duration-300"+ leave-from-class="opacity-100"+ leave-to-class="opacity-0"+ ><div v-if="modalData.modalOpen" class="absolute inset-0 w-full h-full backdrop-blur-sm bg-opacity-70"></div></Transition>- <Transition enter-active-class="ease-out duration-300" enter-from-class="opacity-0 -translate-y-2 sm:scale-95" enter-to-class="opacity-100 translate-y-0 sm:scale-100" leave-active-class="ease-in duration-200" leave-from-class="opacity-100 translate-y-0 sm:scale-100" leave-to-class="opacity-0 -translate-y-2 sm:scale-95">- <UseFocusTrap v-if="modalData.modalOpen" class="relative w-full p-6 max-h-screen h-full overflow-y-scroll scrollbar-hide flex items-center">- <OnClickOutside @trigger="modalData.toggleModal(false)"- @keydown.esc="modalData.toggleModal(false)"- class="m-auto w-full p-6 bg-white dark:bg-neutral-800/90 backdrop-blur-lg border shadow-lg border-neutral-200 dark:border-neutral-700 sm:max-w-lg rounded-md sm:rounded-lg"- tabindex="-1">- <div class="flex items-center justify-between pb-3">- <h3 class="text-xl font-semibold">{{ modalData?.title ?? 'Modal Title' }}</h3>- <ButtonCorner @click="modalData.toggleModal(false)" tabindex="99"/>+ <Transition+ enter-active-class="ease-out duration-300"+ enter-from-class="opacity-0 -translate-y-2 sm:scale-95"+ enter-to-class="opacity-100 translate-y-0 sm:scale-100"+ leave-active-class="ease-in duration-200"+ leave-from-class="opacity-100 translate-y-0 sm:scale-100"+ leave-to-class="opacity-0 -translate-y-2 sm:scale-95"+ >+ <UseFocusTrap+ v-if="modalData.modalOpen"+ class="relative w-full p-6 max-h-screen h-full overflow-y-scroll scrollbar-hide flex items-center"+ >+ <OnClickOutside+ @trigger="modalData.toggleModal(false)"+ @keydown.esc="modalData.toggleModal(false)"+ class="m-auto w-full p-6 bg-white dark:bg-neutral-800/90 backdrop-blur-lg border shadow-lg border-neutral-200 dark:border-neutral-700 sm:max-w-lg rounded-md sm:rounded-lg"+ tabindex="-1"+ >+ <div class="flex items-center justify-between pb-3">+ <h3 class="text-xl font-semibold">{{ modalData?.title ?? 'Modal Title' }}</h3>+ <ButtonCorner @click="modalData.toggleModal(false)" tabindex="99" />+ </div>+ <slot name="content">+ <div class="relative w-auto pb-8">+ <p>This is placeholder text. Replace it with your own content.</p></div>- <slot name="content">- <div class="relative w-auto pb-8">- <p>This is placeholder text. Replace it with your own content.</p>- </div>- </slot>- <slot v-if="useControls" name="controls">- <div class="relative flex flex-col-reverse sm:flex-row sm:justify-end gap-2">- <button @click="modalData.toggleModal(false)" type="button" tabindex="97"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'">Cancel</button>- <button @click="submitModal(action, modalData)" type="button" tabindex="98"- class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none "- :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '">{{ modalData.submitText }}</button>- </div>- </slot>- </OnClickOutside>- </UseFocusTrap>- </Transition>+ </slot>+ <slot v-if="useControls" name="controls">+ <div class="relative flex flex-col-reverse sm:flex-row sm:justify-end gap-2">+ <button+ @click="modalData.toggleModal(false)"+ type="button"+ tabindex="97"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border dark:border-neutral-600 rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-neutral-100 dark:focus:ring-neutral-400 focus:ring-offset-1 hover:bg-neutral-100 dark:hover:bg-neutral-900'"+ >+ Cancel+ </button>+ <button+ @click="submitModal(action, modalData)"+ type="button"+ tabindex="98"+ class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none"+ :class="'focus:ring-1 focus:ring-violet-900 focus:ring-offset-1 bg-neutral-950 hover:bg-neutral-800 dark:hover:bg-neutral-900 '"+ >+ {{ modalData.submitText }}+ </button>+ </div>+ </slot>+ </OnClickOutside>+ </UseFocusTrap>+ </Transition></div></Teleport>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/ToastController.vue b/resources/js/components/pinesUI/ToastController.vueindex 9a2aa3b7..51ff8509 100755--- a/resources/js/components/pinesUI/ToastController.vue+++ b/resources/js/components/pinesUI/ToastController.vue@@ -19,7 +19,7 @@ export default {expanded: false,layout: 'default',paddingBetweenToasts: 16,- heightRecalculateTimeout: null+ heightRecalculateTimeout: null,};},mounted() {@@ -63,12 +63,11 @@ export default {}}}- }+ },},methods: {add(message) {-- if (message.position && this.positionIsValid(message.position)) this.positionRoot = message.position+ if (message.position && this.positionIsValid(message.position)) this.positionRoot = message.position;if (message.type && !this.typeIsValid(message.type)) message.type = 'default';if (message.idx == null) {@@ -128,7 +127,7 @@ export default {let scaleBuffer = 1;let yBuffer = -16;let zBuffer = 100;- let bottomFlag = this.positionRoot.includes("bottom")+ let bottomFlag = this.positionRoot.includes('bottom');let totalHeight = 0;let topToast = null;for (let i = 0; i < this.messages.length; i++) {@@ -142,18 +141,17 @@ export default {totalHeight = totalHeight + (totalHeight ? this.paddingBetweenToasts : 0);if (bottomFlag) {- toast.style.top = "auto";- toast.style.bottom = totalHeight + "px";- }- else toast.style.top = totalHeight + "px";+ toast.style.top = 'auto';+ toast.style.bottom = totalHeight + 'px';+ } else toast.style.top = totalHeight + 'px';totalHeight += toast.getBoundingClientRect().height;toast.style.scale = 1;continue;}- toast.style.top = "auto";- toast.style.bottom = "auto";+ toast.style.top = 'auto';+ toast.style.bottom = 'auto';toast.style.scale = scaleBuffer;toast.style.transform = yBuffer ? `translateY(${bottomFlag ? '-' : ''}${yBuffer}px)` : '';if (i === 0) topToast = toast;@@ -163,8 +161,8 @@ export default {if (this.messages[3]) {let burnToast = document.getElementById(this.messages[3].id);- burnToast.classList.remove("opacity-100");- burnToast.classList.add("opacity-0");+ burnToast.classList.remove('opacity-100');+ burnToast.classList.add('opacity-0');this.messages.splice(3, 1);this.stackToasts();// let that = this;@@ -198,11 +196,11 @@ export default {let top2 = top1 + (height1 - height2);// Apply the calculated top position to the second element- element2.style.top = top2 + "px";+ element2.style.top = top2 + 'px';},calculateHeightOfToastsContainer() {if (this.messages.length == 0) {- this.$refs.container.style.height = "0px";+ this.$refs.container.style.height = '0px';return;}@@ -213,52 +211,73 @@ export default {let firstToastRectangle = document.getElementById(firstToast.id).getBoundingClientRect();if (this.toastsHovered) {- if (this.positionRoot.includes("bottom")) {+ if (this.positionRoot.includes('bottom')) {this.$refs.container.style.height =- firstToastRectangle.top +- firstToastRectangle.height -- lastToastRectangle.top +- "px";+ firstToastRectangle.top + firstToastRectangle.height - lastToastRectangle.top + 'px';} else {- this.$refs.container.style.height =- lastToastRectangle.top +- lastToastRectangle.height -- firstToastRectangle.top +- "px";+ this.$refs.container.style.height = lastToastRectangle.top + lastToastRectangle.height - firstToastRectangle.top + 'px';}} else {- this.$refs.container.style.height = firstToastRectangle.height + "px";+ this.$refs.container.style.height = firstToastRectangle.height + 'px';}},positionIsValid(newPosition) {- return newPosition == 'top-right' || newPosition == 'top-left' || newPosition == 'top-center' || newPosition == 'bottom-right' || newPosition == 'bottom-left' || newPosition == 'bottom-center'+ return (+ newPosition == 'top-right' ||+ newPosition == 'top-left' ||+ newPosition == 'top-center' ||+ newPosition == 'bottom-right' ||+ newPosition == 'bottom-left' ||+ newPosition == 'bottom-center'+ );},typeIsValid(newType) {- return newType == 'success' || newType == 'info' || newType == 'warning' || newType == 'danger' || newType == 'default'- }+ return newType == 'success' || newType == 'info' || newType == 'warning' || newType == 'danger' || newType == 'default';+ },},components: {- ToastNotification: ToastNotification- }-+ ToastNotification: ToastNotification,+ },};</script><template>- <teleport to='body'>- <ul class="fixed w-full group z-[99] sm:max-w-xs" id="toastRoot"- :class="{ 'right-0 top-0 sm:mt-6 sm:mr-6': positionRoot == 'top-right', 'left-0 top-0 sm:mt-6 sm:ml-6': positionRoot == 'top-left', 'left-1/2 -translate-x-1/2 top-0 sm:mt-6': positionRoot == 'top-center', 'right-0 bottom-0 sm:mr-6 sm:mb-6': positionRoot == 'bottom-right', 'left-0 bottom-0 sm:ml-6 sm:mb-6': positionRoot == 'bottom-left', 'left-1/2 -translate-x-1/2 bottom-0 sm:mb-6': positionRoot == 'bottom-center' }"- v-cloak ref="container" @mouseenter="toastsHovered = true;" @mouseleave="toastsHovered = false">- <ToastNotification v-for="toast in messages" :key="toast.idx" :type="toast.type" v-bind="toast"- :stack="stackToasts" :count="messages.length" @close="(event) => {- for (let i = 0; i < messages.length; i++) {- if (messages[i].idx === toast.idx) {- messages.splice(i, 1);- stackToasts();- break;+ <teleport to="body">+ <ul+ class="fixed w-full group z-[99] sm:max-w-xs"+ id="toastRoot"+ :class="{+ 'right-0 top-0 sm:mt-6 sm:mr-6': positionRoot == 'top-right',+ 'left-0 top-0 sm:mt-6 sm:ml-6': positionRoot == 'top-left',+ 'left-1/2 -translate-x-1/2 top-0 sm:mt-6': positionRoot == 'top-center',+ 'right-0 bottom-0 sm:mr-6 sm:mb-6': positionRoot == 'bottom-right',+ 'left-0 bottom-0 sm:ml-6 sm:mb-6': positionRoot == 'bottom-left',+ 'left-1/2 -translate-x-1/2 bottom-0 sm:mb-6': positionRoot == 'bottom-center',+ }"+ v-cloak+ ref="container"+ @mouseenter="toastsHovered = true"+ @mouseleave="toastsHovered = false"+ >+ <ToastNotification+ v-for="toast in messages"+ :key="toast.idx"+ :type="toast.type"+ v-bind="toast"+ :stack="stackToasts"+ :count="messages.length"+ @close="+ (event) => {+ for (let i = 0; i < messages.length; i++) {+ if (messages[i].idx === toast.idx) {+ messages.splice(i, 1);+ stackToasts();+ break;+ }}}- }" />+ "+ /></ul></teleport>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/pinesUI/ToastNotification.vue b/resources/js/components/pinesUI/ToastNotification.vueindex f9390574..63f97b2d 100755--- a/resources/js/components/pinesUI/ToastNotification.vue+++ b/resources/js/components/pinesUI/ToastNotification.vue@@ -1,47 +1,47 @@<script setup>import { onBeforeUnmount, onMounted, ref } from 'vue';-const emit = defineEmits(['close'])+const emit = defineEmits(['close']);const props = defineProps({type: {type: String,- default: 'default'+ default: 'default',},position: {type: String,- default: 'bottom-right'+ default: 'bottom-right',},life: {type: Number,- default: 4000+ default: 4000,},idx: {- type: Number+ type: Number,},id: {- type: String+ type: String,},title: {type: String,- default: 'Title'+ default: 'Title',},description: {type: String,},count: {type: Number,- required: true+ required: true,},html: {- default: ''+ default: '',},isValid: {- type: Boolean+ type: Boolean,},stack: {type: Function,- default: () => {}- }+ default: () => {},+ },});const toastHovered = ref(false);@@ -52,16 +52,16 @@ const stackTimeout = ref(null);onMounted(() => {mounted.value = true;- if(stackTimeout.value) clearTimeout(stackTimeout);+ if (stackTimeout.value) clearTimeout(stackTimeout);stackTimeout.value = setTimeout(() => {props.stack();- })+ });if (props.life) {animateClose();}-})+});onBeforeUnmount(() => {clearCloseTimeout();@@ -69,16 +69,16 @@ onBeforeUnmount(() => {function close(params) {emit('close', params);-};+}function onCloseClick() {mounted.value = false;closeTimeout.value = setTimeout(() => {close({ message: { idx: props.idx }, type: 'life-end' });}, 500);-};+}function clearCloseTimeout() {- if(stackTimeout.value){+ if (stackTimeout.value) {clearTimeout(stackTimeout);stackTimeout.value = null;}@@ -90,70 +90,132 @@ function clearCloseTimeout() {clearTimeout(closeTimeout);closeTimeout.value = null;}-};+}function animateClose() {animateTimeout.value = setTimeout(() => {- onCloseClick()- }, props.life)+ onCloseClick();+ }, props.life);}-</script><template>- <Transition enter-active-class="ease-out duration-300"+ <Transition+ enter-active-class="ease-out duration-300":enter-from-class="`opacity-0 ${props.position.includes('bottom') ? 'translate-y-full' : '-translate-y-full'}`"- :enter-to-class="`opacity-100 translate-y-0`" leave-active-class="ease-out duration-300"+ :enter-to-class="`opacity-100 translate-y-0`"+ leave-active-class="ease-out duration-300":leave-from-class="`opacity-100 translate-y-0`"- :leave-to-class="`opacity-0 ${props.count == 1 ? (props.position.includes('bottom') ? 'translate-y-full' : '-translate-y-full') : 'translate-y-0'}`">- <li v-show="mounted" :id="props.id" @mouseover="toastHovered = true" @mouseout="toastHovered = false"- class="absolute w-full duration-300 ease-out select-none sm:max-w-xs" :class="{'toast-no-description' : !props.description}">+ :leave-to-class="`opacity-0 ${props.count == 1 ? (props.position.includes('bottom') ? 'translate-y-full' : '-translate-y-full') : 'translate-y-0'}`"+ >+ <li+ v-show="mounted"+ :id="props.id"+ @mouseover="toastHovered = true"+ @mouseout="toastHovered = false"+ class="absolute w-full duration-300 ease-out select-none sm:max-w-xs"+ :class="{ 'toast-no-description': !props.description }"+ ><spanclass="relative flex flex-col items-start shadow-[0_5px_15px_-3px_rgb(0_0_0_/_0.08)] mx-6 sm:mx-auto transition-all duration-300 ease-out sm:border bg-white dark:bg-primary-dark-700/70 backdrop-blur-lg border-gray-100 dark:border-neutral-800/50 text-gray-800 dark:text-neutral-100 rounded-md sm:max-w-xs group"- :class="{ 'p-4': !props.html, 'p-0': props.html }">+ :class="{ 'p-4': !props.html, 'p-0': props.html }"+ ><div v-if="!props.html" class="relative">- <div class="flex items-center"- :class="{ 'text-green-500': props.type == 'success', 'text-blue-500': props.type == 'info', 'text-orange-400': props.type == 'warning', 'text-red-500': props.type == 'danger', 'dark:text-neutral-100 text-gray-800': props.type == 'default' }">-- <svg v-show="props.type=='success'" class="w-[18px] h-[18px] mr-1.5 -ml-1"- viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" clip-rule="evenodd"+ <div+ class="flex items-center"+ :class="{+ 'text-green-500': props.type == 'success',+ 'text-blue-500': props.type == 'info',+ 'text-orange-400': props.type == 'warning',+ 'text-red-500': props.type == 'danger',+ 'dark:text-neutral-100 text-gray-800': props.type == 'default',+ }"+ >+ <svg+ v-show="props.type == 'success'"+ class="w-[18px] h-[18px] mr-1.5 -ml-1"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM16.7744 9.63269C17.1238 9.20501 17.0604 8.57503 16.6327 8.22559C16.2051 7.87615 15.5751 7.93957 15.2256 8.36725L10.6321 13.9892L8.65936 12.2524C8.24484 11.8874 7.61295 11.9276 7.248 12.3421C6.88304 12.7566 6.92322 13.3885 7.33774 13.7535L9.31046 15.4903C10.1612 16.2393 11.4637 16.1324 12.1808 15.2547L16.7744 9.63269Z"- fill="currentColor"></path>+ fill="currentColor"+ ></path></svg>- <svg v-show="props.type=='info'" class="w-[18px] h-[18px] mr-1.5 -ml-1" viewBox="0 0 24 24"- fill="none" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" clip-rule="evenodd"+ <svg+ v-show="props.type == 'info'"+ class="w-[18px] h-[18px] mr-1.5 -ml-1"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM12 9C12.5523 9 13 8.55228 13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8C11 8.55228 11.4477 9 12 9ZM13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V12Z"- fill="currentColor"></path>+ fill="currentColor"+ ></path></svg>- <svg v-show="props.type=='warning'" class="w-[18px] h-[18px] mr-1.5 -ml-1"- viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" clip-rule="evenodd"+ <svg+ v-show="props.type == 'warning'"+ class="w-[18px] h-[18px] mr-1.5 -ml-1"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"d="M9.44829 4.46472C10.5836 2.51208 13.4105 2.51168 14.5464 4.46401L21.5988 16.5855C22.7423 18.5509 21.3145 21 19.05 21L4.94967 21C2.68547 21 1.25762 18.5516 2.4004 16.5862L9.44829 4.46472ZM11.9995 8C12.5518 8 12.9995 8.44772 12.9995 9V13C12.9995 13.5523 12.5518 14 11.9995 14C11.4473 14 10.9995 13.5523 10.9995 13V9C10.9995 8.44772 11.4473 8 11.9995 8ZM12.0009 15.99C11.4486 15.9892 11.0003 16.4363 10.9995 16.9886L10.9995 16.9986C10.9987 17.5509 11.4458 17.9992 11.9981 18C12.5504 18.0008 12.9987 17.5537 12.9995 17.0014L12.9995 16.9914C13.0003 16.4391 12.5532 15.9908 12.0009 15.99Z"- fill="currentColor"></path>+ fill="currentColor"+ ></path></svg>- <svg v-show="props.type=='danger'" class="w-[18px] h-[18px] mr-1.5 -ml-1"- viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" clip-rule="evenodd"+ <svg+ v-show="props.type == 'danger'"+ class="w-[18px] h-[18px] mr-1.5 -ml-1"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM11.9996 7C12.5519 7 12.9996 7.44772 12.9996 8V12C12.9996 12.5523 12.5519 13 11.9996 13C11.4474 13 10.9996 12.5523 10.9996 12V8C10.9996 7.44772 11.4474 7 11.9996 7ZM12.001 14.99C11.4488 14.9892 11.0004 15.4363 10.9997 15.9886L10.9996 15.9986C10.9989 16.5509 11.446 16.9992 11.9982 17C12.5505 17.0008 12.9989 16.5537 12.9996 16.0014L12.9996 15.9914C13.0004 15.4391 12.5533 14.9908 12.001 14.99Z"- fill="currentColor"></path>+ fill="currentColor"+ ></path></svg><p class="text-[13px] font-medium leading-none">{{ props.title }}</p></div>- <p v-show="props.description" :class="{ 'pl-5': props.type !== 'default' }"- class="mt-1.5 text-xs leading-none opacity-70">{{ props.description }}</p>+ <p+ v-show="props.description"+ :class="{ 'pl-5': props.type !== 'default' }"+ class="mt-1.5 text-xs leading-none opacity-70"+ >+ {{ props.description }}+ </p></div>- <span @click="onCloseClick"+ <span+ @click="onCloseClick"class="absolute right-0 p-1.5 mr-2.5 text-gray-400 dark:text-rose-700 duration-100 ease-in-out rounded-full opacity-0 cursor-pointer hover:bg-gray-50 dark:bg-gray-800/50 hover:text-gray-500 dark:hover:text-rose-600"- :class="{ 'top-1/2 -translate-y-1/2': !props.description && !props.html, 'top-0 mt-2.5': (props.description || props.html), 'opacity-100': toastHovered, 'opacity-0': !toastHovered }">+ :class="{+ 'top-1/2 -translate-y-1/2': !props.description && !props.html,+ 'top-0 mt-2.5': props.description || props.html,+ 'opacity-100': toastHovered,+ 'opacity-0': !toastHovered,+ }"+ ><svg class="w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd"+ <path+ fill-rule="evenodd"d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"- clip-rule="evenodd"></path>+ clip-rule="evenodd"+ ></path></svg></span></span></li></Transition>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/table/TableBase.vue b/resources/js/components/table/TableBase.vueindex 717e7d28..430f70a8 100755--- a/resources/js/components/table/TableBase.vue+++ b/resources/js/components/table/TableBase.vue@@ -11,8 +11,18 @@ import PhSortAscendingLight from '~icons/ph/sort-ascending-light';import { ref } from 'vue';--const props = defineProps(['useToolbar','data', 'row', 'clickAction', 'loading', 'sortAction', 'sortingOptions', 'itemsPerPage','searchQuery', 'selectedID']);+const props = defineProps([+ 'useToolbar',+ 'data',+ 'row',+ 'clickAction',+ 'loading',+ 'sortAction',+ 'sortingOptions',+ 'itemsPerPage',+ 'searchQuery',+ 'selectedID',+]);const tableData = useTable(props);const sortAscending = ref(true);const lastSortKey = ref('');@@ -22,21 +32,44 @@ const handleSortChange = (sortKey) => {if (!lastSortKey.value) return;props.sortAction(lastSortKey.value, sortAscending.value ? 1 : -1);-}+};</script><template>- <div v-if="props.loading" class="text-center text-lg text-gray-500 dark:text-gray-400 uppercase tracking-wider w-full py-16">Loading...</div>+ <div v-if="props.loading" class="text-center text-lg text-gray-500 dark:text-gray-400 uppercase tracking-wider w-full py-16">+ Loading...+ </div><table v-else class="flex flex-col gap-4 divide-y first:pt-0 [&>*:not(:first-child)]:pt-4"><section v-if="props.useToolbar" class="flex justify-center sm:justify-between py-2 flex-col sm:flex-row gap-2">- <TextInputLabelled v-model="tableData.fields.searchQuery" :text="'Search:'" :placeholder="'Enter Search Query...'" :id="'table-search'" class="w-full sm:w-80" @input="$emit('search', tableData.fields.searchQuery)" title="Search Results"/>+ <TextInputLabelled+ v-model="tableData.fields.searchQuery"+ :text="'Search:'"+ :placeholder="'Enter Search Query...'"+ :id="'table-search'"+ class="w-full sm:w-80"+ @input="$emit('search', tableData.fields.searchQuery)"+ title="Search Results"+ /><span class="flex items-end gap-2"><div class="flex gap-2 flex-col w-full sm:w-40"><FormInputLabel :field="{ name: 'sort', text: 'Sort by:' }" />- <InputSelect :placeholder="'None'" :options="props.sortingOptions" class="w-full" title="Select Sort"- @selectItem="handleSortChange" :defaultItem="0" />+ <InputSelect+ :placeholder="'None'"+ :options="props.sortingOptions"+ class="w-full"+ title="Select Sort"+ @selectItem="handleSortChange"+ :defaultItem="0"+ /></div>- <ButtonIcon @click="sortAscending = !sortAscending; handleSortChange()" title="Sort Results" aria-label="Sort Results">+ <ButtonIcon+ @click="+ sortAscending = !sortAscending;+ handleSortChange();+ "+ title="Sort Results"+ aria-label="Sort Results"+ ><template #icon><PhSortAscendingLight v-if="sortAscending" width="24" height="24" /><PhSortDescendingLight v-else width="24" height="24" />@@ -45,9 +78,28 @@ const handleSortChange = (sortKey) => {</span></section><tbody class="flex w-full flex-wrap gap-2">- <div v-if="tableData.filteredPage.length === 0 && !props.loading" class="text-center text-lg text-gray-500 dark:text-gray-400 uppercase tracking-wider w-full">No Results</div>- <component v-else :is="props.row" v-for="(row, index) in tableData.filteredPage" :key="row?.id ?? index" :data="row" :index="index" :currentID="props.selectedID ?? null" @clickAction="props.clickAction(row?.id)"></component>+ <div+ v-if="tableData.filteredPage.length === 0 && !props.loading"+ class="text-center text-lg text-gray-500 dark:text-gray-400 uppercase tracking-wider w-full"+ >+ No Results+ </div>+ <component+ v-else+ :is="props.row"+ v-for="(row, index) in tableData.filteredPage"+ :key="row?.id ?? index"+ :data="row"+ :index="index"+ :currentID="props.selectedID ?? null"+ @clickAction="props.clickAction(row?.id)"+ ></component></tbody>- <TablePagination :listLength="props.data?.length ?? 0" :itemsPerPage="tableData.fields.itemsPerPage" :currentPage="tableData.fields.currentPage" @setPage="tableData.handlePageChange"/>+ <TablePagination+ :listLength="props.data?.length ?? 0"+ :itemsPerPage="tableData.fields.itemsPerPage"+ :currentPage="tableData.fields.currentPage"+ @setPage="tableData.handlePageChange"+ /></table>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/table/TablePagination.vue b/resources/js/components/table/TablePagination.vueindex 257f73c4..c4e15407 100755--- a/resources/js/components/table/TablePagination.vue+++ b/resources/js/components/table/TablePagination.vue@@ -3,29 +3,31 @@ import { computed, nextTick, ref } from 'vue';import TablePaginationButton from './TablePaginationButton.vue';const emit = defineEmits(['setPage']);-const $element = ref(null)+const $element = ref(null);const props = defineProps(['listLength', 'currentPage', 'itemsPerPage']);-const pageCount = computed(() => { return Math.ceil(props.listLength / props.itemsPerPage); });+const pageCount = computed(() => {+ return Math.ceil(props.listLength / props.itemsPerPage);+});const pageRange = computed(() => {- let out = null;- if(pageCount.value <= 5) out = pageCount.value;- else if(props.currentPage <= 3) out = Math.min(4, pageCount.value)- else if(pageCount.value - props.currentPage <= 2){- let range = [];- for(var i = pageCount.value - 3; i <= pageCount.value; i++){- range = [...range, i];- }- out = range;- }-- return out === null ? [props.currentPage - 1, props.currentPage, props.currentPage + 1] : out;- })+ let out = null;+ if (pageCount.value <= 5) out = pageCount.value;+ else if (props.currentPage <= 3) out = Math.min(4, pageCount.value);+ else if (pageCount.value - props.currentPage <= 2) {+ let range = [];+ for (var i = pageCount.value - 3; i <= pageCount.value; i++) {+ range = [...range, i];+ }+ out = range;+ }++ return out === null ? [props.currentPage - 1, props.currentPage, props.currentPage + 1] : out;+});const handleSetPage = async (page) => {emit('setPage', page);await nextTick();- $element.value?.scrollIntoView({behavior: "smooth", block: "end"});-}+ $element.value?.scrollIntoView({ behavior: 'smooth', block: 'end' });+};</script><template>@@ -34,33 +36,62 @@ const handleSetPage = async (page) => {Showing<span class="font-medium dark:text-neutral-100">{{ props.listLength ? props.itemsPerPage * (currentPage - 1) + 1 : 0 }}</span>to- <span class="font-medium dark:text-neutral-100">{{ Math.min(props.itemsPerPage * (currentPage), props.listLength) }}</span>+ <span class="font-medium dark:text-neutral-100">{{ Math.min(props.itemsPerPage * currentPage, props.listLength) }}</span>of<span class="font-medium dark:text-neutral-100">{{ listLength }}</span><!-- Results --></p><nav><ul- class="flex flex-wrap items-center text-sm leading-tight bg-white dark:bg-primary-dark-800/70 border divide-x rounded h-9 text-neutral-500 dark:text-neutral-200 divide-neutral-200 dark:divide-neutral-700 border-neutral-200 dark:border-neutral-700">- <TablePaginationButton :pageNumber="-1" :text="'Previous'" :disabled="props.currentPage === 1"- @click="handleSetPage(Math.max(1, props.currentPage - 1))" />+ class="flex flex-wrap items-center text-sm leading-tight bg-white dark:bg-primary-dark-800/70 border divide-x rounded h-9 text-neutral-500 dark:text-neutral-200 divide-neutral-200 dark:divide-neutral-700 border-neutral-200 dark:border-neutral-700"+ >+ <TablePaginationButton+ :pageNumber="-1"+ :text="'Previous'"+ :disabled="props.currentPage === 1"+ @click="handleSetPage(Math.max(1, props.currentPage - 1))"+ /><template v-if="pageCount > 5 && props.currentPage > 3">- <TablePaginationButton :pageNumber="1" :currentPage="props.currentPage" @click="handleSetPage(1)" :sticky="true"/>- <TablePaginationButton :pageNumber="-1" :text="'...'" @click="handleSetPage(Math.floor(currentPage/2))" :underline="true"/>+ <TablePaginationButton :pageNumber="1" :currentPage="props.currentPage" @click="handleSetPage(1)" :sticky="true" />+ <TablePaginationButton+ :pageNumber="-1"+ :text="'...'"+ @click="handleSetPage(Math.floor(currentPage / 2))"+ :underline="true"+ /></template>- <TablePaginationButton v-for="page in pageRange" :key="page" :pageNumber="page"- :currentPage="props.currentPage" @click="handleSetPage(page)" />+ <TablePaginationButton+ v-for="page in pageRange"+ :key="page"+ :pageNumber="page"+ :currentPage="props.currentPage"+ @click="handleSetPage(page)"+ /><template v-if="pageCount > 5 && pageCount - props.currentPage > 2">- <TablePaginationButton :pageNumber="-1" :text="'...'" @click="handleSetPage(Math.floor((pageCount - currentPage) / 2 + currentPage))" :underline="true"/>- <TablePaginationButton :pageNumber="pageCount" :currentPage="props.currentPage" @click="handleSetPage(pageCount)" :sticky="true"/>+ <TablePaginationButton+ :pageNumber="-1"+ :text="'...'"+ @click="handleSetPage(Math.floor((pageCount - currentPage) / 2 + currentPage))"+ :underline="true"+ />+ <TablePaginationButton+ :pageNumber="pageCount"+ :currentPage="props.currentPage"+ @click="handleSetPage(pageCount)"+ :sticky="true"+ /></template>- <TablePaginationButton :pageNumber="-1" :text="'Next'" :disabled="props.currentPage === pageCount"- @click="handleSetPage(Math.min(pageCount, props.currentPage + 1))" />+ <TablePaginationButton+ :pageNumber="-1"+ :text="'Next'"+ :disabled="props.currentPage === pageCount"+ @click="handleSetPage(Math.min(pageCount, props.currentPage + 1))"+ /></ul></nav></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/table/TablePaginationButton.vue b/resources/js/components/table/TablePaginationButton.vueindex 9005d522..f4169d1c 100755--- a/resources/js/components/table/TablePaginationButton.vue+++ b/resources/js/components/table/TablePaginationButton.vue@@ -3,17 +3,25 @@ const props = defineProps(['currentPage', 'pageNumber', 'text', 'underline', 'st</script><template>- <li :class="{ 'hidden': props.currentPage !== props.pageNumber && !props.text && !props.sticky }" class="h-full md:block">- <button class="relative inline-flex items-center h-full px-3 group hover:text-neutral-900 hover:dark:text-neutral-50 disabled:dark:text-neutral-500 disabled:text-neutral-300" :class="{ 'text-neutral-900 dark:text-neutral-50 bg-gray-50 dark:bg-neutral-900': props.currentPage === props.pageNumber, }"- :disabled="props.disabled ?? false">+ <li :class="{ hidden: props.currentPage !== props.pageNumber && !props.text && !props.sticky }" class="h-full md:block">+ <button+ class="relative inline-flex items-center h-full px-3 group hover:text-neutral-900 hover:dark:text-neutral-50 disabled:dark:text-neutral-500 disabled:text-neutral-300"+ :class="{ 'text-neutral-900 dark:text-neutral-50 bg-gray-50 dark:bg-neutral-900': props.currentPage === props.pageNumber }"+ :disabled="props.disabled ?? false"+ ><span>{{ props?.text ?? props.pageNumber }}</span>- <span v-if="!props.text || props.underline"+ <span+ v-if="!props.text || props.underline"class="box-content absolute bottom-0 w-0 h-px -mx-px duration-200 ease-out translate-y-px border-transparent group-hover:left-0 group-hover:w-full group-hover:border-l group-hover:border-r bg-neutral-900 dark:bg-violet-600 group-hover:border-neutral-900 group-hover:dark:border-violet-600"- :class="{'left-0 w-full border-l border-r' : props.currentPage === props.pageNumber, 'left-1/2' : props.currentPage !== props.pageNumber}">+ :class="{+ 'left-0 w-full border-l border-r': props.currentPage === props.pageNumber,+ 'left-1/2': props.currentPage !== props.pageNumber,+ }"+ ></span></button></li>-</template>\ No newline at end of file+</template>diff --git a/resources/js/components/video/VideoAmbientPlayer.vue b/resources/js/components/video/VideoAmbientPlayer.vueindex 513401ee..a51c5416 100755--- a/resources/js/components/video/VideoAmbientPlayer.vue+++ b/resources/js/components/video/VideoAmbientPlayer.vue@@ -5,7 +5,7 @@ import { storeToRefs } from 'pinia';import { useAppStore } from '../../stores/AppStore';import { onMounted, onUnmounted, ref, watch } from 'vue';-const player = ref(null)+const player = ref(null);const step = ref(undefined);const canvas = ref(null);const ctx = ref(null);@@ -14,11 +14,11 @@ const appStore = useAppStore();const { lightMode, ambientMode } = storeToRefs(appStore);const draw = () => {- ctx.value.drawImage(player?.value, 0, 0, canvas.value?.width, canvas.value?.height)-}+ ctx.value.drawImage(player?.value, 0, 0, canvas.value?.width, canvas.value?.height);+};const drawLoop = () => {- if(!player.value || lightMode.value || !canvas.value || !ambientMode.value){+ if (!player.value || lightMode.value || !canvas.value || !ambientMode.value) {drawPause();return;}@@ -28,46 +28,38 @@ const drawLoop = () => {};const drawPause = () => {- if(!step.value) return+ if (!step.value) return;window.cancelAnimationFrame(step.value);step.value = undefined;};onMounted(() => {- ctx.value = canvas.value?.getContext("2d")+ ctx.value = canvas.value?.getContext('2d');player.value = document.getElementById('vid-source');-})+});onUnmounted(() => {drawPause();-})+});-watch(() => ambientMode.value, () => {- if (!ambientMode.value) {- drawPause();- }-})+watch(+ () => ambientMode.value,+ () => {+ if (!ambientMode.value) {+ drawPause();+ }+ },+);</script><template><span v-show="!lightMode && ambientMode" class="flex flex-wrap lg:flex-nowrap snap-y w-full absolute left-0 gap-6 -mt-9 pt-2">- <section class="w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 hidden lg:block h-0">- </section>+ <section class="w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 hidden lg:block h-0"></section><section class="flex w-full z-10 rounded-2xl px-6 aspect-video">- <canvas width="10" height="6" aria-hidden="true"- class="w-full opacity-100 h-full p-8 blur-lg" ref="canvas">- Canvas- </canvas>- </section>- <section class="w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 hidden lg:block h-0">+ <canvas width="10" height="6" aria-hidden="true" class="w-full opacity-100 h-full p-8 blur-lg" ref="canvas"> Canvas </canvas></section>+ <section class="w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 hidden lg:block h-0"></section></span>- <VideoPlayer class="z-10"- @loadedData="draw"- @seeked="draw"- @play="drawLoop"- @pause="drawPause"- @ended="drawPause"- />-</template>\ No newline at end of file+ <VideoPlayer class="z-10" @loadedData="draw" @seeked="draw" @play="drawLoop" @pause="drawPause" @ended="drawPause" />+</template>diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vueindex 87e3490d..55e5fbf9 100755--- a/resources/js/components/video/VideoPlayer.vue+++ b/resources/js/components/video/VideoPlayer.vue@@ -5,12 +5,18 @@ import { useContentStore } from '../../stores/ContentStore';import { computed, ref, watch } from 'vue';// Heatmap can be composable-const heatMapData = ref([{ x: 25, y: 60 }, { x: 154, y: 48 }, { x: 266, y: 12 }, { x: 585, y: 18 }, { x: 799, y: 16 }, { x: 1000, y: 100 }]);+const heatMapData = ref([+ { x: 25, y: 60 },+ { x: 154, y: 48 },+ { x: 266, y: 12 },+ { x: 585, y: 18 },+ { x: 799, y: 16 },+ { x: 1000, y: 100 },+]);const heatMap = computed(() => {const start = 'M 0.0,100.0 ';var catmullRomFitting = function (data, alpha) {-if (alpha == 0 || alpha === undefined) {return false;} else {@@ -19,7 +25,6 @@ const heatMap = computed(() => {var d = Math.round(data[0].x) + ',' + Math.round(data[0].y) + ' ';var length = data.length;for (var i = 0; i < length - 1; i++) {-p0 = i == 0 ? data[0] : data[i - 1];p1 = data[i];p2 = data[i + 1];@@ -59,12 +64,12 @@ const heatMap = computed(() => {bp1 = {x: (-d2pow2A * p0.x + A * p1.x + d1pow2A * p2.x) * N,- y: (-d2pow2A * p0.y + A * p1.y + d1pow2A * p2.y) * N+ y: (-d2pow2A * p0.y + A * p1.y + d1pow2A * p2.y) * N,};bp2 = {x: (d3pow2A * p1.x + B * p2.x - d2pow2A * p3.x) * M,- y: (d3pow2A * p1.y + B * p2.y - d2pow2A * p3.y) * M+ y: (d3pow2A * p1.y + B * p2.y - d2pow2A * p3.y) * M,};if (bp1.x == 0 && bp1.y == 0) {@@ -94,19 +99,19 @@ const emit = defineEmits(['loadedData', 'seeked', 'play', 'pause', 'ended']);const initVideoPlayer = () => {let root = document.getElementById('root');root.scrollIntoView();-}+};const handlePlayVideo = () => {if (currentID.value === stateVideo.value.id) return; // stop recording every time video seekcurrentID.value = stateVideo.value.id;createRecord(stateVideo.value.id);updateViewCount(stateVideo.value.id);-}+};const handlePlayerSeeked = () => {// add heatmap data ?emit('seeked');-}+};//#region Player Events@@ -159,21 +164,24 @@ const onPlayerSeek = (event) => {handlePlayerSeeked();};-const playerStateChanged = (event) => {// console.log(event.type);};//#endregion-watch(stateVideo, initVideoPlayer)+watch(stateVideo, initVideoPlayer);</script><template><div class="relative group rounded-xl overflow-clip">- <video id="vid-source" width="100%"- :src="stateVideo?.attributes?.path ? `../${stateVideo?.attributes?.path}` : ''" type="video/mp4" controls- class="focus:outline-none aspect-video flex"+ <video+ id="vid-source"+ width="100%"+ :src="stateVideo?.attributes?.path ? `../${stateVideo?.attributes?.path}` : ''"+ type="video/mp4"+ controls+ class="focus:outline-none aspect-video flex"ref="player"@play="onPlayerPlay"@pause="onPlayerPause"@@ -185,12 +193,21 @@ watch(stateVideo, initVideoPlayer)@canplay="onPlayerCanplay"@canplaythrough="onPlayerCanplaythrough"@statechanged="playerStateChanged"- @seeked="onPlayerSeek">- <track kind="captions">+ @seeked="onPlayerSeek"+ >+ <track kind="captions" /></video>- <section class="absolute bottom-6 w-full hidden px-[1.5%]"> <!-- group-hover:block -->- <svg class="ytp-heat-map-svg fill-indigo-200/70" height="100%" preserveAspectRatio="none" version="1.1"- viewBox="0 0 1000 100" width="100%" style="height: 40px;">+ <section class="absolute bottom-6 w-full hidden px-[1.5%]">+ <!-- group-hover:block -->+ <svg+ class="ytp-heat-map-svg fill-indigo-200/70"+ height="100%"+ preserveAspectRatio="none"+ version="1.1"+ viewBox="0 0 1000 100"+ width="100%"+ style="height: 40px"+ ><defs><!-- <clipPath id="4"><path class="ytp-heat-map-path"@@ -202,10 +219,18 @@ watch(stateVideo, initVideoPlayer)</clipPath></defs><rect class="ytp-heat-map-graph" clip-path="url(#4)" height="100%" width="100%" x="0" y="0"></rect>- <rect class="ytp-heat-map-hover" clip-path="url(#4)" fill="white" fill-opacity="0.7" height="100%"- width="100%" x="0" y="0"></rect>+ <rect+ class="ytp-heat-map-hover"+ clip-path="url(#4)"+ fill="white"+ fill-opacity="0.7"+ height="100%"+ width="100%"+ x="0"+ y="0"+ ></rect><rect class="ytp-heat-map-play" clip-path="url(#4)" height="100%" x="0" y="0"></rect></svg></section></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/composables/useClipboard.js b/resources/js/composables/useClipboard.jsindex 3d7640bf..2f88e637 100755--- a/resources/js/composables/useClipboard.js+++ b/resources/js/composables/useClipboard.js@@ -1,5 +1,5 @@-import { reactive } from "vue";-import { useToast } from "../composables/useToast";+import { reactive } from 'vue';+import { useToast } from '../composables/useToast';export default function useClipboard(copyText) {const toast = useToast();@@ -17,9 +17,9 @@ export default function useClipboard(copyText) {} catch (error) {console.log(error);toast.add({- type: "danger",- title: "Error",- description: "Unable to copy. Network is not secure.",+ type: 'danger',+ title: 'Error',+ description: 'Unable to copy. Network is not secure.',life: 3000,});}diff --git a/resources/js/composables/useDatePicker.js b/resources/js/composables/useDatePicker.jsindex c5eab34c..547eca30 100644--- a/resources/js/composables/useDatePicker.js+++ b/resources/js/composables/useDatePicker.js@@ -1,33 +1,33 @@-import { nextTick, onMounted, reactive, watch } from "vue";+import { nextTick, onMounted, reactive, watch } from 'vue';export default function useDatePicker(props, refs) {const datePicker = reactive({datePickerOpen: false,- datePickerValue: props?.model?.value ?? props?.defaultDate ?? "",- datePickerFormat: "M d, Y",- datePickerMonth: "",- datePickerYear: "",- datePickerDay: "",+ datePickerValue: props?.model?.value ?? props?.defaultDate ?? '',+ datePickerFormat: 'M d, Y',+ datePickerMonth: '',+ datePickerYear: '',+ datePickerDay: '',datePickerDaysInMonth: [],datePickerBlankDaysInMonth: [],datePickerMonthNames: [- "January",- "February",- "March",- "April",- "May",- "June",- "July",- "August",- "September",- "October",- "November",- "December",+ 'January',+ 'February',+ 'March',+ 'April',+ 'May',+ 'June',+ 'July',+ 'August',+ 'September',+ 'October',+ 'November',+ 'December',],- datePickerDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],+ datePickerDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],datePickerInput: refs.datePickerInput,datePickerCalendar: refs.datePickerCalendar,- datePickerPosition: "bottom",+ datePickerPosition: 'bottom',updateRefs(values) {this.datePickerInput = values.datePickerInput;this.datePickerCalendar = values.datePickerCalendar;@@ -37,17 +37,13 @@ export default function useDatePicker(props, refs) {else this.datePickerOpen = !this.datePickerOpen;},datePickerDayClicked(day) {- let selectedDate = new Date(- this.datePickerYear,- this.datePickerMonth,- day- );+ let selectedDate = new Date(this.datePickerYear, this.datePickerMonth, day);this.datePickerDay = day;this.datePickerValue = this.datePickerFormatDate(selectedDate);this.datePickerIsSelectedDate(day);this.datePickerOpen = false;-- if(props?.model) props.model.value = this.datePickerValue;++ if (props?.model) props.model.value = this.datePickerValue;},datePickerPreviousMonth() {if (this.datePickerMonth == 0) {@@ -68,9 +64,7 @@ export default function useDatePicker(props, refs) {},datePickerIsSelectedDate(day) {const d = new Date(this.datePickerYear, this.datePickerMonth, day);- return this.datePickerValue === this.datePickerFormatDate(d)- ? true- : false;+ return this.datePickerValue === this.datePickerFormatDate(d) ? true : false;},datePickerIsToday(day) {const today = new Date();@@ -78,16 +72,9 @@ export default function useDatePicker(props, refs) {return today.toDateString() === d.toDateString() ? true : false;},datePickerCalculateDays() {- let daysInMonth = new Date(- this.datePickerYear,- this.datePickerMonth + 1,- 0- ).getDate();+ let daysInMonth = new Date(this.datePickerYear, this.datePickerMonth + 1, 0).getDate();// find where to start calendar day of week- let dayOfWeek = new Date(- this.datePickerYear,- this.datePickerMonth- ).getDay();+ let dayOfWeek = new Date(this.datePickerYear, this.datePickerMonth).getDay();let blankdaysArray = [];for (let i = 1; i <= dayOfWeek; i++) {blankdaysArray.push(i);@@ -101,30 +88,25 @@ export default function useDatePicker(props, refs) {},datePickerFormatDate(date) {let formattedDay = this.datePickerDays[date.getDay()];- let formattedDate = ("0" + date.getDate()).slice(-2); // appends 0 (zero) in single digit date+ let formattedDate = ('0' + date.getDate()).slice(-2); // appends 0 (zero) in single digit datelet formattedMonth = this.datePickerMonthNames[date.getMonth()];- let formattedMonthShortName = this.datePickerMonthNames[- date.getMonth()- ].substring(0, 3);- let formattedMonthInNumber = (- "0" +- (parseInt(date.getMonth()) + 1)- ).slice(-2);+ let formattedMonthShortName = this.datePickerMonthNames[date.getMonth()].substring(0, 3);+ let formattedMonthInNumber = ('0' + (parseInt(date.getMonth()) + 1)).slice(-2);let formattedYear = date.getFullYear();- if (this.datePickerFormat === "M d, Y") {+ if (this.datePickerFormat === 'M d, Y') {return `${formattedMonthShortName} ${formattedDate}, ${formattedYear}`;}- if (this.datePickerFormat === "MM-DD-YYYY") {+ if (this.datePickerFormat === 'MM-DD-YYYY') {return `${formattedMonthInNumber}-${formattedDate}-${formattedYear}`;}- if (this.datePickerFormat === "DD-MM-YYYY") {+ if (this.datePickerFormat === 'DD-MM-YYYY') {return `${formattedDate}-${formattedMonthInNumber}-${formattedYear}`;}- if (this.datePickerFormat === "YYYY-MM-DD") {+ if (this.datePickerFormat === 'YYYY-MM-DD') {return `${formattedYear}-${formattedMonthInNumber}-${formattedDate}`;}- if (this.datePickerFormat === "D d M, Y") {+ if (this.datePickerFormat === 'D d M, Y') {return `${formattedDay} ${formattedDate} ${formattedMonthShortName} ${formattedYear}`;}@@ -132,14 +114,12 @@ export default function useDatePicker(props, refs) {},datePickerPositionUpdate() {let datePickerBottomPos =- this.datePickerInput.getBoundingClientRect().top +- this.datePickerInput.offsetHeight +- this.datePickerCalendar.offsetHeight;-+ this.datePickerInput.getBoundingClientRect().top + this.datePickerInput.offsetHeight + this.datePickerCalendar.offsetHeight;+if (window.innerHeight < datePickerBottomPos) {- this.datePickerPosition = "top";+ this.datePickerPosition = 'top';} else {- this.datePickerPosition = "bottom";+ this.datePickerPosition = 'bottom';}},});@@ -153,28 +133,26 @@ export default function useDatePicker(props, refs) {datePicker.datePickerYear = datePicker.currentDate.getFullYear();datePicker.datePickerDay = datePicker.currentDate.getDay();-datePicker.datePickerCalculateDays();- if(!props?.useDefaultDate) return;- datePicker.datePickerValue = datePicker.datePickerFormatDate( datePicker.currentDate );-- })+ if (!props?.useDefaultDate) return;+ datePicker.datePickerValue = datePicker.datePickerFormatDate(datePicker.currentDate);+ });const updatePosition = () => {- if(!datePicker.datePickerOpen) return;+ if (!datePicker.datePickerOpen) return;datePicker.datePickerPositionUpdate();- }+ };watch(() => datePicker.datePickerOpen,async function (value) {- if(!value){- removeEventListener("resize", updatePosition);+ if (!value) {+ removeEventListener('resize', updatePosition);return;}await nextTick();- updatePosition()- window.addEventListener("resize", updatePosition);+ updatePosition();+ window.addEventListener('resize', updatePosition);},- { immediate: false }+ { immediate: false },);return datePicker;diff --git a/resources/js/composables/useForm.js b/resources/js/composables/useForm.jsindex 56f84f7f..27ae213f 100755--- a/resources/js/composables/useForm.js+++ b/resources/js/composables/useForm.js@@ -1,6 +1,6 @@-import cloneDeep from "lodash.clonedeep";-import isEqual from "lodash.isequal";-import { reactive, watch } from "vue";+import cloneDeep from 'lodash.clonedeep';+import isEqual from 'lodash.isequal';+import { reactive, watch } from 'vue';export default function useForm(fields) {let defaults = fields;@@ -43,10 +43,7 @@ export default function useForm(fields) {console.log(error?.response?.data?.message ?? error);this.hasErrors = true;- if (- error?.response?.status === 422 ||- error?.response?.status === 401- ) {+ if (error?.response?.status === 422 || error?.response?.status === 401) {this.clearErrors();this.setErrors({message: error?.response?.data.message,@@ -108,7 +105,7 @@ export default function useForm(fields) {() => {form.dirty = !isEqual(form.fields, defaults);},- { immediate: true, deep: true }+ { immediate: true, deep: true },);return form;}diff --git a/resources/js/composables/useMetaData.js b/resources/js/composables/useMetaData.jsindex 9480644d..9b7ee0b0 100755--- a/resources/js/composables/useMetaData.js+++ b/resources/js/composables/useMetaData.js@@ -1,6 +1,6 @@-import { reactive } from "vue";-import { toFormattedDuration } from "@/service/util";-import { useRoute } from "vue-router";+import { reactive } from 'vue';+import { toFormattedDuration } from '@/service/util';+import { useRoute } from 'vue-router';// This so does not work lolexport default function useMetaData(data) {@@ -15,12 +15,12 @@ export default function useMetaData(data) {description: data.description ?? '',url: encodeURI((data?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${data.id}`),},- updateData(props){- this.fields.title = props?.title ?? props?.name,- this.fields.duration = toFormattedDuration(props?.duration) ?? 'N/A',- this.fields.views = props?.view_count ? `${props?.view_count} View${props?.view_count !== 1 ? 's' : ''}` : '0 Views',- this.fields.description = props?.description ?? '',- this.fields.url = encodeURI((props?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${props.id}`)- }+ updateData(props) {+ (this.fields.title = props?.title ?? props?.name),+ (this.fields.duration = toFormattedDuration(props?.duration) ?? 'N/A'),+ (this.fields.views = props?.view_count ? `${props?.view_count} View${props?.view_count !== 1 ? 's' : ''}` : '0 Views'),+ (this.fields.description = props?.description ?? ''),+ (this.fields.url = encodeURI((props?.skipBaseURL ? '' : document.location.origin) + route.path + `?video=${props.id}`));+ },});-}\ No newline at end of file+}diff --git a/resources/js/composables/useModal.js b/resources/js/composables/useModal.jsindex c4eb656a..1f4c1e20 100755--- a/resources/js/composables/useModal.js+++ b/resources/js/composables/useModal.js@@ -1,4 +1,4 @@-import { reactive } from "vue";+import { reactive } from 'vue';export default function useModal(props) {let closingTimeoutID;diff --git a/resources/js/composables/useSelect.js b/resources/js/composables/useSelect.jsindex bd664cc0..4ec95dea 100755--- a/resources/js/composables/useSelect.js+++ b/resources/js/composables/useSelect.js@@ -1,16 +1,16 @@-import { reactive, watch } from "vue";+import { reactive, watch } from 'vue';export default function useSelect(options, refs) {const select = reactive({selectOpen: false,- selectedItem: "",+ selectedItem: '',selectableItems: options,selectableItemActive: null,- selectId: "select-12",- selectKeydownValue: "",+ selectId: 'select-12',+ selectKeydownValue: '',selectKeydownTimeout: 1000,selectKeydownClearTimeout: null,- selectDropdownPosition: "bottom",+ selectDropdownPosition: 'bottom',selectableItemsList: refs.selectableItemsList,selectButton: refs.selectButton,toggleSelect(state) {@@ -22,10 +22,7 @@ export default function useSelect(options, refs) {this.selectableItemsList = values.selectableItemsList;},selectableItemIsActive(item) {- return (- this.selectableItemActive &&- this.selectableItemActive.value == item.value- );+ return this.selectableItemActive && this.selectableItemActive.value == item.value;},selectableItemActiveNext() {let index = this.selectableItems.indexOf(this.selectableItemActive);@@ -43,14 +40,9 @@ export default function useSelect(options, refs) {},selectScrollToActiveItem() {if (this.selectableItemActive) {- let activeElement = document.getElementById(- this.selectableItemActive.value + "-" + this.selectId- );+ let activeElement = document.getElementById(this.selectableItemActive.value + '-' + this.selectId);if (!activeElement) return;- let newScrollPos =- activeElement.offsetTop +- activeElement.offsetHeight -- this.selectableItemsList.offsetHeight;+ let newScrollPos = activeElement.offsetTop + activeElement.offsetHeight - this.selectableItemsList.offsetHeight;if (newScrollPos > 0) {this.selectableItemsList.scrollTop = newScrollPos;} else {@@ -71,10 +63,10 @@ export default function useSelect(options, refs) {}}- if (this.selectKeydownValue != "") {+ if (this.selectKeydownValue != '') {clearTimeout(this.selectKeydownClearTimeout);this.selectKeydownClearTimeout = setTimeout(() => {- this.selectKeydownValue = "";+ this.selectKeydownValue = '';}, this.selectKeydownTimeout);}}@@ -86,11 +78,7 @@ export default function useSelect(options, refs) {for (var i = 0; i < this.selectableItems.length; i++) {var title = this.selectableItems[i].title.toLowerCase();var index = title.indexOf(typedValue);- if (- index > -1 &&- (bestMatchIndex == -1 || index < bestMatchIndex) &&- !this.selectableItems[i].disabled- ) {+ if (index > -1 && (bestMatchIndex == -1 || index < bestMatchIndex) && !this.selectableItems[i].disabled) {bestMatch = this.selectableItems[i];bestMatchIndex = index;}@@ -101,21 +89,19 @@ export default function useSelect(options, refs) {let selectDropdownBottomPos =this.selectButton.getBoundingClientRect().top +this.selectButton.offsetHeight +- parseInt(- window.getComputedStyle(this.selectableItemsList).maxHeight- );+ parseInt(window.getComputedStyle(this.selectableItemsList).maxHeight);if (window.innerHeight < selectDropdownBottomPos) {- this.selectDropdownPosition = "top";+ this.selectDropdownPosition = 'top';} else {- this.selectDropdownPosition = "bottom";+ this.selectDropdownPosition = 'bottom';}},});const updatePosition = () => {- if(!select.selectOpen) return;+ if (!select.selectOpen) return;select.selectPositionUpdate();- }+ };watch(() => select.selectOpen,@@ -126,8 +112,8 @@ export default function useSelect(options, refs) {select.selectableItemActive = select.selectedItem;}- if(!value){- window.removeEventListener("resize", updatePosition);+ if (!value) {+ window.removeEventListener('resize', updatePosition);return;}@@ -136,9 +122,9 @@ export default function useSelect(options, refs) {}, 10);updatePosition();- window.addEventListener("resize", updatePosition);+ window.addEventListener('resize', updatePosition);},- { immediate: false }+ { immediate: false },);return select;diff --git a/resources/js/composables/useTable.js b/resources/js/composables/useTable.jsindex 9bc83683..b269d064 100755--- a/resources/js/composables/useTable.js+++ b/resources/js/composables/useTable.js@@ -1,28 +1,28 @@import { computed, reactive, ref, watch } from 'vue';-export default function useTable(props){+export default function useTable(props) {const currentPage = ref(1);const itemsPerPage = ref(props.itemsPerPage ?? 10);- const searchQuery = ref(props.searchQuery ?? '')+ const searchQuery = ref(props.searchQuery ?? '');const table = reactive({- filteredPage : computed(() => {+ filteredPage: computed(() => {const minIndex = itemsPerPage.value * (currentPage.value - 1);- const maxIndex = Math.min(itemsPerPage.value * (currentPage.value), props.data.length);-+ const maxIndex = Math.min(itemsPerPage.value * currentPage.value, props.data.length);+return props.data.slice(minIndex, maxIndex);}),props,- fields: {currentPage, itemsPerPage, searchQuery},- handlePageChange (page) {+ fields: { currentPage, itemsPerPage, searchQuery },+ handlePageChange(page) {currentPage.value = page;},- handlePageReset () {+ handlePageReset() {currentPage.value = 1;},});- watch(() => props.data, table.handlePageReset, {immediate: true})+ watch(() => props.data, table.handlePageReset, { immediate: true });return table;-}\ No newline at end of file+}diff --git a/resources/js/composables/useToast.js b/resources/js/composables/useToast.jsindex fd7af8cb..3f81c06a 100755--- a/resources/js/composables/useToast.js+++ b/resources/js/composables/useToast.js@@ -1,4 +1,4 @@-import { inject } from "vue";+import { inject } from 'vue';export const ToastSymbol = Symbol();@@ -6,7 +6,7 @@ export function useToast() {const Toast = inject(ToastSymbol);if (!Toast) {- throw new Error("No Toast provided!");+ throw new Error('No Toast provided!');}return Toast;diff --git a/resources/js/composables/useToastController.js b/resources/js/composables/useToastController.jsindex 60c97198..023d9187 100755--- a/resources/js/composables/useToastController.js+++ b/resources/js/composables/useToastController.js@@ -1,10 +1,9 @@-import { reactive, watch } from "vue";-+import { reactive, watch } from 'vue';/*UNUSED -> Left for reference only*/-export default function useToastController($el = document.querySelector('#toastRoot'), layout = "default", position = "top-center") {+export default function useToastController($el = document.querySelector('#toastRoot'), layout = 'default', position = 'top-center') {const toast = reactive({toasts: [],toastsHovered: false,@@ -32,18 +31,18 @@ export default function useToastController($el = document.querySelector('#toastRlet burnToastElement = document.getElementById(burnToast.id);if (burnToastElement) {if (this.toasts.length == 1) {- if (this.layout == "default") {+ if (this.layout == 'default') {this.expanded = false;}- burnToastElement.classList.remove("translate-y-0");- if (this.position.includes("bottom")) {- burnToastElement.classList.add("translate-y-full");+ burnToastElement.classList.remove('translate-y-0');+ if (this.position.includes('bottom')) {+ burnToastElement.classList.add('translate-y-full');} else {- burnToastElement.classList.add("-translate-y-full");+ burnToastElement.classList.add('-translate-y-full');}- burnToastElement.classList.add("-translate-y-full");+ burnToastElement.classList.add('-translate-y-full');}- burnToastElement.classList.add("opacity-0");+ burnToastElement.classList.add('opacity-0');let that = this;setTimeout(function () {that.deleteToastWithId(id);@@ -66,15 +65,15 @@ export default function useToastController($el = document.querySelector('#toastRlet topToast = document.getElementById(this.toasts[0].id);//Custom Addition- if(!topToast) return;+ if (!topToast) return;topToast.style.zIndex = 100;if (this.expanded) {- if (this.position.includes("bottom")) {- topToast.style.top = "auto";- topToast.style.bottom = "0px";+ if (this.position.includes('bottom')) {+ topToast.style.top = 'auto';+ topToast.style.bottom = '0px';} else {- topToast.style.top = "0px";+ topToast.style.top = '0px';}}@@ -85,29 +84,29 @@ export default function useToastController($el = document.querySelector('#toastRlet middleToast = document.getElementById(this.toasts[1].id);//Custom Addition- if(!middleToast) return;+ if (!middleToast) return;middleToast.style.zIndex = 90;if (this.expanded) {- let middleToastPosition = topToast.getBoundingClientRect().height + this.paddingBetweenToasts + "px";+ let middleToastPosition = topToast.getBoundingClientRect().height + this.paddingBetweenToasts + 'px';- if (this.position.includes("bottom")) {- middleToast.style.top = "auto";+ if (this.position.includes('bottom')) {+ middleToast.style.top = 'auto';middleToast.style.bottom = middleToastPosition;} else {middleToast.style.top = middleToastPosition;}- middleToast.style.scale = "100%";- middleToast.style.transform = "translateY(0px)";+ middleToast.style.scale = '100%';+ middleToast.style.transform = 'translateY(0px)';} else {- middleToast.style.scale = "94%";- if (this.position.includes("bottom")) {- middleToast.style.transform = "translateY(-16px)";+ middleToast.style.scale = '94%';+ if (this.position.includes('bottom')) {+ middleToast.style.transform = 'translateY(-16px)';} else {this.alignBottom(topToast, middleToast);- middleToast.style.transform = "translateY(16px)";+ middleToast.style.transform = 'translateY(16px)';}}@@ -116,28 +115,33 @@ export default function useToastController($el = document.querySelector('#toastRlet bottomToast = document.getElementById(this.toasts[2].id);//Custom Addition- if(!bottomToast) return;+ if (!bottomToast) return;bottomToast.style.zIndex = 80;if (this.expanded) {- let bottomToastPosition = topToast.getBoundingClientRect().height + this.paddingBetweenToasts + middleToast.getBoundingClientRect().height + this.paddingBetweenToasts + "px";-- if (this.position.includes("bottom")) {- bottomToast.style.top = "auto";+ let bottomToastPosition =+ topToast.getBoundingClientRect().height ++ this.paddingBetweenToasts ++ middleToast.getBoundingClientRect().height ++ this.paddingBetweenToasts ++ 'px';++ if (this.position.includes('bottom')) {+ bottomToast.style.top = 'auto';bottomToast.style.bottom = bottomToastPosition;} else {bottomToast.style.top = bottomToastPosition;}- bottomToast.style.scale = "100%";- bottomToast.style.transform = "translateY(0px)";+ bottomToast.style.scale = '100%';+ bottomToast.style.transform = 'translateY(0px)';} else {- bottomToast.style.scale = "88%";- if (this.position.includes("bottom")) {- bottomToast.style.transform = "translateY(-32px)";+ bottomToast.style.scale = '88%';+ if (this.position.includes('bottom')) {+ bottomToast.style.transform = 'translateY(-32px)';} else {this.alignBottom(topToast, bottomToast);- bottomToast.style.transform = "translateY(32px)";+ bottomToast.style.transform = 'translateY(32px)';}}@@ -145,29 +149,36 @@ export default function useToastController($el = document.querySelector('#toastRlet burnToast = document.getElementById(this.toasts[3].id);//Custom Addition- if(!burnToast) return;+ if (!burnToast) return;burnToast.style.zIndex = 70;if (this.expanded) {- let burnToastPosition = topToast.getBoundingClientRect().height + this.paddingBetweenToasts + middleToast.getBoundingClientRect().height + this.paddingBetweenToasts + bottomToast.getBoundingClientRect().height + this.paddingBetweenToasts + "px";-- if (this.position.includes("bottom")) {- burnToast.style.top = "auto";+ let burnToastPosition =+ topToast.getBoundingClientRect().height ++ this.paddingBetweenToasts ++ middleToast.getBoundingClientRect().height ++ this.paddingBetweenToasts ++ bottomToast.getBoundingClientRect().height ++ this.paddingBetweenToasts ++ 'px';++ if (this.position.includes('bottom')) {+ burnToast.style.top = 'auto';burnToast.style.bottom = burnToastPosition;} else {burnToast.style.top = burnToastPosition;}- burnToast.style.scale = "100%";- burnToast.style.transform = "translateY(0px)";+ burnToast.style.scale = '100%';+ burnToast.style.transform = 'translateY(0px)';} else {- burnToast.style.scale = "82%";+ burnToast.style.scale = '82%';this.alignBottom(topToast, burnToast);- burnToast.style.transform = "translateY(48px)";+ burnToast.style.transform = 'translateY(48px)';}- burnToast.firstElementChild.classList.remove("opacity-100");- burnToast.firstElementChild.classList.add("opacity-0");+ burnToast.firstElementChild.classList.remove('opacity-100');+ burnToast.firstElementChild.classList.add('opacity-0');let that = this;// Burn 🔥 (remove) last toast@@ -175,8 +186,8 @@ export default function useToastController($el = document.querySelector('#toastRthat.toasts.pop();}, 300);- if (this.position.includes("bottom")) {- middleToast.style.top = "auto";+ if (this.position.includes('bottom')) {+ middleToast.style.top = 'auto';}return;@@ -193,44 +204,37 @@ export default function useToastController($el = document.querySelector('#toastRlet top2 = top1 + (height1 - height2);// Apply the calculated top position to the second element- element2.style.top = top2 + "px";+ element2.style.top = top2 + 'px';},alignTop(element1, element2) {// Get the top position of the first elementlet top1 = element1.offsetTop;// Apply the same top position to the second element- element2.style.top = top1 + "px";+ element2.style.top = top1 + 'px';},resetBottom() {for (let i = 0; i < this.toasts.length; i++) {if (document.getElementById(this.toasts[i].id)) {- let toastElement = document.getElementById(- this.toasts[i].id- );- toastElement.style.bottom = "0px";+ let toastElement = document.getElementById(this.toasts[i].id);+ toastElement.style.bottom = '0px';}}},resetTop() {for (let i = 0; i < this.toasts.length; i++) {if (document.getElementById(this.toasts[i].id)) {- let toastElement = document.getElementById(- this.toasts[i].id- );- toastElement.style.top = "0px";+ let toastElement = document.getElementById(this.toasts[i].id);+ toastElement.style.top = '0px';}}},getBottomPositionOfElement(el) {- return (- el.getBoundingClientRect().height +- el.getBoundingClientRect().top- );+ return el.getBoundingClientRect().height + el.getBoundingClientRect().top;},calculateHeightOfToastsContainer() {if (this.toasts.length == 0) {- $el.value.style.height = "0px";+ $el.value.style.height = '0px';return;}@@ -241,52 +245,46 @@ export default function useToastController($el = document.querySelector('#toastRlet firstToastRectangle = document.getElementById(firstToast.id).getBoundingClientRect();if (this.toastsHovered) {- if (this.position.includes("bottom")) {- $el.value.style.height =- firstToastRectangle.top +- firstToastRectangle.height -- lastToastRectangle.top +- "px";+ if (this.position.includes('bottom')) {+ $el.value.style.height = firstToastRectangle.top + firstToastRectangle.height - lastToastRectangle.top + 'px';} else {- $el.value.style.height =- lastToastRectangle.top +- lastToastRectangle.height -- firstToastRectangle.top +- "px";+ $el.value.style.height = lastToastRectangle.top + lastToastRectangle.height - firstToastRectangle.top + 'px';}} else {- $el.value.style.height = firstToastRectangle.height + "px";+ $el.value.style.height = firstToastRectangle.height + 'px';}},});- watch(() => toast.toastsHovered, function (value) {-- if (toast.layout == 'default') {- if (toast.position.includes('bottom')) {- toast.resetBottom();- } else {- toast.resetTop();- }-- if (value) {- // calculate the new positions- toast.expanded = true;- if (toast.layout == 'default') {- toast.stackToasts();+ watch(+ () => toast.toastsHovered,+ function (value) {+ if (toast.layout == 'default') {+ if (toast.position.includes('bottom')) {+ toast.resetBottom();+ } else {+ toast.resetTop();}- } else {- if (toast.layout == 'default') {- toast.expanded = false;- // setTimeout(function(){- toast.stackToasts();- // }, 10);- setTimeout(function () {++ if (value) {+ // calculate the new positions+ toast.expanded = true;+ if (toast.layout == 'default') {+ toast.stackToasts();+ }+ } else {+ if (toast.layout == 'default') {+ toast.expanded = false;+ // setTimeout(function(){toast.stackToasts();- }, 10)+ // }, 10);+ setTimeout(function () {+ toast.stackToasts();+ }, 10);+ }}}- }- });+ },+ );return toast;}diff --git a/resources/js/layouts/LayoutAuth.vue b/resources/js/layouts/LayoutAuth.vueindex aefb2f0b..f4665585 100755--- a/resources/js/layouts/LayoutAuth.vue+++ b/resources/js/layouts/LayoutAuth.vue@@ -1,5 +1,7 @@<template>- <main class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-white dark:bg-neutral-800 sm:bg-gray-100 sm:dark:bg-[#121216] dark:text-[#e2e0e2]">+ <main+ class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-white dark:bg-neutral-800 sm:bg-gray-100 sm:dark:bg-[#121216] dark:text-[#e2e0e2]"+ ><slot name="content"></slot></main>-</template>\ No newline at end of file+</template>diff --git a/resources/js/layouts/LayoutBase.vue b/resources/js/layouts/LayoutBase.vueindex ebb1cf88..e9da0a42 100755--- a/resources/js/layouts/LayoutBase.vue+++ b/resources/js/layouts/LayoutBase.vue@@ -17,20 +17,29 @@ const scrollBody = ref(null);</script><template>- <div class="h-screen" :class="{'' : scrollLock}" ref="scrollBody">+ <div class="h-screen" :class="{ '': scrollLock }" ref="scrollBody"><!-- overflow-y-hidden -->- <main class="flex p-6 gap-6 flex-wrap lg:flex-nowrap snap-y bg-primary-950 dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased">- <section id="left-card" class="w-full h-fit p-3 pb-6 rounded-2xl lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6 hidden lg:block">- </section>- <section id="content-card"- class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-6 pt-3 rounded-2xl w-full h-fit flex flex-col gap-3 z-20">+ <main+ class="flex p-6 gap-6 flex-wrap lg:flex-nowrap snap-y bg-primary-950 dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased"+ >+ <section+ id="left-card"+ class="w-full h-fit p-3 pb-6 rounded-2xl lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6 hidden lg:block"+ ></section>+ <section+ id="content-card"+ class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-6 pt-3 rounded-2xl w-full h-fit flex flex-col gap-3 z-20"+ ><NavBar class="z-20" /><slot name="content" class="relative z-0"></slot></section>- <section id="list-card" :class="{ invisible: !selectedSideBar }"- class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-3 rounded-2xl w-full h-fit lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6 z-20">+ <section+ id="list-card"+ :class="{ invisible: !selectedSideBar }"+ class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-3 rounded-2xl w-full h-fit lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6 z-20"+ ><slot name="sidebar"></slot></section></main></div>-</template>\ No newline at end of file+</template>diff --git a/resources/js/router/index.js b/resources/js/router/index.jsindex 906187a6..faf9a455 100755--- a/resources/js/router/index.js+++ b/resources/js/router/index.js@@ -1,14 +1,14 @@import SettingsView from '../views/SettingsView.vue';-import HistoryView from '../views/HistoryView.vue'-import ProfileView from '../views/ProfileView.vue'-import RegisterView from "../views/RegisterView.vue";-import LoginView from "../views/LoginView.vue";-import VideoView from '../views/VideoView.vue'+import HistoryView from '../views/HistoryView.vue';+import ProfileView from '../views/ProfileView.vue';+import RegisterView from '../views/RegisterView.vue';+import LoginView from '../views/LoginView.vue';+import VideoView from '../views/VideoView.vue';import ErrorView from '../views/ErrorView.vue';-import { createRouter, createWebHistory} from "vue-router";-import { useAuthStore } from "../stores/AuthStore";-import { logout } from "../service/authAPI";+import { createRouter, createWebHistory } from 'vue-router';+import { useAuthStore } from '../stores/AuthStore';+import { logout } from '../service/authAPI';import { toTitleCase } from '../service/util';import { useToast } from '../composables/useToast';@@ -16,23 +16,23 @@ const router = createRouter({history: createWebHistory(),routes: [{- path:'/',- name:'root',- redirect:'/anime'+ path: '/',+ name: 'root',+ redirect: '/anime',},{- path:'/login',- name:'login',- component: LoginView+ path: '/login',+ name: 'login',+ component: LoginView,},{- path:'/register',- name:'register',- component: RegisterView+ path: '/register',+ name: 'register',+ component: RegisterView,},{- path:'/logout',- name:'logout',+ path: '/logout',+ name: 'logout',component: {async beforeRouteEnter(to, from, next) {try {@@ -43,88 +43,90 @@ const router = createRouter({await logout();clearAuthState();- if(from.meta?.protected || from.name === 'logout'){+ if (from.meta?.protected || from.name === 'logout') {nextPath = '/';- nextTitle = 'Home'+ nextTitle = 'Home';}document.title = nextTitle;- next(nextPath)+ next(nextPath);} catch (error) {const toast = useToast();- toast.add({ type: 'danger', title:'Error', description: `Unable to logout.`})+ toast.add({ type: 'danger', title: 'Error', description: `Unable to logout.` });console.log(error);next('/');document.title = 'Home'; // Update Page Title}- }- }+ },+ },},{- path:'/history',- name:'history',- meta: {protected: true},- component: HistoryView+ path: '/history',+ name: 'history',+ meta: { protected: true },+ component: HistoryView,},{- path:'/profile',- name:'profile',- component: ProfileView+ path: '/profile',+ name: 'profile',+ component: ProfileView,},{- path:'/settings',- name:'settings',- component: SettingsView+ path: '/settings',+ name: 'settings',+ component: SettingsView,},{- path:'/:category/:folder?',- name:'home',- component: VideoView+ path: '/:category/:folder?',+ name: 'home',+ component: VideoView,},{- path:'/403',- name:'403',+ path: '/403',+ name: '403',component: ErrorView,- meta: {code: 403, message: 'Access Forbidden'}+ meta: { code: 403, message: 'Access Forbidden' },},{- path:'/404',- name:'404',+ path: '/404',+ name: '404',component: ErrorView,- meta: {code: 404, message: 'Not Found'}+ meta: { code: 404, message: 'Not Found' },},{- path:'/500',- name:'500',+ path: '/500',+ name: '500',component: ErrorView,- meta: {code: 500, message: 'Server Error'}- }- ]-})+ meta: { code: 500, message: 'Server Error' },+ },+ ],+});router.beforeEach(async (to, from, next) => {- if(to.name !== 'logout') document.title = to.meta?.title ?? toTitleCase(to.name); // Update Page Title+ if (to.name !== 'logout') document.title = to.meta?.title ?? toTitleCase(to.name); // Update Page Title- if(to.name === 'login' && !to.query.redirect && from.fullPath !== '/'){+ if (to.name === 'login' && !to.query.redirect && from.fullPath !== '/') {to.query = {redirect: from.name !== 'login' ? from.fullPath : null,- }+ };next();return;}- if(!to.meta?.protected){ // Not protected route+ if (!to.meta?.protected) {+ // Not protected routenext();return;}const authStore = useAuthStore();const { auth } = authStore;-- if( await auth() ){ // Logged in -> user and page is protected++ if (await auth()) {+ // Logged in -> user and page is protectednext();return;}@@ -133,16 +135,17 @@ router.beforeEach(async (to, from, next) => {next({name: 'login',query: {- redirect: to.fullPath- }+ redirect: to.fullPath,+ },});-})+});-router.afterEach((to) => { // Scroll to top on every spa page load- if(to?.name === 'home') return;+router.afterEach((to) => {+ // Scroll to top on every spa page load+ if (to?.name === 'home') return;let root = document.getElementById('root');root.scrollIntoView();});-export default router;\ No newline at end of file+export default router;diff --git a/resources/js/service/api.js b/resources/js/service/api.jsindex ab11d9e6..48ba1cc7 100755--- a/resources/js/service/api.js+++ b/resources/js/service/api.js@@ -1,38 +1,39 @@-import axios from "axios";+import axios from 'axios';const handleResponse = (response) => {return response;-}+};const handleError = (error) => {// if the server throws an error (404, 500 etc.)console.log(error);- if(error.response.status === 403){ //|| error.response.status === 500- window.location = `/${error.response.status}?message=${error?.response?.data?.message ?? error?.message}`+ if (error.response.status === 403) {+ //|| error.response.status === 500+ window.location = `/${error.response.status}?message=${error?.response?.data?.message ?? error?.message}`;return;}- if(error.response.status === 401 || error.response.status == 422) throw(error);+ if (error.response.status === 401 || error.response.status == 422) throw error;console.log(error);return error.response;-}+};export const API = axios.create({- baseURL: "/api",+ baseURL: '/api',headers: {- Accept: "application/json",- "Content-Type": "application/json",+ Accept: 'application/json',+ 'Content-Type': 'application/json',},withCredentials: true,});export const WEB = axios.create({- baseURL: "/",+ baseURL: '/',headers: {- Accept: "application/json",- "Content-Type": "application/json",+ Accept: 'application/json',+ 'Content-Type': 'application/json',},withCredentials: true,});diff --git a/resources/js/service/authAPI.js b/resources/js/service/authAPI.jsindex eb849bc6..928bf5bc 100755--- a/resources/js/service/authAPI.js+++ b/resources/js/service/authAPI.js@@ -1,13 +1,13 @@import { WEB, API } from './api';export const getCSRF = async () => {- return WEB.get(`/sanctum/csrf-cookie`)-}+ return WEB.get(`/sanctum/csrf-cookie`);+};export const login = async (credentials) => {try {await WEB.get(`/sanctum/csrf-cookie`);- const response = await API.post('/login', credentials)+ const response = await API.post('/login', credentials);return Promise.resolve(response);} catch (error) {return Promise.reject(error);@@ -16,29 +16,31 @@ export const login = async (credentials) => {export const register = async (credentials) => {try {- const response = await API.post('/register', credentials)+ const response = await API.post('/register', credentials);return Promise.resolve(response);} catch (error) {return Promise.reject(error);}-}+};export const logout = async () => {try {const response = await API.delete('/logout');const { data } = response;- return Promise.resolve({response: data});+ return Promise.resolve({ response: data });} catch (error) {- return Promise.reject({error});+ return Promise.reject({ error });}-}+};export const authenticate = async (token) => {try {- return await API.get('/auth', { headers: {- Authorization: `bearer ${token}`- }});+ return await API.get('/auth', {+ headers: {+ Authorization: `bearer ${token}`,+ },+ });} catch (error) {- return Promise.reject({error});+ return Promise.reject({ error });}-}\ No newline at end of file+};diff --git a/resources/js/service/eventBus.ts b/resources/js/service/eventBus.tsindex 768a9765..f7c7284f 100755--- a/resources/js/service/eventBus.ts+++ b/resources/js/service/eventBus.ts@@ -39,6 +39,6 @@ export function EventBus(): EventBusOptions {},clear() {allHandlers.clear();- }+ },};-}\ No newline at end of file+}diff --git a/resources/js/service/mediaAPI.js b/resources/js/service/mediaAPI.jsindex a0786800..0b541915 100755--- a/resources/js/service/mediaAPI.js+++ b/resources/js/service/mediaAPI.js@@ -4,31 +4,31 @@Have create, get, update actionsRun and commit to database (store) -> ?? What does that mean?*/-import { API } from "./api"+import { API } from './api';-export default{+export default {getVideos(data) {return API.post('/videos', data);},viewVideo(id) {- return API.patch(`/videos/watch/${id}`)+ return API.patch(`/videos/watch/${id}`);},- updateVideo(id,data){- return API.patch(`/videos/${id}`, data)+ updateVideo(id, data) {+ return API.patch(`/videos/${id}`, data);},- createMetadata(data){- return API.post(`/metadata/`, data)+ createMetadata(data) {+ return API.post(`/metadata/`, data);},- updateMetadata(id,data){- return API.patch(`/metadata/${id}`, data)+ updateMetadata(id, data) {+ return API.patch(`/metadata/${id}`, data);},- createSeries(data){- return API.post(`/series`, data)+ createSeries(data) {+ return API.post(`/series`, data);},- updateSeries(id,data){- return API.patch(`/series/${id}`, data)+ updateSeries(id, data) {+ return API.patch(`/series/${id}`, data);},getCategory(query) {return API.get(`/${query}`);- }-}\ No newline at end of file+ },+};diff --git a/resources/js/service/recordsAPI.js b/resources/js/service/recordsAPI.jsindex 4f9ac315..62e82f8f 100755--- a/resources/js/service/recordsAPI.js+++ b/resources/js/service/recordsAPI.js@@ -4,16 +4,16 @@Have get, add, and delete actionsRun and commit to database (store) -> ?? What does that mean?*/-import { API } from "./api"+import { API } from './api';-export default{+export default {createRecord(data) {- return API.post('/records', data)+ return API.post('/records', data);},getRecords(query) {return API.get(`/records${query ?? ''}`);},deleteRecord(query) {return API.delete(`/records${query}`);- }-}\ No newline at end of file+ },+};diff --git a/resources/js/service/toastEventBus.js b/resources/js/service/toastEventBus.jsindex b9365f06..ff265e63 100755--- a/resources/js/service/toastEventBus.js+++ b/resources/js/service/toastEventBus.js@@ -1,3 +1,3 @@import { EventBus } from './eventBus';-export default EventBus();\ No newline at end of file+export default EventBus();diff --git a/resources/js/service/toastService.js b/resources/js/service/toastService.jsindex 76567d26..c4fbde0d 100755--- a/resources/js/service/toastService.js+++ b/resources/js/service/toastService.js@@ -15,10 +15,10 @@ export default {},removeAllGroups: () => {ToastEventBus.emit('remove-all-groups');- }+ },};app.config.globalProperties.$toast = ToastService;app.provide(ToastSymbol, ToastService);- }-};\ No newline at end of file+ },+};diff --git a/resources/js/service/util.js b/resources/js/service/util.jsindex 0cb2f8f4..9aa5e2b0 100755--- a/resources/js/service/util.js+++ b/resources/js/service/util.js@@ -1,38 +1,50 @@export function toTitleCase(str) {- return str.toLowerCase().replace(/(?:^|\s)\w/g, function(match) {+ return str.toLowerCase().replace(/(?:^|\s)\w/g, function (match) {return match.toUpperCase();});}export function toTimeSpan(rawDate) {const rawAge = Date.now() - rawDate.getTime();-+const weeks = Math.round(rawAge / (1000 * 3600 * 24 * 7));const days = Math.round(rawAge / (1000 * 3600 * 24));const hours = Math.round(rawAge / (1000 * 3600));const minutes = Math.round(rawAge / (1000 * 60));- const seconds = Math.round(rawAge / (1000));-- const timeSpan = weeks > 0 ? `${weeks} week${weeks > 1 ? 's' : ''} ago` : days > 0 ? `${days} day${days > 1 ? 's' : ''} ago` : hours > 0 ? `${hours} hour${hours > 1 ? 's' : ''} ago` : minutes > 0 ? `${minutes}m ago` : `${seconds}s ago`;+ const seconds = Math.round(rawAge / 1000);++ const timeSpan =+ weeks > 0+ ? `${weeks} week${weeks > 1 ? 's' : ''} ago`+ : days > 0+ ? `${days} day${days > 1 ? 's' : ''} ago`+ : hours > 0+ ? `${hours} hour${hours > 1 ? 's' : ''} ago`+ : minutes > 0+ ? `${minutes}m ago`+ : `${seconds}s ago`;return timeSpan;}export function toFormattedDate(rawDate) {- return (rawDate.toLocaleString([], {year: 'numeric', month: '2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit', hour12: true})).toLocaleUpperCase().replaceAll('.','');+ return rawDate+ .toLocaleString([], { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', hour12: true })+ .toLocaleUpperCase()+ .replaceAll('.', '');}export function toFormattedDuration(rawSeconds) {- if(isNaN(parseInt(rawSeconds))) return null;- const hours = Math.floor(rawSeconds / (3600));- const minutes = Math.floor((rawSeconds % 3600) / (60));+ if (isNaN(parseInt(rawSeconds))) return null;+ const hours = Math.floor(rawSeconds / 3600);+ const minutes = Math.floor((rawSeconds % 3600) / 60);const seconds = Math.floor(rawSeconds % 60);-- const duration = `${hours > 0 ? `${hours}h `:''}${minutes > 0 ? `${minutes}m `:''}${`${formatInteger(seconds)}s`}`;++ const duration = `${hours > 0 ? `${hours}h ` : ''}${minutes > 0 ? `${minutes}m ` : ''}${`${formatInteger(seconds)}s`}`;return duration;}export function formatInteger(integer, minimumDigits = 2) {- return integer.toLocaleString('en-CA', { minimumIntegerDigits: minimumDigits})-}\ No newline at end of file+ return integer.toLocaleString('en-CA', { minimumIntegerDigits: minimumDigits });+}diff --git a/resources/js/stores/AppStore.js b/resources/js/stores/AppStore.jsindex 9012065b..8ffa8055 100755--- a/resources/js/stores/AppStore.js+++ b/resources/js/stores/AppStore.js@@ -1,64 +1,66 @@-import { ref } from "vue";-import { defineStore } from "pinia";+import { ref } from 'vue';+import { defineStore } from 'pinia';-export const useAppStore = defineStore("App", () => {- const pageTitle = ref("");+export const useAppStore = defineStore('App', () => {+ const pageTitle = ref('');const lightMode = ref(null);const ambientMode = ref(null);- const selectedSideBar = ref("");+ const selectedSideBar = ref('');const scrollLock = ref(false);function toggleDarkMode() {- let rootHTML = document.querySelector("html");+ let rootHTML = document.querySelector('html');- localStorage.setItem("lightMode", lightMode.value);- lightMode.value- ? rootHTML.classList.remove("dark", "tw-dark")- : rootHTML.classList.add("dark", "tw-dark");+ localStorage.setItem('lightMode', lightMode.value);+ lightMode.value ? rootHTML.classList.remove('dark', 'tw-dark') : rootHTML.classList.add('dark', 'tw-dark');}function initDarkMode() {let init = lightMode.value === null;- let cachedState = localStorage.getItem("lightMode");+ let cachedState = localStorage.getItem('lightMode');if (!init) return;- lightMode.value = cachedState === "true";- localStorage.setItem("lightMode", lightMode.value);+ lightMode.value = cachedState === 'true';+ localStorage.setItem('lightMode', lightMode.value);}function setAmbientMode() {- localStorage.setItem("ambientMode", ambientMode.value);+ localStorage.setItem('ambientMode', ambientMode.value);}function initAmbientMode() {let init = ambientMode.value === null;- let cachedState = localStorage.getItem("ambientMode");+ let cachedState = localStorage.getItem('ambientMode');if (!init) return;- ambientMode.value = cachedState === "true";- localStorage.setItem("ambientMode", ambientMode.value);+ ambientMode.value = cachedState === 'true';+ localStorage.setItem('ambientMode', ambientMode.value);}- function cycleSideBar(target = "") {+ function cycleSideBar(target = '') {if (selectedSideBar.value === target) {- selectedSideBar.value = "";- document- .getElementById("root")- .scrollIntoView({ behavior: "smooth" });+ selectedSideBar.value = '';+ document.getElementById('root').scrollIntoView({ behavior: 'smooth' });return;}selectedSideBar.value = target;}- function setScrollLock(state = false){+ function setScrollLock(state = false) {scrollLock.value = state;}return {- initDarkMode, toggleDarkMode, lightMode,- initAmbientMode, setAmbientMode, ambientMode,- cycleSideBar, selectedSideBar,+ initDarkMode,+ toggleDarkMode,+ lightMode,+ initAmbientMode,+ setAmbientMode,+ ambientMode,+ cycleSideBar,+ selectedSideBar,pageTitle,- scrollLock, setScrollLock+ scrollLock,+ setScrollLock,};});diff --git a/resources/js/stores/AuthStore.js b/resources/js/stores/AuthStore.jsindex c37168c9..85b017bd 100755--- a/resources/js/stores/AuthStore.js+++ b/resources/js/stores/AuthStore.js@@ -1,7 +1,7 @@-import { ref } from "vue";-import { defineStore } from "pinia";-import { authenticate } from "../service/authAPI";-import { useToast } from "../composables/useToast";+import { ref } from 'vue';+import { defineStore } from 'pinia';+import { authenticate } from '../service/authAPI';+import { useToast } from '../composables/useToast';export const useAuthStore = defineStore('Auth', () => {const userData = ref(null);@@ -20,15 +20,16 @@ export const useAuthStore = defineStore('Auth', () => {*/- if(!localStorage.getItem('auth-token')) return false; // console.log('no auth token');-- if(userData.value === null && !localStorage.getItem('auth-token')) return false; // console.log('never logged in');+ if (!localStorage.getItem('auth-token')) return false; // console.log('no auth token');++ if (userData.value === null && !localStorage.getItem('auth-token')) return false; // console.log('never logged in');try {const localToken = localStorage.getItem('auth-token');- const { data, error, status } = await authenticate(localToken)-- if(error || status !== 200){ // Auth request was denied (so local data is invalid) -> don't logout because that will be another 401 anyway+ const { data, error, status } = await authenticate(localToken);++ if (error || status !== 200) {+ // Auth request was denied (so local data is invalid) -> don't logout because that will be another 401 anywaythrow error ?? 'Unauthenticated';}@@ -36,18 +37,21 @@ export const useAuthStore = defineStore('Auth', () => {return true;} catch (error) {console.log(error);- toast.add({ type: 'warning', title:'Session Expired', description: `Please log in again.`})+ toast.add({ type: 'warning', title: 'Session Expired', description: `Please log in again.` });clearAuthState();return false;}- }-+ };+const clearAuthState = () => {userData.value = null;localStorage.removeItem('auth-token');- }+ };return {- user, userData, auth, clearAuthState,+ user,+ userData,+ auth,+ clearAuthState,};-});\ No newline at end of file+});diff --git a/resources/js/stores/ContentStore.js b/resources/js/stores/ContentStore.jsindex 0a623c02..79d8cf0a 100755--- a/resources/js/stores/ContentStore.js+++ b/resources/js/stores/ContentStore.js@@ -1,14 +1,13 @@-import recordsAPI from "@/service/recordsAPI";-import mediaAPI from "@/service/mediaAPI";+import recordsAPI from '@/service/recordsAPI';+import mediaAPI from '@/service/mediaAPI';import { toFormattedDate } from '@/service/util';-import { ref, watch } from "vue";-import { defineStore, storeToRefs } from "pinia";-import { useAppStore } from "./AppStore";-import { useAuthStore } from "./AuthStore";-import { useRoute } from "vue-router";-import { useToast } from "../composables/useToast";-+import { ref, watch } from 'vue';+import { defineStore, storeToRefs } from 'pinia';+import { useAppStore } from './AppStore';+import { useAuthStore } from './AuthStore';+import { useRoute } from 'vue-router';+import { useToast } from '../composables/useToast';export const useContentStore = defineStore('Content', () => {const AppStore = useAppStore();@@ -22,74 +21,74 @@ export const useContentStore = defineStore('Content', () => {const fullRecordsLoaded = ref(false);- const stateDirectory = ref({id:7, name:'anime', folders: []})- const stateFolder = ref({id:7, name:'ODDTAXI', videos: [], series: null})+ const stateDirectory = ref({ id: 7, name: 'anime', folders: [] });+ const stateFolder = ref({ id: 7, name: 'ODDTAXI', videos: [], series: null });const statePlaylist = ref([]);- const stateFilteredPlaylist = ref([]);+ const stateFilteredPlaylist = ref([]);const stateVideo = ref({});const { pageTitle } = storeToRefs(AppStore);const { userData } = storeToRefs(AuthStore);const searchQuery = ref('');- const filterQuery = ref({search: '', season: -1, tag: ''});+ const filterQuery = ref({ search: '', season: -1, tag: '' });- async function updateViewCount(id){+ async function updateViewCount(id) {const { data, error } = await mediaAPI.viewVideo(id);- if(error || !data?.success){+ if (error || !data?.success) {console.log(error ?? data?.message);return Promise.reject([]);}stateVideo.value.attributes.view_count += 1;- return Promise.resolve(stateVideo.value)+ return Promise.resolve(stateVideo.value);}- async function getRecords(limit){- if(!userData.value) return;-- if(fullRecordsLoaded.value){+ async function getRecords(limit) {+ if (!userData.value) return;++ if (fullRecordsLoaded.value) {Promise.resolve(records.value);return;}- if(!limit) fullRecordsLoaded.value = true;+ if (!limit) fullRecordsLoaded.value = true;records.value = [];- const { data, error } = await recordsAPI.getRecords(limit ? `?limit=${limit}`: '');+ const { data, error } = await recordsAPI.getRecords(limit ? `?limit=${limit}` : '');- if(error || !data?.success){+ if (error || !data?.success) {console.log(error ?? data?.message);return Promise.reject([]);}records.value = data?.data ?? []; // always overwrite because if limit is set and results cached, no request is made. Otherwise its a full request.- return Promise.resolve(records.value)+ return Promise.resolve(records.value);}- async function createRecord(id){- if(!userData.value) return;- const { data, error } = await recordsAPI.createRecord({ 'video_id': id });+ async function createRecord(id) {+ if (!userData.value) return;+ const { data, error } = await recordsAPI.createRecord({ video_id: id });- if(error || !data?.success){+ if (error || !data?.success) {console.log(error ?? data?.message);return Promise.reject([]);}records.value = [data?.data, ...records.value];- return Promise.resolve(records.value)+ return Promise.resolve(records.value);}- async function deleteRecord(id){+ async function deleteRecord(id) {const recordID = parseInt(id);- const { data, error } = await recordsAPI.deleteRecord(`/${recordID}`)- if(error || !data?.success){+ const { data, error } = await recordsAPI.deleteRecord(`/${recordID}`);+ if (error || !data?.success) {console.log(error ?? data?.message);return false;}- records.value = records.value.filter((record) => {+ records.value = records.value.filter((record) => {return record.id != recordID;});@@ -98,7 +97,7 @@ export const useContentStore = defineStore('Content', () => {const recordsSort = (column = 'created_at', dir = 1) => {let tempList = records.value.sort((recordA, recordB) => {- if(column === 'created_at'){+ if (column === 'created_at') {let dateA = new Date(recordA?.attributes['created_at']);let dateB = new Date(recordB?.attributes['created_at']);return (dateB - dateA) * dir;@@ -107,12 +106,12 @@ export const useContentStore = defineStore('Content', () => {});records.value = tempList;return tempList;- }+ };async function getCategory(URL_CATEGORY, URL_FOLDER) {- const { data, error } = await mediaAPI.getCategory(`${URL_CATEGORY}${URL_FOLDER ? '/' + URL_FOLDER : ''}`)- if(error || !data?.success){- toast.add({ type: 'danger', title:'Error', description: data?.message ?? 'Unable to load data.'})+ const { data, error } = await mediaAPI.getCategory(`${URL_CATEGORY}${URL_FOLDER ? '/' + URL_FOLDER : ''}`);+ if (error || !data?.success) {+ toast.add({ type: 'danger', title: 'Error', description: data?.message ?? 'Unable to load data.' });pageTitle.value = 'Folder not Found';console.log(error ?? data?.message);return false;@@ -129,26 +128,27 @@ export const useContentStore = defineStore('Content', () => {}async function getFolder(nextFolderName) {- const nextFolder = stateDirectory.value.folders?.find((folder) => {return folder.attributes.name === nextFolderName});-- if(!nextFolder?.id){- toast.add({ type: 'danger', title:'Invalid folder', description: `The folder '${nextFolderName}' does not exist.`})+ const nextFolder = stateDirectory.value.folders?.find((folder) => {+ return folder.attributes.name === nextFolderName;+ });++ if (!nextFolder?.id) {+ toast.add({ type: 'danger', title: 'Invalid folder', description: `The folder '${nextFolderName}' does not exist.` });return;}- const { data, error } = await mediaAPI.getVideos({ folder_id: nextFolder.id}); // get videos with given folder id (list of videos organised by folder id)+ const { data, error } = await mediaAPI.getVideos({ folder_id: nextFolder.id }); // get videos with given folder id (list of videos organised by folder id)- if(error || !data?.success){- toast.add({ type: 'danger', title:'Invalid folder', description: `The folder '${nextFolderName}' does not exist.`})+ if (error || !data?.success) {+ toast.add({ type: 'danger', title: 'Invalid folder', description: `The folder '${nextFolderName}' does not exist.` });pageTitle.value = 'Folder not Found';console.log(error ?? data?.message);return Promise.reject(false);}-+// console.log(nextFolder);-- stateFolder.value = {id: nextFolder.id, name: nextFolder.attributes.name, videos: data.data, series: nextFolder.series ?? null};+ stateFolder.value = { id: nextFolder.id, name: nextFolder.attributes.name, videos: data.data, series: nextFolder.series ?? null };pageTitle.value = stateFolder.value.name;InitPlaylist();@@ -158,44 +158,43 @@ export const useContentStore = defineStore('Content', () => {//Playlist and Search// PlaylistSeek (index) next previous specific- function playlistSeek(direction){+ function playlistSeek(direction) {let nextIndex = stateVideo.value.index + direction;- if( nextIndex < 0 || nextIndex > statePlaylist.value.length ) return;+ if (nextIndex < 0 || nextIndex > statePlaylist.value.length) return;stateVideo.value = statePlaylist.value[nextIndex];document.title = `${stateFolder.value.name} · ${stateVideo.value?.attributes?.title ?? stateVideo.value?.attributes?.name}`;}- function playlistFind(id){+ function playlistFind(id) {let result = statePlaylist.value.length > 0 ? statePlaylist.value[0] : {};- if(id && stateVideo.value.id === id) return;+ if (id && stateVideo.value.id === id) return;- if(!isNaN(parseInt(id))){- result = statePlaylist.value.find((video) => {- return video.id === id+ if (!isNaN(parseInt(id))) {+ result = statePlaylist.value.find((video) => {+ return video.id === id;});}- if(!result) toast.add({ type: 'danger', title:'Invalid Video', description: 'Selected video cannot be found...'})+ if (!result) toast.add({ type: 'danger', title: 'Invalid Video', description: 'Selected video cannot be found...' });else {stateVideo.value = result;document.title = `${stateFolder.value.name} · ${stateVideo.value?.attributes?.title ?? stateVideo.value?.attributes?.name}`;}-}// InitPlaylist (set up playlist with indexes and current video)- async function InitPlaylist(){- filterQuery.value = {search: '', season: -1, tag: ''};- if(!stateFolder.value.id){- toast.add({ type: 'danger', title:'Invalid folder', description: `The folder '${stateFolder.value.name}' does not exist.`})+ async function InitPlaylist() {+ filterQuery.value = { search: '', season: -1, tag: '' };+ if (!stateFolder.value.id) {+ toast.add({ type: 'danger', title: 'Invalid folder', description: `The folder '${stateFolder.value.name}' does not exist.` });return;- }+ }- statePlaylist.value = stateFolder.value.videos.map((video, index) => {+ statePlaylist.value = stateFolder.value.videos.map((video, index) => {video.attributes.date = toFormattedDate(new Date(video.attributes.date + ' GMT'));- return {index, ...video};- } );+ return { index, ...video };+ });playlistSort();searchQuery.value = '';playlistFind(route.query?.video);@@ -203,62 +202,78 @@ export const useContentStore = defineStore('Content', () => {const playlistSort = (column = 'name', dir = 1) => {let tempList = statePlaylist.value.sort((videoA, videoB) => {- if(column === 'date'){+ if (column === 'date') {let dateA = new Date(videoA?.attributes[column]);let dateB = new Date(videoB?.attributes[column]);return (dateB - dateA) * dir;}- if(column === 'name' || column === 'title') return videoA?.attributes[column].localeCompare(videoB?.attributes[column]) * dir;+ if (column === 'name' || column === 'title') return videoA?.attributes[column].localeCompare(videoB?.attributes[column]) * dir;return (videoB?.attributes[column] - videoA?.attributes[column]) * dir;});stateFilteredPlaylist.value = tempList;return tempList;- }+ };const playlistFilter = (query) => {// console.log(query);-- let tempList = query ? statePlaylist.value.filter((video) => {{- try {- let strRepresentation = [video.attributes.name, video.attributes.date].join(' ').toLowerCase();- // console.log(strRepresentation);-- return strRepresentation.includes(query.toLowerCase())- } catch (error) {- console.log(error);- return false- }- }}) : statePlaylist.value;++ let tempList = query+ ? statePlaylist.value.filter((video) => {+ {+ try {+ let strRepresentation = [video.attributes.name, video.attributes.date].join(' ').toLowerCase();+ // console.log(strRepresentation);++ return strRepresentation.includes(query.toLowerCase());+ } catch (error) {+ console.log(error);+ return false;+ }+ }+ })+ : statePlaylist.value;stateFilteredPlaylist.value = tempList;- }+ };const updateVideoData = (data, index) => {const localIndex = Object.keys(statePlaylist.value).find((entry) => statePlaylist.value[entry].index == index);- if(localIndex) {- statePlaylist.value[localIndex] = {...data};+ if (localIndex) {+ statePlaylist.value[localIndex] = { ...data };}- }+ };const updateFolderData = (data, id) => {const localIndex = Object.keys(stateDirectory.value.folders).find((entry) => stateDirectory.value.folders[entry].id == id);-- if(localIndex) {- stateDirectory.value.folders[localIndex] = {...stateDirectory.value.folders[localIndex], series: {...data}};++ if (localIndex) {+ stateDirectory.value.folders[localIndex] = { ...stateDirectory.value.folders[localIndex], series: { ...data } };}- }+ };- watch(searchQuery, playlistFilter, {immediate: false});+ watch(searchQuery, playlistFilter, { immediate: false });return {- folders, records,- stateDirectory, stateFolder, stateVideo,- searchQuery, filterQuery, stateFilteredPlaylist,- getRecords, createRecord, deleteRecord, recordsSort,- getCategory, getFolder,- updateViewCount, updateVideoData,+ folders,+ records,+ stateDirectory,+ stateFolder,+ stateVideo,+ searchQuery,+ filterQuery,+ stateFilteredPlaylist,+ getRecords,+ createRecord,+ deleteRecord,+ recordsSort,+ getCategory,+ getFolder,+ updateViewCount,+ updateVideoData,updateFolderData,- playlistSeek, playlistFind, playlistSort+ playlistSeek,+ playlistFind,+ playlistSort,};-});\ No newline at end of file+});diff --git a/resources/js/views/ErrorView.vue b/resources/js/views/ErrorView.vueindex ce97e294..4a62ffa3 100755--- a/resources/js/views/ErrorView.vue+++ b/resources/js/views/ErrorView.vue@@ -1,16 +1,15 @@-<template><main class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center sm:pt-0"><div class="max-w-xl mx-auto sm:px-6 lg:px-8"><div class="flex items-center pt-8 sm:justify-start sm:pt-0"><div class="px-4 text-lg text-gray-400 border-r border-gray-400 tracking-wider">- {{ $route.name }}+ {{ $route.name }}</div><div class="ml-4 text-lg text-gray-500 uppercase tracking-wider">- {{ $route.meta.message }} : {{ $route.query?.message ?? 'No message' }}+ {{ $route.meta.message }} : {{ $route.query?.message ?? 'No message' }}</div></div></div></main>-</template>\ No newline at end of file+</template>diff --git a/resources/js/views/HistoryView.vue b/resources/js/views/HistoryView.vueindex fdbbf9d6..73ef3f51 100755--- a/resources/js/views/HistoryView.vue+++ b/resources/js/views/HistoryView.vue@@ -1,6 +1,6 @@<script setup>import RecordCardDetails from '../components/cards/RecordCardDetails.vue';-import LayoutBase from '../layouts/LayoutBase.vue';;+import LayoutBase from '../layouts/LayoutBase.vue';import ModalBase from '../components/pinesUI/ModalBase.vue';import useModal from '../composables/useModal';import TableBase from '../components/table/TableBase.vue';@@ -25,24 +25,32 @@ const { records } = storeToRefs(ContentStore);const { getRecords, deleteRecord, recordsSort } = ContentStore;const filteredRecords = computed(() => {- let tempList = searchQuery.value ? records.value.filter((video) => {- {- try {- let strRepresentation = [video.relationships?.video_name, video.relationships?.folder_name, video.attributes.created_at,].join(' ').toLowerCase();- return strRepresentation.includes(searchQuery.value.toLowerCase())- } catch (error) {- console.log(error);- return false- }- }- }) : records.value;+ let tempList = searchQuery.value+ ? records.value.filter((video) => {+ {+ try {+ let strRepresentation = [+ video.relationships?.video_name,+ video.relationships?.folder_name,+ video.attributes.created_at,+ ]+ .join(' ')+ .toLowerCase();+ return strRepresentation.includes(searchQuery.value.toLowerCase());+ } catch (error) {+ console.log(error);+ return false;+ }+ }+ })+ : records.value;return tempList;-})+});const handleDelete = (id) => {cachedID.value = id;confirmModal.toggleModal(true);-}+};const submitDelete = async () => {if (cachedID.value) {@@ -50,51 +58,58 @@ const submitDelete = async () => {if (request) toast.add({ type: 'success', title: 'Success', description: 'Record Deleted Successfully!', life: 3000 });else toast.add({ type: 'warning', title: 'Error', description: 'Unable to delete record. Please try again.', life: 3000 });}-}+};const sortingOptions = ref([{title: 'Date',value: 'created_at',- disabled: false+ disabled: false,},{title: 'Title',value: 'video_name',- disabled: false+ disabled: false,},{title: 'Folder',value: 'folder_name',- disabled: false+ disabled: false,},]);const handleSort = (column = 'date', dir = 1) => {recordsSort(column, dir);-}+};const handleSearch = (query) => {searchQuery.value = query;-}+};onMounted(() => {- pageTitle.value = "History";+ pageTitle.value = 'History';selectedSideBar.value = '';(async () => {await getRecords();loading.value = false;- })()-})+ })();+});</script><template><LayoutBase><template v-slot:content>- <section id="content-history" class=" space-y-2 min-h-[80vh] ">- <TableBase :data="filteredRecords" :row="RecordCardDetails" :clickAction="handleDelete"- :loading="loading" :useToolbar="true" :sortAction="handleSort" :sortingOptions="sortingOptions"- @search="handleSearch" />+ <section id="content-history" class="space-y-2 min-h-[80vh]">+ <TableBase+ :data="filteredRecords"+ :row="RecordCardDetails"+ :clickAction="handleDelete"+ :loading="loading"+ :useToolbar="true"+ :sortAction="handleSort"+ :sortingOptions="sortingOptions"+ @search="handleSearch"+ /></section><ModalBase :modalData="confirmModal" :action="submitDelete"><template #content>@@ -108,4 +123,4 @@ onMounted(() => {<!-- <HistorySidebar /> --></template></LayoutBase>-</template>\ No newline at end of file+</template>diff --git a/resources/js/views/LoginView.vue b/resources/js/views/LoginView.vueindex 1ca81bf7..d26c058b 100755--- a/resources/js/views/LoginView.vue+++ b/resources/js/views/LoginView.vue@@ -4,13 +4,12 @@ import FormInputLabel from '../components/labels/FormInputLabel.vue';import FormInput from '../components/inputs/FormInput.vue';import useForm from '../composables/useForm';-import { useRouter, useRoute, RouterLink } from 'vue-router'-import { useAuthStore } from '../stores/AuthStore'+import { useRouter, useRoute, RouterLink } from 'vue-router';+import { useAuthStore } from '../stores/AuthStore';import { storeToRefs } from 'pinia';import { login } from '../service/authAPI';import { ref } from 'vue';-const router = useRouter();const route = useRoute();const authStore = useAuthStore();@@ -25,7 +24,7 @@ const form = useForm({email: '',password: '',remember: false,-})+});const handleLogin = async () => {form.submit(@@ -39,22 +38,20 @@ const handleLogin = async () => {router.push(route.query.redirect ?? '/');},onError: () => form.reset('password'),- }- )-}+ },+ );+};</script><template><LayoutAuth><template #content><div- class="flex items-center pt-8 sm:justify-start sm:pt-0 text-gray-500 border-gray-400 dark:text-gray-400 dark:border-gray-400">- <div class="px-4 text-lg tracking-wider">- Media Server- </div>+ class="flex items-center pt-8 sm:justify-start sm:pt-0 text-gray-500 border-gray-400 dark:text-gray-400 dark:border-gray-400"+ >+ <div class="px-4 text-lg tracking-wider">Media Server</div></div>- <div- class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-neutral-800 sm:shadow-md overflow-hidden sm:rounded-lg">+ <div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-neutral-800 sm:shadow-md overflow-hidden sm:rounded-lg"><!-- Session Status --><form class="flex flex-col gap-2" @submit.prevent="handleLogin"><div v-for="(field, index) in fields" :key="index">@@ -65,9 +62,13 @@ const handleLogin = async () => {<!-- Remember Me --><div class="block"><label for="remember_me" class="inline-flex items-center">- <input v-model="form.fields.remember" id="remember_me" type="checkbox"+ <input+ v-model="form.fields.remember"+ id="remember_me"+ type="checkbox"class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"- name="remember_me">+ name="remember_me"+ /><span class="ms-2 text-sm text-gray-600 dark:text-gray-400">Remember me</span></label></div>@@ -81,13 +82,17 @@ const handleLogin = async () => {<div class="flex items-center justify-end mt-4"><RouterLinkclass="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"- to="/register">+ to="/register"+ >Not Registered?</RouterLink>- <button type="submit"+ <button+ type="submit"class="inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150 ms-3"- :class="{ 'opacity-25': form.processing }" :disabled="form.processing">+ :class="{ 'opacity-25': form.processing }"+ :disabled="form.processing"+ >Log in</button></div>@@ -95,4 +100,4 @@ const handleLogin = async () => {</div></template></LayoutAuth>-</template>\ No newline at end of file+</template>diff --git a/resources/js/views/ProfileView.vue b/resources/js/views/ProfileView.vueindex 5bd0f073..6cc8dcf7 100755--- a/resources/js/views/ProfileView.vue+++ b/resources/js/views/ProfileView.vue@@ -12,83 +12,72 @@ const appStore = useAppStore();const { pageTitle, selectedSideBar } = storeToRefs(appStore);onMounted(() => {- pageTitle.value = 'Tests';- selectedSideBar.value = '';+ pageTitle.value = 'Tests';+ selectedSideBar.value = '';});</script><template>- <LayoutBase>- <template #content>- <section class="min-h-[80vh]">- <div class="relative w-auto h-auto">- <div class="relative space-y-5">- <div class="relative">- <p- class="mb-2 text-xs font-medium text-center text-gray-500 sm:text-left"- >- Tests- </p>- <div- class="relative flex flex-col px-10 space-y-2 sm:space-x-5 sm:space-y-0 sm:flex-row sm:px-0"- >- <ButtonText- @click="- toast.add({- type: 'danger',- title: 'Default Toast Notification',- description:- 'This is an example toast notification',- life: 3000,- })- "- >- <template #text>- Test Notification- </template>- </ButtonText>- <ButtonText- @click="- toast.add({- type: 'success',- title: 'Default Toast Notification',- description:- 'This is an example toast notification',- life: 3000,- })- "- >- <template #text> Test </template>- </ButtonText>- <ButtonText- @click="- toast.add({- type: 'warning',- title: 'Default Toast Notification',- description:- 'This is an example toast notification',- life: 3000,- })- "- >- <template #text> Test </template>- </ButtonText>- <ButtonText- @click="- toast.add({- type: 'info',- title: 'Default Toast Notification',- life: 3000,- })- "- >- <template #text> Test </template>- </ButtonText>- </div>- </div>- </div>- </div>- </section>- </template>- </LayoutBase>+ <LayoutBase>+ <template #content>+ <section class="min-h-[80vh]">+ <div class="relative w-auto h-auto">+ <div class="relative space-y-5">+ <div class="relative">+ <p class="mb-2 text-xs font-medium text-center text-gray-500 sm:text-left">Tests</p>+ <div class="relative flex flex-col px-10 space-y-2 sm:space-x-5 sm:space-y-0 sm:flex-row sm:px-0">+ <ButtonText+ @click="+ toast.add({+ type: 'danger',+ title: 'Default Toast Notification',+ description: 'This is an example toast notification',+ life: 3000,+ })+ "+ >+ <template #text> Test Notification </template>+ </ButtonText>+ <ButtonText+ @click="+ toast.add({+ type: 'success',+ title: 'Default Toast Notification',+ description: 'This is an example toast notification',+ life: 3000,+ })+ "+ >+ <template #text> Test </template>+ </ButtonText>+ <ButtonText+ @click="+ toast.add({+ type: 'warning',+ title: 'Default Toast Notification',+ description: 'This is an example toast notification',+ life: 3000,+ })+ "+ >+ <template #text> Test </template>+ </ButtonText>+ <ButtonText+ @click="+ toast.add({+ type: 'info',+ title: 'Default Toast Notification',+ life: 3000,+ })+ "+ >+ <template #text> Test </template>+ </ButtonText>+ </div>+ </div>+ </div>+ </div>+ </section>+ </template>+ </LayoutBase></template>diff --git a/resources/js/views/RegisterView.vue b/resources/js/views/RegisterView.vueindex c0a58d48..6e83d053 100755--- a/resources/js/views/RegisterView.vue+++ b/resources/js/views/RegisterView.vue@@ -5,12 +5,11 @@ import FormInput from '../components/inputs/FormInput.vue';import useForm from '../composables/useForm';import { register } from '../service/authAPI';-import { useRouter, RouterLink } from 'vue-router'+import { useRouter, RouterLink } from 'vue-router';import { useAuthStore } from '../stores/AuthStore';import { storeToRefs } from 'pinia';import { ref } from 'vue';-const router = useRouter();const authStore = useAuthStore();const { userData } = storeToRefs(authStore);@@ -27,8 +26,7 @@ const form = useForm({email: '',password: '',password_confirmation: '',-})-+});const handleRegister = async () => {form.submit(@@ -42,24 +40,22 @@ const handleRegister = async () => {router.push({ name: 'root' });},onError: () => {- form.reset('password', 'password_confirmation')+ form.reset('password', 'password_confirmation');},- }- )-}+ },+ );+};</script><template><LayoutAuth><template #content><div- class="flex items-center pt-8 sm:justify-start sm:pt-0 text-gray-500 border-gray-400 dark:text-gray-400 dark:border-gray-400">- <div class="px-4 text-lg tracking-wider">- Media Server- </div>+ class="flex items-center pt-8 sm:justify-start sm:pt-0 text-gray-500 border-gray-400 dark:text-gray-400 dark:border-gray-400"+ >+ <div class="px-4 text-lg tracking-wider">Media Server</div></div>- <div- class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-neutral-800 sm:shadow-md overflow-hidden sm:rounded-lg">+ <div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-neutral-800 sm:shadow-md overflow-hidden sm:rounded-lg"><form class="flex flex-col gap-4" @submit.prevent="handleRegister"><div v-for="(field, index) in fields" :key="index"><FormInputLabel :field="field" />@@ -72,12 +68,15 @@ const handleRegister = async () => {<div class="flex items-center justify-end mt-4"><RouterLinkclass="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"- to="/login">+ to="/login"+ >Already registered?</RouterLink>- <button type="submit"- class="inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150 ms-4">+ <button+ type="submit"+ class="inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150 ms-4"+ >Register</button></div>@@ -85,4 +84,4 @@ const handleRegister = async () => {</div></template></LayoutAuth>-</template>\ No newline at end of file+</template>diff --git a/resources/js/views/SettingsView.vue b/resources/js/views/SettingsView.vueindex 33c4d8a2..374bcffb 100755--- a/resources/js/views/SettingsView.vue+++ b/resources/js/views/SettingsView.vue@@ -12,23 +12,23 @@ const appStore = useAppStore();const { pageTitle, ambientMode } = storeToRefs(appStore);onMounted(() => {- pageTitle.value = 'Settings';+ pageTitle.value = 'Settings';});</script><template>- <LayoutBase>- <template v-slot:content>- <section id="content-settings" class="space-y-2 cursor-pointer min-h-[80vh]">- <FormInputLabel :field="{ name: 'ToggleAmbientMode', text: 'Ambient Mode' }" />- <div class="flex items-center gap-2">- <ToggleBase v-model="ambientMode" />- <p>{{ ambientMode ? 'On' : 'Off' }}</p>- </div>- </section>- </template>- <template v-slot:sidebar>- <!-- <Settings /> -->- </template>- </LayoutBase>+ <LayoutBase>+ <template v-slot:content>+ <section id="content-settings" class="space-y-2 cursor-pointer min-h-[80vh]">+ <FormInputLabel :field="{ name: 'ToggleAmbientMode', text: 'Ambient Mode' }" />+ <div class="flex items-center gap-2">+ <ToggleBase v-model="ambientMode" />+ <p>{{ ambientMode ? 'On' : 'Off' }}</p>+ </div>+ </section>+ </template>+ <template v-slot:sidebar>+ <!-- <Settings /> -->+ </template>+ </LayoutBase></template>diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vueindex 22cfe761..9bdb815f 100755--- a/resources/js/views/VideoView.vue+++ b/resources/js/views/VideoView.vue@@ -10,8 +10,7 @@ import { nextTick, onMounted, ref, watch } from 'vue';import { useContentStore } from '../stores/ContentStore';import { useAppStore } from '../stores/AppStore';import { storeToRefs } from 'pinia';-import { useRoute } from 'vue-router'-+import { useRoute } from 'vue-router';const route = useRoute();const loading = ref(true);@@ -22,13 +21,13 @@ const { searchQuery, stateFilteredPlaylist, stateVideo } = storeToRefs(ContentStconst { getFolder, getCategory, getRecords, playlistFind, playlistSort } = ContentStore;async function cycleSideBar(state) {- if (state === "history") {+ if (state === 'history') {await getRecords(10);}if (!state) return;await nextTick();- document.querySelector('#list-card').scrollIntoView({ behavior: "smooth" });+ document.querySelector('#list-card').scrollIntoView({ behavior: 'smooth' });}async function reload(nextFolderName) {@@ -43,47 +42,47 @@ const sortingOptions = ref([{title: 'Title',value: 'title',- disabled: false+ disabled: false,},{title: 'Duration',value: 'duration',- disabled: false+ disabled: false,},{title: 'Views',value: 'view_count',- disabled: false+ disabled: false,},{title: 'Date Uploaded',value: 'date',- disabled: false+ disabled: false,},{title: 'Date released',value: 'date_released',- disabled: true+ disabled: true,},{title: 'Episode',value: 'episode',- disabled: true+ disabled: true,},{title: 'Season',value: 'season',- disabled: true+ disabled: true,},]);const handleSort = (column = 'date', dir = 1) => {playlistSort(column, dir);-}+};const handleSearch = (query) => {searchQuery.value = query;-}+};onMounted(async () => {const URL_CATEGORY = route.params.category;@@ -91,7 +90,7 @@ onMounted(async () => {await getCategory(URL_CATEGORY, URL_FOLDER);loading.value = false;-})+});watch(() => route.params.folder, reload, { immediate: false });watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });@@ -101,9 +100,8 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });<LayoutBase><template v-slot:content><section id="content-video" class="flex flex-col gap-3">-<div id="video-container" class="flex flex-col gap-3">- <VideoAmbientPlayer/>+ <VideoAmbientPlayer /><!-- <hr class=""> -->@@ -112,13 +110,21 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });<!-- <hr id='preData'> -->- <TableBase :data="stateFilteredPlaylist" :row="VideoCard" :clickAction="playlistFind" :loading="loading"- :useToolbar="true" :sortAction="handleSort" :sortingOptions="sortingOptions"- :selectedID="stateVideo?.id" @search="handleSearch" />+ <TableBase+ :data="stateFilteredPlaylist"+ :row="VideoCard"+ :clickAction="playlistFind"+ :loading="loading"+ :useToolbar="true"+ :sortAction="handleSort"+ :sortingOptions="sortingOptions"+ :selectedID="stateVideo?.id"+ @search="handleSearch"+ /></section></template><template v-slot:sidebar><VideoSidebar /></template></LayoutBase>-</template>\ No newline at end of file+</template>diff --git a/tailwind.config.js b/tailwind.config.jsindex bb0936a3..1c968e59 100755--- a/tailwind.config.js+++ b/tailwind.config.js@@ -1,20 +1,20 @@import defaultTheme from 'tailwindcss/defaultTheme';// eslint-disable-next-line no-undef-const plugin = require('tailwindcss/plugin')+const plugin = require('tailwindcss/plugin');/** @type {import('tailwindcss').Config} */export default {prefix: '',darkMode: 'class',content: [- "./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",- "./storage/framework/views/*.php",- "./resources/views/**/*.blade.php",- "./resources/**/*.blade.php",- "./resources/**/*.js",- "./resources/**/*.vue",- './resources/js/components/**/*.vue',+ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',+ './storage/framework/views/*.php',+ './resources/views/**/*.blade.php',+ './resources/**/*.blade.php',+ './resources/**/*.js',+ './resources/**/*.vue',+ './resources/js/components/**/*.vue',],theme: {extend: {@@ -27,12 +27,13 @@ export default {// 'primary-dark': {// 800: '#1D2128',//#1D2128 //#13171d //#121216// 900: '#211E1D',- // 950: '#121216',//original: #121216 rtc: #161312 figma:+ // 950: '#121216',//original: #121216 rtc: #161312 figma:// }// },- colors: { // Default- 'primary': {+ colors: {+ // Default+ primary: {800: '#f4f4f5',900: '#fafafa',950: '#FCF9F8',@@ -44,30 +45,30 @@ export default {900: '#18181b', // Panel950: '#101016', // bg},- 'secondary': {},- 'accent': {+ secondary: {},+ accent: {500: '#f59e0b',- 600: '#ea580c'+ 600: '#ea580c',},- 'text': {},- 'input': {+ text: {},+ input: {100: '#F9F9F9', // Light bg200: '#D8D8D8', // Light outline800: '#212529', // Datatables bg dark900: '#505056', // Dark bg950: '#2D2D2d', // Darl outline},- 'button': {+ button: {100: '#E3E2E5', // Light primary200: '#D2D2D2', // Light secondary900: '#2F2F33', // Dark primary950: '#2F2F33', // Dark secondary- }+ },},aspectRatio: {- 'video': '16 / 9',- 'square': '1 / 1',- 'portrait': '9 / 16',+ video: '16 / 9',+ square: '1 / 1',+ portrait: '9 / 16','1/2': '1 / 2','2/3': '2 / 3','3/4': '3 / 4',@@ -76,15 +77,15 @@ export default {},variants: {extend: {- visibility: ["group-hover"],+ visibility: ['group-hover'],fontFamily: {sans: ['Figtree', ...defaultTheme.fontFamily.sans],},},},plugins: [- plugin(function({ addVariant }) {- addVariant('hocus', ['&:hover', '&:focus'])+ plugin(function ({ addVariant }) {+ addVariant('hocus', ['&:hover', '&:focus']);}),// eslint-disable-next-line no-undefrequire('@tailwindcss/forms'),@@ -92,6 +93,5 @@ export default {require('@tailwindcss/aspect-ratio'),// eslint-disable-next-line no-undefrequire('tailwind-scrollbar-hide'),- ]-}-+ ],+};diff --git a/vite.config.js b/vite.config.jsindex 346d0602..0d458647 100755--- a/vite.config.js+++ b/vite.config.js@@ -1,7 +1,7 @@import { defineConfig } from 'vite';import laravel from 'laravel-vite-plugin';-import vue from '@vitejs/plugin-vue'-import Icons from 'unplugin-icons/vite'+import vue from '@vitejs/plugin-vue';+import Icons from 'unplugin-icons/vite';export default defineConfig({plugins: [@@ -13,6 +13,6 @@ export default defineConfig({Icons({// experimentalautoInstall: true,- })+ }),],});