mirror of
https://github.com/twinpath/app.git
synced 2026-01-26 13:21:59 +07:00
fix: production deployment issues (JS classList, Alpine syntax, and WebSocket config)
This commit is contained in:
22
.gitignore
vendored
22
.gitignore
vendored
@@ -5,27 +5,31 @@
|
|||||||
/storage/*.key
|
/storage/*.key
|
||||||
/storage/pail
|
/storage/pail
|
||||||
/vendor
|
/vendor
|
||||||
|
|
||||||
|
# Environment files
|
||||||
.env
|
.env
|
||||||
.env.backup
|
.env.backup
|
||||||
.env.production
|
.env.production
|
||||||
.phpactor.json
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Development & IDEs
|
||||||
|
/.idea
|
||||||
|
/.vscode
|
||||||
|
/.fleet
|
||||||
|
/.nova
|
||||||
|
/.zed
|
||||||
|
/.phpunit.cache
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
*.log
|
*.log
|
||||||
/.fleet
|
|
||||||
/.idea
|
|
||||||
/.nova
|
|
||||||
/.phpunit.cache
|
|
||||||
/.vscode
|
|
||||||
/.zed
|
|
||||||
/auth.json
|
/auth.json
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
.phpunit.result.cache
|
|
||||||
|
|
||||||
# SQLite
|
# SQLite
|
||||||
/database/*.sqlite
|
/database/*.sqlite
|
||||||
@@ -41,7 +45,5 @@ mix-manifest.json
|
|||||||
/copy-release.php
|
/copy-release.php
|
||||||
/make-release.bat
|
/make-release.bat
|
||||||
/auth_backup.php
|
/auth_backup.php
|
||||||
/.idea
|
|
||||||
/.vscode
|
|
||||||
*.bak
|
*.bak
|
||||||
*.tmp
|
*.tmp
|
||||||
|
|||||||
@@ -107,7 +107,9 @@
|
|||||||
class="fixed inset-0 z-40 md:hidden bg-white dark:bg-gray-900 pt-24 px-6">
|
class="fixed inset-0 z-40 md:hidden bg-white dark:bg-gray-900 pt-24 px-6">
|
||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6">
|
||||||
<a href="{{ route('home') }}" @click="$store.sidebar.setMobileOpen(false)" class="text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">Home</a>
|
<a href="{{ route('home') }}" @click="$store.sidebar.setMobileOpen(false)" class="text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">Home</a>
|
||||||
<a href="{{ route('home') }}#features" @click="$store.sidebar.setMobileOpen(false); if(Route::is('home')) window.appSmoothScroll('#features')" class="text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">Features</a>
|
<a href="{{ route('home') }}#features"
|
||||||
|
@click="$store.sidebar.setMobileOpen(false)@if(Route::is('home')); window.appSmoothScroll('#features')@endif"
|
||||||
|
class="text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">Features</a>
|
||||||
|
|
||||||
<div x-data="{ expanded: false }">
|
<div x-data="{ expanded: false }">
|
||||||
<button @click="expanded = !expanded" class="w-full flex justify-between items-center text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">
|
<button @click="expanded = !expanded" class="w-full flex justify-between items-center text-lg font-bold text-gray-900 dark:text-white border-b border-gray-100 dark:border-gray-800 pb-4">
|
||||||
|
|||||||
@@ -81,13 +81,22 @@
|
|||||||
const savedTheme = localStorage.getItem('theme');
|
const savedTheme = localStorage.getItem('theme');
|
||||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||||
const theme = savedTheme || systemTheme;
|
const theme = savedTheme || systemTheme;
|
||||||
|
|
||||||
|
// Add to html immediately (works in <head>)
|
||||||
if (theme === 'dark') {
|
if (theme === 'dark') {
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
document.body.classList.add('dark', 'bg-gray-900');
|
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.classList.remove('dark');
|
document.documentElement.classList.remove('dark');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add to body after it's available
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
if (theme === 'dark') {
|
||||||
|
document.body.classList.add('dark', 'bg-gray-900');
|
||||||
|
} else {
|
||||||
document.body.classList.remove('dark', 'bg-gray-900');
|
document.body.classList.remove('dark', 'bg-gray-900');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -102,13 +102,22 @@
|
|||||||
const savedTheme = localStorage.getItem('theme');
|
const savedTheme = localStorage.getItem('theme');
|
||||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||||
const theme = savedTheme || systemTheme;
|
const theme = savedTheme || systemTheme;
|
||||||
|
|
||||||
|
// Add to html immediately (works in <head>)
|
||||||
if (theme === 'dark') {
|
if (theme === 'dark') {
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
document.body.classList.add('dark', 'bg-gray-900');
|
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.classList.remove('dark');
|
document.documentElement.classList.remove('dark');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add to body after it's available
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
if (theme === 'dark') {
|
||||||
|
document.body.classList.add('dark', 'bg-gray-900');
|
||||||
|
} else {
|
||||||
document.body.classList.remove('dark', 'bg-gray-900');
|
document.body.classList.remove('dark', 'bg-gray-900');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user