A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
Broken Vue Implementation
aminnausin102398d795ac
diff --git a/package-lock.json b/package-lock.jsonindex e5507604..497b7815 100644--- a/package-lock.json+++ b/package-lock.json@@ -7,8 +7,10 @@"dependencies": {"@tailwindcss/aspect-ratio": "^0.4.2","@tailwindcss/forms": "^0.5.7",+ "pinia": "^2.1.7","vue": "^3.4.29",- "vue-loader": "^17.4.2"+ "vue-loader": "^17.4.2",+ "vue-router": "^4.4.0"},"devDependencies": {"@vitejs/plugin-vue": "^5.0.5",@@ -846,6 +848,11 @@"@vue/shared": "3.4.29"}},+ "node_modules/@vue/devtools-api": {+ "version": "6.6.3",+ "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.3.tgz",+ "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw=="+ },"node_modules/@vue/reactivity": {"version": "3.4.29","resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.29.tgz",@@ -2182,6 +2189,56 @@"node": ">=0.10.0"}},+ "node_modules/pinia": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.7.tgz",+ "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==",+ "dependencies": {+ "@vue/devtools-api": "^6.5.0",+ "vue-demi": ">=0.14.5"+ },+ "funding": {+ "url": "https://github.com/sponsors/posva"+ },+ "peerDependencies": {+ "@vue/composition-api": "^1.4.0",+ "typescript": ">=4.4.4",+ "vue": "^2.6.14 || ^3.3.0"+ },+ "peerDependenciesMeta": {+ "@vue/composition-api": {+ "optional": true+ },+ "typescript": {+ "optional": true+ }+ }+ },+ "node_modules/pinia/node_modules/vue-demi": {+ "version": "0.14.8",+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",+ "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",+ "hasInstallScript": true,+ "bin": {+ "vue-demi-fix": "bin/vue-demi-fix.js",+ "vue-demi-switch": "bin/vue-demi-switch.js"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/antfu"+ },+ "peerDependencies": {+ "@vue/composition-api": "^1.0.0-rc.1",+ "vue": "^3.0.0-0 || ^2.6.0"+ },+ "peerDependenciesMeta": {+ "@vue/composition-api": {+ "optional": true+ }+ }+ },"node_modules/pirates": {"version": "4.0.6","resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",@@ -3000,6 +3057,20 @@}}},+ "node_modules/vue-router": {+ "version": "4.4.0",+ "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.0.tgz",+ "integrity": "sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==",+ "dependencies": {+ "@vue/devtools-api": "^6.5.1"+ },+ "funding": {+ "url": "https://github.com/sponsors/posva"+ },+ "peerDependencies": {+ "vue": "^3.2.0"+ }+ },"node_modules/watchpack": {"version": "2.4.1","resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz",diff --git a/package.json b/package.jsonindex bd7f6265..0ecc0656 100644--- a/package.json+++ b/package.json@@ -17,7 +17,9 @@"dependencies": {"@tailwindcss/aspect-ratio": "^0.4.2","@tailwindcss/forms": "^0.5.7",+ "pinia": "^2.1.7","vue": "^3.4.29",- "vue-loader": "^17.4.2"+ "vue-loader": "^17.4.2",+ "vue-router": "^4.4.0"}}diff --git a/public/js/main.js b/public/js/main.jsindex 8285e662..24e886d6 100644--- a/public/js/main.js+++ b/public/js/main.js@@ -38,9 +38,9 @@ document.addEventListener("DOMContentLoaded", function(event) {//#region UI Navigation- $("#user_header").on('click', function(){- document.querySelector("#user_dropdown").classList.toggle("hidden");- });+ // $("#user_header").on('click', function(){+ // document.querySelector("#user_dropdown").classList.toggle("hidden");+ // });$("#btn-nav-folders").on('click', function(){cycleSideBar("folders");@@ -50,16 +50,16 @@ document.addEventListener("DOMContentLoaded", function(event) {cycleSideBar("history");});- window.addEventListener('click', function(e){- try {- let dropdown = this.document.querySelector("#user_dropdown")- if (!this.document.querySelector("#user_options").contains(e.target)){- dropdown.classList.add("hidden");- }- } catch (error) {- console.log(error);- }- });+ // window.addEventListener('click', function(e){+ // try {+ // let dropdown = this.document.querySelector("#user_dropdown")+ // if (!this.document.querySelector("#user_options").contains(e.target)){+ // dropdown.classList.add("hidden");+ // }+ // } catch (error) {+ // console.log(error);+ // }+ // });//#endregion});diff --git a/resources/js/App.vue b/resources/js/App.vuenew file mode 100644index 00000000..4e237bc9--- /dev/null+++ b/resources/js/App.vue@@ -0,0 +1,23 @@+<!-- <script setup>+const props = defineProps({+ user: Object+});+</script> -->+<script setup>+ import { onMounted, ref } from 'vue';+ import {RouterView} from 'vue-router'+ import { useAuthStore } from './stores/AuthStore';+ const authStore = useAuthStore();++ onMounted(() => {+ fetch(`/sanctum/csrf-cookie`, {+ method: 'get'+ }).catch((error) => {+ console.log(error);+ });+ })+</script>++<template>+ <RouterView/>+</template>\ No newline at end of filediff --git a/resources/js/app.js b/resources/js/app.jsindex 85c8f262..38dbf6fd 100644--- a/resources/js/app.js+++ b/resources/js/app.js@@ -1,5 +1,12 @@import './bootstrap';import { createApp } from 'vue';-import app from './components/app.vue';+import { createPinia } from 'pinia';+import router from './router'+import App from './App.vue';-createApp(app).mount('#app')\ No newline at end of file+const application = createApp(App);+const pinia = createPinia()++application.use(router);+application.use(pinia);+application.mount('#app')\ No newline at end of filediff --git a/resources/js/components/EditDetails.vue b/resources/js/components/EditDetails.vuenew file mode 100644index 00000000..e69de29bdiff --git a/resources/js/components/FolderCard.vue b/resources/js/components/FolderCard.vuenew file mode 100644index 00000000..99108638--- /dev/null+++ b/resources/js/components/FolderCard.vue@@ -0,0 +1,19 @@+<script setup>+ const {folderData} = defineProps(['folderData'])+</script>++<template>+ <div class="p-2 flex flex-wrap rounded-xl bg-neutral-100 dark:bg-neutral-800 dark:text-white shadow-md w-full divide-y divide-gray-300 group">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl truncate">{{ folderData?.folder_name }}</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500 line-clamp-1">{{folderData?.file_count}} Episode{{folderData?.file_count > 1 ? 's' : ''}}</h3>+ <button class="hidden group-hover:flex space-x-1 folder-link" :data-id="folderData?.folder_id" :data-name="folderData?.folder_name">+ <span class="flex hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2 space-x-1">+ Watch+ </span>+ </button>+ </aside>+ </div>+</template>\ No newline at end of filediff --git a/resources/js/components/RecordCard.vue b/resources/js/components/RecordCard.vuenew file mode 100644index 00000000..d60b9b8e--- /dev/null+++ b/resources/js/components/RecordCard.vue@@ -0,0 +1,21 @@+<script setup>+ const { record } = defineProps(['record']);+</script>++<template>+ <div class="flex flex-wrap rounded-xl dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-[3%] w-full divide-y divide-gray-300 group flex-grow">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl text-left truncate">{{ record.videoName}}</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500 truncate">{{ record.folderName}}</h3>+ <h3 class="text-lg text-right text-neutral-500 text-nowrap line-clamp-1 truncate">{{ record.timeSpan}}</h3>+ <span class="hidden flex space-x-1">+ <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </span>+ </aside>+ </div>+</template>\ No newline at end of filediff --git a/resources/js/components/RecordFull.vue b/resources/js/components/RecordFull.vuenew file mode 100644index 00000000..6f2e2429--- /dev/null+++ b/resources/js/components/RecordFull.vue@@ -0,0 +1,31 @@+<script setup>+ const { record } = defineProps(['record']);+</script>++<template>+ <div class="flex gap-12 group cursor-default">+ <div class="flex rounded-xl items-center justify-center dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-3 w-full group flex-grow cursor-pointer">+ <div class="w-full flex-wrap divide-y divide-gray-300">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl text-left truncate">{{record.videoName}}</h2>+ <h2 class="text-xl text-right truncate">{{record.date}}</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500 truncate">{{record.folderName}}</h3>+ <h3 class="text-lg text-right text-neutral-500 text-nowrap line-clamp-1 truncate">{{record.timeSpan}}</h3>+ <span class="hidden flex space-x-1">+ <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </span>+ </aside>+ </div>+ </div>+ <div class="aspect-square rounded-full items-center justify-center group-hover:visible invisible flex">+ <button class="record-delete w-full p-3 items-center justify-center rounded-xl bg-red-700 hover:bg-red-600" :data-id={record}>+ Delete+ </button>+ </div>+ </div>+</template>\ No newline at end of filediff --git a/resources/js/components/VideoPlayer.vue b/resources/js/components/VideoPlayer.vuenew file mode 100644index 00000000..71a96281--- /dev/null+++ b/resources/js/components/VideoPlayer.vue@@ -0,0 +1,9 @@+<script setup>+ const { URL } = defineProps(['URL'])+</script>++<template>+ <video id="vid-source" width="100%" :src="URL" type="video/mp4" controls class="focus:outline-none aspect-video">+ <track kind="captions">+ </video>+</template>\ No newline at end of filediff --git a/resources/js/components/app.vue b/resources/js/components/app.vuedeleted file mode 100644index d3807e0a..00000000--- a/resources/js/components/app.vue+++ /dev/null@@ -1,10 +0,0 @@-<!-- <script setup>-const props = defineProps({- user: Object-});-</script> -->--<template>- <h1>Hi</h1>- <!-- <h1>Hi {{ user.name }}</h1> -->-</template>\ No newline at end of filediff --git a/resources/js/components/layout/Layout.vue b/resources/js/components/layout/Layout.vuenew file mode 100644index 00000000..6de1fd41--- /dev/null+++ b/resources/js/components/layout/Layout.vue@@ -0,0 +1,17 @@+<script setup>+ import NavBar from './NavBar.vue';+</script>++<template>+ <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">+ <section id="list-card" class="invisible dark:bg-neutral-900 shadow-xl p-3 pb-6 rounded-2xl light-mode w-full lg:w-1/6 lg:max-w-72 shrink-0 space-y-2 scroll-mt-6">+ <slot name="sidebar"></slot>+ </section>+ <section id="content-card" class=" dark:bg-neutral-900 shadow-xl p-6 pt-3 rounded-2xl light-mode w-full">+ <NavBar/>+ <slot name="content"></slot>+ </section>+ <section id="left-card" class="w-full lg:w-72 shrink-0 hidden lg:block">+ </section>+ </main>+</template>\ No newline at end of filediff --git a/resources/js/components/layout/NavBar.vue b/resources/js/components/layout/NavBar.vuenew file mode 100644index 00000000..9c1cba51--- /dev/null+++ b/resources/js/components/layout/NavBar.vue@@ -0,0 +1,79 @@+<script setup>+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../../stores/AuthStore'+ import { ref, onMounted } from 'vue';+ import UserDropdown from '../user/UserDropdown.vue';++ const authStore = useAuthStore();+ const { user, auth, pageTitle, darkMode } = storeToRefs(authStore);+ const showDropdown = ref(false);++ const { toggleDarkMode } = authStore;++ const toggleDropdown = () => {+ showDropdown.value = !showDropdown.value;+ console.log(showDropdown.value);+ }++ window.addEventListener('click', function(e){+ try {+ if (!this.document.querySelector("#user_options").contains(e.target)){+ showDropdown.value = false;+ }+ } catch (error) {+ console.log(error);+ }+ });+++ onMounted(() => {+ toggleDarkMode(true);+ })+</script>++<template>+ <nav id="navbar">+ <div class="flex p-1 gap-y-3 flex-wrap justify-between">+ <h1 id="title" class="text-2xl">{{ pageTitle }}</h1>+ <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-2 sm:shrink-0">+ <section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true">+ <button id="user_header" class="flex space-x-2 text-2xl text-slate-900 dark:text-white hover:text-orange-600 dark:hover:text-orange-600 items-center justify-center" @click="toggleDropdown">++ <span id="user_name" v-if="auth">{{ user.username }}</span>+ <span id="user_name_unauth" v-else class="w-[10vw] text-right">Guest</span>++ <img :src="user.avatar" class="h-7 w-7 rounded-full sm:mx-0 sm:shrink-0 ring-2 ring-orange-600/60 shadow-lg object-cover" alt="profile picture">+ </button>+ <UserDropdown v-if="showDropdown"/>+ </section>++ <section id="navbar-video" class="flex items-center space-x-2">+ <button id="btn-nav-folders" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="folders">+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" height="24" width="24" class="stroke-slate-900">+ <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776" />+ </svg>+ </button>+ <button v-if="auth" id="btn-nav-history" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-purple-300 hover:bg-purple-200" aria-label="watch history">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path d="M0 0h24v24H0z" fill="none" />+ <path fill-rule="evenodd" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />+ </svg>+ </button>+ <button v-if="auth" id="btn-nav-settings" class=" hidden flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="settings">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />+ </svg>+ </button>+ </section>++ <div class="toggle-switch shrink-0">+ <label class="switch-label">+ <input type="checkbox" class="checkbox invisible" id="dark-mode-toggle" @click="toggleDarkMode(false)" v-bind:checked="!darkMode">+ <span class="slider"></span>+ </label>+ </div>+ </span>+ </div>+ <hr class="mt-2 mb-3">+ </nav>+</template>\ No newline at end of filediff --git a/resources/js/components/panels/HistoryPanel.vue b/resources/js/components/panels/HistoryPanel.vuenew file mode 100644index 00000000..899ff9c0--- /dev/null+++ b/resources/js/components/panels/HistoryPanel.vue@@ -0,0 +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 filediff --git a/resources/js/components/panels/RecordsPanel.vue b/resources/js/components/panels/RecordsPanel.vuenew file mode 100644index 00000000..e69de29bdiff --git a/resources/js/components/panels/VideoPanel.vue b/resources/js/components/panels/VideoPanel.vuenew file mode 100644index 00000000..e69de29bdiff --git a/resources/js/components/panels/VideoSidebar.vue b/resources/js/components/panels/VideoSidebar.vuenew file mode 100644index 00000000..6e8582d6--- /dev/null+++ b/resources/js/components/panels/VideoSidebar.vue@@ -0,0 +1,23 @@+<script setup>+ import FolderCard from '../FolderCard.vue';+ import RecordCard from '../RecordCard.vue';+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../../stores/AuthStore';++ const authStore = useAuthStore();+ const { folders, records } = storeToRefs(authStore);+</script>++<template>+ <div class="flex p-1 text-ri">+ <h1 id="sidebar-title" class="text-2xl w-full">Folders</h1>+ </div>++ <hr class="mt-2 mb-3">+ <section id="list-content-folders" class="hidden flex space-y-2 flex-wrap">+ <FolderCard v-for="folder in folders" :key="folder.folder_id" :folder-data="folder"/>+ </section>+ <section id="list-content-history" class="hidden flex space-y-2 flex-wrap">+ <RecordCard v-for="record in records" :key="record.record_id" :record="record"/>+ </section>+</template>\ No newline at end of filediff --git a/resources/js/components/user/UserDropdown.vue b/resources/js/components/user/UserDropdown.vuenew file mode 100644index 00000000..1961c5bd--- /dev/null+++ b/resources/js/components/user/UserDropdown.vue@@ -0,0 +1,36 @@+<script setup>+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../../stores/AuthStore'+ import { RouterLink } from 'vue-router';++ const authStore = useAuthStore();+ const {user, auth, logout} = storeToRefs(authStore);+</script>++<template>+ <div role="menu" id="user_dropdown" aria-orientation="vertical" aria-labelledby="user_options" class="absolute left-0 z-30 mt-4 w-56 origin-top-right rounded-md shadow-lg ring-1 bg-white ring-black ring-opacity-5 focus:outline-none text-gray-700">+ <div v-if="auth" class="divide-y divide-gray-300" role="menu" id="user-menu-auth">+ <section class="flex flex-wrap gap-1 p-4 justify-between">+ <p class="text-sm leading-5 text-orange-500">Logged in as: </p>+ <p class="text-sm font-medium leading-5 text-gray-900 truncate">{{ user.email }}</p>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>+ <RouterLink class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left font-bold" role="menuitem" to="/history">Full History</RouterLink>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>+ <span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="logout();" role="menuitem">Log out</button>+ </section>+ </div>+ <div v-else role="menu" id="user-menu-unauth" class="">+ <section class="">+ <RouterLink class="rounded-t-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem" to="/login">Log in</RouterLink>+ <RouterLink class="rounded-b-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem" to="/register">Sign up</RouterLink>+ </section>+ </div>+ </div>+</template>\ No newline at end of filediff --git a/resources/js/components/user/UserProfile.vue b/resources/js/components/user/UserProfile.vuenew file mode 100644index 00000000..e69de29bdiff --git a/resources/js/router/index.js b/resources/js/router/index.jsnew file mode 100644index 00000000..fff6262b--- /dev/null+++ b/resources/js/router/index.js@@ -0,0 +1,50 @@+import { createRouter, createWebHistory} from "vue-router";+import VideoView from '../views/VideoView.vue'+import HistoryView from '../views/HistoryView.vue'+import ProfileView from '../views/ProfileView.vue'+import LoginView from "../views/LoginView.vue";+import Layout from "../components/layout/Layout.vue";++const router = createRouter({+ history: createWebHistory(import.meta.env.BASE_URL),+ routes: [+ {+ path:'/',+ name:'home',+ component: VideoView+ },+ {+ path:'/login',+ name:'login',+ component: LoginView+ },+ {+ path:'/register',+ name:'register',+ component: LoginView+ },+ {+ path:'/history',+ name:'history',+ component: HistoryView+ },+ {+ path:'/profile',+ name:'profile',+ component: VideoView+ },+ {+ path:'/:category',+ name:'home',+ component: VideoView+ },+ {+ path:'/:category/:folder',+ name:'home',+ component: VideoView+ },++ ]+})++export default router;\ No newline at end of filediff --git a/resources/js/stores/AuthStore.js b/resources/js/stores/AuthStore.jsnew file mode 100644index 00000000..91833613--- /dev/null+++ b/resources/js/stores/AuthStore.js@@ -0,0 +1,100 @@+import { ref, computed } from "vue";+import { defineStore } from "pinia";++export const useAuthStore = defineStore('Auth', () => {+ var csrfToken = ref(document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') ?? '');++ const user = ref({+ username: 'Aminushki',+ email: '[email protected]',+ avatar:'/storage/avatars/12345.jpg'+ });++ const pageTitle = ref('Full User History')+ const auth = ref(true);+ const darkMode = ref(true);++ const folders = ref([]);+ const videos = ref([]);+ const records = ref([]);+++ const login = () => {+ const remember_me = document.getElementById("remember_me");+ fetch(`/api/login`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json'+ },+ body: JSON.stringify({+ 'email': $('#email').val(),+ 'password': $('#password').val(), //'123456789!aB'+ 'remember_me': remember_me.checked+ })+ }).then((response) =>+ response.json()+ ).then((json) => {+ console.log(json);+ if(json.success){+ localStorage.setItem('auth-token', json.data.token)+ toastr['info'](localStorage.getItem('auth-token'));+ window.location.href = '/';+ }+ }).catch((error) => {+ console.log(error);+ });+ };++ const logout = () => {+ const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');++ fetch(`/logout`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ }+ }).then(response =>+ response.json()+ ).then(json => {+ console.log(json);+ localStorage.clear('auth-token');+ if(json.success == true) window.location.href = "/";+ }).catch((error) => {+ console.log(error);+ });+ }++ const register = () => {++ }++ function toggleDarkMode(init = false){+ let rootHTML = document.querySelector('html');+ let lightModeToggle = document.getElementById('dark-mode-toggle') ?? {checked: true};+ if(!init || (init && darkMode.value === false)) darkMode.value = !lightModeToggle.checked;++ let currElemClass = darkMode.value ? 'light-mode' : 'dark-mode';+ let nextElemClass = darkMode.value ? 'dark-mode' : 'light-mode';+ let currBtnClass = darkMode.value ? 'btn-light' : 'btn-dark';+ let nextBtnClass = darkMode.value ? 'btn-dark' : 'btn-light';++ darkMode.value ? rootHTML.classList.add("dark", "tw-dark") : rootHTML.classList.remove("dark", "tw-dark");++ let elems = document.querySelectorAll('.' + currElemClass);+ let btns = document.querySelectorAll('.' + currBtnClass);++ for (let el of elems) {+ el.classList.replace(currElemClass, nextElemClass);+ }++ for (let btn of btns) {+ btn.classList.replace(currBtnClass, nextBtnClass);+ }++ }++ return {user, auth, login, logout, register, pageTitle, csrfToken, toggleDarkMode, darkMode, folders, videos, records};+});\ No newline at end of filediff --git a/resources/js/views/HistoryView.vue b/resources/js/views/HistoryView.vuenew file mode 100644index 00000000..52f12171--- /dev/null+++ b/resources/js/views/HistoryView.vue@@ -0,0 +1,131 @@+<script setup>+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../stores/AuthStore'+ import Layout from '../components/layout/Layout.vue';+ import { onMounted, ref } from 'vue';+ import RecordFull from '../components/RecordFull.vue';+ const authStore = useAuthStore();++ const {auth, csrfToken} = storeToRefs(authStore)++ const records = ref([]);++ async function loadHistory(){+ if(!auth) return;+ fetch(`/api/records`, {+ method: 'get',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ }+ }).then((response) =>+ response.json()+ ).then((json) => {+ // console.log(json);+ if(json.success == true){+ parseHistory(json.data);+ console.log('loading history');+ }+ }).catch((error) => {+ console.log(error);+ });+ }++ async function addToHistory(id){+ if(!auth) return;++ fetch(`/api/records`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ },+ body: JSON.stringify({+ 'video_id': id,+ })+ }).then((response) =>+ response.json()+ ).then((json) => {+ // console.log(json);+ if(json.success == true) {+ // toastr['success']('Added to history!');+ // loadHistory();+ parseHistory([json.data], false);+ };+ }).catch((error) => {+ console.log(error);+ });+ }++ function parseHistory(data, empty = true) {+ let newData = [];++ for (let recordCount = 0; recordCount < data.length; recordCount++) {+ const recordID = data[recordCount].id;+ const videoName = data[recordCount].relationships.video_name;+ const folderName = data[recordCount].relationships.folder_name;+ const categoryName = data[recordCount].relationships.category_name;+ const rawDate = (new Date(data[recordCount].attributes.created_at.replace(' ', 'T')));+ 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`++ newData.push({videoName, folderName, timeSpan, date:`${rawDate.toLocaleDateString([], {year: "numeric", month: '2-digit', day: '2-digit', hour: '2-digit', hour12:false, minute:'2-digit'})}`, recordID})+ }+++ records.value = newData;+ console.log(records.value);++ $(".record-delete").off('click').on('click.delete', function(){+ const id = parseInt($(this).data('id'));++ if(isNaN(id)){+ toastr.error(`Invalid Record ID... ${$(this).data('id')}`);+ return;+ }++ fetch(`/api/records/${id}`, {+ method: 'delete',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ }+ }).then((response) =>+ response.json()+ ).then((json) => {+ if(json.success == true) {+ toastr.success('Record deleted!');+ $(this).parent().parent().remove();+ };+ }).catch((error) => {+ console.log(error);+ toastr.error('Unable to delete record.');+ });+ })+ }++ onMounted(() => {+ loadHistory();+ })+</script>++<template>+ <Layout>+ <template v-slot:content>+ <section id="content-history" class=" space-y-2 cursor-pointer min-h-[80vh] pt-8">+ <RecordFull v-for="record in records" :record="record" :key="record.recordID"/>+ </section>+ </template>++ </Layout>+</template>\ No newline at end of filediff --git a/resources/js/views/LoginView.vue b/resources/js/views/LoginView.vuenew file mode 100644index 00000000..cd33d8d2--- /dev/null+++ b/resources/js/views/LoginView.vue@@ -0,0 +1,59 @@+<script setup>+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../stores/AuthStore'+ import { ref } from 'vue';++ const authStore = useAuthStore();+ const {username, email, avatar, login, csrfToken} = storeToRefs(authStore);++ const error = ref('')+</script>++<template>+ <main class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-gray-100">+ <div class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">+ <!-- Session Status -->+ <form method="POST" action="http://app.test:8080/api/login">+ <input type="hidden" name="_token" :value="csrfToken" autocomplete="off">+ <!-- Email Address -->+ <div>+ <label class="block font-medium text-sm text-gray-700 dark:text-gray-300" for="email">+ </label>+ <input class="border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm block mt-1 w-full" id="email" type="email" name="email" required="required" autofocus="autofocus" autocomplete="username">+ <ul class="text-sm text-red-600 dark:text-red-400 space-y-1 mt-2">+ <li>{{error}}</li>+ </ul>+ </div>++ <!-- Password -->+ <div class="mt-4">+ <label class="block font-medium text-sm text-gray-700 dark:text-gray-300" for="password">+ Password+ </label>++ <input class="border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm block mt-1 w-full" id="password" type="password" name="password" required="required" autocomplete="current-password">++ </div>++ <!-- Remember Me -->+ <div class="block mt-4">+ <label for="remember_me" class="inline-flex items-center">+ <input 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">+ <span class="ms-2 text-sm text-gray-600 dark:text-gray-400">Remember me</span>+ </label>+ </div>++ <div class="flex items-center justify-end mt-4">+ <a class="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" href="/register">+ Forgot your password?+ </a>++ <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">+ Log in+ </button>+ </div>+ </form>+ </div>+ </main>+</template>\ No newline at end of filediff --git a/resources/js/views/ProfileView.vue b/resources/js/views/ProfileView.vuenew file mode 100644index 00000000..bf26a4da--- /dev/null+++ b/resources/js/views/ProfileView.vue@@ -0,0 +1,3 @@+<template>+ Profile+</template>\ No newline at end of filediff --git a/resources/js/views/RegisterView.vue b/resources/js/views/RegisterView.vuenew file mode 100644index 00000000..e9fdf182--- /dev/null+++ b/resources/js/views/RegisterView.vue@@ -0,0 +1,7 @@+<template>+ <main class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-gray-100">+ <div class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">++ </div>+ </main>+</template>\ No newline at end of filediff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vuenew file mode 100644index 00000000..879bc044--- /dev/null+++ b/resources/js/views/VideoView.vue@@ -0,0 +1,433 @@+<script setup>+ import Layout from '../components/layout/Layout.vue';+ import VideoPlayer from '../components/VideoPlayer.vue';+ import { storeToRefs } from 'pinia';+ import { useAuthStore } from '../stores/AuthStore';+ import { ref, onMounted } from 'vue';+ import VideoSidebar from '../components/panels/VideoSidebar.vue';++ const authStore = useAuthStore();+ const { user, auth, csrfToken, folders, records } = storeToRefs(authStore);++ async function loadCategoryFolders(){+ if(isNaN(parseInt(stateDirectory.id))){+ toastr["error"](`An invalid category "${stateDirectory.name}" was provided in the URL.`, "Invalid Category");+ return;+ }++ fetch(`/api/folders`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken.value+ },+ body: JSON.stringify({+ category_id:stateDirectory.id+ })+ }).then((response) =>+ response.json()+ ).then((json) => {+ // console.log(json);+ if(json.success == false){+ toastr["error"](`The directory '${stateDirectory.name}' does not exist.`, "Invalid Category");+ return;+ }++ folderData = json.data;+ parseFolders(folderData);+ loadVideosAndParse(folderData);+ }).catch((error) => {+ console.log(error);+ });+ }+++ async function parseFolders(data){++ var folderTemplate = function(folder_id, folder_name, file_count) {+ return `+ <div class="p-2 flex flex-wrap rounded-xl bg-neutral-100 dark:bg-neutral-800 dark:text-white shadow-md w-full divide-y divide-gray-300 group">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl truncate">${folder_name}</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500">${file_count} Episode${file_count > 1 ? 's' : ''}</h2>+ <button class="hidden group-hover:flex space-x-1 folder-link" data-id="${folder_id}" data-name="${folder_name}">+ <span class="flex hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2 space-x-1">+ Watch+ </span>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </button>+ </aside>+ </div>+ `+ }++ let newFoldersList = [];++ data.forEach(folder => {+ const folder_id = folder.id;+ const folder_name = folder.attributes.name;+ const file_count = folder.attributes.file_count;++ // let folder_element = folderTemplate(folder_id, folder_name, file_count);++ // $('#list-content-folders').append(folder_element);++ newFoldersList.push({folder_id, folder_name, file_count})+ });++ folders.value = [...newFoldersList];++ $('.folder-link').on('mousedown', (e) => {+ let name = e.currentTarget.dataset.name;+ let id = e.currentTarget.dataset.id;++ if(e.which != 2) reload(id, name);+ else window.open(`/${stateDirectory.name}/${name}`, '_blank');+ });+ }++ async function loadVideosAndParse(data){+ // const darkModeSettings = getDarkModeSettings();+ const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');+ var folderTemplate = function(folderName, folderCount, fileElements) {+ return `+ <div class="w-full">+ <div class="folder-header flex justify-center sm:justify-start">+ <h2 class="text-2xl py-4 hidden"> ${folderName} </h2>+ <h2 class="text-2xl py-4">Episodes</h2>+ </div>+ <div class="" id="dataTable-${folderCount}-collapse" data-state="1">+ <table class="vid-table hover stripe" id="dataTable-${folderCount}" data-folder="${folderName}">+ <thead>+ <tr>+ <th>Title</th>+ <!-- <th>Length</th> -->+ <th>Date</th>+ </tr>+ </thead>+ <tbody>+ ${fileElements}+ </tbody>+ </table>+ </div>+ </div>+ <hr>+ `+ }+ var videoTemplate = function(fileArray){+ const filePath = fileArray.attributes.path;+ const title = fileArray.attributes.name;+ const rawDate = new Date(fileArray.attributes.date + ' GMT');+ const id = fileArray.id;+ const filePrefix = '../';+ return `+ <tr class="vid-row" data-id="${id}" data-path="${filePrefix}${filePath}">+ <td class="vid-row-title line-clamp-1">${title}</td>+ <td class="vid-row-date line-clamp-1 truncate overflow-hidden">${(rawDate.toLocaleString([], {year: 'numeric', month: '2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit', hour12: true})).toLocaleUpperCase().replaceAll('.','')}</td>+ </tr>+ `+ }++ // parse the user provided folder name into an actual folder in the directory and get id if id not present+ if(isNaN(parseInt(stateFolder.id))){+ if(stateFolder.name === null | stateFolder.name === undefined) {+ toastr["error"](`An invalid folder name "${stateFolder.name}" was provided in the URL.`, "Invalid Folder");+ return;+ }++ let res = data.find(folder => folder.attributes["name"].toLowerCase().localeCompare(stateFolder.name.toLowerCase()) == 0);+ if(!res){+ toastr["error"](`An invalid folder name "${stateFolder.name}" was provided in the URL.`, "Invalid Folder");+ return;+ }+ stateFolder = {id: res["id"], name: res.attributes["name"]};+ }++ fetch(`/api/videos`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ },+ body: JSON.stringify({+ folder_id: stateFolder.id+ })+ }).then((response) =>+ response.json()+ ).then((json) => {+ if(json.success == false){+ toastr["error"](`The folder '${stateFolder.name}' does not exist.`, "Invalid folder");+ return;+ }++ const files = json.data;+ // console.log(files);+ let fileElements = files.map(videoTemplate);+ let folderElement = folderTemplate(stateFolder.name, 0, fileElements.toString().replaceAll(',',''));+ $('#dataContainer').empty();+ $('#dataContainer').append(folderElement);++ initVideos();+ }).catch((error) => {+ console.log(error);+ });+ }++ function initVideos(){+ let pastFirst = false;+ $('.vid-row').off('click').on('click', function(){+ let file = $(this).data('path');+ let id = $(this).data('id');+ let vidSource = document.getElementById('vid-source');+ let root = document.getElementById('root');+ let folder = $(this).closest('table');+ // let lastID = $(vidSource).data('vid-id');++ // if(!isNaN(parseInt(lastID))){+ // addToHistory(lastID);+ // }++ try {+ vidSource.pause();+ } catch (error) {+ console.log('No video running. Cannot pause.')+ }++ $(vidSource).attr('src', file);+ // $(vidSource).data('vid-id', id);+ vidSource.load();+ if(pastFirst){+ vidSource.play();+ }+ else pastFirst = true;++ try {+ root.scrollIntoView();+ } catch (error) {+ console.log(error);+ console.log(root);+ console.log(document.getElementById('root'));+ }++ $('#mp4-title').text($(this).find(".vid-row-title").text());+ $('#mp4-title-folder').text($(folder).data('folder'));+ $('#folder-thumbnail').attr('src', `${stateThumbnailDir}${stateFolder.id}.jpg`);+ addToHistory(id);+ })++ $('.vid-row').first().click();++ $('.vid-table').each(function(){+ let id = $(this).attr('id');+ let table = new DataTable('#' + id, {+ responsive: true,+ columnDefs: [{ "width": "80%", "targets": 0 }]+ });++ document.getElementById(id).style.removeProperty('width');+ });+++ $('.collapse').removeClass('show');+ //$('#dataTable-0-collapse-toggle').trigger('click');++ $('.folder-toggle').off('click.main').on('click.main', function(){+ var targetID = $(this).data('bs-target');++ if($(targetID).data('state') == 1){+ $(targetID).data('state', 0);+ $(this).empty().append('<i class="bi bi-list"></i> Show Folder');+ }+ else {+ $(targetID).data('state', 1);+ $(this).empty().append('<i class="bi bi-list"></i> Hide Folder');+ }+ });+ }+++ function cycleSideBar(state){+ let listCard = document.querySelector('#list-card');+ if(state === "folders" && document.querySelector("#list-content-folders").classList.contains('hidden')){+ document.querySelector("#list-card").classList.remove("invisible");+ document.querySelector("#list-content-folders").classList.toggle("hidden");+ document.querySelector("#list-content-history").classList.add("hidden");+ $('#sidebar-title').text('Folders');+ listCard.scrollIntoView({behavior: "smooth"});+ }+ else if(state === "history" && document.querySelector("#list-content-history").classList.contains('hidden')){+ document.querySelector("#list-card").classList.remove("invisible");+ document.querySelector("#list-content-history").classList.toggle("hidden");+ document.querySelector("#list-content-folders").classList.add("hidden");+ $('#sidebar-title').text('History');+ listCard.scrollIntoView({behavior: "smooth"});+ loadHistory();+ }+ else{+ document.querySelector("#list-card").classList.add("invisible");+ document.querySelector("#list-content-history").classList.add("hidden");+ document.querySelector("#list-content-folders").classList.add("hidden");+ document.getElementById('root').scrollIntoView({behavior: "smooth"});+ }+ }++ async function loadHistory(limit = 10){+ if(!user) return;++ fetch(`/api/records?limit=${limit}`, {+ method: 'get',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ }+ }).then((response) =>+ response.json()+ ).then((json) => {+ // console.log(json);+ if(json.success == true){+ parseHistory(json.data);+ console.log('loading history');+ }+ }).catch((error) => {+ console.log(error);+ });+ }++ async function addToHistory(id){+ if(!user) return;+ const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');++ fetch(`/api/records`, {+ method: 'post',+ headers: {+ 'Accept': 'application/json',+ 'Content-Type': 'application/json',+ 'X-CSRF-TOKEN': csrfToken+ },+ body: JSON.stringify({+ 'video_id': id,+ })+ }).then((response) =>+ response.json()+ ).then((json) => {+ // console.log(json);+ if(json.success == true) {+ // toastr['success']('Added to history!');+ // loadHistory();+ parseHistory([json.data], 10, false);+ };+ }).catch((error) => {+ console.log(error);+ });+ }++ function parseHistory(data, count = 10, empty = true) {+ let newRecordList = [];++ for (let recordCount = 0; recordCount < Math.min(data.length, count); recordCount++) {+ const recordID = data[recordCount].id;+ const videoName = data[recordCount].relationships.video_name;+ const folderName = data[recordCount].relationships.folder_name;+ const rawDate = (new Date(data[recordCount].attributes.created_at.replace(' ', 'T')));+ 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`++ newRecordList.push({recordID, videoName, folderName, timeSpan});+ }++ records.value = [...newRecordList];+ }++ function reload(newFolderID, newFolderName){+ stateFolder = {id: newFolderID, name: newFolderName};+ window.history.pushState({dir: stateDirectory.name, folder: stateFolder.name},`${stateDirectory.name} - ${stateFolder.name}`, `/${stateDirectory.name}/${stateFolder.name}`);+ loadVideosAndParse(folderData);+ }+++ onMounted(() => {+ try {+ if(stateFolder === null | stateFolder === undefined) { loadVideos(); }+ else { loadCategoryFolders(); }+ } catch (error) {+ toastr['error']('Unable to load data.');+ console.log(error);+ return;+ }++ $("#btn-nav-folders").on('click', function(){+ cycleSideBar("folders");+ });++ $("#btn-nav-history").on('click', function(){+ cycleSideBar("history");+ });+ })++ var folderData = [];+</script>++<template>+ <Layout>+ <template v-slot:content>+ <section id="content-video">+ <div id="video-container">+ <VideoPlayer URL=""/>++ <hr class="mt-4 mb-3">++ <div class="p-6 my-4 w-full mx-auto dark:bg-neutral-800 bg-white rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">+ <div class="flex items-center space-x-4">+ <div class="shrink-0">+ <img id="folder-thumbnail" class="h-16 lg:h-24 object-contain rounded-md" src="http://app.test:8080/storage/thumbnails/folders/5.jpg" onerror='this.onerror=null;this.src="http\:\/\/app.test:8080/storage/thumbnails/folders/5.jpg";' alt="Folder Cover Art">+ </div>+ <div class="h-full">+ <div id="mp4-title" class="text-xl font-medium"></div>+ <p class="dark:text-slate-400 text-slate-500 line-clamp-2">This episode is about a walrus going for a juice box run at 3am</p>+ </div>+ </div>+ <!-- <div id="mp4-controls" class="my-auto container flex w-auto" role="group">+ <button type="button" class="bg-gray-800 text-white rounded-l-md border-r border-gray-100 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl">+ <div class="flex flex-row align-middle">+ <svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">+ <path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>+ </svg>+ <p class="ml-2">Prev</p>+ </div>+ </button>+ <button type="button" class="bg-gray-800 text-white rounded-r-md py-2 border-l border-gray-200 hover:bg-red-700 hover:text-white px-3 shadow-xl">+ <div class="flex flex-row align-middle">+ <span class="mr-2">Next</span>+ <svg class="w-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">+ <path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>+ </svg>+ </div>+ </button>+ </div> -->+ </div>+ </div>++ <hr id='preData' class="my-4">++ <div id='dataContainer'></div>+ </section>+ </template>+ <template v-slot:sidebar>+ <VideoSidebar/>+ </template>+ </Layout>+</template>\ No newline at end of filediff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.phpindex 9453c53c..0568ee35 100644--- a/resources/views/auth/login.blade.php+++ b/resources/views/auth/login.blade.php@@ -1,11 +1,10 @@<x-app-layout>- <main class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-gray-100">- <div class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">+ <!-- <main class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 m-auto bg-gray-100">+ <div class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg"> --><!-- Session Status -->- <form method="POST" action="{{ route('login') }}">- @csrf+ <!-- <form method="POST" action="{{ route('login') }}">--><!-- Email Address -->- <div>+ <!-- <div><label class="block font-medium text-sm text-gray-700 dark:text-gray-300" for="email"></label>@@ -13,20 +12,20 @@<ul class="text-sm text-red-600 dark:text-red-400 space-y-1 mt-2"><li>{{$error ?? ""}}</li></ul>- </div>+ </div> --><!-- Password -->- <div class="mt-4">+ <!-- <div class="mt-4"><label class="block font-medium text-sm text-gray-700 dark:text-gray-300" for="password">Password</label><input class="border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm block mt-1 w-full" id="password" type="password" name="password" required="required" autocomplete="current-password">- </div>+ </div> --><!-- Remember Me -->- <div class="block mt-4">+ <!-- <div class="block mt-4"><label for="remember_me" class="inline-flex items-center"><input 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" type="checkbox"><span class="ms-2 text-sm text-gray-600 dark:text-gray-400">Remember me</span>@@ -43,7 +42,6 @@</button></div></form>-</div>- </main>+ </main> --></x-app-layout>\ No newline at end of filediff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.phpindex f1618321..689769ec 100644--- a/resources/views/auth/register.blade.php+++ b/resources/views/auth/register.blade.php@@ -5,7 +5,6 @@</section><section id="content-sign-up" class=" w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-neutral-900 shadow-md overflow-hidden rounded-lg"><form method="POST" action="/register">- @csrf<!-- Name --><div><label class="block font-medium text-sm text-gray-700 dark:text-gray-300" for="name">diff --git a/resources/views/home.blade.php b/resources/views/home.blade.phpindex 9bb1f58e..b734df72 100644--- a/resources/views/home.blade.php+++ b/resources/views/home.blade.php@@ -1,5 +1,5 @@<x-app-layout>- <script src="{{ URL::asset('js/main.js') }}"></script>+ <!-- <script src="{{ URL::asset('js/main.js') }}"></script> --><script>var stateDirectory = <?php echo json_encode($dir ?? array('id'=>7,'name'=>'anime')) ?>;var stateFolder = <?php echo json_encode($folder ?? array('id'=>7,'name'=>'ODDTAXI')) ?>;@@ -10,176 +10,4 @@@else<script>var user = false;</script>@endauth- <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">- <section id="list-card" class="invisible dark:bg-neutral-900 shadow-xl p-3 pb-6 rounded-2xl light-mode w-full lg:w-1/6 lg:max-w-72 shrink-0 space-y-2 scroll-mt-6">- <div class="flex p-1 text-ri">- <h1 id="sidebar-title" class="text-2xl w-full">Folders</h1>- </div>-- <hr class="mt-2 mb-3">- <section id="list-content-folders" class="hidden flex space-y-2 flex-wrap">- <div class="hidden flex flex-wrap rounded-xl dark:bg-neutral-800 bg-slate-100 dark:text-white shadow p-[3%] w-full divide-y divide-gray-300 group flex-grow">- <section class="flex flex-row-reverse justify-between items-baseline w-full">- <h2 class="text-lg text-right text-neutral-500 text-nowrap">24 Episodes</h2>- <h2 class="text-xl text-left">Frieren</h2>- </section>- <aside class="flex justify-between items-center w-full pt-1">- <h3 class="text-lg text-left text-neutral-500">Drama</h2>- <span class="hidden group-hover:flex space-x-1">- <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">- <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />- </svg>- </span>- </aside>- </div>- </section>- <section id="list-content-history" class="hidden flex space-y-2 flex-wrap">- <div class="hidden flex flex-wrap rounded-xl dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-[3%] w-full divide-y divide-gray-300 group flex-grow">- <section class="flex justify-between items-baseline w-full">- <h2 class="text-xl text-left">S1E24</h2>- </section>- <aside class="flex justify-between items-center w-full pt-1">- <h3 class="text-lg text-left text-neutral-500">Frieren</h2>- <h3 class="text-lg text-right text-neutral-500 text-nowrap">3 days ago</h3>- <span class="hidden flex space-x-1">- <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">- <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />- </svg>- </span>- </aside>- </div>- </section>- </section>- <section id="content-card" class=" dark:bg-neutral-900 shadow-xl p-6 pt-3 rounded-2xl light-mode w-full">- <nav id="navbar">- <div class="flex p-1 gap-y-3 flex-wrap justify-between">- <h1 id="mp4-title-folder" class="text-2xl"></h1>- <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-2 sm:shrink-0">- <section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true">- <button id="user_header" class="flex space-x-2 text-2xl text-slate-900 dark:text-white hover:text-orange-600 dark:hover:text-orange-600 items-center justify-center" >- @auth- <span id="user_name">{{ Auth::user()->name }}</span>- @else- <span id="user_name_unauth" class="w-[10vw] text-right">Guest</span>- @endauth-- <img src="{{ URL::asset('storage/avatars/12345.jpg')}}" class="h-7 w-7 rounded-full sm:mx-0 sm:shrink-0 ring-2 ring-orange-600/60 shadow-lg object-cover" alt="profile picture">- </button>- <div role="menu" id="user_dropdown" aria-orientation="vertical" aria-labelledby="user_options" class="hidden absolute left-0 z-30 mt-4 w-56 origin-top-right divide-y divide-gray-300 rounded-md shadow-lg ring-1 bg-white ring-black ring-opacity-5 focus:outline-none text-gray-700">-- @auth- <!-- <div class="divide-y divide-gray-300" role="menu" id="user-menu-auth"> -->- <section class="flex flex-wrap gap-1 p-4 justify-between">- <p class="text-sm leading-5 text-orange-500">Logged in as: </p>- <p class="text-sm font-medium leading-5 text-gray-900 truncate">{{ Auth::user()->email }}</p>- </section>- <section class="py-1">- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem" onclick="window.location.href = '/history' ">Full History</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/syncFiles" class="w-full h-full">Sync Files</a></button>- <span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>- </section>- <section class="py-1">- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="logout();" role="menuitem">Log out</button>- </section>- <!-- </div> -->- @else- <!-- <div role="menu" id="user-menu-unauth" class="text-gray-700"> -->- <section class="">- <button class="rounded-t-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showLogin();" role="menuitem">Log in</button>- <button class="rounded-b-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showSignup();" role="menuitem">Sign up</button>- </section>- <!-- </div> -->- @endauth- </div>-- </section>--- <section id="navbar-video" class="flex items-center space-x-2">- <button id="btn-nav-folders" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="folders">- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" height="24" width="24" class="stroke-slate-900">- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776" />- </svg>- </button>- @auth- <button id="btn-nav-history" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-purple-300 hover:bg-purple-200" aria-label="watch history">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">- <path d="M0 0h24v24H0z" fill="none" />- <path fill-rule="evenodd" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />- </svg>- </button>- <button id="btn-nav-settings" class=" hidden flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="settings">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">- <path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />- </svg>- </button>- @endauth- </section>-- <div class="toggle-switch shrink-0">- <label class="switch-label">- <input type="checkbox" class="checkbox invisible" id="dark-mode-toggle">- <span class="slider"></span>- </label>- </div>- </span>- </div>- <hr class="mt-2 mb-3">- </nav>- <section id="content-video">- <div id="video-container">- <video id="vid-source" width="100%" src="" type="video/mp4" controls class="focus:outline-none aspect-video">- <track kind="captions">- </video>-- <hr class="mt-4 mb-3">-- <div class="p-6 my-4 w-full mx-auto dark:bg-neutral-800 bg-white rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">- <div class="flex items-center space-x-4">- <div class="shrink-0">- <img id="folder-thumbnail" class="h-16 lg:h-24 object-contain rounded-md" src="{{ URL::asset('storage/thumbnails/folders/5.jpg')}}" onerror="this.onerror=null;this.src=`{{ URL::asset('storage/thumbnails/folders/5.jpg')}}`;" alt="Folder Cover Art">- </div>- <div class="h-full">- <div id="mp4-title" class="text-xl font-medium"></div>- <p class="dark:text-slate-400 text-slate-500 line-clamp-2">This episode is about a walrus going for a juice box run at 3am</p>- </div>- </div>- <!-- <div id="mp4-controls" class="my-auto container flex w-auto" role="group">- <button type="button" class="bg-gray-800 text-white rounded-l-md border-r border-gray-100 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl">- <div class="flex flex-row align-middle">- <svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>- </svg>- <p class="ml-2">Prev</p>- </div>- </button>- <button type="button" class="bg-gray-800 text-white rounded-r-md py-2 border-l border-gray-200 hover:bg-red-700 hover:text-white px-3 shadow-xl">- <div class="flex flex-row align-middle">- <span class="mr-2">Next</span>- <svg class="w-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">- <path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>- </svg>- </div>- </button>- </div> -->- </div>- </div>-- <hr id='preData' class="my-4">-- <div id='dataContainer'></div>- </section>-- <section id="content-history">-- </section>- </section>- <section id="left-card" class="w-full lg:w-1/6 lg:max-w-72 shrink-0 hidden lg:block"></section>- </main></x-app-layout>\ No newline at end of filediff --git a/resources/views/home.blade.php.bak b/resources/views/home.blade.php.baknew file mode 100644index 00000000..9bb1f58e--- /dev/null+++ b/resources/views/home.blade.php.bak@@ -0,0 +1,185 @@+<x-app-layout>+ <script src="{{ URL::asset('js/main.js') }}"></script>+ <script>+ var stateDirectory = <?php echo json_encode($dir ?? array('id'=>7,'name'=>'anime')) ?>;+ var stateFolder = <?php echo json_encode($folder ?? array('id'=>7,'name'=>'ODDTAXI')) ?>;+ var stateThumbnailDir = "{{ URL::asset('storage/thumbnails/folders') }}/"+ </script>+ @auth+ <script>var user = true;</script>+ @else+ <script>var user = false;</script>+ @endauth+ <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">+ <section id="list-card" class="invisible dark:bg-neutral-900 shadow-xl p-3 pb-6 rounded-2xl light-mode w-full lg:w-1/6 lg:max-w-72 shrink-0 space-y-2 scroll-mt-6">+ <div class="flex p-1 text-ri">+ <h1 id="sidebar-title" class="text-2xl w-full">Folders</h1>+ </div>++ <hr class="mt-2 mb-3">+ <section id="list-content-folders" class="hidden flex space-y-2 flex-wrap">+ <div class="hidden flex flex-wrap rounded-xl dark:bg-neutral-800 bg-slate-100 dark:text-white shadow p-[3%] w-full divide-y divide-gray-300 group flex-grow">+ <section class="flex flex-row-reverse justify-between items-baseline w-full">+ <h2 class="text-lg text-right text-neutral-500 text-nowrap">24 Episodes</h2>+ <h2 class="text-xl text-left">Frieren</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500">Drama</h2>+ <span class="hidden group-hover:flex space-x-1">+ <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </span>+ </aside>+ </div>+ </section>+ <section id="list-content-history" class="hidden flex space-y-2 flex-wrap">+ <div class="hidden flex flex-wrap rounded-xl dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-[3%] w-full divide-y divide-gray-300 group flex-grow">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl text-left">S1E24</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500">Frieren</h2>+ <h3 class="text-lg text-right text-neutral-500 text-nowrap">3 days ago</h3>+ <span class="hidden flex space-x-1">+ <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </span>+ </aside>+ </div>+ </section>+ </section>+ <section id="content-card" class=" dark:bg-neutral-900 shadow-xl p-6 pt-3 rounded-2xl light-mode w-full">+ <nav id="navbar">+ <div class="flex p-1 gap-y-3 flex-wrap justify-between">+ <h1 id="mp4-title-folder" class="text-2xl"></h1>+ <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-2 sm:shrink-0">+ <section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true">+ <button id="user_header" class="flex space-x-2 text-2xl text-slate-900 dark:text-white hover:text-orange-600 dark:hover:text-orange-600 items-center justify-center" >+ @auth+ <span id="user_name">{{ Auth::user()->name }}</span>+ @else+ <span id="user_name_unauth" class="w-[10vw] text-right">Guest</span>+ @endauth++ <img src="{{ URL::asset('storage/avatars/12345.jpg')}}" class="h-7 w-7 rounded-full sm:mx-0 sm:shrink-0 ring-2 ring-orange-600/60 shadow-lg object-cover" alt="profile picture">+ </button>+ <div role="menu" id="user_dropdown" aria-orientation="vertical" aria-labelledby="user_options" class="hidden absolute left-0 z-30 mt-4 w-56 origin-top-right divide-y divide-gray-300 rounded-md shadow-lg ring-1 bg-white ring-black ring-opacity-5 focus:outline-none text-gray-700">++ @auth+ <!-- <div class="divide-y divide-gray-300" role="menu" id="user-menu-auth"> -->+ <section class="flex flex-wrap gap-1 p-4 justify-between">+ <p class="text-sm leading-5 text-orange-500">Logged in as: </p>+ <p class="text-sm font-medium leading-5 text-gray-900 truncate">{{ Auth::user()->email }}</p>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem" onclick="window.location.href = '/history' ">Full History</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/syncFiles" class="w-full h-full">Sync Files</a></button>+ <span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="logout();" role="menuitem">Log out</button>+ </section>+ <!-- </div> -->+ @else+ <!-- <div role="menu" id="user-menu-unauth" class="text-gray-700"> -->+ <section class="">+ <button class="rounded-t-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showLogin();" role="menuitem">Log in</button>+ <button class="rounded-b-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showSignup();" role="menuitem">Sign up</button>+ </section>+ <!-- </div> -->+ @endauth+ </div>++ </section>+++ <section id="navbar-video" class="flex items-center space-x-2">+ <button id="btn-nav-folders" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="folders">+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" height="24" width="24" class="stroke-slate-900">+ <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776" />+ </svg>+ </button>+ @auth+ <button id="btn-nav-history" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-purple-300 hover:bg-purple-200" aria-label="watch history">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path d="M0 0h24v24H0z" fill="none" />+ <path fill-rule="evenodd" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />+ </svg>+ </button>+ <button id="btn-nav-settings" class=" hidden flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="settings">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />+ </svg>+ </button>+ @endauth+ </section>++ <div class="toggle-switch shrink-0">+ <label class="switch-label">+ <input type="checkbox" class="checkbox invisible" id="dark-mode-toggle">+ <span class="slider"></span>+ </label>+ </div>+ </span>+ </div>+ <hr class="mt-2 mb-3">+ </nav>+ <section id="content-video">+ <div id="video-container">+ <video id="vid-source" width="100%" src="" type="video/mp4" controls class="focus:outline-none aspect-video">+ <track kind="captions">+ </video>++ <hr class="mt-4 mb-3">++ <div class="p-6 my-4 w-full mx-auto dark:bg-neutral-800 bg-white rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">+ <div class="flex items-center space-x-4">+ <div class="shrink-0">+ <img id="folder-thumbnail" class="h-16 lg:h-24 object-contain rounded-md" src="{{ URL::asset('storage/thumbnails/folders/5.jpg')}}" onerror="this.onerror=null;this.src=`{{ URL::asset('storage/thumbnails/folders/5.jpg')}}`;" alt="Folder Cover Art">+ </div>+ <div class="h-full">+ <div id="mp4-title" class="text-xl font-medium"></div>+ <p class="dark:text-slate-400 text-slate-500 line-clamp-2">This episode is about a walrus going for a juice box run at 3am</p>+ </div>+ </div>+ <!-- <div id="mp4-controls" class="my-auto container flex w-auto" role="group">+ <button type="button" class="bg-gray-800 text-white rounded-l-md border-r border-gray-100 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl">+ <div class="flex flex-row align-middle">+ <svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">+ <path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>+ </svg>+ <p class="ml-2">Prev</p>+ </div>+ </button>+ <button type="button" class="bg-gray-800 text-white rounded-r-md py-2 border-l border-gray-200 hover:bg-red-700 hover:text-white px-3 shadow-xl">+ <div class="flex flex-row align-middle">+ <span class="mr-2">Next</span>+ <svg class="w-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">+ <path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>+ </svg>+ </div>+ </button>+ </div> -->+ </div>+ </div>++ <hr id='preData' class="my-4">++ <div id='dataContainer'></div>+ </section>++ <section id="content-history">++ </section>+ </section>+ <section id="left-card" class="w-full lg:w-1/6 lg:max-w-72 shrink-0 hidden lg:block"></section>+ </main>+</x-app-layout>\ No newline at end of filediff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.phpindex 372dc8d0..f955e025 100644--- a/resources/views/layouts/app.blade.php+++ b/resources/views/layouts/app.blade.php@@ -31,7 +31,7 @@<!-- local --><link href="{{ URL::asset('css/main.css') }}" rel="stylesheet">- <script src="{{ URL::asset('js/auth.js') }}"></script>+ <!-- <script src="{{ URL::asset('js/auth.js') }}"></script> -->@vite('resources/css/app.css')diff --git a/resources/views/profile/history.blade.php b/resources/views/profile/history.blade.phpindex e9eb4610..c5ea161a 100644--- a/resources/views/profile/history.blade.php+++ b/resources/views/profile/history.blade.php@@ -1,122 +1,3 @@<x-app-layout>- <script src="{{ URL::asset('js/history.js') }}"></script>- <script>- var stateThumbnailDir = "{{ URL::asset('storage/thumbnails/folders') }}/"- </script>- @auth- <script>var user = true;</script>- @else- <script>var user = false;</script>- @endauth- <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">- <section id="right-card" class="w-full lg:w-72 shrink-0 hidden lg:block"></section>- <section id="content-card" class=" dark:bg-neutral-900 shadow-xl p-6 pt-3 rounded-2xl light-mode w-full">- <nav id="navbar">- <div class="flex p-1 gap-y-3 flex-wrap justify-between">- <h1 id="title" class="text-2xl">Full User History</h1>- <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-2 sm:shrink-0">- <section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true">- <button id="user_header" class="flex space-x-2 text-2xl text-slate-900 dark:text-white hover:text-orange-600 dark:hover:text-orange-600 items-center justify-center" >- @auth- <span id="user_name">{{ Auth::user()->name }}</span>- @else- <span id="user_name_unauth" class="w-[10vw] text-right">Guest</span>- @endauth- <img src="{{ URL::asset('storage/avatars/12345.jpg')}}" class="h-7 w-7 rounded-full sm:mx-0 sm:shrink-0 ring-2 ring-orange-600/60 shadow-lg object-cover" alt="profile picture">- </button>- <div role="menu" id="user_dropdown" aria-orientation="vertical" aria-labelledby="user_options" class="hidden absolute left-0 z-30 mt-4 w-56 origin-top-right divide-y divide-gray-300 rounded-md shadow-lg ring-1 bg-white ring-black ring-opacity-5 focus:outline-none text-gray-700">-- @auth- <!-- <div class="divide-y divide-gray-300" role="menu" id="user-menu-auth"> -->- <section class="flex flex-wrap gap-1 p-4 justify-between">- <p class="text-sm leading-5 text-orange-500">Logged in as: </p>- <p class="text-sm font-medium leading-5 text-gray-900 truncate">{{ Auth::user()->email }}</p>- </section>- <section class="py-1">- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left font-bold" role="menuitem">Full History</button>- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>- <span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>- </section>- <section class="py-1">- <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="logout();" role="menuitem">Log out</button>- </section>- <!-- </div> -->- @else- <!-- <div role="menu" id="user-menu-unauth" class="text-gray-700"> -->- <section class="">- <button class="rounded-t-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showLogin();" role="menuitem">Log in</button>- <button class="rounded-b-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showSignup();" role="menuitem">Sign up</button>- </section>- <!-- </div> -->- @endauth- </div>-- </section>--- <section id="navbar-video" class="flex items-center space-x-2">- <button id="btn-nav-folders" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="folders">- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" height="24" width="24" class="stroke-slate-900">- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776" />- </svg>- </button>- @auth- <button id="btn-nav-history" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-purple-300 hover:bg-purple-200" aria-label="watch history">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">- <path d="M0 0h24v24H0z" fill="none" />- <path fill-rule="evenodd" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />- </svg>- </button>- <button id="btn-nav-settings" class=" hidden flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="settings">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">- <path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />- </svg>- </button>- @endauth- </section>-- <div class="toggle-switch shrink-0">- <label class="switch-label">- <input type="checkbox" class="checkbox invisible" id="dark-mode-toggle">- <span class="slider"></span>- </label>- </div>- </span>- </div>- <hr class="mt-2 mb-3">- </nav>- <section id="content-history" class=" space-y-2 cursor-pointer min-h-[80vh] pt-8">- <div class="flex gap-12 group cursor-default hidden">- <div class="flex rounded-xl items-center justify-center dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-3 w-full group flex-grow cursor-pointer">- <div class="w-full flex-wrap divide-y divide-gray-300">- <section class="flex justify-between items-baseline w-full">- <h2 class="text-xl text-left truncate">${videoName}</h2>- <h2 class="text-xl text-right truncate">${date}</h2>- </section>- <aside class="flex justify-between items-center w-full pt-1">- <h3 class="text-lg text-left text-neutral-500 truncate">${folderName}</h3>- <h3 class="text-lg text-right text-neutral-500 text-nowrap line-clamp-1 truncate">${timeSpan}</h3>- <span class="hidden flex space-x-1">- <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">- <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />- </svg>- </span>- </aside>- </div>- </div>- <div class="aspect-square rounded-full items-center justify-center group-hover:visible invisible flex">- <button class="record-delete w-full p-3 items-center justify-center rounded-xl bg-red-700 hover:bg-red-600" data-id='${recordID}'>- Delete- </button>- </div>- </div>- </section>- </section>- <section id="left-card" class="w-full lg:w-72 shrink-0 hidden lg:block"></section>- </main></x-app-layout>\ No newline at end of filediff --git a/resources/views/profile/history.blade.php.bak b/resources/views/profile/history.blade.php.baknew file mode 100644index 00000000..ae154640--- /dev/null+++ b/resources/views/profile/history.blade.php.bak@@ -0,0 +1,118 @@+<!-- <x-app-layout>+ <script src="{{ URL::asset('js/history.js') }}"></script>+ <script>+ var stateThumbnailDir = "{{ URL::asset('storage/thumbnails/folders') }}/"+ </script>+ @auth+ <script>var user = true;</script>+ @else+ <script>var user = false;</script>+ @endauth+ <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">+ <section id="right-card" class="w-full lg:w-72 shrink-0 hidden lg:block"></section>+ <section id="content-card" class=" dark:bg-neutral-900 shadow-xl p-6 pt-3 rounded-2xl light-mode w-full">+ <nav id="navbar">+ <div class="flex p-1 gap-y-3 flex-wrap justify-between">+ <h1 id="title" class="text-2xl">Full User History</h1>+ <span class="flex flex-wrap sm:flex-nowrap sm:max-w-sm items-center gap-2 sm:shrink-0">+ <section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true">+ <button id="user_header" class="flex space-x-2 text-2xl text-slate-900 dark:text-white hover:text-orange-600 dark:hover:text-orange-600 items-center justify-center" >+ @auth+ <span id="user_name">{{ Auth::user()->name }}</span>+ @else+ <span id="user_name_unauth" class="w-[10vw] text-right">Guest</span>+ @endauth++ <img src="{{ URL::asset('storage/avatars/12345.jpg')}}" class="h-7 w-7 rounded-full sm:mx-0 sm:shrink-0 ring-2 ring-orange-600/60 shadow-lg object-cover" alt="profile picture">+ </button>+ <div role="menu" id="user_dropdown" aria-orientation="vertical" aria-labelledby="user_options" class="hidden absolute left-0 z-30 mt-4 w-56 origin-top-right divide-y divide-gray-300 rounded-md shadow-lg ring-1 bg-white ring-black ring-opacity-5 focus:outline-none text-gray-700">++ @auth+ <section class="flex flex-wrap gap-1 p-4 justify-between">+ <p class="text-sm leading-5 text-orange-500">Logged in as: </p>+ <p class="text-sm font-medium leading-5 text-gray-900 truncate">{{ Auth::user()->email }}</p>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Account settings</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Collections</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem">Dashboard</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left font-bold" role="menuitem">Full History</button>+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" role="menuitem"><a href="/jobs/indexFiles" class="w-full h-full">Index Files</a></button>+ <span role="menuitem" tabindex="-1" class="flex justify-between w-full px-4 py-2 text-sm leading-5 text-left text-gray-700 cursor-not-allowed opacity-50" aria-disabled="true">New feature (soon)</span>+ </section>+ <section class="py-1">+ <button class="text-gray-700 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="logout();" role="menuitem">Log out</button>+ </section>+ @else+ <section class="">+ <button class="rounded-t-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showLogin();" role="menuitem">Log in</button>+ <button class="rounded-b-md hover:bg-neutral-100 flex justify-between w-full px-4 py-2 text-sm leading-5 text-left" onclick="showSignup();" role="menuitem">Sign up</button>+ </section>+ @endauth+ </div>++ </section>+++ <section id="navbar-video" class="flex items-center space-x-2">+ <button id="btn-nav-folders" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="folders">+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" height="24" width="24" class="stroke-slate-900">+ <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776" />+ </svg>+ </button>+ @auth+ <button id="btn-nav-history" class="flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-purple-300 hover:bg-purple-200" aria-label="watch history">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path d="M0 0h24v24H0z" fill="none" />+ <path fill-rule="evenodd" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" />+ </svg>+ </button>+ <button id="btn-nav-settings" class=" hidden flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg bg-red-300 hover:bg-red-200" aria-label="settings">+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="24" width="24" class="fill-slate-900">+ <path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" />+ </svg>+ </button>+ @endauth+ </section>++ <div class="toggle-switch shrink-0">+ <label class="switch-label">+ <input type="checkbox" class="checkbox invisible" id="dark-mode-toggle">+ <span class="slider"></span>+ </label>+ </div>+ </span>+ </div>+ <hr class="mt-2 mb-3">+ </nav>+ <section id="content-history" class=" space-y-2 cursor-pointer min-h-[80vh] pt-8">+ <div class="flex gap-12 group cursor-default hidden">+ <div class="flex rounded-xl items-center justify-center dark:bg-neutral-800 dark:hover:bg-neutral-700 hover:bg-slate-200 bg-slate-100 dark:text-white shadow p-3 w-full group flex-grow cursor-pointer">+ <div class="w-full flex-wrap divide-y divide-gray-300">+ <section class="flex justify-between items-baseline w-full">+ <h2 class="text-xl text-left truncate">${videoName}</h2>+ <h2 class="text-xl text-right truncate">${date}</h2>+ </section>+ <aside class="flex justify-between items-center w-full pt-1">+ <h3 class="text-lg text-left text-neutral-500 truncate">${folderName}</h3>+ <h3 class="text-lg text-right text-neutral-500 text-nowrap line-clamp-1 truncate">${timeSpan}</h3>+ <span class="hidden flex space-x-1">+ <button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">+ <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />+ </svg>+ </span>+ </aside>+ </div>+ </div>+ <div class="aspect-square rounded-full items-center justify-center group-hover:visible invisible flex">+ <button class="record-delete w-full p-3 items-center justify-center rounded-xl bg-red-700 hover:bg-red-600" data-id='${recordID}'>+ Delete+ </button>+ </div>+ </div>+ </section>+ </section>+ <section id="left-card" class="w-full lg:w-72 shrink-0 hidden lg:block"></section>+ </main>+</x-app-layout> -->\ No newline at end of filediff --git a/tailwind.config.js b/tailwind.config.jsindex 5171305d..eb1228b7 100644--- a/tailwind.config.js+++ b/tailwind.config.js@@ -12,6 +12,7 @@ export default {"./resources/**/*.blade.php","./resources/**/*.js","./resources/**/*.vue",+ './resources/js/components/**/*.vue',],theme: {extend: {