diff --git a/components/dashboard/application/advanced/traefik/show-traefik-config.tsx b/components/dashboard/application/advanced/traefik/show-traefik-config.tsx index 8f48dc77e..6b5415044 100644 --- a/components/dashboard/application/advanced/traefik/show-traefik-config.tsx +++ b/components/dashboard/application/advanced/traefik/show-traefik-config.tsx @@ -9,7 +9,7 @@ import { import { api } from "@/utils/api"; import { File } from "lucide-react"; import { UpdateTraefikConfig } from "./update-traefik-config"; -import CodeEditor from "@/components/shared/code-editor"; +import { CodeEditor } from "@/components/shared/code-editor"; interface Props { applicationId: string; } diff --git a/components/dashboard/application/advanced/traefik/update-traefik-config.tsx b/components/dashboard/application/advanced/traefik/update-traefik-config.tsx index 8b7cc8d4a..13bec2424 100644 --- a/components/dashboard/application/advanced/traefik/update-traefik-config.tsx +++ b/components/dashboard/application/advanced/traefik/update-traefik-config.tsx @@ -24,7 +24,7 @@ import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; import jsyaml from "js-yaml"; -import CodeEditor from "@/components/shared/code-editor"; +import { CodeEditor } from "@/components/shared/code-editor"; const UpdateTraefikConfigSchema = z.object({ traefikConfig: z.string(), @@ -122,7 +122,7 @@ export const UpdateTraefikConfig = ({ applicationId }: Props) => {
{ return (
{isError && {error?.message}} - -
+
{ return (
-
+
{directories?.length === 0 && (
@@ -27,7 +27,7 @@ export const ShowTraefikSystem = () => { <> setFile(item?.id || null)} folderIcon={Folder} itemIcon={Workflow} diff --git a/components/dashboard/settings/web-server/show-main-traefik-config.tsx b/components/dashboard/settings/web-server/show-main-traefik-config.tsx index cac85c068..4a14d2207 100644 --- a/components/dashboard/settings/web-server/show-main-traefik-config.tsx +++ b/components/dashboard/settings/web-server/show-main-traefik-config.tsx @@ -23,7 +23,7 @@ import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; -import CodeEditor from "@/components/shared/code-editor"; +import { CodeEditor } from "@/components/shared/code-editor"; import { validateAndFormatYAML } from "../../application/advanced/traefik/update-traefik-config"; const UpdateMainTraefikConfigSchema = z.object({ diff --git a/components/dashboard/settings/web-server/show-server-middleware-config.tsx b/components/dashboard/settings/web-server/show-server-middleware-config.tsx index ec6c9428a..6d53648f4 100644 --- a/components/dashboard/settings/web-server/show-server-middleware-config.tsx +++ b/components/dashboard/settings/web-server/show-server-middleware-config.tsx @@ -23,7 +23,7 @@ import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; -import CodeEditor from "@/components/shared/code-editor"; +import { CodeEditor } from "@/components/shared/code-editor"; import { validateAndFormatYAML } from "../../application/advanced/traefik/update-traefik-config"; const UpdateServerMiddlewareConfigSchema = z.object({ @@ -98,7 +98,7 @@ export const ShowServerMiddlewareConfig = ({ children }: Props) => {
{
{ const { resolvedTheme } = useTheme(); return ( -
+
+ {props.disabled && ( +
+ )}
); -} - -export default CodeEditor; +}; diff --git a/styles/globals.css b/styles/globals.css index aea4a874f..3d5f5aacd 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -33,6 +33,7 @@ --ring: 240 10% 3.9%; --radius: 0.5rem; + --overlay: rgba(0, 0, 0, 0.2); } .dark { @@ -63,6 +64,8 @@ --border: 240 3.7% 15.9%; --input: 240 4% 10%; --ring: 240 4.9% 83.9%; + + --overlay: rgba(0, 0, 0, 0.5); } } @@ -86,13 +89,7 @@ .xterm .xterm-screen { overflow: hidden; } -/* .no-scrollbar::-webkit-scrollbar { - display: none; -} -.no-scrollbar { - -ms-overflow-style: none; - scrollbar-width: none; */ -/* } */ + @layer utilities { /* Chrome, Safari and Opera */ .no-scrollbar::-webkit-scrollbar { @@ -110,23 +107,10 @@ font-weight: 500; letter-spacing: 0px !important; } -.xterm-rows { - /* padding-left: 1rem; - padding-right: 1rem; */ - /* padding-top: 1rem; - padding-bottom: 1rem; */ -} - -/* .xterm-cursor { - background-color: transparent !important; - border-color: transparent !important; - outline: none !important; - outline-offset: 0px !important; -} */ /* Codemirror */ .cm-editor { - @apply w-full h-full rounded-md p-1 border border-solid border-border outline-none; + @apply w-full h-full rounded-md overflow-hidden border border-solid border-border outline-none; } .cm-editor .cm-scroller { @@ -142,3 +126,18 @@ .cm-editor .cm-activeLine:has(.cm-placeholder) { background-color: transparent; } + + +.disabled-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); /* Fondo opaco */ + display: flex; + align-items: center; + justify-content: center; + z-index: 10; +} +