Compare commits
No commits in common. "main" and "dev" have entirely different histories.
6 changed files with 2931 additions and 1780 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,7 +8,6 @@ pnpm-debug.log*
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env
|
|
||||||
.env.local
|
.env.local
|
||||||
.env.development.local
|
.env.development.local
|
||||||
.env.test.local
|
.env.test.local
|
||||||
|
|
|
||||||
15
Dockerfile
15
Dockerfile
|
|
@ -1,15 +0,0 @@
|
||||||
# Build stage
|
|
||||||
FROM node:22-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json package-lock.json ./
|
|
||||||
RUN npm ci
|
|
||||||
COPY . .
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# Production stage - simple option
|
|
||||||
FROM node:22-alpine
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=builder /app/dist /app/dist
|
|
||||||
RUN npm install -g serve
|
|
||||||
EXPOSE 80
|
|
||||||
CMD ["serve", "-s", "dist", "-l", "80"]
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
services:
|
|
||||||
frontend:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
# ports:
|
|
||||||
# - 80:80
|
|
||||||
restart: unless-stopped
|
|
||||||
4667
package-lock.json
generated
4667
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Button } from "../ui/Button";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import { ScrollArea } from "../ui/scroll-area";
|
import { ScrollArea } from "../ui/scroll-area";
|
||||||
import { useContext, useEffect, useRef, useState } from "react";
|
import { useContext, useEffect, useRef, useState } from "react";
|
||||||
|
|
@ -7,7 +8,6 @@ import { fabric } from "fabric";
|
||||||
import CommonPanel from "./CommonPanel";
|
import CommonPanel from "./CommonPanel";
|
||||||
import useProject from "@/hooks/useProject";
|
import useProject from "@/hooks/useProject";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { Button } from "../ui/button";
|
|
||||||
|
|
||||||
export default function TextPanel() {
|
export default function TextPanel() {
|
||||||
const { canvas, setSelectedPanel } = useContext(CanvasContext);
|
const { canvas, setSelectedPanel } = useContext(CanvasContext);
|
||||||
|
|
@ -20,8 +20,7 @@ export default function TextPanel() {
|
||||||
|
|
||||||
function isUUID(value) {
|
function isUUID(value) {
|
||||||
if (typeof value !== "string") return false;
|
if (typeof value !== "string") return false;
|
||||||
const uuidRegex =
|
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
||||||
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
||||||
return uuidRegex.test(value);
|
return uuidRegex.test(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +62,7 @@ export default function TextPanel() {
|
||||||
setActiveObject(text);
|
setActiveObject(text);
|
||||||
canvas.renderAll();
|
canvas.renderAll();
|
||||||
|
|
||||||
const object = canvas.toJSON(["id", "selectable"]);
|
const object = canvas.toJSON(['id', 'selectable']);
|
||||||
const updateData = { ...projectData?.data, object };
|
const updateData = { ...projectData?.data, object };
|
||||||
// Wait for the project update before continuing
|
// Wait for the project update before continuing
|
||||||
projectUpdate({ id, updateData });
|
projectUpdate({ id, updateData });
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from 'vite'
|
||||||
import react from "@vitejs/plugin-react-swc";
|
import react from '@vitejs/plugin-react-swc'
|
||||||
import path from "path";
|
import path from "path"
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
@ -11,6 +11,9 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 5175,
|
port: 5175
|
||||||
},
|
},
|
||||||
});
|
esbuild: {
|
||||||
|
target: "esnext",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue