mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-05 09:05:27 +00:00
Compare commits
8 Commits
e8efb7e234
...
42868fe7c2
| Author | SHA1 | Date | |
|---|---|---|---|
| 42868fe7c2 | |||
|
|
ea27788cf6 | ||
|
|
1ef562cf3c | ||
| 0b77d95ae4 | |||
| 9a19617906 | |||
| d199d47730 | |||
| 62777970fc | |||
| af7f51efbd |
@ -3,5 +3,6 @@ VITE_API_URL=http://localhost:8055/
|
|||||||
#VITE_API_URL=https://api.utopia-lab.org
|
#VITE_API_URL=https://api.utopia-lab.org
|
||||||
VITE_MAP_URL=http://local.development
|
VITE_MAP_URL=http://local.development
|
||||||
#VITE_MAP_URL=CURRENT_WINDOW_LOCATION
|
#VITE_MAP_URL=CURRENT_WINDOW_LOCATION
|
||||||
|
#VITE_DIRECTUS_ADMIN_ROLE=
|
||||||
VITE_VALIDATE_INVITE_FLOW_ID=01d61db0-25aa-4bfa-bc24-c6a8f208a455
|
VITE_VALIDATE_INVITE_FLOW_ID=01d61db0-25aa-4bfa-bc24-c6a8f208a455
|
||||||
VITE_REDEEM_INVITE_FLOW_ID=cc80ec73-ecf5-4789-bee5-1127fb1a6ed4
|
VITE_REDEEM_INVITE_FLOW_ID=cc80ec73-ecf5-4789-bee5-1127fb1a6ed4
|
||||||
|
|||||||
11
app/README.md
Normal file
11
app/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# App
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
Map doesn't load and the Error `You must define the Admin roll in the .env file!` shows in the console.
|
||||||
|
|
||||||
|
In order to get the map running you need to define the correct uuid of the admin roll in the `.env` file.
|
||||||
|
|
||||||
|
Go to http://localhost:8055 and login with the admin credentials. Navigate to http://localhost:8055/admin/settings/roles and click `Administrator` and copy the UUID from the URL.
|
||||||
|
|
||||||
|
Put this UUID in the `.env` as `VITE_DIRECTUS_ADMIN_ROLE=UUID`
|
||||||
@ -155,11 +155,9 @@ function App() {
|
|||||||
appName={map.name}
|
appName={map.name}
|
||||||
embedded={embedded}
|
embedded={embedded}
|
||||||
openCollectiveApiKey={config.openCollectiveApiKey}
|
openCollectiveApiKey={config.openCollectiveApiKey}
|
||||||
|
hideSignup={map.hide_signup}
|
||||||
>
|
>
|
||||||
<Permissions
|
<Permissions api={permissionsApiInstance} adminRole={config.adminRole} />
|
||||||
api={permissionsApiInstance}
|
|
||||||
adminRole='8ed0b24e-3320-48cd-8444-bc152304e580'
|
|
||||||
></Permissions>
|
|
||||||
{tagsApi && <Tags api={tagsApi}></Tags>}
|
{tagsApi && <Tags api={tagsApi}></Tags>}
|
||||||
<Modal>
|
<Modal>
|
||||||
<ModalContent map={map} />
|
<ModalContent map={map} />
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
export const config = {
|
export const config = {
|
||||||
apiUrl: String(import.meta.env.VITE_API_URL ?? 'http://localhost:8055/'),
|
apiUrl: String(import.meta.env.VITE_API_URL ?? 'http://localhost:8055/'),
|
||||||
mapUrl: String(import.meta.env.VITE_MAP_URL ?? 'http://local.development'),
|
mapUrl: String(import.meta.env.VITE_MAP_URL ?? 'http://local.development'),
|
||||||
|
adminRole: String(import.meta.env.VITE_DIRECTUS_ADMIN_ROLE ?? ''),
|
||||||
validateInviteFlowId: String(
|
validateInviteFlowId: String(
|
||||||
import.meta.env.VITE_VALIDATE_INVITE_FLOW_ID ?? '01d61db0-25aa-4bfa-bc24-c6a8f208a455',
|
import.meta.env.VITE_VALIDATE_INVITE_FLOW_ID ?? '01d61db0-25aa-4bfa-bc24-c6a8f208a455',
|
||||||
),
|
),
|
||||||
@ -10,4 +11,8 @@ export const config = {
|
|||||||
openCollectiveApiKey: String(import.meta.env.VITE_OPEN_COLLECTIVE_API_KEY ?? ''),
|
openCollectiveApiKey: String(import.meta.env.VITE_OPEN_COLLECTIVE_API_KEY ?? ''),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.adminRole === '') {
|
||||||
|
throw Error('You must define the Admin roll in the .env file!')
|
||||||
|
}
|
||||||
|
|
||||||
export type Config = typeof config
|
export type Config = typeof config
|
||||||
|
|||||||
@ -12,12 +12,7 @@ npx directus-sync push \
|
|||||||
--directus-email admin@it4c.dev \
|
--directus-email admin@it4c.dev \
|
||||||
--directus-password admin123
|
--directus-password admin123
|
||||||
|
|
||||||
npx directus-sync seed push \
|
./seed.sh
|
||||||
--directus-url http://localhost:8055 \
|
|
||||||
--directus-email admin@it4c.dev \
|
|
||||||
--directus-password admin123
|
|
||||||
|
|
||||||
./directus-config/manual/seed.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pull Data from Docker to Harddrive
|
## Pull Data from Docker to Harddrive
|
||||||
@ -44,27 +39,7 @@ npx directus-sync push \
|
|||||||
|
|
||||||
## Seed Data for local development
|
## Seed Data for local development
|
||||||
|
|
||||||
Seed the development data via:
|
In order to seed the development data, run the script `backend/seed.sh`.
|
||||||
```
|
|
||||||
npx directus-sync seed push \
|
|
||||||
--directus-url http://localhost:8055 \
|
|
||||||
--directus-email admin@it4c.dev \
|
|
||||||
--directus-password admin123
|
|
||||||
```
|
|
||||||
|
|
||||||
## Seed Data - find differences
|
|
||||||
|
|
||||||
In order so see what changes would appear when seeding, you can execute:
|
|
||||||
```
|
|
||||||
npx directus-sync seed diff \
|
|
||||||
--directus-url http://localhost:8055 \
|
|
||||||
--directus-email admin@it4c.dev \
|
|
||||||
--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
|
## Backup Database
|
||||||
|
|
||||||
|
|||||||
@ -1697,7 +1697,7 @@
|
|||||||
"permissions": null,
|
"permissions": null,
|
||||||
"validation": null,
|
"validation": null,
|
||||||
"presets": {
|
"presets": {
|
||||||
"role": "cccbc503-ecab-4ef1-8cf9-b6ac0f2be240"
|
"role": "REPLACEME-WITH-REGISTRATED-ROLE_UUID"
|
||||||
},
|
},
|
||||||
"fields": [
|
"fields": [
|
||||||
"first_name",
|
"first_name",
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
"app_access": false,
|
"app_access": false,
|
||||||
"roles": [
|
"roles": [
|
||||||
{
|
{
|
||||||
"role": "9865ace7-27fe-4d1f-be88-99ee6410fca2",
|
"role": "role-registrated",
|
||||||
"sort": 1
|
"sort": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"icon": "paragliding",
|
"icon": "paragliding",
|
||||||
"description": null,
|
"description": null,
|
||||||
"parent": null,
|
"parent": null,
|
||||||
"_syncId": "9865ace7-27fe-4d1f-be88-99ee6410fca2"
|
"_syncId": "role-registrated"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Editor",
|
"name": "Editor",
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
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';
|
|
||||||
3
backend/directus-config/seeds/.gitignore
vendored
Normal file
3
backend/directus-config/seeds/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/*
|
||||||
|
!development/
|
||||||
|
!.gitignore
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"collection": "directus_files",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"_sync_id": "utopia-logo",
|
||||||
|
"_file_path": "./files/utopia-logo.svg",
|
||||||
|
"storage": "local",
|
||||||
|
"filename_download": "utopia-logo.svg",
|
||||||
|
"title": "Utopia Logo",
|
||||||
|
"tags": [],
|
||||||
|
"description": "Utopia Logo"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -0,0 +1 @@
|
|||||||
|
UPDATE public.directus_settings SET project_logo = (SELECT id FROM directus_files WHERE filename_download = 'utopia-logo.svg');
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
UPDATE public.directus_permissions
|
||||||
|
SET presets = jsonb_set(presets::jsonb,'{role}', to_jsonb((SELECT id FROM public.directus_roles WHERE name = 'Registrated')), true)
|
||||||
|
WHERE policy = (SELECT id FROM public.directus_policies WHERE name = '$t:public_label')
|
||||||
|
AND collection = 'directus_users'
|
||||||
|
AND action = 'create';
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"collection": "maps",
|
||||||
|
"field": "hide_signup",
|
||||||
|
"type": "boolean",
|
||||||
|
"meta": {
|
||||||
|
"collection": "maps",
|
||||||
|
"conditions": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"field": "hide_signup",
|
||||||
|
"group": null,
|
||||||
|
"hidden": false,
|
||||||
|
"interface": "boolean",
|
||||||
|
"note": null,
|
||||||
|
"options": null,
|
||||||
|
"readonly": false,
|
||||||
|
"required": false,
|
||||||
|
"sort": 17,
|
||||||
|
"special": [
|
||||||
|
"cast-boolean"
|
||||||
|
],
|
||||||
|
"translations": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"width": "full"
|
||||||
|
},
|
||||||
|
"schema": {
|
||||||
|
"name": "hide_signup",
|
||||||
|
"table": "maps",
|
||||||
|
"data_type": "boolean",
|
||||||
|
"default_value": false,
|
||||||
|
"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": null,
|
||||||
|
"foreign_key_column": null
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"collection": "maps",
|
||||||
|
"field": "show_request_password",
|
||||||
|
"type": "boolean",
|
||||||
|
"meta": {
|
||||||
|
"collection": "maps",
|
||||||
|
"conditions": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"field": "show_request_password",
|
||||||
|
"group": null,
|
||||||
|
"hidden": false,
|
||||||
|
"interface": "boolean",
|
||||||
|
"note": null,
|
||||||
|
"options": null,
|
||||||
|
"readonly": false,
|
||||||
|
"required": false,
|
||||||
|
"sort": 18,
|
||||||
|
"special": [
|
||||||
|
"cast-boolean"
|
||||||
|
],
|
||||||
|
"translations": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"width": "full"
|
||||||
|
},
|
||||||
|
"schema": {
|
||||||
|
"name": "show_request_password",
|
||||||
|
"table": "maps",
|
||||||
|
"data_type": "boolean",
|
||||||
|
"default_value": false,
|
||||||
|
"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": null,
|
||||||
|
"foreign_key_column": null
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,6 +11,10 @@ type Query {
|
|||||||
oceannomads_profiles_by_id(id: ID!, version: String): oceannomads_profiles
|
oceannomads_profiles_by_id(id: ID!, version: String): oceannomads_profiles
|
||||||
oceannomads_profiles_aggregated(groupBy: [String], filter: oceannomads_profiles_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [oceannomads_profiles_aggregated!]!
|
oceannomads_profiles_aggregated(groupBy: [String], filter: oceannomads_profiles_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [oceannomads_profiles_aggregated!]!
|
||||||
oceannomads_profiles_by_version(version: String!, id: ID!): version_oceannomads_profiles
|
oceannomads_profiles_by_version(version: String!, id: ID!): version_oceannomads_profiles
|
||||||
|
maps(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [maps!]!
|
||||||
|
maps_by_id(id: ID!, version: String): maps
|
||||||
|
maps_aggregated(groupBy: [String], filter: maps_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [maps_aggregated!]!
|
||||||
|
maps_by_version(version: String!, id: ID!): version_maps
|
||||||
attestations(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [attestations!]!
|
attestations(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [attestations!]!
|
||||||
attestations_by_id(id: ID!, version: String): attestations
|
attestations_by_id(id: ID!, version: String): attestations
|
||||||
attestations_aggregated(groupBy: [String], filter: attestations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [attestations_aggregated!]!
|
attestations_aggregated(groupBy: [String], filter: attestations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [attestations_aggregated!]!
|
||||||
@ -111,10 +115,6 @@ type Query {
|
|||||||
layers_maps_by_id(id: ID!, version: String): layers_maps
|
layers_maps_by_id(id: ID!, version: String): layers_maps
|
||||||
layers_maps_aggregated(groupBy: [String], filter: layers_maps_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [layers_maps_aggregated!]!
|
layers_maps_aggregated(groupBy: [String], filter: layers_maps_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [layers_maps_aggregated!]!
|
||||||
layers_maps_by_version(version: String!, id: ID!): version_layers_maps
|
layers_maps_by_version(version: String!, id: ID!): version_layers_maps
|
||||||
maps(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [maps!]!
|
|
||||||
maps_by_id(id: ID!, version: String): maps
|
|
||||||
maps_aggregated(groupBy: [String], filter: maps_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [maps_aggregated!]!
|
|
||||||
maps_by_version(version: String!, id: ID!): version_maps
|
|
||||||
Themes(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [Themes!]!
|
Themes(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [Themes!]!
|
||||||
Themes_by_id(id: ID!, version: String): Themes
|
Themes_by_id(id: ID!, version: String): Themes
|
||||||
Themes_aggregated(groupBy: [String], filter: Themes_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [Themes_aggregated!]!
|
Themes_aggregated(groupBy: [String], filter: Themes_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [Themes_aggregated!]!
|
||||||
@ -144,6 +144,8 @@ type Mutation {
|
|||||||
create_relations_item(data: create_relations_input!): relations
|
create_relations_item(data: create_relations_input!): relations
|
||||||
create_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_oceannomads_profiles_input!]): [oceannomads_profiles!]!
|
create_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_oceannomads_profiles_input!]): [oceannomads_profiles!]!
|
||||||
create_oceannomads_profiles_item(data: create_oceannomads_profiles_input!): oceannomads_profiles
|
create_oceannomads_profiles_item(data: create_oceannomads_profiles_input!): oceannomads_profiles
|
||||||
|
create_maps_items(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_maps_input!]): [maps!]!
|
||||||
|
create_maps_item(data: create_maps_input!): maps
|
||||||
create_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_input!]): [attestations!]!
|
create_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_input!]): [attestations!]!
|
||||||
create_attestations_item(data: create_attestations_input!): attestations
|
create_attestations_item(data: create_attestations_input!): attestations
|
||||||
create_attestations_directus_users_items(filter: attestations_directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_directus_users_input!]): [attestations_directus_users!]!
|
create_attestations_directus_users_items(filter: attestations_directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_directus_users_input!]): [attestations_directus_users!]!
|
||||||
@ -194,8 +196,6 @@ type Mutation {
|
|||||||
create_layers_files_item(data: create_layers_files_input!): layers_files
|
create_layers_files_item(data: create_layers_files_input!): layers_files
|
||||||
create_layers_maps_items(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_layers_maps_input!]): [layers_maps!]!
|
create_layers_maps_items(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_layers_maps_input!]): [layers_maps!]!
|
||||||
create_layers_maps_item(data: create_layers_maps_input!): layers_maps
|
create_layers_maps_item(data: create_layers_maps_input!): layers_maps
|
||||||
create_maps_items(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_maps_input!]): [maps!]!
|
|
||||||
create_maps_item(data: create_maps_input!): maps
|
|
||||||
create_Themes_items(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_Themes_input!]): [Themes!]!
|
create_Themes_items(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_Themes_input!]): [Themes!]!
|
||||||
create_Themes_item(data: create_Themes_input!): Themes
|
create_Themes_item(data: create_Themes_input!): Themes
|
||||||
create_startEnd_items(filter: startEnd_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_startEnd_input!]): [startEnd!]!
|
create_startEnd_items(filter: startEnd_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_startEnd_input!]): [startEnd!]!
|
||||||
@ -215,6 +215,9 @@ type Mutation {
|
|||||||
update_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_oceannomads_profiles_input!): [oceannomads_profiles!]!
|
update_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_oceannomads_profiles_input!): [oceannomads_profiles!]!
|
||||||
update_oceannomads_profiles_batch(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_oceannomads_profiles_input!]): [oceannomads_profiles!]!
|
update_oceannomads_profiles_batch(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_oceannomads_profiles_input!]): [oceannomads_profiles!]!
|
||||||
update_oceannomads_profiles_item(id: ID!, data: update_oceannomads_profiles_input!): oceannomads_profiles
|
update_oceannomads_profiles_item(id: ID!, data: update_oceannomads_profiles_input!): oceannomads_profiles
|
||||||
|
update_maps_items(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_maps_input!): [maps!]!
|
||||||
|
update_maps_batch(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_maps_input!]): [maps!]!
|
||||||
|
update_maps_item(id: ID!, data: update_maps_input!): maps
|
||||||
update_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_attestations_input!): [attestations!]!
|
update_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_attestations_input!): [attestations!]!
|
||||||
update_attestations_batch(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_attestations_input!]): [attestations!]!
|
update_attestations_batch(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_attestations_input!]): [attestations!]!
|
||||||
update_attestations_item(id: ID!, data: update_attestations_input!): attestations
|
update_attestations_item(id: ID!, data: update_attestations_input!): attestations
|
||||||
@ -290,9 +293,6 @@ type Mutation {
|
|||||||
update_layers_maps_items(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_layers_maps_input!): [layers_maps!]!
|
update_layers_maps_items(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_layers_maps_input!): [layers_maps!]!
|
||||||
update_layers_maps_batch(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_layers_maps_input!]): [layers_maps!]!
|
update_layers_maps_batch(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_layers_maps_input!]): [layers_maps!]!
|
||||||
update_layers_maps_item(id: ID!, data: update_layers_maps_input!): layers_maps
|
update_layers_maps_item(id: ID!, data: update_layers_maps_input!): layers_maps
|
||||||
update_maps_items(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_maps_input!): [maps!]!
|
|
||||||
update_maps_batch(filter: maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_maps_input!]): [maps!]!
|
|
||||||
update_maps_item(id: ID!, data: update_maps_input!): maps
|
|
||||||
update_Themes_items(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_Themes_input!): [Themes!]!
|
update_Themes_items(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_Themes_input!): [Themes!]!
|
||||||
update_Themes_batch(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_Themes_input!]): [Themes!]!
|
update_Themes_batch(filter: Themes_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_Themes_input!]): [Themes!]!
|
||||||
update_Themes_item(id: ID!, data: update_Themes_input!): Themes
|
update_Themes_item(id: ID!, data: update_Themes_input!): Themes
|
||||||
@ -314,6 +314,8 @@ type Mutation {
|
|||||||
delete_relations_item(id: ID!): delete_one
|
delete_relations_item(id: ID!): delete_one
|
||||||
delete_oceannomads_profiles_items(ids: [ID]!): delete_many
|
delete_oceannomads_profiles_items(ids: [ID]!): delete_many
|
||||||
delete_oceannomads_profiles_item(id: ID!): delete_one
|
delete_oceannomads_profiles_item(id: ID!): delete_one
|
||||||
|
delete_maps_items(ids: [ID]!): delete_many
|
||||||
|
delete_maps_item(id: ID!): delete_one
|
||||||
delete_attestations_items(ids: [ID]!): delete_many
|
delete_attestations_items(ids: [ID]!): delete_many
|
||||||
delete_attestations_item(id: ID!): delete_one
|
delete_attestations_item(id: ID!): delete_one
|
||||||
delete_attestations_directus_users_items(ids: [ID]!): delete_many
|
delete_attestations_directus_users_items(ids: [ID]!): delete_many
|
||||||
@ -364,8 +366,6 @@ type Mutation {
|
|||||||
delete_layers_files_item(id: ID!): delete_one
|
delete_layers_files_item(id: ID!): delete_one
|
||||||
delete_layers_maps_items(ids: [ID]!): delete_many
|
delete_layers_maps_items(ids: [ID]!): delete_many
|
||||||
delete_layers_maps_item(id: ID!): delete_one
|
delete_layers_maps_item(id: ID!): delete_one
|
||||||
delete_maps_items(ids: [ID]!): delete_many
|
|
||||||
delete_maps_item(id: ID!): delete_one
|
|
||||||
delete_Themes_items(ids: [ID]!): delete_many
|
delete_Themes_items(ids: [ID]!): delete_many
|
||||||
delete_Themes_item(id: ID!): delete_one
|
delete_Themes_item(id: ID!): delete_one
|
||||||
delete_startEnd_items(ids: [ID]!): delete_many
|
delete_startEnd_items(ids: [ID]!): delete_many
|
||||||
@ -403,6 +403,7 @@ type Subscription {
|
|||||||
directus_policies_mutated(event: EventEnum): directus_policies_mutated
|
directus_policies_mutated(event: EventEnum): directus_policies_mutated
|
||||||
relations_mutated(event: EventEnum): relations_mutated
|
relations_mutated(event: EventEnum): relations_mutated
|
||||||
oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated
|
oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated
|
||||||
|
maps_mutated(event: EventEnum): maps_mutated
|
||||||
attestations_mutated(event: EventEnum): attestations_mutated
|
attestations_mutated(event: EventEnum): attestations_mutated
|
||||||
attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated
|
attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated
|
||||||
contactInfos_mutated(event: EventEnum): contactInfos_mutated
|
contactInfos_mutated(event: EventEnum): contactInfos_mutated
|
||||||
@ -428,7 +429,6 @@ type Subscription {
|
|||||||
layers_directus_users_1_mutated(event: EventEnum): layers_directus_users_1_mutated
|
layers_directus_users_1_mutated(event: EventEnum): layers_directus_users_1_mutated
|
||||||
layers_files_mutated(event: EventEnum): layers_files_mutated
|
layers_files_mutated(event: EventEnum): layers_files_mutated
|
||||||
layers_maps_mutated(event: EventEnum): layers_maps_mutated
|
layers_maps_mutated(event: EventEnum): layers_maps_mutated
|
||||||
maps_mutated(event: EventEnum): maps_mutated
|
|
||||||
Themes_mutated(event: EventEnum): Themes_mutated
|
Themes_mutated(event: EventEnum): Themes_mutated
|
||||||
startEnd_mutated(event: EventEnum): startEnd_mutated
|
startEnd_mutated(event: EventEnum): startEnd_mutated
|
||||||
team_mutated(event: EventEnum): team_mutated
|
team_mutated(event: EventEnum): team_mutated
|
||||||
@ -1954,6 +1954,8 @@ type maps {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps]
|
layers(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps]
|
||||||
layers_func: count_functions
|
layers_func: count_functions
|
||||||
}
|
}
|
||||||
@ -2000,6 +2002,8 @@ type maps_aggregated_count {
|
|||||||
tile_server_url: Int
|
tile_server_url: Int
|
||||||
url: Int
|
url: Int
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Int
|
||||||
|
show_request_password: Int
|
||||||
layers: Int
|
layers: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2673,6 +2677,8 @@ type version_maps {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers: JSON
|
layers: JSON
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3221,6 +3227,8 @@ input create_maps_input {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers: [create_layers_maps_input]
|
layers: [create_layers_maps_input]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4200,6 +4208,8 @@ input maps_filter {
|
|||||||
tile_server_url: string_filter_operators
|
tile_server_url: string_filter_operators
|
||||||
url: string_filter_operators
|
url: string_filter_operators
|
||||||
zoom: number_filter_operators
|
zoom: number_filter_operators
|
||||||
|
hide_signup: boolean_filter_operators
|
||||||
|
show_request_password: boolean_filter_operators
|
||||||
layers: layers_maps_quantifier_filter
|
layers: layers_maps_quantifier_filter
|
||||||
layers_func: count_function_filter_operators
|
layers_func: count_function_filter_operators
|
||||||
_and: [maps_filter]
|
_and: [maps_filter]
|
||||||
@ -4764,6 +4774,8 @@ input update_maps_input {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers: [update_layers_maps_input]
|
layers: [update_layers_maps_input]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -265,6 +265,7 @@ type Subscription {
|
|||||||
directus_policies_mutated(event: EventEnum): directus_policies_mutated
|
directus_policies_mutated(event: EventEnum): directus_policies_mutated
|
||||||
relations_mutated(event: EventEnum): relations_mutated
|
relations_mutated(event: EventEnum): relations_mutated
|
||||||
oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated
|
oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated
|
||||||
|
maps_mutated(event: EventEnum): maps_mutated
|
||||||
attestations_mutated(event: EventEnum): attestations_mutated
|
attestations_mutated(event: EventEnum): attestations_mutated
|
||||||
attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated
|
attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated
|
||||||
contactInfos_mutated(event: EventEnum): contactInfos_mutated
|
contactInfos_mutated(event: EventEnum): contactInfos_mutated
|
||||||
@ -290,7 +291,6 @@ type Subscription {
|
|||||||
layers_directus_users_1_mutated(event: EventEnum): layers_directus_users_1_mutated
|
layers_directus_users_1_mutated(event: EventEnum): layers_directus_users_1_mutated
|
||||||
layers_files_mutated(event: EventEnum): layers_files_mutated
|
layers_files_mutated(event: EventEnum): layers_files_mutated
|
||||||
layers_maps_mutated(event: EventEnum): layers_maps_mutated
|
layers_maps_mutated(event: EventEnum): layers_maps_mutated
|
||||||
maps_mutated(event: EventEnum): maps_mutated
|
|
||||||
Themes_mutated(event: EventEnum): Themes_mutated
|
Themes_mutated(event: EventEnum): Themes_mutated
|
||||||
startEnd_mutated(event: EventEnum): startEnd_mutated
|
startEnd_mutated(event: EventEnum): startEnd_mutated
|
||||||
team_mutated(event: EventEnum): team_mutated
|
team_mutated(event: EventEnum): team_mutated
|
||||||
@ -2039,6 +2039,8 @@ type maps {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps]
|
layers(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps]
|
||||||
layers_func: count_functions
|
layers_func: count_functions
|
||||||
}
|
}
|
||||||
@ -2783,6 +2785,8 @@ input create_maps_input {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers: [create_layers_maps_input]
|
layers: [create_layers_maps_input]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3746,6 +3750,8 @@ input maps_filter {
|
|||||||
tile_server_url: string_filter_operators
|
tile_server_url: string_filter_operators
|
||||||
url: string_filter_operators
|
url: string_filter_operators
|
||||||
zoom: number_filter_operators
|
zoom: number_filter_operators
|
||||||
|
hide_signup: boolean_filter_operators
|
||||||
|
show_request_password: boolean_filter_operators
|
||||||
layers: layers_maps_quantifier_filter
|
layers: layers_maps_quantifier_filter
|
||||||
layers_func: count_function_filter_operators
|
layers_func: count_function_filter_operators
|
||||||
_and: [maps_filter]
|
_and: [maps_filter]
|
||||||
@ -4304,6 +4310,8 @@ input update_maps_input {
|
|||||||
tile_server_url: String
|
tile_server_url: String
|
||||||
url: String
|
url: String
|
||||||
zoom: Int
|
zoom: Int
|
||||||
|
hide_signup: Boolean
|
||||||
|
show_request_password: Boolean
|
||||||
layers: [update_layers_maps_input]
|
layers: [update_layers_maps_input]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "directus-extensions",
|
"name": "directus-extensions",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"directus-extension-sync": "^3.0.3"
|
"directus-extension-sync": "^3.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
31
backend/seed.sh
Executable file
31
backend/seed.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# base setup
|
||||||
|
SCRIPT_PATH=$(realpath $0)
|
||||||
|
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
||||||
|
|
||||||
|
DIRECTUS_URL="${DIRECTUS_URL:-http://localhost:8055}"
|
||||||
|
DIRECTUS_EMAIL="${DIRECTUS_EMAIL:-admin@it4c.dev}"
|
||||||
|
DIRECTUS_PASSWORD="${DIRECTUS_PASSWORD:-admin123}"
|
||||||
|
|
||||||
|
PGPASSWORD="${PGPASSWORD:-'directus'}"
|
||||||
|
PGUSER="${PGUSER:-'directus'}"
|
||||||
|
PGDATABASE="${PGDATABASE:-'directus'}"
|
||||||
|
|
||||||
|
PROJECT_NAME="${PROJECT:-development}"
|
||||||
|
PROJECT_FOLDER=$SCRIPT_DIR/directus-config/seeds/$PROJECT_NAME
|
||||||
|
|
||||||
|
|
||||||
|
npx directus-sync seed push \
|
||||||
|
--directus-url $DIRECTUS_URL \
|
||||||
|
--directus-email $DIRECTUS_EMAIL \
|
||||||
|
--directus-password $DIRECTUS_PASSWORD \
|
||||||
|
--seed-path $PROJECT_FOLDER/directus
|
||||||
|
|
||||||
|
|
||||||
|
SEED_SQL_DIR=$PROJECT_FOLDER/manual
|
||||||
|
|
||||||
|
# apply database updates
|
||||||
|
for filename in $SEED_SQL_DIR/*.sql; do
|
||||||
|
docker exec -i utopia-map-database-1 /bin/bash -c "PGPASSWORD=$PGPASSWORD psql -v ON_ERROR_STOP=1 --username $PGUSER $PGDATABASE" < $filename
|
||||||
|
done
|
||||||
@ -15,12 +15,14 @@ export function AppShell({
|
|||||||
assetsApi,
|
assetsApi,
|
||||||
embedded,
|
embedded,
|
||||||
openCollectiveApiKey,
|
openCollectiveApiKey,
|
||||||
|
hideSignup,
|
||||||
}: {
|
}: {
|
||||||
appName: string
|
appName: string
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
assetsApi: AssetsApi
|
assetsApi: AssetsApi
|
||||||
embedded?: boolean
|
embedded?: boolean
|
||||||
openCollectiveApiKey?: string
|
openCollectiveApiKey?: string
|
||||||
|
hideSignup?: boolean
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<ContextWrapper>
|
<ContextWrapper>
|
||||||
@ -29,6 +31,7 @@ export function AppShell({
|
|||||||
assetsApi={assetsApi}
|
assetsApi={assetsApi}
|
||||||
embedded={embedded}
|
embedded={embedded}
|
||||||
openCollectiveApiKey={openCollectiveApiKey}
|
openCollectiveApiKey={openCollectiveApiKey}
|
||||||
|
hideSignup={hideSignup}
|
||||||
/>
|
/>
|
||||||
<NavBar appName={appName}></NavBar>
|
<NavBar appName={appName}></NavBar>
|
||||||
<div id='app-content' className='tw:flex'>
|
<div id='app-content' className='tw:flex'>
|
||||||
|
|||||||
@ -8,10 +8,12 @@ export const SetAppState = ({
|
|||||||
assetsApi,
|
assetsApi,
|
||||||
embedded,
|
embedded,
|
||||||
openCollectiveApiKey,
|
openCollectiveApiKey,
|
||||||
|
hideSignup,
|
||||||
}: {
|
}: {
|
||||||
assetsApi: AssetsApi
|
assetsApi: AssetsApi
|
||||||
embedded?: boolean
|
embedded?: boolean
|
||||||
openCollectiveApiKey?: string
|
openCollectiveApiKey?: string
|
||||||
|
hideSignup?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
const setAppState = useSetAppState()
|
const setAppState = useSetAppState()
|
||||||
|
|
||||||
@ -27,5 +29,9 @@ export const SetAppState = ({
|
|||||||
setAppState({ openCollectiveApiKey })
|
setAppState({ openCollectiveApiKey })
|
||||||
}, [openCollectiveApiKey, setAppState])
|
}, [openCollectiveApiKey, setAppState])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setAppState({ hideSignup: hideSignup ?? false })
|
||||||
|
}, [hideSignup, setAppState])
|
||||||
|
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,9 +93,11 @@ export const UserControl = () => {
|
|||||||
<div className='tw:self-center tw:btn tw:btn-ghost tw:mr-2'>Login</div>
|
<div className='tw:self-center tw:btn tw:btn-ghost tw:mr-2'>Login</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link to={'/signup'}>
|
{!appState.hideSignup && (
|
||||||
<div className='tw:btn tw:btn-ghost tw:mr-2'>Sign Up</div>
|
<Link to={'/signup'}>
|
||||||
</Link>
|
<div className='tw:btn tw:btn-ghost tw:mr-2'>Sign Up</div>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className='tw:dropdown tw:dropdown-end'>
|
<div className='tw:dropdown tw:dropdown-end'>
|
||||||
<label tabIndex={1} className='tw:btn tw:btn-ghost tw:md:hidden'>
|
<label tabIndex={1} className='tw:btn tw:btn-ghost tw:md:hidden'>
|
||||||
@ -108,9 +110,11 @@ export const UserControl = () => {
|
|||||||
<li>
|
<li>
|
||||||
<Link to={'/login'}>Login</Link>
|
<Link to={'/login'}>Login</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{!appState.hideSignup && (
|
||||||
<Link to={'/signup'}>Sign Up</Link>
|
<li>
|
||||||
</li>
|
<Link to={'/signup'}>Sign Up</Link>
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,6 +11,7 @@ interface AppState {
|
|||||||
showThemeControl: boolean
|
showThemeControl: boolean
|
||||||
embedded: boolean
|
embedded: boolean
|
||||||
openCollectiveApiKey: string
|
openCollectiveApiKey: string
|
||||||
|
hideSignup: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
type UseAppManagerResult = ReturnType<typeof useAppManager>
|
type UseAppManagerResult = ReturnType<typeof useAppManager>
|
||||||
@ -22,6 +23,7 @@ const initialAppState: AppState = {
|
|||||||
showThemeControl: false,
|
showThemeControl: false,
|
||||||
embedded: false,
|
embedded: false,
|
||||||
openCollectiveApiKey: '',
|
openCollectiveApiKey: '',
|
||||||
|
hideSignup: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppContext = createContext<UseAppManagerResult>({
|
const AppContext = createContext<UseAppManagerResult>({
|
||||||
|
|||||||
1
lib/src/types/UtopiaMapProps.d.ts
vendored
1
lib/src/types/UtopiaMapProps.d.ts
vendored
@ -21,4 +21,5 @@ export interface UtopiaMapProps {
|
|||||||
tileServerUrl?: string
|
tileServerUrl?: string
|
||||||
tileServerAttribution?: string
|
tileServerAttribution?: string
|
||||||
show_request_password?: boolean
|
show_request_password?: boolean
|
||||||
|
hideSignup?: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user