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
+25
-14
No files matched your search
@@ -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,32 +144,36 @@ 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 ao lado do ícone */}
|
||||||
<div
|
<div
|
||||||
className="fixed z-50"
|
className="absolute left-full top-0 z-50"
|
||||||
style={{
|
style={{
|
||||||
left: '5rem', // w-20 = 80px
|
marginLeft: "0.5rem"
|
||||||
top: '50%',
|
|
||||||
transform: 'translateY(-50%)'
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<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-[120px]">
|
||||||
{item.subitems.filter(subitem =>
|
{item.subitems.filter(subitem =>
|
||||||
!subitem.roles.length ||
|
!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-white/10 rounded-lg transition-colors ${
|
||||||
|
isCurrentPath(subitem.path) ? "bg-white/20" : ""
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col items-center justify-center">
|
<div className="flex flex-col items-center justify-center">
|
||||||
<subitem.icon className="h-6 w-6 text-white opacity-80" />
|
<subitem.icon className="h-6 w-6 text-white opacity-80" />
|
||||||
@@ -186,7 +190,6 @@ export const MainLayout: React.FC = () => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Content */}
|
{/* Main Content */}
|
||||||
@@ -274,8 +277,8 @@ export const MainLayout: React.FC = () => {
|
|||||||
Gerenciar Usuários
|
Gerenciar Usuários
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</Menu.Item>
|
|
||||||
)}
|
)}
|
||||||
|
</Menu.Item>
|
||||||
|
|
||||||
<Menu.Item>
|
<Menu.Item>
|
||||||
{({ active }) => (
|
{({ active }) => (
|
||||||
|
|||||||
+10
-2
@@ -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: {
|
||||||
|
|||||||
Reference in new issue
Block a user