mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
Compare commits
8 Commits
9b2ac9f74f
...
94fa6321ba
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94fa6321ba | ||
|
|
34e45c6dea | ||
| 85b0f93ab7 | |||
| 42086b9217 | |||
| 6c7308ad38 | |||
| 5c79633ea4 | |||
| aa13c44cba | |||
| cf80f35b5c |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
data/
|
||||
.claude/
|
||||
data/
|
||||
|
||||
125
CLAUDE.md
Normal file
125
CLAUDE.md
Normal file
@ -0,0 +1,125 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is **Utopia Map**, a flexible collaborative mapping application for decentralized coordination and real-life networking. The project consists of three main parts:
|
||||
|
||||
- **`/app`**: React application (frontend) - the main Utopia Map instance
|
||||
- **`/lib`**: React component library (`utopia-ui`) - reusable UI components
|
||||
- **`/backend`**: Directus CMS backend configuration and Docker setup
|
||||
|
||||
## Development Commands
|
||||
|
||||
### App (Frontend)
|
||||
```bash
|
||||
cd app
|
||||
npm install
|
||||
npm run dev # Start development server
|
||||
npm run build # Build for production
|
||||
npm run test:lint:eslint # Run ESLint
|
||||
npm run preview # Preview production build
|
||||
```
|
||||
|
||||
### Library (utopia-ui)
|
||||
```bash
|
||||
cd lib
|
||||
npm install
|
||||
npm run build # Build library
|
||||
npm run start # Build in watch mode
|
||||
npm run test:lint:eslint # Run ESLint
|
||||
npm run lint # Run ESLint (alias)
|
||||
npm run lintfix # Auto-fix ESLint issues
|
||||
npm run test:component # Run Cypress component tests
|
||||
npm run test:unit # Run Vitest unit tests with coverage
|
||||
npm run test:unit:dev # Run Vitest in watch mode
|
||||
npm run docs:generate # Generate TypeDoc documentation
|
||||
```
|
||||
|
||||
### Root Level
|
||||
```bash
|
||||
./scripts/check-lint.sh # Run linting on both app and lib (used by PR hooks)
|
||||
```
|
||||
|
||||
### Backend (Directus)
|
||||
```bash
|
||||
cd app
|
||||
docker-compose up # Start Directus backend locally
|
||||
|
||||
# Sync data to/from Directus (run from backend/)
|
||||
npx directus-sync pull --directus-url http://localhost:8055 --directus-email admin@it4c.dev --directus-password admin123
|
||||
npx directus-sync push --directus-url http://localhost:8055 --directus-email admin@it4c.dev --directus-password admin123
|
||||
```
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### High-Level Structure
|
||||
|
||||
**Utopia Map** is built on a **3-tier monorepo architecture**:
|
||||
|
||||
1. **Frontend App** (`/app`): Consumer application using `utopia-ui` components
|
||||
2. **Component Library** (`/lib`): Reusable React components with TypeScript
|
||||
3. **Backend** (`/backend`): Directus headless CMS with Docker configuration
|
||||
|
||||
### Key Design Patterns
|
||||
|
||||
**API Abstraction Layer**: The app uses API classes (`itemsApi`, `mapApi`, `layersApi`, etc.) that implement TypeScript interfaces to abstract backend communication. This allows swapping backends without changing components.
|
||||
|
||||
**Layer-Based Data Model**: Items are organized into customizable **Layers** (e.g., Places, Projects, People) where each layer defines:
|
||||
- Visual styling (icons, colors, markers)
|
||||
- Data structure and validation
|
||||
- Custom popup and profile templates
|
||||
|
||||
**Component Composition**: The `UtopiaMap` component accepts child components like `<Layer>`, `<Tags>`, and `<Permissions>` to configure its behavior declaratively.
|
||||
|
||||
**Type-Safe APIs**: All API interactions use TypeScript interfaces (`ItemsApi<T>`, `UserApi`, `InviteApi`) ensuring type safety across the frontend-backend boundary.
|
||||
|
||||
### Core Components Architecture
|
||||
|
||||
- **`UtopiaMap`**: Main map container with Leaflet integration
|
||||
- **`Layer`**: Defines item types with custom styling and behavior
|
||||
- **`AppShell`**: Navigation, sidebar, and global app state management
|
||||
- **`AuthProvider`**: Authentication context and user management
|
||||
- **Profile Templates**: Flexible system for custom item display (`SimpleView`, `TabsView`, `OnepagerView`)
|
||||
|
||||
### Data Flow
|
||||
|
||||
1. **Items** are fetched via API classes from Directus backend
|
||||
2. **Layers** define how items are displayed on the map
|
||||
3. **Popups** show item previews when clicking map markers
|
||||
4. **Profiles** provide detailed item views with custom templates
|
||||
5. **Permissions** control CRUD operations based on user roles
|
||||
|
||||
### Testing Strategy
|
||||
|
||||
- **Unit Tests**: Vitest for lib components with coverage reporting
|
||||
- **Component Tests**: Cypress for React component integration
|
||||
- **Linting**: ESLint with TypeScript rules for code quality
|
||||
- **Type Checking**: TypeScript strict mode across all packages
|
||||
|
||||
### Import Conventions
|
||||
|
||||
The lib uses path mapping for clean imports:
|
||||
- `#components/*` → `./src/Components/*`
|
||||
- `#types/*` → `./src/types/*`
|
||||
- `#utils/*` → `./src/Utils/*`
|
||||
- `#assets/*` → `./src/assets/*`
|
||||
|
||||
### Backend Integration
|
||||
|
||||
Uses **Directus** as headless CMS with:
|
||||
- RESTful API for CRUD operations
|
||||
- GraphQL endpoint available
|
||||
- Real-time updates via WebSocket
|
||||
- File/media management
|
||||
- Role-based permissions
|
||||
- Collection definitions in `/backend/directus-config/`
|
||||
|
||||
## Code Quality
|
||||
|
||||
- **ESLint** enforces code style across both app and lib
|
||||
- **TypeScript strict mode** ensures type safety
|
||||
- Pre-commit hooks run linting checks via `scripts/check-lint.sh`
|
||||
- Coverage reporting for unit tests
|
||||
- Automated dependency updates via `npm-check-updates`
|
||||
@ -1,5 +1,7 @@
|
||||
VITE_OPEN_COLLECTIVE_API_KEY=your_key
|
||||
VITE_API_URL=http://localhost:8055/
|
||||
#VITE_API_URL=https://api.utopia-lab.org
|
||||
VITE_MAP_URL=http://local.development
|
||||
#VITE_MAP_URL=CURRENT_WINDOW_LOCATION
|
||||
VITE_VALIDATE_INVITE_FLOW_ID=01d61db0-25aa-4bfa-bc24-c6a8f208a455
|
||||
VITE_REDEEM_INVITE_FLOW_ID=cc80ec73-ecf5-4789-bee5-1127fb1a6ed4
|
||||
|
||||
@ -54,7 +54,7 @@ import { ModalContent } from './ModalContent'
|
||||
import { Landingpage } from './pages/Landingpage'
|
||||
import MapContainer from './pages/MapContainer'
|
||||
import { getBottomRoutes, routes } from './routes/sidebar'
|
||||
import { config } from '@/config'
|
||||
import { config } from './config'
|
||||
import { InviteApi } from './api/inviteApi'
|
||||
|
||||
const userApi = new UserApi()
|
||||
@ -82,7 +82,10 @@ function App() {
|
||||
|
||||
useEffect(() => {
|
||||
setPermissionsApiInstance(new permissionsApi())
|
||||
setMapApiInstance(new mapApi(window.location.origin))
|
||||
// TODO: it should be mapId instead of mapUrl, which then in turn can be an URL
|
||||
const mapUrl =
|
||||
config.mapUrl === 'CURRENT_WINDOW_LOCATION' ? window.location.origin : config.mapUrl
|
||||
setMapApiInstance(new mapApi(mapUrl))
|
||||
setAttestationApi(new itemsApi<any>('attestations'))
|
||||
}, [])
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ export class mapApi {
|
||||
try {
|
||||
const map = await directusClient.request(
|
||||
readItems('maps' as any, {
|
||||
fields: ['*', { user_type: ['name'] }],
|
||||
fields: ['*'],
|
||||
filter: { url: { _eq: this.url } } as any,
|
||||
limit: 500,
|
||||
}),
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
export const config = {
|
||||
apiUrl: String(import.meta.env.VITE_API_URL ?? 'http://localhost:8055/'),
|
||||
mapUrl: String(import.meta.env.VITE_MAP_URL ?? 'http://local.development'),
|
||||
validateInviteFlowId: String(
|
||||
import.meta.env.VITE_VALIDATE_INVITE_FLOW_ID ?? '01d61db0-25aa-4bfa-bc24-c6a8f208a455',
|
||||
),
|
||||
|
||||
@ -3,7 +3,25 @@
|
||||
To run the backend you can simply execute
|
||||
`docker-compose up`
|
||||
|
||||
To fill in all required data execute the following commands in order:
|
||||
```
|
||||
cd backend
|
||||
|
||||
npx directus-sync push \
|
||||
--directus-url http://localhost:8055 \
|
||||
--directus-email admin@it4c.dev \
|
||||
--directus-password admin123
|
||||
|
||||
npx directus-sync seed push \
|
||||
--directus-url http://localhost:8055 \
|
||||
--directus-email admin@it4c.dev \
|
||||
--directus-password admin123
|
||||
|
||||
./directus-config/manual/seed.sh
|
||||
```
|
||||
|
||||
## Pull Data from Docker to Harddrive
|
||||
|
||||
In order to pull data from your locally running backend (see [docker-compose](../app/docker-compose.yml)) to your local harddrive, you can run the following command
|
||||
|
||||
|
||||
@ -15,6 +33,7 @@ npx directus-sync pull \
|
||||
```
|
||||
|
||||
## Push Data from Harddrive to Docker
|
||||
|
||||
To push local changes or to seed directus use the following command
|
||||
```
|
||||
npx directus-sync push \
|
||||
@ -24,6 +43,7 @@ npx directus-sync push \
|
||||
```
|
||||
|
||||
## Seed Data for local development
|
||||
|
||||
Seed the development data via:
|
||||
```
|
||||
npx directus-sync seed push \
|
||||
@ -33,6 +53,7 @@ npx directus-sync seed push \
|
||||
```
|
||||
|
||||
## Seed Data - find differences
|
||||
|
||||
In order so see what changes would appear when seeding, you can execute:
|
||||
```
|
||||
npx directus-sync seed diff \
|
||||
@ -41,7 +62,12 @@ npx directus-sync seed diff \
|
||||
--directus-password admin123
|
||||
```
|
||||
|
||||
## Manual Seed
|
||||
|
||||
In order to seed files and additional data not covered by `directus-sync` run the script `backend/directus-config/manual/seed.sh`.
|
||||
|
||||
## Backup Database
|
||||
|
||||
Either keep a copy of the `/data/database` folder or run the following command to get an sql dump
|
||||
|
||||
```
|
||||
@ -116,3 +142,5 @@ sudo chmod 777 -R ./data/
|
||||
```
|
||||
|
||||
This process is to be repeated whenever you restart the database docker container
|
||||
|
||||
The same applies for the uploads and extension folder - ensure that the folder is writeable or file uploads will fail.
|
||||
|
||||
@ -0,0 +1,264 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="18mm"
|
||||
height="16mm"
|
||||
viewBox="0 0 17.999999 16.000001"
|
||||
version="1.1"
|
||||
id="svg119"
|
||||
sodipodi:docname="3markers-globe.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs113" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="10.24"
|
||||
inkscape:cx="25.927734"
|
||||
inkscape:cy="34.61914"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer6"
|
||||
showgrid="false"
|
||||
fit-margin-right="-0.1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1013"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:pagecheckerboard="0" />
|
||||
<metadata
|
||||
id="metadata116">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="Ebene 4"
|
||||
style="display:inline"
|
||||
transform="translate(0,-4.809948)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="display:inline;fill:#aad400;stroke-width:0.26458332;fill-opacity:1"
|
||||
d="m 8.5782875,9.4721385 c -2.9104166,0 -5.2916666,2.3812505 -5.2916666,5.2916675 0,2.910417 2.38125,5.291667 5.2916666,5.291667 2.9104165,0 5.2916665,-2.38125 5.2916665,-5.291667 0,-2.910417 -2.38125,-5.2916675 -5.2916665,-5.2916675 z"
|
||||
id="path2" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="display:inline;fill:#31b0fd;stroke-width:0.26458332;fill-opacity:1"
|
||||
d="m 14.134538,14.763806 c 0,3.095625 -2.513542,5.55625 -5.5562505,5.55625 -3.0427082,0 -5.5562499,-2.460625 -5.5562499,-5.55625 0,-3.095625 2.460625,-5.5562505 5.5562499,-5.5562505 3.0956255,0 5.5562505,2.4606255 5.5562505,5.5562505 z m -5.6091675,2.566458 c 0,-0.105833 -0.05292,-0.15875 -0.15875,-0.211666 -0.3439579,-0.105834 -0.6614579,-0.105834 -0.9524996,-0.396875 -0.052917,-0.105834 -0.052917,-0.211667 -0.1058333,-0.343959 -0.1058333,-0.105833 -0.396875,-0.15875 -0.555625,-0.211666 -0.2116667,0 -0.4497917,0 -0.714375,0 -0.1058333,0 -0.2910417,0 -0.396875,0 -0.15875,-0.05292 -0.2910417,-0.291042 -0.396875,-0.449792 0,-0.05292 0,-0.15875 -0.1058333,-0.15875 -0.1058334,-0.05292 -0.2116667,0.05292 -0.3439584,0 -0.052917,-0.05292 -0.052917,-0.105833 -0.052917,-0.15875 0,-0.15875 0.1058333,-0.343958 0.2116666,-0.449792 0.15875,-0.105833 0.3439584,0.05292 0.5027084,0.05292 0.052917,0 0.052917,0 0.1058333,0.05292 0.15875,0.05292 0.2116667,0.264583 0.2116667,0.449791 0,0.05292 0,0.105834 0,0.105834 0,0.05292 0.052917,0.05292 0.1058333,0.05292 0.052917,-0.291041 0.052917,-0.555625 0.1058333,-0.846666 0,-0.343959 0.3439584,-0.661459 0.6085417,-0.767292 0.1058333,-0.05292 0.15875,0.05292 0.2910417,0 0.3439583,-0.105833 1.1641666,-0.449792 1.0054166,-0.899583 -0.1058333,-0.396875 -0.4497916,-0.767292 -0.8995833,-0.714375 -0.1058333,0.05292 -0.15875,0.105833 -0.2645833,0.15875 -0.15875,0.105833 -0.5027084,0.449791 -0.6614584,0.449791 -0.2910416,-0.05292 -0.2910416,-0.449791 -0.2116666,-0.608541 0.052917,-0.211667 0.555625,-0.9525 0.8995833,-0.820209 0.052917,0.05292 0.15875,0.15875 0.2116667,0.211667 0.1058333,0.05292 0.2910416,0.05292 0.4497916,0.05292 0.052917,0 0.1058334,0 0.15875,-0.05292 0.052917,-0.05292 0.052917,-0.05292 0.052917,-0.105833 0,-0.15875 -0.15875,-0.343959 -0.2645833,-0.449792 -0.1058334,-0.105833 -0.2910417,-0.211667 -0.4497917,-0.291042 -0.555625,-0.15875 -1.4552083,0.05292 -1.8785417,0.449792 -0.4233333,0.396875 -0.7672916,1.058333 -1.0054166,1.613958 -0.1058334,0.343959 -0.2116667,0.767292 -0.2645834,1.164167 -0.052917,0.264583 -0.1058333,0.502708 0.052917,0.767292 0.15875,0.343958 0.5027083,0.661458 0.8466667,0.899583 0.2116666,0.15875 0.6614583,0.15875 0.8995833,0.449792 0.15875,0.211666 0.1058333,0.502708 0.1058333,0.767291 0,0.343959 0.2116667,0.608542 0.3439584,0.899584 0.052917,0.15875 0.1058333,0.396875 0.15875,0.555625 0,0.05292 0.052917,0.396875 0.052917,0.449791 0.3439584,0.15875 0.6085417,0.343959 1.0054167,0.449792 0.052917,0 0.2645833,-0.343958 0.2645833,-0.396875 0.15875,-0.15875 0.2910417,-0.396875 0.4497917,-0.502708 0.1058333,-0.05292 0.2116663,-0.105834 0.3439583,-0.211667 0.105833,-0.105833 0.15875,-0.343958 0.211667,-0.502708 0.02646,-0.132292 0.07937,-0.343959 0.02646,-0.502709 z m 0.105834,-5.132916 c 0.05292,0 0.105833,-0.05292 0.211666,-0.105834 0.15875,-0.105833 0.343959,-0.291041 0.502709,-0.396875 0.15875,-0.105833 0.343958,-0.291041 0.449791,-0.396875 0.15875,-0.105833 0.2910415,-0.343958 0.3439585,-0.502708 0.05292,-0.105833 0.211666,-0.343958 0.15875,-0.502708 -0.05292,-0.105834 -0.3439585,-0.15875 -0.4497915,-0.211667 -0.449792,-0.1058335 -0.820208,-0.1587505 -1.27,-0.1587505 -0.15875,0 -0.396875,0.05292 -0.449792,0.2116675 -0.05292,0.291041 0.15875,0.211666 0.396875,0.291041 0,0 0.05292,0.449792 0.05292,0.502709 0.05292,0.264583 -0.105833,0.449791 -0.105833,0.714375 0,0.15875 0,0.449791 0.105833,0.555625 z m 4.6566665,3.889375 c 0.05292,-0.105834 0.05292,-0.291042 0.105833,-0.396875 0.05292,-0.264584 0.05292,-0.555625 0.05292,-0.820209 0,-0.555625 -0.05292,-1.11125 -0.211666,-1.613958 -0.105834,-0.15875 -0.15875,-0.343958 -0.211667,-0.502708 -0.105833,-0.291042 -0.264583,-0.555625 -0.502708,-0.767292 -0.211667,-0.291042 -0.502709,-1.058333 -1.005417,-0.820208 -0.15875,0.05292 -0.264583,0.264583 -0.396875,0.396875 -0.105833,0.15875 -0.211667,0.343958 -0.343959,0.502708 -0.05292,0.05292 -0.105833,0.15875 -0.05292,0.211667 0,0.05292 0.05292,0.05292 0.105834,0.05292 0.105833,0.05292 0.15875,0.05292 0.264583,0.105834 0.05292,0 0.105834,0.05292 0.05292,0.105833 0,0 0,0.05292 -0.05292,0.05292 -0.264583,0.291041 -0.555625,0.502708 -0.820208,0.767291 -0.05292,0.05292 -0.105834,0.15875 -0.105834,0.211667 0,0.05292 0.05292,0.05292 0.05292,0.105833 0,0.05292 -0.05292,0.05292 -0.105833,0.105834 -0.105832,0.05292 -0.2116665,0.105833 -0.2910415,0.15875 -0.05292,0.105833 0,0.291041 -0.05292,0.396875 -0.05292,0.291041 -0.211666,0.502708 -0.343958,0.767291 -0.105833,0.15875 -0.15875,0.343959 -0.264583,0.502709 0,0.211666 -0.05292,0.396875 0.05292,0.555625 0.264583,0.396875 0.767291,0.15875 1.1641655,0.343958 0.105834,0.05292 0.211667,0.05292 0.291042,0.15875 0.15875,0.15875 0.15875,0.449792 0.211667,0.608542 0.05292,0.211666 0.105833,0.449791 0.211667,0.661458 0.05292,0.264583 0.15875,0.555625 0.211666,0.767292 0.502709,-0.396875 0.9525,-0.820209 1.27,-1.375834 0.396875,-0.343958 0.555625,-0.79375 0.714375,-1.243541 z"
|
||||
id="path4" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Ebene 2"
|
||||
style="display:inline"
|
||||
transform="translate(4.6675853,46.091266)">
|
||||
<g
|
||||
id="g89"
|
||||
transform="rotate(-34.618495,35.488753,-41.431433)">
|
||||
<g
|
||||
id="g356"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.1012137,-0.03262355,0.01210909,0.10427296,3.1730944,-59.40221)"
|
||||
stroke-miterlimit="2"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-opacity:1">
|
||||
<image
|
||||
id="image354"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAACXBIWXMAAA9hAAAPYQGoP6dpAAABoUlEQVRIic2Vy3LCMAxFD2lS6Gtg0f//x0JoEwKmC98LqklCZ7qpZjSynYdOrmQH/pEtJtarYlxNrM89V1oaiSnMR2Gq4HVwry0m4OZgnPAInBUPikdfd5LyhTXwKF8CK+ChgIrPTSl8DjBJAINiBXQBMtUzIC/Aq+JKa02AmAIwRCzDSQl7uQFqRdCktErJ34A1sBFQU8DYUhi7BGeyAkfFgdteORfP3sBYmaUANsA7WSErU4L4pafgA7msveYprLtM7plLE48pY6gl8CyQNfCkBLaY3Ar0Gp/I/fAFfAJ7je2dYBLXMt30jEHsDblk7ptGShjAfeAvPyh5B2wDyF5rPSO7aE6ZSAvXrdzofpfGQBFgB7SaO1qNsjRwp2cM4i+OsrqffK3VtZ08wrg8VsIl+XHIlVaPXHT9nWgrVQYBHZS4lRugJ5ej1b1dUOHSF3rHKNCYMj6cdlxP3J7cwGhsGAO7DLM9MTKehfHNhnFJPsi7K4WvngOYTDhnU1v7yPWoTuT6+1fgph3COPGLnrhnUz/KCFuHseGiAnHn/cm+AU9X31BIhxprAAAAAElFTkSuQmCC"
|
||||
preserveAspectRatio="none"
|
||||
height="16"
|
||||
width="35"
|
||||
y="-6.5234251"
|
||||
x="3.2418795"
|
||||
transform="rotate(32.792589)" />
|
||||
</g>
|
||||
<g
|
||||
id="g522"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.13120595,0,0,0.13120595,2.0117562,-64.499292)"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#c4037d;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
id="path520"
|
||||
d="M 28.205,3.217 H 6.777 c -2.367,0 -4.286,1.87 -4.286,4.179 v 19.847 c 0,2.308 1.919,4.179 4.286,4.179 h 5.357 l 5.337,13.58 5.377,-13.58 h 5.357 c 2.366,0 4.285,-1.87 4.285,-4.179 V 7.396 c 0,-2.308 -1.919,-4.179 -4.285,-4.179"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill-rule:nonzero" />
|
||||
</g>
|
||||
<g
|
||||
id="g550"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.13915785,0,0,0.13915785,1.8725982,-64.608673)"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#ffffff;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
id="path548"
|
||||
d="m 11.875,22.4375 c 0,0.3646 0.1276,0.6745 0.3828,0.9297 0.2552,0.2552 0.5651,0.3828 0.9297,0.3828 h 9.625 c 0.3646,0 0.6745,-0.1276 0.9297,-0.3828 0.2552,-0.2552 0.3828,-0.5651 0.3828,-0.9297 V 15 h -12.25 v 7.4375 m 8.75,-5.3594 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 22.2188,18.4688 22.1406,18.5 22.0469,18.5 h -1.0938 c -0.0937,0 -0.1718,-0.0312 -0.2343,-0.0937 -0.0625,-0.0625 -0.0938,-0.1407 -0.0938,-0.2344 v -1.0938 m 0,3.5 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 22.2188,21.9688 22.1406,22 22.0469,22 H 20.9531 C 20.8594,22 20.7813,21.9688 20.7188,21.9063 20.6563,21.8438 20.625,21.7656 20.625,21.6719 v -1.0938 m -3.5,-3.5 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 18.7188,18.4688 18.6406,18.5 18.5469,18.5 h -1.0938 c -0.0937,0 -0.1718,-0.0312 -0.2343,-0.0937 -0.0625,-0.0625 -0.0938,-0.1407 -0.0938,-0.2344 v -1.0938 m 0,3.5 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 18.7188,21.9688 18.6406,22 18.5469,22 H 17.4531 C 17.3594,22 17.2813,21.9688 17.2188,21.9063 17.1563,21.8438 17.125,21.7656 17.125,21.6719 v -1.0938 m -3.5,-3.5 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 15.2188,18.4688 15.1406,18.5 15.0469,18.5 h -1.0938 c -0.0937,0 -0.1718,-0.0312 -0.2343,-0.0937 -0.0625,-0.0625 -0.0938,-0.1407 -0.0938,-0.2344 v -1.0938 m 0,3.5 c 0,-0.0937 0.0313,-0.1718 0.0938,-0.2343 0.0625,-0.0625 0.1406,-0.0938 0.2343,-0.0938 h 1.0938 c 0.0937,0 0.1719,0.0313 0.2344,0.0938 0.0625,0.0625 0.0937,0.1406 0.0937,0.2343 v 1.0938 c 0,0.0937 -0.0312,0.1719 -0.0937,0.2344 C 15.2188,21.9688 15.1406,22 15.0469,22 H 13.9531 C 13.8594,22 13.7813,21.9688 13.7188,21.9063 13.6563,21.8438 13.625,21.7656 13.625,21.6719 V 20.5781 M 22.8125,11.5 H 21.5 V 10.1875 C 21.5,10.0625 21.4583,9.95833 21.375,9.875 21.2917,9.79167 21.1875,9.75 21.0625,9.75 h -0.875 c -0.125,0 -0.2292,0.04167 -0.3125,0.125 -0.0833,0.08333 -0.125,0.1875 -0.125,0.3125 V 11.5 h -3.5 V 10.1875 C 16.25,10.0625 16.2083,9.95833 16.125,9.875 16.0417,9.79167 15.9375,9.75 15.8125,9.75 h -0.875 c -0.125,0 -0.2292,0.04167 -0.3125,0.125 C 14.5417,9.95833 14.5,10.0625 14.5,10.1875 V 11.5 h -1.3125 c -0.3646,0 -0.6745,0.1276 -0.9297,0.3828 -0.2552,0.2552 -0.3828,0.5651 -0.3828,0.9297 v 1.3125 h 12.25 v -1.3125 c 0,-0.3646 -0.1276,-0.6745 -0.3828,-0.9297 C 23.487,11.6276 23.1771,11.5 22.8125,11.5"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill-rule:nonzero" />
|
||||
</g>
|
||||
<g
|
||||
id="g356-3"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.1012137,-0.03262355,0.01210909,0.10427296,8.1741435,-58.851786)"
|
||||
stroke-miterlimit="2"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-opacity:1">
|
||||
<image
|
||||
id="image354-6"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAACXBIWXMAAA9hAAAPYQGoP6dpAAABoUlEQVRIic2Vy3LCMAxFD2lS6Gtg0f//x0JoEwKmC98LqklCZ7qpZjSynYdOrmQH/pEtJtarYlxNrM89V1oaiSnMR2Gq4HVwry0m4OZgnPAInBUPikdfd5LyhTXwKF8CK+ChgIrPTSl8DjBJAINiBXQBMtUzIC/Aq+JKa02AmAIwRCzDSQl7uQFqRdCktErJ34A1sBFQU8DYUhi7BGeyAkfFgdteORfP3sBYmaUANsA7WSErU4L4pafgA7msveYprLtM7plLE48pY6gl8CyQNfCkBLaY3Ar0Gp/I/fAFfAJ7je2dYBLXMt30jEHsDblk7ptGShjAfeAvPyh5B2wDyF5rPSO7aE6ZSAvXrdzofpfGQBFgB7SaO1qNsjRwp2cM4i+OsrqffK3VtZ08wrg8VsIl+XHIlVaPXHT9nWgrVQYBHZS4lRugJ5ej1b1dUOHSF3rHKNCYMj6cdlxP3J7cwGhsGAO7DLM9MTKehfHNhnFJPsi7K4WvngOYTDhnU1v7yPWoTuT6+1fgph3COPGLnrhnUz/KCFuHseGiAnHn/cm+AU9X31BIhxprAAAAAElFTkSuQmCC"
|
||||
preserveAspectRatio="none"
|
||||
height="13.833991"
|
||||
width="32.70261"
|
||||
y="-4.4695668"
|
||||
x="2.8086059"
|
||||
transform="matrix(0.82962222,0.55832515,-0.5232806,0.85216044,0,0)" />
|
||||
</g>
|
||||
<g
|
||||
id="g356-3-7"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.1012137,-0.03262355,0.01210909,0.10427296,10.119996,-55.735617)"
|
||||
stroke-miterlimit="2"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-opacity:1">
|
||||
<image
|
||||
id="image354-6-5"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAACXBIWXMAAA9hAAAPYQGoP6dpAAABoUlEQVRIic2Vy3LCMAxFD2lS6Gtg0f//x0JoEwKmC98LqklCZ7qpZjSynYdOrmQH/pEtJtarYlxNrM89V1oaiSnMR2Gq4HVwry0m4OZgnPAInBUPikdfd5LyhTXwKF8CK+ChgIrPTSl8DjBJAINiBXQBMtUzIC/Aq+JKa02AmAIwRCzDSQl7uQFqRdCktErJ34A1sBFQU8DYUhi7BGeyAkfFgdteORfP3sBYmaUANsA7WSErU4L4pafgA7msveYprLtM7plLE48pY6gl8CyQNfCkBLaY3Ar0Gp/I/fAFfAJ7je2dYBLXMt30jEHsDblk7ptGShjAfeAvPyh5B2wDyF5rPSO7aE6ZSAvXrdzofpfGQBFgB7SaO1qNsjRwp2cM4i+OsrqffK3VtZ08wrg8VsIl+XHIlVaPXHT9nWgrVQYBHZS4lRugJ5ej1b1dUOHSF3rHKNCYMj6cdlxP3J7cwGhsGAO7DLM9MTKehfHNhnFJPsi7K4WvngOYTDhnU1v7yPWoTuT6+1fgph3COPGLnrhnUz/KCFuHseGiAnHn/cm+AU9X31BIhxprAAAAAElFTkSuQmCC"
|
||||
preserveAspectRatio="none"
|
||||
height="16"
|
||||
width="35"
|
||||
y="-2.0808461"
|
||||
x="2.1253965"
|
||||
transform="rotate(32.792589)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-58.269337,-115.53478)"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g109"
|
||||
transform="rotate(-1.1556361,1155.3307,302.61847)">
|
||||
<g
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;fill:#e87520;fill-opacity:1;stroke:none"
|
||||
transform="matrix(0.13120595,0,0,0.13120595,69.079628,93.634241)"
|
||||
font-size="10"
|
||||
font-weight="400"
|
||||
font-style="normal"
|
||||
id="g6701">
|
||||
<path
|
||||
style="vector-effect:none;fill-rule:nonzero"
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 28.205,3.217 H 6.777 c -2.367,0 -4.286,1.87 -4.286,4.179 v 19.847 c 0,2.308 1.919,4.179 4.286,4.179 h 5.357 l 5.337,13.58 5.377,-13.58 h 5.357 c 2.366,0 4.285,-1.87 4.285,-4.179 V 7.396 c 0,-2.308 -1.919,-4.179 -4.285,-4.179"
|
||||
id="path6699" />
|
||||
</g>
|
||||
<g
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;fill:#231f20;fill-opacity:0.2;stroke:none"
|
||||
transform="matrix(0.14057447,0,0,-0.14057447,38.479791,112.89298)"
|
||||
font-size="10"
|
||||
font-weight="400"
|
||||
font-style="normal"
|
||||
id="g6709">
|
||||
<path
|
||||
style="vector-effect:none;fill-rule:nonzero"
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 244,134 h -20 c -2.209,0 -4,-1.746 -4,-3.9 v -18.525 c 0,-2.154 1.791,-3.9 4,-3.9 h 5 L 233.982,95 239,107.675 h 5 c 2.209,0 4,1.746 4,3.9 V 130.1 c 0,2.154 -1.791,3.9 -4,3.9 m 0,-1 c 1.654,0 3,-1.301 3,-2.9 v -18.525 c 0,-1.599 -1.346,-2.9 -3,-2.9 h -5.68 l -0.25,-0.632 -4.084,-10.318 -4.055,10.316 -0.249,0.634 H 224 c -1.654,0 -3,1.301 -3,2.9 V 130.1 c 0,1.599 1.346,2.9 3,2.9 h 20"
|
||||
id="path6707" />
|
||||
</g>
|
||||
<g
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
transform="matrix(0.13915785,0,0,0.13915785,68.702265,93.556608)"
|
||||
font-size="10"
|
||||
font-weight="400"
|
||||
font-style="normal"
|
||||
id="g6729">
|
||||
<path
|
||||
style="vector-effect:none;fill-rule:nonzero"
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 18.364194,16.757346 c 0.6354,0 1.224,-0.1562 1.7656,-0.4687 0.5417,-0.3125 0.9662,-0.737 1.2735,-1.2735 0.3073,-0.5364 0.4609,-1.1224 0.4609,-1.7578 0,-0.6354 -0.1536,-1.224 -0.4609,-1.7656 -0.3073,-0.5417 -0.7318,-0.9662 -1.2735,-1.2735 -0.5416,-0.3072494 -1.1302,-0.4608994 -1.7656,-0.4608994 -0.6354,0 -1.2214,0.15365 -1.7578,0.4608994 -0.5365,0.3073 -0.9609,0.7318 -1.2734,1.2735 -0.3125,0.5416 -0.4688,1.1302 -0.4688,1.7656 0,0.6354 0.1563,1.2214 0.4688,1.7578 0.3125,0.5365 0.7369,0.961 1.2734,1.2735 0.5364,0.3125 1.1224,0.4687 1.7578,0.4687 m 2.4688,0.875 h -0.4688 c -0.6354,0.2917 -1.2995,0.4375 -1.9922,0.4375 -0.6927,0 -1.362,-0.1458 -2.0078,-0.4375 h -0.4531 c -0.6563,0 -1.2683,0.1641 -1.836,0.4922 -0.5677,0.3281 -1.0156,0.7734 -1.3437,1.3359 -0.3281,0.5625 -0.4922,1.1719 -0.4922,1.8282 v 1.1562 c 0,0.3646 0.1276,0.6745 0.3828,0.9297 0.2552,0.2552 0.5651,0.3828 0.9297,0.3828 h 9.625 c 0.3646,0 0.6745,-0.1276 0.9297,-0.3828 0.2552,-0.2552 0.3828,-0.5651 0.3828,-0.9297 v -1.1562 c 0,-0.6563 -0.1641,-1.2657 -0.4922,-1.8282 -0.3281,-0.5625 -0.7734,-1.0078 -1.3359,-1.3359 -0.5625,-0.3281 -1.1719,-0.4922 -1.8281,-0.4922"
|
||||
id="path6727" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer6"
|
||||
inkscape:label="Ebene 3"
|
||||
style="display:inline"
|
||||
transform="translate(4.6675853,46.091266)">
|
||||
<g
|
||||
id="g99"
|
||||
transform="rotate(58.747582,-19.440046,-29.612246)">
|
||||
<g
|
||||
id="g678"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.12723008,0,0,0.12723008,-15.000979,-62.923636)"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#008e5b;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
id="path676"
|
||||
d="m 17.5,2.746 c -8.284,0 -15,6.853 -15,15.307 0,0.963 0.098,1.902 0.265,2.816 0.36664,2.0268 1.13579,3.9595 2.262,5.684 l 0.134,0.193 12.295,17.785 12.439,-17.863 0.056,-0.08 c 1.2093,-1.8462 2.0083,-3.9305 2.343,-6.112 0.123,-0.791 0.206,-1.597 0.206,-2.423 0,-8.454 -6.716,-15.307 -15,-15.307"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill-rule:nonzero" />
|
||||
</g>
|
||||
<g
|
||||
id="g684"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.12723008,0,0,0.12723008,-15.000979,-62.923636)"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#2a71b0;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
id="path682"
|
||||
d="m 17.488,2.748 c -8.284,0 -15,6.853 -15,15.307 0,0.963 0.098,1.902 0.265,2.816 0.36664,2.0268 1.13579,3.9595 2.262,5.684 l 0.134,0.193 12.295,17.785 12.44,-17.863 0.055,-0.08 c 1.2093,-1.8462 2.0083,-3.9305 2.343,-6.112 0.124,-0.791 0.206,-1.597 0.206,-2.423 0,-8.454 -6.716,-15.307 -15,-15.307 m 0,1.071 c 7.68,0 13.929,6.386 13.929,14.236 0,0.685 -0.064,1.423 -0.193,2.258 -0.325,2.075 -1.059,3.99 -2.164,5.667 L 29.005,26.058 17.448,42.653 6.032,26.14 5.912,25.966 C 4.86177,24.3621 4.14583,22.5629 3.807,20.676 3.64649,19.8118 3.56383,18.935 3.56,18.056 3.56,10.205 9.809,3.819 17.488,3.819"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill-rule:nonzero;fill:#008000" />
|
||||
</g>
|
||||
<g
|
||||
id="g702"
|
||||
font-style="normal"
|
||||
font-weight="400"
|
||||
font-size="10"
|
||||
transform="matrix(0.13915785,0,0,0.13915785,-15.279297,-63.122493)"
|
||||
style="font-style:normal;font-weight:400;font-size:10px;font-family:Ubuntu;display:inline;fill:#ffffff;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
id="path700"
|
||||
d="m 18,9.96875 c -1.2187,0 -2.349,0.30465 -3.3906,0.91405 -1.0417,0.6094 -1.8672,1.4349 -2.4766,2.4766 -0.6094,1.0416 -0.914,2.1719 -0.914,3.3906 0,1.2188 0.3046,2.349 0.914,3.3906 0.6094,1.0417 1.4349,1.8672 2.4766,2.4766 1.0416,0.6094 2.1719,0.9141 3.3906,0.9141 1.2188,0 2.349,-0.3047 3.3906,-0.9141 1.0417,-0.6094 1.8672,-1.4349 2.4766,-2.4766 0.6094,-1.0416 0.9141,-2.1718 0.9141,-3.3906 0,-1.2187 -0.3047,-2.349 -0.9141,-3.3906 C 23.2578,12.3177 22.4323,11.4922 21.3906,10.8828 20.349,10.2734 19.2188,9.96875 18,9.96875"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill-rule:nonzero" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 22 KiB |
20
backend/directus-config/manual/seed.sh
Executable file
20
backend/directus-config/manual/seed.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# base setup
|
||||
SCRIPT_PATH=$(realpath $0)
|
||||
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
||||
ROOT_DIR=$SCRIPT_DIR/../../..
|
||||
|
||||
DATA_DIR=$ROOT_DIR/data
|
||||
DATA_UPLOADS_DIR=$DATA_DIR/uploads
|
||||
|
||||
SEED_FILES_DIR=$SCRIPT_DIR/files
|
||||
SEED_SQL_DIR=$SCRIPT_DIR/sql
|
||||
|
||||
# copy files
|
||||
cp $SEED_FILES_DIR/* $DATA_UPLOADS_DIR/
|
||||
|
||||
# apply database updates
|
||||
for filename in $SEED_SQL_DIR/*.sql; do
|
||||
docker exec -i utopia-map-database-1 /bin/bash -c "PGPASSWORD=directus psql -v ON_ERROR_STOP=1 --username directus directus" < $filename
|
||||
done
|
||||
7
backend/directus-config/manual/sql/branding-logo.sql
Normal file
7
backend/directus-config/manual/sql/branding-logo.sql
Normal file
@ -0,0 +1,7 @@
|
||||
DELETE FROM public.directus_files WHERE id = '412c25dc-a3b7-4114-b64b-cac2d6b46db3';
|
||||
|
||||
COPY public.directus_files (id, storage, filename_disk, filename_download, title, type, folder, uploaded_by, created_on, modified_by, modified_on, charset, filesize, width, height, duration, embed, description, location, tags, metadata, focal_point_x, focal_point_y, tus_id, tus_data, uploaded_on) FROM stdin;
|
||||
412c25dc-a3b7-4114-b64b-cac2d6b46db3 local 412c25dc-a3b7-4114-b64b-cac2d6b46db3.svg utopia-logo.svg utopia-logo image/svg+xml \N \N 2025-08-12 11:26:36.539+00 \N 2025-08-12 11:27:07.646+00 \N 22906 \N \N \N \N \N \N \N \N \N \N \N \N 2025-08-12 11:26:36.555+00
|
||||
\.
|
||||
|
||||
UPDATE public.directus_settings SET project_logo = '412c25dc-a3b7-4114-b64b-cac2d6b46db3';
|
||||
26
backend/directus-config/seed/layers.json
Normal file
26
backend/directus-config/seed/layers.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"collection": "layers",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "layer-places",
|
||||
"name": "Places",
|
||||
"itemType": "type-test",
|
||||
"userProfileLayer": false,
|
||||
"menuColor": "#2ECDA7",
|
||||
"markerDefaultColor2": null,
|
||||
"onlyOnePerOwner": false,
|
||||
"index_plus_button": true,
|
||||
"public_edit_items": false,
|
||||
"listed": true,
|
||||
"item_presets": null
|
||||
}
|
||||
]
|
||||
}
|
||||
18
backend/directus-config/seed/layers_maps.json
Normal file
18
backend/directus-config/seed/layers_maps.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"collection": "layers_maps",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "layer-places-map-local-development",
|
||||
"layers_id": "layer-places",
|
||||
"maps_id": "map-local-development"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -10,9 +10,21 @@
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "local-development",
|
||||
"_sync_id": "map-local-development",
|
||||
"name": "Local Development",
|
||||
"url": "http://local.development"
|
||||
"url": "http://local.development",
|
||||
"zoom": 6,
|
||||
"own_tag_space": true,
|
||||
"center": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
10.067625824315172,
|
||||
50.51565268622562
|
||||
]
|
||||
},
|
||||
"donation_widget": false,
|
||||
"custom_text": "# Welcome to the Development Server\n\nThis map is just for development purposes and to try out new things.",
|
||||
"default_theme": null
|
||||
}
|
||||
]
|
||||
}
|
||||
22
backend/directus-config/seed/types.json
Normal file
22
backend/directus-config/seed/types.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"collection": "types",
|
||||
"meta": {
|
||||
"insert_order": 1,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true,
|
||||
"preserve_ids": false,
|
||||
"ignore_on_update": []
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"_sync_id": "type-test",
|
||||
"user_created": null,
|
||||
"date_created": "2025-01-01T00:00:00.000Z",
|
||||
"user_updated": null,
|
||||
"date_updated": null,
|
||||
"name": "test",
|
||||
"template": "flex"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
{
|
||||
"collection": "maps",
|
||||
"field": "user_type",
|
||||
"type": "uuid",
|
||||
"meta": {
|
||||
"collection": "maps",
|
||||
"conditions": null,
|
||||
"display": null,
|
||||
"display_options": null,
|
||||
"field": "user_type",
|
||||
"group": null,
|
||||
"hidden": true,
|
||||
"interface": "select-dropdown-m2o",
|
||||
"note": null,
|
||||
"options": {
|
||||
"template": "{{name}}"
|
||||
},
|
||||
"readonly": false,
|
||||
"required": false,
|
||||
"sort": 9,
|
||||
"special": [
|
||||
"m2o"
|
||||
],
|
||||
"translations": null,
|
||||
"validation": null,
|
||||
"validation_message": null,
|
||||
"width": "full"
|
||||
},
|
||||
"schema": {
|
||||
"name": "user_type",
|
||||
"table": "maps",
|
||||
"data_type": "uuid",
|
||||
"default_value": null,
|
||||
"max_length": null,
|
||||
"numeric_precision": null,
|
||||
"numeric_scale": null,
|
||||
"is_nullable": true,
|
||||
"is_unique": false,
|
||||
"is_indexed": false,
|
||||
"is_primary_key": false,
|
||||
"is_generated": false,
|
||||
"generation_expression": null,
|
||||
"has_auto_increment": false,
|
||||
"foreign_key_table": "types",
|
||||
"foreign_key_column": "id"
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
{
|
||||
"collection": "maps",
|
||||
"field": "user_type",
|
||||
"related_collection": "types",
|
||||
"meta": {
|
||||
"junction_field": null,
|
||||
"many_collection": "maps",
|
||||
"many_field": "user_type",
|
||||
"one_allowed_collections": null,
|
||||
"one_collection": "types",
|
||||
"one_collection_field": null,
|
||||
"one_deselect_action": "nullify",
|
||||
"one_field": null,
|
||||
"sort_field": null
|
||||
},
|
||||
"schema": {
|
||||
"table": "maps",
|
||||
"column": "user_type",
|
||||
"foreign_key_table": "types",
|
||||
"foreign_key_column": "id",
|
||||
"constraint_name": "maps_user_type_foreign",
|
||||
"on_update": "NO ACTION",
|
||||
"on_delete": "SET NULL"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -44,6 +44,11 @@ services:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- 8055:8055
|
||||
volumes:
|
||||
- ./data/uploads:/directus/uploads
|
||||
# This is not compatible with the current setup with directus-sync as this
|
||||
# extension is installed before the volume bind onto the docker container
|
||||
# - ./data/extensions:/directus/extensions
|
||||
environment:
|
||||
PUBLIC_URL: 'http://localhost'
|
||||
|
||||
|
||||
@ -42,6 +42,11 @@ export const UserControl = () => {
|
||||
pending: 'logging out ..',
|
||||
})
|
||||
}
|
||||
const avatar: string | undefined =
|
||||
userProfile.image && appState.assetsApi.url
|
||||
? appState.assetsApi.url + userProfile.image
|
||||
: userProfile.image_external
|
||||
|
||||
return (
|
||||
<>
|
||||
{isAuthenticated ? (
|
||||
@ -50,10 +55,10 @@ export const UserControl = () => {
|
||||
to={`${userProfile.id && '/item/' + userProfile.id}`}
|
||||
className='tw:flex tw:items-center'
|
||||
>
|
||||
{userProfile.image && (
|
||||
{avatar && (
|
||||
<div className='tw:avatar'>
|
||||
<div className='tw:w-10 tw:rounded-full'>
|
||||
<img src={appState.assetsApi.url + userProfile.image} />
|
||||
<img src={avatar} alt='User avatar' />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -58,8 +58,8 @@ export function HeaderView({
|
||||
const [imageLoaded, setImageLoaded] = useState(false)
|
||||
|
||||
const avatar =
|
||||
item.image_external ||
|
||||
(item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160')
|
||||
(item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160') ||
|
||||
item.image_external
|
||||
const title = item.name
|
||||
const subtitle = item.subname
|
||||
|
||||
|
||||
10
package-lock.json
generated
10
package-lock.json
generated
@ -1,10 +0,0 @@
|
||||
{
|
||||
"name": "utopia-map",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "utopia-map"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user