Add docker support - reloa3d
Signed-off-by: Rodrigo Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
6ee201d113
commit
7e7f3e9353
2 files changed
+27
-16
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,32 +144,36 @@ 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 ao lado do ícone */}
|
||||
<div
|
||||
className="fixed z-50"
|
||||
style={{
|
||||
left: '5rem', // w-20 = 80px
|
||||
top: '50%',
|
||||
transform: 'translateY(-50%)'
|
||||
className="absolute left-full top-0 z-50"
|
||||
style={{
|
||||
marginLeft: "0.5rem"
|
||||
}}
|
||||
>
|
||||
<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-[120px]">
|
||||
{item.subitems.filter(subitem =>
|
||||
!subitem.roles.length ||
|
||||
!subitem.roles?.length ||
|
||||
(userProfile?.perfil && subitem.roles.includes(userProfile.perfil))
|
||||
).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-white/10 rounded-lg transition-colors ${
|
||||
isCurrentPath(subitem.path) ? "bg-white/20" : ""
|
||||
}`}
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center">
|
||||
<subitem.icon className="h-6 w-6 text-white opacity-80" />
|
||||
@@ -186,7 +190,6 @@ export const MainLayout: React.FC = () => {
|
||||
))}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Main Content */}
|
||||
@@ -274,8 +277,8 @@ export const MainLayout: React.FC = () => {
|
||||
Gerenciar Usuários
|
||||
</Link>
|
||||
)}
|
||||
</Menu.Item>
|
||||
)}
|
||||
)}
|
||||
</Menu.Item>
|
||||
|
||||
<Menu.Item>
|
||||
{({ active }) => (
|
||||
|
||||
+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