Add docker support - reloa3d
Signed-off-by: Rodrigo Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
6ee201d113
commit
8dfe0d6f94
2 files changed
+33
-19
No files matched your search
@@ -126,7 +126,7 @@ export const MainLayout: React.FC = () => {
|
||||
{/* Menu de navegação vertical com scroll */}
|
||||
<nav className="flex-1 overflow-y-auto">
|
||||
<div className="py-4">
|
||||
{menuItems.map((item) => (
|
||||
{menuItems.map((item, index) => (
|
||||
<div key={item.path || item.label} className="px-2 mb-2">
|
||||
{!item.subitems ? (
|
||||
<Link
|
||||
@@ -144,36 +144,43 @@ export const MainLayout: React.FC = () => {
|
||||
) : (
|
||||
<div className="relative group">
|
||||
<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}
|
||||
>
|
||||
<item.icon className="h-6 w-6 text-white opacity-80" />
|
||||
<span className="text-xs mt-1 text-white/80">{item.label}</span>
|
||||
</div>
|
||||
|
||||
{/* Submenu reposicionado */}
|
||||
{/* Submenu corrigido - posicionado fora da sidebar como pop-up */}
|
||||
<div
|
||||
className="fixed z-50"
|
||||
className="fixed left-20 z-50"
|
||||
style={{
|
||||
left: '5rem', // w-20 = 80px
|
||||
top: '50%',
|
||||
transform: 'translateY(-50%)'
|
||||
}}
|
||||
top: 'var(--submenu-top)',
|
||||
'--submenu-top': `${index * 70 + 100}px`
|
||||
} as React.CSSProperties}
|
||||
>
|
||||
<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">
|
||||
{item.subitems.filter(subitem =>
|
||||
!subitem.roles.length ||
|
||||
<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 =>
|
||||
!subitem.roles?.length ||
|
||||
(userProfile?.perfil && subitem.roles.includes(userProfile.perfil))
|
||||
).map((subitem) => (
|
||||
)
|
||||
.map((subitem) => (
|
||||
<Link
|
||||
key={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">
|
||||
<subitem.icon className="h-6 w-6 text-white opacity-80" />
|
||||
<span className="text-xs mt-1 text-white/80">{subitem.label}</span>
|
||||
<div className="flex items-center space-x-2">
|
||||
<subitem.icon className="h-5 w-5 text-white opacity-80" />
|
||||
<span className="text-sm text-white/90">{subitem.label}</span>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
@@ -186,7 +193,6 @@ export const MainLayout: React.FC = () => {
|
||||
))}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Main Content */}
|
||||
|
||||
+10
-2
@@ -6,6 +6,7 @@ export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 3000,
|
||||
host: true,
|
||||
allowedHosts: [
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
@@ -13,11 +14,18 @@ export default defineConfig({
|
||||
],
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://advx.martinsevieira.adv.br:5000',
|
||||
target: 'http://localhost:5000',
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
secure: false,
|
||||
}
|
||||
},
|
||||
hmr: {
|
||||
// Configuração do HMR
|
||||
host: 'advx.martinsevieira.adv.br',
|
||||
protocol: 'wss',
|
||||
clientPort: 443,
|
||||
overlay: true
|
||||
},
|
||||
},
|
||||
css: {
|
||||
postcss: {
|
||||
|
||||
Reference in new issue
Block a user