diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f065789 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "biome.enabled": false, + // Required in vscode-eslint < v3.0.10 only + "eslint.useFlatConfig": true +} diff --git a/Dockerfile b/Dockerfile index 4ee3d2b..8873d09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM node as builder +# These are ARGs because nuxt bakes them into its minified version of the JS, +# So they are actually set at build time vs. run-time +# ARG VITE_TDEI_API_URL ARG VITE_TDEI_USER_API_URL ARG VITE_API_URL @@ -10,6 +13,9 @@ ARG VITE_IMAGERY_SCHEMA ARG VITE_IMAGERY_EXAMPLE_URL ARG VITE_LONG_FORM_QUEST_SCHEMA ARG VITE_LONG_FORM_QUEST_EXAMPLE_URL +ARG VITE_SENTRY_AUTH_TOKEN +ARG VITE_SENTRY_DSN + ARG CODE_VERSION=unknown WORKDIR /app/ diff --git a/README.md b/README.md index 132166b..76bea5d 100644 --- a/README.md +++ b/README.md @@ -6,27 +6,34 @@ Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introdu ## Dev Setup -NB: This will start the dev server against the cloud-hosted backend. If you need to change both the frontend and the backend, you'll -need to start a local copy of the backend (workspaces-tasking-manager) and set the environment vars appropriately below. - -The below values are for cloud-hosted dev: - ``` +# set these e.g. to the dev TDEI instance--note: any tokens you get from these hosts must match the environment for other components +# e.g. you can't use dev TDEI KeyCloak JWT tokens in stage or production environments. export VITE_TDEI_API_URL=https://api-dev.tdei.us/api/v1/ export VITE_TDEI_USER_API_URL=https://portal-api-dev.tdei.us/api/v1/ -export VITE_API_URL=https://api.workspaces-dev.sidewalks.washington.edu/api/v1/ -export VITE_OSM_URL=https://osm.workspaces-dev.sidewalks.washington.edu/ + +# use your local workspaces-backend instance--or set to the dev instance of this component if not running locally +export VITE_API_URL=http://localhost:3000/api/v1/ +export VITE_OSM_URL=http://localhost:3000/ + +# probably want to leave these as-is export VITE_RAPID_URL=https://rapid.workspaces-dev.sidewalks.washington.edu/ export VITE_PATHWAYS_EDITOR_URL=https://pathways.workspaces-dev.sidewalks.washington.edu/ + +# probably don't need to change any of these export CODE_VERSION="local" -export VITE_IMAGERY_SCHEMA=https://raw.githubusercontent.com/TaskarCenterAtUW/tdei-tools/main/docs/imagery-layer/schema.json -export VITE_IMAGERY_EXAMPLE_URL=https://raw.githubusercontent.com/TaskarCenterAtUW/tdei-tools/main/docs/imagery-layer/example.json -export VITE_LONG_FORM_QUEST_SCHEMA=https://raw.githubusercontent.com/TaskarCenterAtUW/tdei-tools/refs/heads/main/docs/quest-definition/schema.json -export VITE_LONG_FORM_QUEST_EXAMPLE_URL=https://raw.githubusercontent.com/TaskarCenterAtUW/tdei-tools/refs/heads/main/docs/quest-definition/example.json +export VITE_IMAGERY_SCHEMA=https://raw.githubusercontent.com/TaskarCenterAtUW/asr-imagery-list/refs/heads/main/schema/schema.json +export VITE_IMAGERY_EXAMPLE_URL=https://github.com/TaskarCenterAtUW/asr-imagery-list/blob/main/examples/example.json +export VITE_LONG_FORM_QUEST_SCHEMA=https://raw.githubusercontent.com/TaskarCenterAtUW/asr-quests/refs/heads/main/schema/schema.json +export VITE_LONG_FORM_QUEST_EXAMPLE_URL=https://raw.githubusercontent.com/TaskarCenterAtUW/asr-quests/refs/heads/main/docs/quest-definition/example.json -# install deps +# install deps (first time only) npm install # start dev server npm run dev ``` + +## Troubleshooting + +If you run ```npm run dev``` and nothing happens, check that you've set your "exports" as above. Undefined environment variables are not handled gracefully right now. \ No newline at end of file diff --git a/components/AppIcon.vue b/components/AppIcon.vue index 19c3b2f..2470bde 100644 --- a/components/AppIcon.vue +++ b/components/AppIcon.vue @@ -6,23 +6,23 @@ const props = defineProps({ variant: { type: String, - required: true + required: true, }, size: { type: [Number, String], - default: 18 + default: 18, }, noMargin: { type: Boolean, - default: false - } + default: false, + }, }) const classes = computed(() => ([ 'material-icons', `md-${props.size}`, `md-${props.variant}`, - props.noMargin ? undefined : 'me-2' + props.noMargin ? undefined : 'me-2', ])) diff --git a/components/AppLogo.vue b/components/AppLogo.vue index 539ca6f..15f678e 100644 --- a/components/AppLogo.vue +++ b/components/AppLogo.vue @@ -1,4 +1,7 @@ - diff --git a/components/AppNavbar.vue b/components/AppNavbar.vue index dfe5802..add9748 100644 --- a/components/AppNavbar.vue +++ b/components/AppNavbar.vue @@ -1,42 +1,99 @@