diff --git a/package-lock.json b/package-lock.json index a20995f7..e6c21b7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", - "utopia-ui": "^3.0.0-alpha.23" + "utopia-ui": "^3.0.0-alpha.27" }, "devDependencies": { "@types/react": "^18.0.28", @@ -2399,6 +2399,11 @@ "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", "dev": true }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.1", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz", + "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==" + }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", @@ -5477,6 +5482,14 @@ "react": "^18.2.0" } }, + "node_modules/react-image-crop": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/react-image-crop/-/react-image-crop-10.1.8.tgz", + "integrity": "sha512-4rb8XtXNx7ZaOZarKKnckgz4xLMvds/YrU6mpJfGhGAsy2Mg4mIw1x+DCCGngVGq2soTBVVOxx2s/C6mTX9+pA==", + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -6685,13 +6698,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utopia-ui": { - "version": "3.0.0-alpha.23", - "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.23.tgz", - "integrity": "sha512-N+rV8mTtcJtQ9EvMI/VlUWFUp9Ou/VHlDm0fKuTDxODhGTDOqY/Cbs5344vwglGMSV3+V0h7c/801g2pUSZxZg==", + "version": "3.0.0-alpha.27", + "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.27.tgz", + "integrity": "sha512-RpCPXgGt55MTvwiqcnqU/r0KTcvnT74s86ziIxOHWrn/2BgXmgS9ikdjj2q1KAa+/9cFubWkibWhDSQoZL60zg==", "dependencies": { "@heroicons/react": "^2.0.17", + "@types/offscreencanvas": "^2019.7.1", "leaflet": "^1.9.4", "prop-types": "^15.8.1", + "react-image-crop": "^10.1.8", "react-leaflet": "^4.2.1", "react-leaflet-cluster": "^2.1.0", "react-router-dom": "^6.16.0", diff --git a/package.json b/package.json index f5333741..55705414 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", - "utopia-ui": "^3.0.0-alpha.23" + "utopia-ui": "^3.0.0-alpha.27" }, "devDependencies": { "@types/react": "^18.0.28", diff --git a/public/3markers-globe_256.png b/public/3markers-globe_256.png new file mode 100644 index 00000000..bca1b672 Binary files /dev/null and b/public/3markers-globe_256.png differ diff --git a/public/camp3.svg b/public/camp3.svg new file mode 100644 index 00000000..3a2125c9 --- /dev/null +++ b/public/camp3.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/earth.svg b/public/earth.svg new file mode 100644 index 00000000..eef79e5c --- /dev/null +++ b/public/earth.svg @@ -0,0 +1,43 @@ + + + + + + + diff --git a/public/fear.svg b/public/fear.svg new file mode 100644 index 00000000..89bb8137 --- /dev/null +++ b/public/fear.svg @@ -0,0 +1,187 @@ + + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/fear2.svg b/public/fear2.svg new file mode 100644 index 00000000..abac368b --- /dev/null +++ b/public/fear2.svg @@ -0,0 +1,149 @@ + + + + + + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/tv.svg b/public/tv.svg new file mode 100644 index 00000000..024e4975 --- /dev/null +++ b/public/tv.svg @@ -0,0 +1,32 @@ + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + diff --git a/src/App.tsx b/src/App.tsx index 96f95c85..8b233f2e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,7 @@ import Concept from './pages/Concept' import { userApi } from './api/userApi' import Projects from './pages/Projects' import { ProjectView } from './pages/ProjectView' +import { assetsApi } from './api/assetsApi' @@ -17,7 +18,7 @@ function App() {
- + diff --git a/src/api/assetsApi.ts b/src/api/assetsApi.ts new file mode 100644 index 00000000..4bbb0ce3 --- /dev/null +++ b/src/api/assetsApi.ts @@ -0,0 +1,27 @@ +import { uploadFiles } from '@directus/sdk'; +import { directusClient } from './directus'; +import { AssetsApi } from 'utopia-ui/dist/types'; + + +export class assetsApi implements AssetsApi{ + + url : string; + + constructor(url: string) { + this.url = url; + } + + async upload(file:Blob, title: string) { + + const formData = new FormData(); + formData.append('title', title); + formData.append('file', file); + + try { + return await directusClient.request(uploadFiles(formData)); + } catch (error: any) { + console.log(error); + throw error; + } + } +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 356b24ba..64154063 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,13 +10,18 @@ export default defineConfig({ react(), VitePWA({manifest: { "short_name": "Utopia Game", - "name": "Utopia Game: The Real Life Manifestation Game", + "name": "Utopia - A Real Life Manifestation Game", "icons": [ { "src": "3markers-globe.svg", "sizes": "any", "type": "image/svg+xml" - } + }, + { + "src": "3markers-globe_256.png", + "sizes": "256x256", + "type": "image/png" + }, ], "start_url": "/", "display": "fullscreen",