Skip to content

A self-hosted media server and file management system

fix: second scrollbar shows up from hover cards Scroll Area #153

aminnausin5143c4b71ebd
diff --git a/resources/js/App.vue b/resources/js/App.vue
index acdab305..a3061e39 100755
--- a/resources/js/App.vue
+++ b/resources/js/App.vue
@@ -13,8 +13,8 @@ import GlobalModal from '@/components/modals/GlobalModal.vue';
const toastPosition = ref<ToastPostion>();
-const { lightMode, ambientMode, playbackHeatmap, contextMenuItems, contextMenuStyle, contextMenuItemStyle, isPlaylist } = storeToRefs(useAppStore());
const { toggleDarkMode, initDarkMode, initAmbientMode, initPlaybackHeatmap, initIsPlaylist, setAmbientMode, setPlaybackHeatmap, setIsPlaylist } = useAppStore();
+const { lightMode, ambientMode, playbackHeatmap, contextMenuItems, contextMenuStyle, contextMenuItemStyle, isPlaylist } = storeToRefs(useAppStore());
onMounted(async () => {
initDarkMode();
diff --git a/resources/js/app.ts b/resources/js/app.ts
index e14cb34b..e6d9017e 100644
--- a/resources/js/app.ts
+++ b/resources/js/app.ts
@@ -1,19 +1,24 @@
-import './bootstrap';
+import '@/bootstrap';
import { VueQueryPlugin } from '@tanstack/vue-query';
import { queryClient } from '@/service/vue-query';
import { createPinia } from 'pinia';
import { createApp } from 'vue';
+
import nProgress from 'nprogress';
-import router from './router/index';
-import App from './App.vue';
+import router from '@/router/index';
+import App from '@/App.vue';
import 'nprogress/nprogress.css';
-nProgress.configure({ showSpinner: false });
const application = createApp(App);
const pinia = createPinia();
+nProgress.configure({
+ showSpinner: false,
+ parent: '#nprogress-container',
+});
+
application.use(router);
application.use(pinia);
application.use(VueQueryPlugin, { queryClient });
diff --git a/resources/js/layouts/LayoutBase.vue b/resources/js/layouts/LayoutBase.vue
index 12f980f8..b634a431 100755
--- a/resources/js/layouts/LayoutBase.vue
+++ b/resources/js/layouts/LayoutBase.vue
@@ -1,60 +1,14 @@
<script setup lang="ts">
import { useAppStore } from '@/stores/AppStore';
import { storeToRefs } from 'pinia';
-import { ref, watch } from 'vue';
import NavBar from '@/components/panels/NavBar.vue';
-const { selectedSideBar, sideBarTarget, scrollLock } = storeToRefs(useAppStore());
-
-const bodyStyles = ref<Record<string, string>>({});
-
-watch(
- () => scrollLock.value,
- async (newVal) => {
- if (newVal) {
- const scrollY = window.scrollY;
-
- bodyStyles.value.top = `-${scrollY}px`;
- document.body.style.overflow = 'hidden';
- } else {
- const scrollY = parseInt(bodyStyles.value.top.replaceAll('px', '')) * -1;
- bodyStyles.value.top = `0px`;
- document.body.style.overflow = 'auto';
-
- window.scrollTo(0, scrollY);
- }
- },
-);
+const { selectedSideBar, sideBarTarget } = storeToRefs(useAppStore());
</script>
<template>
<main
- :style="bodyStyles"
- @scroll.passive="
- (e) => {
- if (scrollLock) {
- e.preventDefault();
- e.stopPropagation();
- }
- }
- "
- @wheel.passive="
- (e) => {
- if (scrollLock) {
- e.preventDefault();
- e.stopPropagation();
- }
- }
- "
- @touchmove.passive="
- (e) => {
- if (scrollLock) {
- e.preventDefault();
- e.stopPropagation();
- }
- }
- "
class="h-full md:h-auto grid grid-cols-1 lg:grid-cols-10 2xl:grid-cols-6 sm:p-6 gap-6 snap-y bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-white text-gray-900 antialiased overflow-x-clip"
>
<section
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index dde53e8a..2c728a54 100755
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -19,34 +19,54 @@
<!-- local -->
@vite('resources/css/app.css')
<style>
- /* #app {
+ /* body {
scrollbar-gutter: stable;
font-optical-sizing: auto;
- } */
+ }
@media (min-width: 640px) {
- #app {
+ body {
scrollbar-gutter: stable both-edges;
}
}
- #app.fullscreen {
+ body.fullscreen {
scrollbar-gutter: auto;
- }
+ } */
#nprogress .bar {
background: #9333ea !important;
}
+
+ #nprogress-container {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 10000;
+ pointer-events: none;
+ }
+
+ html {
+ height: 100%;
+ }
+
+ html {
+ overflow: hidden;
+ height: 100%;
+ }
</style>
</head>
-<body class="bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-white text-gray-900 antialiased dark:[color-scheme:dark]" id="root"> <!-- dark:bg-[#121216] dark:text-[#e2e0e2] text-gray-900 -->
+<body class="overflow-y-auto bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-white text-gray-900 antialiased dark:[color-scheme:dark] scrollbar-minimal scrollbar-track:bg-neutral-300 scrollbar-track:dark:bg-neutral-800" id="root"> <!-- dark:bg-[#121216] dark:text-[#e2e0e2] text-gray-900 -->
<div
id="reverb-config"
data-reverb-config='@json(["key" => config("reverb.apps.apps.0.key"), "host" => config("reverb.apps.apps.0.options.host"), "port" => config("reverb.apps.apps.0.options.port")])'>
</div>
@vite('resources/js/app.ts')
- <div id='app' class="h-screen overflow-auto scrollbar-minimal scrollbar-track:bg-neutral-300 scrollbar-track:dark:bg-neutral-800"></div>
+ <div id='app' class="h-screen"></div>
+ <div id="nprogress-container" class="h-2"></div>
+
{{ $slot }}
</body>