Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acb8103ba6 | ||
|
|
5cc945be6b | ||
|
|
3bb860957b | ||
|
|
5bf01f3078 | ||
|
|
632c2fef0c | ||
| a4846621fb | |||
| 6d05517c25 | |||
| 474c832896 |
6 changed files with 1657 additions and 2808 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,6 +8,7 @@ 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
Normal file
15
Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# 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"]
|
||||||
8
docker-compose.yaml
Normal file
8
docker-compose.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
# ports:
|
||||||
|
# - 80:80
|
||||||
|
restart: unless-stopped
|
||||||
4419
package-lock.json
generated
4419
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,3 @@
|
||||||
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";
|
||||||
|
|
@ -8,6 +7,7 @@ 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,7 +20,8 @@ export default function TextPanel() {
|
||||||
|
|
||||||
function isUUID(value) {
|
function isUUID(value) {
|
||||||
if (typeof value !== "string") return false;
|
if (typeof value !== "string") return false;
|
||||||
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
const uuidRegex =
|
||||||
|
/^[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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +63,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,9 +11,6 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 5175
|
port: 5175,
|
||||||
},
|
},
|
||||||
esbuild: {
|
});
|
||||||
target: "esnext",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue