Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some changes #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
API_URL='https://localhost:4133/'
VITE_API_URL='https://localhost:4133/'
VITE_APP_SERVICE_URI="https://arcada-backend-cff36b685fa8.herokuapp.com/"
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />

<title>Arcada</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>

</body>
</html>
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"react": "^18.0.0",
"react-device-detect": "^2.2.2",
"react-dom": "^18.0.0",
"react-scripts": "5.0.0",
"tabler-icons-react": "^1.43.0",
"three": "^0.140.0",
"typescript": "^4.6.3",
"web-vitals": "^2.1.4",
"zustand": "^3.7.2"
"tabler-icons-react": "^1.56.0",
"three": "^0.165.0",
"typescript": "^5.4.5",
"vite": "^5.0.8",
"vite-plugin-svgr": "4.2.0",
"web-vitals": "^4.0.1",
"zustand": "^4.5.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"eslintConfig": {
"extends": [
Expand All @@ -52,6 +52,7 @@
]
},
"devDependencies": {
"@types/three": "^0.139.0"
"@types/three": "^0.165.0",
"@vitejs/plugin-react": "^4.3.0"
}
}
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
Expand Down
19 changes: 19 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
2 changes: 1 addition & 1 deletion src/api/api-client.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export const endpoint = process.env.REACT_APP_SERVICE_URI ? process.env.REACT_APP_SERVICE_URI : 'http://localhost:4133/';
export const endpoint = import.meta.env.VITE_APP_SERVICE_URI ?import.meta.env.VITE_APP_SERVICE_URI : 'http://localhost:4133/';


export function getCategoriesRequest() {
Expand Down
5 changes: 3 additions & 2 deletions src/editor/editor/objects/TransformControls/Handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Point } from "../../../../helpers/Point";
import { viewportX, viewportY } from "../../../../helpers/ViewportCoordinates";
import { Furniture } from "../Furniture";
import { TransformLayer } from "./TransformLayer";
import { WALL_THICKNESS } from "../../constants";

export enum HandleType {
Horizontal,
Expand Down Expand Up @@ -191,10 +192,10 @@ export class Handle extends Graphics {
//end of wall
else if (
this.localCoords.x + amount >=
this.target.parent.length - this.target.width - WALL_THICKNESS * 0.5 //parent wall length
(this.target.parent as any).length - this.target.width - WALL_THICKNESS * 0.5 //parent wall length
) {
this.target.position.x =
this.target.parent.length -
(this.target.parent as any).length -
this.target.width -
WALL_THICKNESS * 0.5;
}
Expand Down
1 change: 0 additions & 1 deletion src/react-app-env.d.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/ui/Layout/ToolNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Icon as TablerIcon,
Armchair,
BorderLeft,
ArrowBottomSquare,
ArrowDownSquare,
DeviceFloppy,
Upload,
Ruler2,
Expand All @@ -16,7 +16,6 @@ import {
Window,
Door,
Plus,
Help,
SquareX,
Dimensions,
Printer,
Expand Down Expand Up @@ -223,7 +222,7 @@ export function ToolNavbar() {
message: "Click and drag to measure areas",
})
}} />
<NavbarLink icon={ArrowBottomSquare} label="Snap to grid" onClick={() => {
<NavbarLink icon={ArrowDownSquare} label="Snap to grid" onClick={() => {
setSnap(!snap);
cleanNotifications();
showNotification({
Expand Down
2 changes: 2 additions & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="vite/client" />
declare module '*.gif';
9 changes: 9 additions & 0 deletions vite.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
plugins: [react()],
build: {
outDir: 'build' // Change the output directory to 'build'
}
})