Add docker support - reloa3d

Signed-off-by: Rodrigo Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
rodrigo committed 2025-04-11 00:35:08 -03:00
1 parent 6ee201d113
commit 8dfe0d6f94
2 files changed
+33 -19

No files matched your search

+23 -17
View File
@@ -126,7 +126,7 @@ export const MainLayout: React.FC = () => {
{/* Menu de navegação vertical com scroll */} {/* Menu de navegação vertical com scroll */}
<nav className="flex-1 overflow-y-auto"> <nav className="flex-1 overflow-y-auto">
<div className="py-4"> <div className="py-4">
{menuItems.map((item) => ( {menuItems.map((item, index) => (
<div key={item.path || item.label} className="px-2 mb-2"> <div key={item.path || item.label} className="px-2 mb-2">
{!item.subitems ? ( {!item.subitems ? (
<Link <Link
@@ -144,36 +144,43 @@ export const MainLayout: React.FC = () => {
) : ( ) : (
<div className="relative group"> <div className="relative group">
<div <div
className="flex flex-col items-center justify-center p-3 rounded-lg transition-colors hover:bg-white/10 cursor-pointer" className={`flex flex-col items-center justify-center p-3 rounded-lg transition-colors hover:bg-white/10 cursor-pointer ${
item.subitems.some(subitem => isCurrentPath(subitem.path))
? "bg-white/20"
: ""
}`}
title={item.label} title={item.label}
> >
<item.icon className="h-6 w-6 text-white opacity-80" /> <item.icon className="h-6 w-6 text-white opacity-80" />
<span className="text-xs mt-1 text-white/80">{item.label}</span> <span className="text-xs mt-1 text-white/80">{item.label}</span>
</div> </div>
{/* Submenu reposicionado */} {/* Submenu corrigido - posicionado fora da sidebar como pop-up */}
<div <div
className="fixed z-50" className="fixed left-20 z-50"
style={{ style={{
left: '5rem', // w-20 = 80px top: 'var(--submenu-top)',
top: '50%', '--submenu-top': `${index * 70 + 100}px`
transform: 'translateY(-50%)' } as React.CSSProperties}
}}
> >
<div className="opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200"> <div className="opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200">
<div className="bg-blue-800/95 backdrop-blur-sm rounded-lg py-2 px-1 shadow-xl w-[100px] ml-2"> <div className="bg-blue-800/95 backdrop-blur-sm rounded-lg py-2 px-1 shadow-xl w-[140px] border border-blue-700/30">
{item.subitems.filter(subitem => {item.subitems
!subitem.roles.length || .filter(subitem =>
!subitem.roles?.length ||
(userProfile?.perfil && subitem.roles.includes(userProfile.perfil)) (userProfile?.perfil && subitem.roles.includes(userProfile.perfil))
).map((subitem) => ( )
.map((subitem) => (
<Link <Link
key={subitem.path} key={subitem.path}
to={subitem.path} to={subitem.path}
className="block px-3 py-2 hover:bg-white/10 rounded-lg transition-colors" className={`block px-3 py-2 hover:bg-blue-700/50 rounded-lg transition-colors ${
isCurrentPath(subitem.path) ? "bg-blue-700/70" : ""
}`}
> >
<div className="flex flex-col items-center justify-center"> <div className="flex items-center space-x-2">
<subitem.icon className="h-6 w-6 text-white opacity-80" /> <subitem.icon className="h-5 w-5 text-white opacity-80" />
<span className="text-xs mt-1 text-white/80">{subitem.label}</span> <span className="text-sm text-white/90">{subitem.label}</span>
</div> </div>
</Link> </Link>
))} ))}
@@ -186,7 +193,6 @@ export const MainLayout: React.FC = () => {
))} ))}
</div> </div>
</nav> </nav>
</div> </div>
{/* Main Content */} {/* Main Content */}
+10 -2
View File
@@ -6,6 +6,7 @@ export default defineConfig({
plugins: [react()], plugins: [react()],
server: { server: {
port: 3000, port: 3000,
host: true,
allowedHosts: [ allowedHosts: [
'localhost', 'localhost',
'127.0.0.1', '127.0.0.1',
@@ -13,11 +14,18 @@ export default defineConfig({
], ],
proxy: { proxy: {
'/api': { '/api': {
target: 'https://advx.martinsevieira.adv.br:5000', target: 'http://localhost:5000',
changeOrigin: true, changeOrigin: true,
secure: true, secure: false,
} }
}, },
hmr: {
// Configuração do HMR
host: 'advx.martinsevieira.adv.br',
protocol: 'wss',
clientPort: 443,
overlay: true
},
}, },
css: { css: {
postcss: { postcss: {