Режим создания связей: кликните на два узла для соединения
{selectedNode && (
Выбран: {selectedNode.name}
diff --git a/frontend/src/modules/ide/IDE.tsx b/frontend/src/modules/ide/IDE.tsx
index ca2214f..272fb2a 100644
--- a/frontend/src/modules/ide/IDE.tsx
+++ b/frontend/src/modules/ide/IDE.tsx
@@ -13,16 +13,45 @@ import {
TitleBar,
StatusBar,
} from "./components";
+import { useThemeStore } from "@/modules/theme-bw/stores/theme.store";
interface IDEProps {
initialFiles?: FileNode;
onBack?: () => void;
}
+const darkColors = {
+ bg: "#1e1e1e",
+ bgSecondary: "#252526",
+ bgTertiary: "#2d2d30",
+ border: "#3e3e42",
+ textPrimary: "#cccccc",
+ textSecondary: "#858585",
+ accent: "#0e639c",
+ accentHover: "#1177bb",
+ statusBar: "#007acc",
+};
+
+const lightColors = {
+ bg: "#ffffff",
+ bgSecondary: "#f3f3f3",
+ bgTertiary: "#e8e8e8",
+ border: "#e0e0e0",
+ textPrimary: "#333333",
+ textSecondary: "#616161",
+ accent: "#0e639c",
+ accentHover: "#1177bb",
+ statusBar: "#007acc",
+};
+
export const IDE: React.FC
= ({
initialFiles: externalFiles,
onBack,
}: IDEProps = {}) => {
+ const theme = useThemeStore((s) => s.theme);
+ const isDark = theme === "dark";
+ const c = isDark ? darkColors : lightColors;
+
const files = useIDEStore((state) => state.files);
const openFiles = useIDEStore((state) => state.openFiles);
const activeFile = useIDEStore((state) => state.activeFile);
@@ -51,7 +80,7 @@ export const IDE: React.FC = ({
height: "100vh",
display: "flex",
flexDirection: "column",
- backgroundColor: "#1e1e1e",
+ backgroundColor: c.bg,
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
position: "relative",
@@ -66,8 +95,8 @@ export const IDE: React.FC = ({
top: "40px",
left: "12px",
background: "transparent",
- border: "1px solid #3e3e42",
- color: "#cccccc",
+ border: `1px solid ${c.border}`,
+ color: c.textPrimary,
cursor: "pointer",
display: "flex",
alignItems: "center",
@@ -79,14 +108,14 @@ export const IDE: React.FC = ({
zIndex: 10,
}}
onMouseEnter={(e) => {
- e.currentTarget.style.backgroundColor = "#3e3e42";
+ e.currentTarget.style.backgroundColor = c.border;
e.currentTarget.style.color = "#fff";
e.currentTarget.style.borderColor = "#555";
}}
onMouseLeave={(e) => {
e.currentTarget.style.backgroundColor = "transparent";
- e.currentTarget.style.color = "#cccccc";
- e.currentTarget.style.borderColor = "#3e3e42";
+ e.currentTarget.style.color = c.textPrimary;
+ e.currentTarget.style.borderColor = c.border;
}}
title="Go back"
>
@@ -117,7 +146,7 @@ export const IDE: React.FC = ({
style={{
fontSize: "22px",
marginBottom: "12px",
- color: "#cccccc",
+ color: c.textPrimary,
fontWeight: 300,
}}
>
@@ -127,7 +156,7 @@ export const IDE: React.FC = ({
style={{
fontSize: "13px",
marginBottom: "32px",
- color: "#858585",
+ color: c.textSecondary,
}}
>
Create a new project to get started
@@ -136,7 +165,7 @@ export const IDE: React.FC = ({
onClick={createNewProject}
style={{
padding: "10px 24px",
- backgroundColor: "#0e639c",
+ backgroundColor: c.accent,
border: "none",
borderRadius: "4px",
color: "#fff",
@@ -146,10 +175,10 @@ export const IDE: React.FC = ({
transition: "background-color 0.1s",
}}
onMouseEnter={(e) => {
- e.currentTarget.style.backgroundColor = "#1177bb";
+ e.currentTarget.style.backgroundColor = c.accentHover;
}}
onMouseLeave={(e) => {
- e.currentTarget.style.backgroundColor = "#0e639c";
+ e.currentTarget.style.backgroundColor = c.accent;
}}
>
New Project
@@ -168,7 +197,7 @@ export const IDE: React.FC = ({
display: "flex",
flexDirection: "column",
overflow: "hidden",
- backgroundColor: "#1e1e1e",
+ backgroundColor: c.bg,
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
}}
@@ -176,14 +205,14 @@ export const IDE: React.FC = ({
= ({
style={{
background: "transparent",
border: "none",
- color: "#cccccc",
+ color: c.textPrimary,
cursor: "pointer",
display: "flex",
alignItems: "center",
@@ -205,12 +234,12 @@ export const IDE: React.FC
= ({
transition: "all 0.1s",
}}
onMouseEnter={(e) => {
- e.currentTarget.style.backgroundColor = "#3e3e42";
+ e.currentTarget.style.backgroundColor = c.border;
e.currentTarget.style.color = "#fff";
}}
onMouseLeave={(e) => {
e.currentTarget.style.backgroundColor = "transparent";
- e.currentTarget.style.color = "#cccccc";
+ e.currentTarget.style.color = c.textPrimary;
}}
title="Go back"
>
diff --git a/frontend/src/modules/ide/components/FilePicker.tsx b/frontend/src/modules/ide/components/FilePicker.tsx
index e6441c9..7a7bf1a 100644
--- a/frontend/src/modules/ide/components/FilePicker.tsx
+++ b/frontend/src/modules/ide/components/FilePicker.tsx
@@ -57,6 +57,7 @@ export const FilePicker: React.FC = ({ files }) => {
style={{
height: "100%",
overflowY: "auto",
+ backgroundColor: "var(--bg-primary)",
}}
>
diff --git a/frontend/src/modules/ide/components/FilePickerItem.tsx b/frontend/src/modules/ide/components/FilePickerItem.tsx
index 39aeddd..22f5f5f 100644
--- a/frontend/src/modules/ide/components/FilePickerItem.tsx
+++ b/frontend/src/modules/ide/components/FilePickerItem.tsx
@@ -44,7 +44,7 @@ export const FilePickerItem: React.FC = ({
paddingLeft: `${paddingLeft}px`,
paddingRight: "12px",
height: "36px",
- borderBottom: "1px solid #1a1a1a",
+ borderBottom: "1px solid var(--border)",
cursor: "pointer",
transition: "background-color 0.1s",
gap: "8px",
@@ -57,7 +57,7 @@ export const FilePickerItem: React.FC = ({
}
}}
onMouseEnter={(e) => {
- e.currentTarget.style.backgroundColor = "#2a2a2a";
+ e.currentTarget.style.backgroundColor = "var(--bg-secondary)";
}}
onMouseLeave={(e) => {
e.currentTarget.style.backgroundColor = "transparent";
@@ -65,7 +65,13 @@ export const FilePickerItem: React.FC = ({
>
{/* Folder expand icon */}
{isFolder && (
-
+
{isExpanded ? (
) : (
@@ -77,9 +83,9 @@ export const FilePickerItem: React.FC = ({
{/* File/Folder icon */}
{isFolder ? (
-
+
) : (
-
+
)}
@@ -87,7 +93,7 @@ export const FilePickerItem: React.FC = ({
= ({
{!isFolder && extension && (
= ({
style={{
width: "18px",
height: "18px",
- border: isSelected ? "2px solid #0e639c" : "2px solid #555",
+ border: isSelected
+ ? "2px solid #0e639c"
+ : "2px solid var(--border)",
borderRadius: "3px",
backgroundColor: isSelected ? "#0e639c" : "transparent",
display: "flex",
diff --git a/frontend/src/pages/ide.page.tsx b/frontend/src/pages/ide.page.tsx
index d518e94..a5fe8ef 100644
--- a/frontend/src/pages/ide.page.tsx
+++ b/frontend/src/pages/ide.page.tsx
@@ -8,7 +8,10 @@ export const IDEPage = () => {
const files: FileNode | undefined = location.state?.files;
return (
-
+
navigate("/templates")} initialFiles={files} />
);
diff --git a/frontend/src/pages/templates.page.tsx b/frontend/src/pages/templates.page.tsx
index 2cc3561..68c6783 100644
--- a/frontend/src/pages/templates.page.tsx
+++ b/frontend/src/pages/templates.page.tsx
@@ -118,6 +118,7 @@ export const TemplatesPage = () => {
style={{
height: "100vh",
position: "relative",
+ backgroundColor: "var(--bg-primary)",
}}
>
{/* Floating header */}
@@ -139,13 +140,13 @@ export const TemplatesPage = () => {
alignItems: "center",
gap: "8px",
padding: "6px 12px",
- backgroundColor: "#1a1a1a",
+ backgroundColor: "var(--card-bg)",
borderRadius: "4px",
- border: "1px solid #2a2a2a",
+ border: "1px solid var(--border)",
}}
>
-
+
{selectedPaths.size} script{selectedPaths.size !== 1 ? "s" : ""}{" "}
running
diff --git a/frontend/src/pages/themes.page.tsx b/frontend/src/pages/themes.page.tsx
deleted file mode 100644
index fa02cc9..0000000
--- a/frontend/src/pages/themes.page.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { ThemeChanger } from "@/modules/theme-changer";
-
-export const ThemesPage = () => {
- return (
-
-
-
- );
-};