Ensure transition only appears when sidebar is openend and in use

This commit is contained in:
ernstmul committed 2025-02-11 12:21:06 +01:00
1 parent 70ea552aa8
commit 0ac924e0e5
1 file changed
+9 -5
+9 -5
View File
@@ -27,16 +27,20 @@
$: selectedProject = loadedProjects.find((project) => project.isSelected);
let y: number;
let showContentTransition = true;
let showContentTransition = false;
let timeoutId: NodeJS.Timeout;
page.subscribe(({ url }) => {
$showSubNavigation = url.searchParams.get('openNavbar') === 'true';
if (url.search.includes('create-project')) {
clearTimeout(timeoutId);
if (url.pathname.includes('project-')) {
timeoutId = setTimeout(() => {
showContentTransition = true;
}, 1000);
} else {
showContentTransition = false;
}
setTimeout(() => {
showContentTransition = !url.pathname.includes('organization');
}, 1000);
});
/**