Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
628 commits
Select commit Hold shift + click to select a range
aa454a3
feat: save overwrite layer group
DefineDan Jun 12, 2023
9618159
feat: hide group layers
DefineDan Jun 12, 2023
dd8f24e
feat: load newly saved annotations to editor
DefineDan Jun 12, 2023
dfcb124
refactor: import helpers naming
DefineDan Jun 12, 2023
8b530fa
fix: save overwrite for .nii.gz
DefineDan Jun 12, 2023
d009e2d
feat: show layers to save
DefineDan Jun 12, 2023
0dc3371
feat: add task loading logic for who review strategy
TimRiedel Jun 12, 2023
69dc008
feat: add loading block component
richartkeil Jun 13, 2023
24b03e9
fix: load title and description from who task
TimRiedel Jun 13, 2023
a8d2711
fix: keep loading popup open until all files are imported
TimRiedel Jun 13, 2023
02f58c1
Merge branch 'layer-groups' into who-review-task
TimRiedel Jun 13, 2023
86469ee
feat: do not display divider for last table row
richartkeil Jun 13, 2023
4289703
feat: add duplicate Layer option
janiswehen Jun 14, 2023
c356d25
feat: introduce general page components
richartkeil Jun 14, 2023
997da1e
refactor: restructure layout
richartkeil Jun 14, 2023
cf4b61e
refactor: get and set file group or metadata
DefineDan Jun 14, 2023
c49c5ed
fix: forbid duplicate layers in group
DefineDan Jun 14, 2023
8d9d552
refactor: extract project section components
richartkeil Jun 14, 2023
ea62e7c
refactor: rename data to images
richartkeil Jun 14, 2023
6f7158e
fix: initially selected slice when using group layers
DefineDan Jun 14, 2023
b5bcb27
Merge branch 'develop-annotation-service' into page-restructure
richartkeil Jun 14, 2023
abfe7e8
fix: back button padding incorrect
richartkeil Jun 14, 2023
5fa526c
fix: unused import of Modal
richartkeil Jun 14, 2023
33ce5a1
feat: add saving logic to who review strategy
TimRiedel Jun 14, 2023
e692d57
Merge pull request #465 from HealthML/duplicate-layers
janiswehen Jun 14, 2023
6e49202
fix: handle layers that are not part of a group
TimRiedel Jun 14, 2023
78afef0
refactor: confirmation popup messageData
Tonybodo Jun 14, 2023
7d7edb5
fix: add missing translation in import popup
Tonybodo Jun 14, 2023
3fc12fb
refactor: merge async changes
Tonybodo Jun 14, 2023
65f50e7
Merge branch 'refactor-feedback' of https://github.com/HealthML/visia…
Tonybodo Jun 14, 2023
3736cd7
fix: linting issues
Tonybodo Jun 14, 2023
0a2b2ec
fix: changed event handling for editor affects all screens
richartkeil Jun 18, 2023
38c4d00
refactor: new layer grouping object that is not a file
DefineDan Jun 19, 2023
b26d51f
reafactor: revert some changes made to LayerGroup
DefineDan Jun 19, 2023
63d869c
refactor: lint
DefineDan Jun 19, 2023
965dec6
fix: async and saving issues
konrad-gerlach Jun 19, 2023
84de75e
feat: export single nifti
janiswehen Jun 19, 2023
e1384ad
refactor: better saving name suggestion
janiswehen Jun 19, 2023
9bf09d2
Merge branch 'layer-groups' into export-single-nifti
janiswehen Jun 20, 2023
f5991e4
refactor: import from components
janiswehen Jun 21, 2023
61e3add
refactor: named import for hubBaseUrl
janiswehen Jun 21, 2023
4d63c16
fix: modals don't open
richartkeil Jun 21, 2023
d38afbc
fix: duplicate translation keys
richartkeil Jun 21, 2023
5c93728
fix: variable spelling mistake
richartkeil Jun 21, 2023
ad19640
Fix: Disable blur for fileending dropdown
Tonybodo Jun 21, 2023
16f4114
fix: recursion when deleting layers
DefineDan Jun 21, 2023
a777852
Merge remote-tracking branch 'origin/develop-annotation-service' into…
DefineDan Jun 21, 2023
cae0262
refactor: add getFamilyLayersOf to ILayer
Tonybodo Jun 21, 2023
b32dc1a
refactor: always useCallback
janiswehen Jun 21, 2023
8da71a9
fix: remove walnut
janiswehen Jun 21, 2023
515c77e
Merge pull request #461 from HealthML/layer-groups
konrad-gerlach Jun 21, 2023
a93fe22
fix: back button broken
richartkeil Jun 21, 2023
c8c65f9
feat: customize mia title
richartkeil Jun 21, 2023
7bc5b85
refactor: add component prop files
richartkeil Jun 21, 2023
e0275aa
fix: lint
janiswehen Jun 21, 2023
88d1ca9
merge: develop-annotation-service into who-review-task
konrad-gerlach Jun 21, 2023
af7e1af
docs: add review strategy and task documentation
konrad-gerlach Jun 21, 2023
db51b7c
refactor: make buildTask private in who strategy
konrad-gerlach Jun 21, 2023
540c029
refactor: simplify DetailsTable component
richartkeil Jun 21, 2023
41e22ba
fix: unsorted import statements
richartkeil Jun 21, 2023
5a3d28d
fix: address review findings
konrad-gerlach Jun 26, 2023
4907fca
Merge pull request #466 from HealthML/refactor-feedback
richartkeil Jun 26, 2023
ee5ddbf
feat: add saving progress bar
konrad-gerlach Jun 26, 2023
ee6ec14
Merge pull request #469 from HealthML/who-review-task
konrad-gerlach Jun 26, 2023
7018479
feat: mia strategia
janiswehen Jun 26, 2023
3e55139
Merge branch 'develop-annotation-service' into mia-review-task
janiswehen Jun 26, 2023
5cdfa6f
feat: return Url after review finished
janiswehen Jun 27, 2023
67eb826
Merge branch 'release-develop-annotation-service' into develop-annota…
richartkeil Jun 26, 2023
ee605ca
feat: layer has changes
janiswehen Jun 27, 2023
45d058e
refactor: drop down and add isDisbaleMixin
Tonybodo Jun 27, 2023
32a2e69
feat: add image and annotation metadata
janiswehen Jun 27, 2023
5a24e3c
feat: add MiaReviewBar
janiswehen Jun 27, 2023
ff3dc2f
Merge branch 'develop-annotation-service' into page-restructure
richartkeil Jun 27, 2023
9414c16
fix: list padding not balanced
richartkeil Jun 27, 2023
7abdeff
fix: issues detected by linter
richartkeil Jun 27, 2023
ace5d44
Merge pull request #463 from HealthML/page-restructure
richartkeil Jun 27, 2023
c20d096
feat: implement generic progress component
richartkeil Jun 4, 2023
15a4732
feat: layer wise command history
janiswehen Jun 27, 2023
442327b
feat: increase progress height
richartkeil Jun 27, 2023
0f9e610
feat: let progress bar handle translation
richartkeil Jun 27, 2023
93de6dd
feat: add saveItem to CommandStack
janiswehen Jun 27, 2023
c3b7f98
feat: add export popup
Tonybodo Jun 27, 2023
f503ed3
feat: show dataset progress
richartkeil Jun 27, 2023
a34ab72
feat: add grid component to ui-shared
johannaschlimme Jun 27, 2023
224ec5a
feat: add grid and list icons
johannaschlimme Jun 27, 2023
93d7779
feat: add iterable type interface
johannaschlimme Jun 27, 2023
d01ab91
feat: add use local storage func to utils
johannaschlimme Jun 27, 2023
1f2e647
feat: add grid and list views to data manager components
johannaschlimme Jun 27, 2023
b093b5d
feat: add translations and dataset preview
johannaschlimme Jun 27, 2023
4fb1866
feat: add grid and list views to dataset section
johannaschlimme Jun 27, 2023
48cd2c5
feat: add grid and list views to projects screen
johannaschlimme Jun 27, 2023
d07ad18
feat: add fake annotation progress component
richartkeil Jun 27, 2023
e4f1628
fix: not loading task
janiswehen Jun 27, 2023
fe600e6
feat: adapt dataset progress if no images exist
richartkeil Jun 27, 2023
7e0ed34
Merge branch 'develop-annotation-service' into mia-review-task
janiswehen Jun 27, 2023
2fb3176
Merge branch 'develop-annotation-service' into export-single-nifti
janiswehen Jun 27, 2023
4fcc63e
fix: layersToExport not updating correctly
janiswehen Jun 27, 2023
cb29b58
fix: export nii not working and better title
janiswehen Jun 27, 2023
abcbfb5
feat: add options selector to new views
johannaschlimme Jun 27, 2023
1696031
refactor: delete old edit popups
johannaschlimme Jun 27, 2023
16f8e90
refactor: delete old lists
johannaschlimme Jun 27, 2023
067945b
fix: progress bar not sorted correctly
richartkeil Jun 27, 2023
7f1dac8
feat: sort layer list
janiswehen Jun 27, 2023
f0d63a6
fix: issues detected by linter
richartkeil Jun 27, 2023
5608fa7
fix: progress in saveAs
janiswehen Jun 27, 2023
e84606f
refactor: rename getFamilyLayersOf to getFamilyLayers
janiswehen Jun 27, 2023
b1f5a1a
feat: let display date function accept strings
richartkeil Jun 27, 2023
6e3df25
feat: add jobs page and add progress
richartkeil Jun 27, 2023
c310831
fix: lint
janiswehen Jun 27, 2023
4252681
Merge branch 'export-single-nifti' into mia-review-task
janiswehen Jun 27, 2023
ce02620
feat: remove big sheet from grid view
johannaschlimme Jun 27, 2023
87936f9
feat: adapt letter casing
richartkeil Jun 28, 2023
e58e9b9
fix: comment letter casing
richartkeil Jun 28, 2023
a062752
feat: add 'v' before model version
richartkeil Jun 28, 2023
1623c5c
refactor: change datetime preposition
richartkeil Jun 28, 2023
3703d72
feat: adjust details section height based on row height
richartkeil Jun 28, 2023
c071894
refactor: add optional comma to translation
richartkeil Jun 28, 2023
453a878
feat: add brats previews
johannaschlimme Jun 28, 2023
d7d30fc
feat: add progress confetti
richartkeil Jun 28, 2023
8a633fb
Merge pull request #477 from HealthML/list-grid-views
johannaschlimme Jun 28, 2023
94f087e
fix: different plus button heights and padding
johannaschlimme Jun 28, 2023
0dfc791
Merge branch 'develop-annotation-service' into progress-bar
johannaschlimme Jun 28, 2023
0645b7f
Merge pull request #478 from HealthML/progress-bar
johannaschlimme Jun 28, 2023
86a7418
feat: implement review workflow
janiswehen Jul 4, 2023
373681a
Merge branch 'develop-annotation-service' into mia-review-task
janiswehen Jul 4, 2023
264b5c2
feat: review buttons
DefineDan Jul 4, 2023
4d86be8
fix: add translations for project and dataset name
johannaschlimme Jul 4, 2023
3a5c35f
feat: uncolor save and verify button
janiswehen Jul 4, 2023
e578f5f
feat: save verification on close
janiswehen Jul 4, 2023
a78459e
feat: mia create task
DefineDan Jul 4, 2023
d392666
Merge branch 'mia-review-task' of github.com:HealthML/visian into mia…
DefineDan Jul 4, 2023
7089790
fix: save button
DefineDan Jul 4, 2023
2e485b3
refactor: feedback
janiswehen Jul 4, 2023
1de8ba4
Merge branch 'develop-annotation-service' into export-single-nifti
janiswehen Jul 4, 2023
32d0344
Merge pull request #468 from HealthML/export-single-nifti
janiswehen Jul 4, 2023
a8ae731
Merge branch 'develop-annotation-service' into mia-review-task
janiswehen Jul 4, 2023
36a444d
feat: add dragndrop layergroup ui
konrad-gerlach Jul 4, 2023
bd5270e
Merge branch 'develop-annotation-service' into layer-group-ui
konrad-gerlach Jul 4, 2023
92eab4c
Merge pull request #490 from HealthML/missing-name-translations
TimRiedel Jul 5, 2023
e83e1aa
fix: save button disabled
janiswehen Jul 5, 2023
d42bd74
fix: image import component is unmounted when hub returns first images
richartkeil Jul 5, 2023
9b610d1
feat: submit creation popups with enter key
johannaschlimme Jul 5, 2023
870c51f
fix: open creat on annotation
janiswehen Jul 5, 2023
a785d08
fix: undo redo buttons
DefineDan Jul 5, 2023
4279076
feat: improve ui
konrad-gerlach Jul 5, 2023
e9da86b
refactor: change review Icon
janiswehen Jul 5, 2023
d43c405
refactor: use useCallback
konrad-gerlach Jul 5, 2023
f42e15c
merge: upstream branch into local branch
konrad-gerlach Jul 5, 2023
57302fe
refactor: create startReview method in store
janiswehen Jul 5, 2023
ff70ba2
fix: rerendering
konrad-gerlach Jul 5, 2023
712d6df
refactor: reviewBar text
janiswehen Jul 5, 2023
13452f6
refactor: happy family
janiswehen Jul 5, 2023
0efefe8
fix: arrow-right
janiswehen Jul 5, 2023
91e432d
refactor: delete useles component
janiswehen Jul 5, 2023
486e450
Merge pull request #506 from HealthML/fix-image-import-unmount
TimRiedel Jul 9, 2023
b481131
docs: link issue in comment
janiswehen Jul 10, 2023
ffa5acd
feat: translate task title and description
janiswehen Jul 10, 2023
7d28846
refactor: better error message and color theme
janiswehen Jul 10, 2023
24759b3
fix: lint
janiswehen Jul 10, 2023
15ac2d5
feat: return to last page on editor exit
janiswehen Jul 10, 2023
d818b9b
feat: add autofocus to creation popup input
johannaschlimme Jul 10, 2023
142412e
feat: add form for confirmation popup
johannaschlimme Jul 10, 2023
f4406a5
feat: add form for edit popup
johannaschlimme Jul 10, 2023
7566c99
feat: disable submit button if no changes
johannaschlimme Jul 10, 2023
a1059bc
refactor: better error handling in save-popup
janiswehen Jul 10, 2023
0525eb8
Merge branch 'develop-annotation-service' into mia-review-task
janiswehen Jul 10, 2023
b4a12d0
Merge pull request #476 from HealthML/mia-review-task
janiswehen Jul 10, 2023
a18c064
refactor: rename Progress component to ProgressBar
janiswehen Jul 10, 2023
1ce1c81
refactor: move types to ui-shared
janiswehen Jul 10, 2023
8167862
feat: add yarn hook for libary generation
janiswehen Jul 10, 2023
26dc88c
refactor: rename types from Mia
janiswehen Jul 10, 2023
17a6cbc
refactor: move backend types to utils
janiswehen Jul 10, 2023
ef022bb
fix: remove util types from ui-shared
janiswehen Jul 10, 2023
e6362c5
merge: develop-annotation-service into layer-group-ui
konrad-gerlach Jul 11, 2023
1470887
feat: add submit by enter for job deletion
johannaschlimme Jul 11, 2023
bc78577
feat: submit image deletion by enter key
johannaschlimme Jul 11, 2023
81ae939
Merge branch 'develop-annotation-service' into submit-forms
johannaschlimme Jul 11, 2023
411fecd
refactor: remove react-beautiful-dnd
konrad-gerlach Jul 11, 2023
30babcb
refactor: make metadata type more explicit
janiswehen Jul 11, 2023
1dccca7
fix: lint
janiswehen Jul 11, 2023
a831855
feat: add missing cancel job translation
johannaschlimme Jul 11, 2023
f37d513
refactor: make review-task abstract
janiswehen Jul 11, 2023
7bfb4bb
fix: observable issue and recursion bug
konrad-gerlach Jul 11, 2023
958405a
refactor: remove fake annotation progress
TimRiedel Jul 11, 2023
ec58a2b
fix: applySnapshot in layer fails
janiswehen Jul 12, 2023
69b54d0
feat: add metadata to layer snapshot
janiswehen Jul 12, 2023
58b3d8b
feat: add reviewTask snapshot
janiswehen Jul 12, 2023
e39a0a0
feat: snapshot of review strategy
janiswehen Jul 12, 2023
3f0cb0a
feat: persist reviewStrategy
janiswehen Jul 12, 2023
652c391
feat: implement layerFamily snapshot
janiswehen Jul 12, 2023
0c64da8
feat: add layerFamily snapshot to document
janiswehen Jul 12, 2023
4ddcd2a
feat: make document observe layer familys
janiswehen Jul 12, 2023
e7f39a9
refactor: add returnUrl to store
janiswehen Jul 12, 2023
315c266
refactor: remove returnUrl from mia
janiswehen Jul 12, 2023
9d7961c
feat: set returnUrl on editor open
janiswehen Jul 12, 2023
a8241fa
feat: disable exit button for who
janiswehen Jul 12, 2023
c90295b
fix: lint
janiswehen Jul 12, 2023
cb67ca0
Merge pull request #526 from HealthML/remove-fake-progress
richartkeil Jul 17, 2023
f242712
refactor: remove submit by enter for delete confirmations
johannaschlimme Jul 17, 2023
ea58b4a
fix: dragging families into families
konrad-gerlach Jul 17, 2023
0010955
Merge pull request #523 from HealthML/submit-forms
johannaschlimme Jul 17, 2023
1291543
fix: WHO saving bug
konrad-gerlach Jul 17, 2023
b6eb5ef
fix: address review findings
konrad-gerlach Jul 17, 2023
c6c9886
fix: layer context menu duplicate layers bug
konrad-gerlach Jul 17, 2023
ae0c71d
refactor: Error severity
Tonybodo Jul 18, 2023
fafdd26
feat: Show job name and id
Tonybodo Jul 18, 2023
4b44960
Merge pull request #517 from HealthML/page-redirect-from-editor
TimRiedel Jul 18, 2023
b8af6dd
fix: lint
janiswehen Jul 18, 2023
6bfc1fc
feat: add Font DINPRO
janiswehen Jul 24, 2023
84eca4a
fix: address review findings and remove dropAnimation
konrad-gerlach Jul 24, 2023
9355386
Merge branch 'develop-annotation-service' into red-big-dockey
janiswehen Jul 24, 2023
a6194a4
refactor: remove Severity refactor
janiswehen Jul 24, 2023
4358423
fix: remove unused npm script
richartkeil Jul 24, 2023
08d2097
feat: disable layer movement when using strategy
konrad-gerlach Jul 24, 2023
0c301a7
feat: change preview when strategy exists
konrad-gerlach Jul 24, 2023
0a0fe66
Merge branch 'develop-annotation-service' into refactor-util-types
janiswehen Jul 24, 2023
5391c7a
Merge pull request #520 from HealthML/refactor-util-types
janiswehen Jul 24, 2023
732c320
refactor: implement feedback
janiswehen Jul 24, 2023
050eedd
Merge branch 'develop-annotation-service' into refactor-metadata
janiswehen Jul 24, 2023
7219a84
feat: limit item width
konrad-gerlach Jul 25, 2023
c11b765
refactor: unify image list component
richartkeil Jul 25, 2023
ea5bb87
fix: import sorting
richartkeil Jul 25, 2023
681d745
fix: address review findings
konrad-gerlach Jul 25, 2023
785b9f6
fix: address review findings
konrad-gerlach Jul 25, 2023
8d98641
Merge branch 'layer-group-ui' of https://github.com/HealthML/visian i…
konrad-gerlach Jul 25, 2023
9bfdf15
fix: no-layers problem
konrad-gerlach Jul 25, 2023
dd2b4e1
refactor: remove image row
richartkeil Jul 25, 2023
57f8650
Merge pull request #521 from HealthML/refactor-metadata
Tonybodo Jul 25, 2023
e20a23e
fix: status badge padding
richartkeil Jul 25, 2023
ad19b18
refactor: remove old font
richartkeil Jul 25, 2023
84e8b9e
merge: develop-annotation-service into layer-group-ui
konrad-gerlach Jul 25, 2023
8417dd3
Merge pull request #496 from HealthML/layer-group-ui
konrad-gerlach Jul 25, 2023
6b2fce4
Merge pull request #542 from HealthML/image-list-refactor
richartkeil Jul 25, 2023
0c65939
Merge branch 'develop-annotation-service' into new-font
janiswehen Jul 25, 2023
5ffdece
fix: saving issue
konrad-gerlach Jul 25, 2023
94c7a85
refactor: ui fixes
Tonybodo Jul 25, 2023
e89a341
Merge pull request #545 from HealthML/fix-saving-issue
janiswehen Jul 25, 2023
ad5b78c
Merge pull request #540 from HealthML/new-font
janiswehen Jul 25, 2023
d616ff6
feat: enable drop preview for strategies
konrad-gerlach Jul 27, 2023
97d6ce9
fix: review suggestions
johannaschlimme Jul 31, 2023
e6c8e41
fix: image layers not at last after import
richartkeil Jul 31, 2023
76ff1ab
Merge branch 'develop-annotation-service' into red-big-dockey
johannaschlimme Jul 31, 2023
df3de20
Merge pull request #547 from HealthML/layer-group-dnd-for-strategies
richartkeil Jul 31, 2023
273c63d
Merge pull request #539 from HealthML/red-big-dockey
johannaschlimme Jul 31, 2023
be389d9
fix: layer group ui bug with incorrect preview
konrad-gerlach Aug 1, 2023
a6558ce
Merge pull request #548 from HealthML/update-sortable-tree
richartkeil Aug 1, 2023
775bea1
Merge branch 'develop' into develop-annotation-service
Tonybodo Oct 25, 2023
d1849ec
refactor: Add missing index files and remove depth paths
Tonybodo Oct 26, 2023
4c37d94
Fix: Linting warnings
Tonybodo Oct 26, 2023
00ecb89
Refactor: Remove unnessesary code comments
Tonybodo Oct 30, 2023
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}/apps/editor"
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
}
},
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }]
}
18 changes: 18 additions & 0 deletions Dockerfile.editor
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:18 as build

ENV NODE_ENV=production

WORKDIR /app

COPY .yarn .yarn
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install

COPY . .
ARG NX_ANNOTATION_SERVICE_HUB_URL
RUN yarn build editor --prod

FROM nginx:alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/apps/editor /usr/share/nginx/html
EXPOSE 80
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Omitting an app name starts the default app.
After running this command, the app will be available at the URL printed in the console.<br />
The app will automatically reload if you change any of the source files.

It is possible to use VISIAN with the annotation-service backend. The location of the backend is set via the environment variable `NX_ANNOTATION_SERVICE_HUB_URL`. Assuming the backend is located at `localhost:3000`, you can use the shortcut `yarn start:hub`.

### `yarn format [<app-name>]`

Runs automated code formatting on all applicable file types.
Expand Down
4 changes: 2 additions & 2 deletions apps/ar-demo/src/components/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { ReactComponent as SelectIcon } from "./select.svg";
export { ReactComponent as SelectIcon } from "./select-ar.svg";
export { ReactComponent as EraserIcon } from "./eraser-ar.svg";
export { ReactComponent as DeleteIcon } from "./delete.svg";
export { ReactComponent as DeleteIcon } from "./delete-ar.svg";
export { ReactComponent as ClearIcon } from "./clear.svg";
export { ReactComponent as InvertSelectionIcon } from "./invertSelection.svg";
export { ReactComponent as UndoIcon } from "./undo-ar.svg";
Expand Down
1 change: 1 addition & 0 deletions apps/editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"targets": {
"build": {
"executor": "@nrwl/webpack:webpack",
"inputs": [{ "env": "NX_ANNOTATION_SERVICE_HUB_URL" }],
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand Down
51 changes: 38 additions & 13 deletions apps/editor/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ import { Amplify } from "aws-amplify";
import { observer } from "mobx-react-lite";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { QueryClient, QueryClientProvider } from "react-query";
import { Route, Routes } from "react-router-dom";
import { ReactQueryDevtools } from "react-query/devtools";
import { Navigate, Route, Routes } from "react-router-dom";

import {
whoAwsConfigDeployment,
whoAwsConfigDevelopment,
whoRequiresAuthentication,
} from "../constants";
import { setUpEventHandling } from "../event-handling";
import type { RootStore } from "../models";
import { EditorScreen } from "../screens";
import { hubBaseUrl } from "../queries";
import {
DatasetScreen,
EditorScreen,
JobScreen,
ProjectScreen,
ProjectsScreen,
} from "../screens";
import { setupRootStore, StoreProvider } from "./root-store";

if (isFromWHO()) {
Expand Down Expand Up @@ -49,14 +56,8 @@ function App(): JSX.Element {
const result = Promise.all([setupRootStore(), initI18n()]).then(
([rootStore]) => {
rootStoreRef.current = rootStore;
const [dispatch, dispose] = setUpEventHandling(rootStore);
rootStore.pointerDispatch = dispatch;

setIsReady(true);
return () => {
dispose();
rootStore.dispose();
};
return rootStore.dispose;
},
);
return () => {
Expand All @@ -75,12 +76,36 @@ function App(): JSX.Element {
{isReady && (
<React.StrictMode>
<ModalRoot />
<Routes>
<Route path="/" element={<EditorScreen />} />
</Routes>
{hubBaseUrl ? (
<Routes>
<Route path="/projects" element={<ProjectsScreen />} />
<Route
path="/projects/:projectId"
element={<ProjectScreen />}
/>
<Route
path="/datasets/:datasetId"
element={<DatasetScreen />}
/>
<Route path="/jobs/:jobId" element={<JobScreen />} />
<Route
path="/"
element={<Navigate replace to="/projects" />}
/>
<Route path="/editor" element={<EditorScreen />} />
<Route path="*" element={<Navigate replace to="/" />} />
</Routes>
) : (
<Routes>
<Route path="/" element={<EditorScreen />} />
</Routes>
)}
</React.StrictMode>
)}
</StoreProvider>
{process.env.NODE_ENV === "development" && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</QueryClientProvider>
</ThemeProvider>
);
Expand Down
9 changes: 4 additions & 5 deletions apps/editor/src/app/root-store.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { i18n, LocalForageBackend } from "@visian/ui-shared";
import { getWHOTaskIdFromUrl, isFromWHO, readFileFromURL } from "@visian/utils";
import { isFromWHO, readFileFromURL } from "@visian/utils";
import React from "react";

import { storePersistInterval } from "../constants";
import { RootStore } from "../models";
import { WHOReviewStrategy } from "../models/review-strategy";

export const storageBackend = new LocalForageBackend(
storePersistInterval,
Expand Down Expand Up @@ -55,10 +56,8 @@ export const setupRootStore = async () => {
}

if (isFromWHO()) {
// Load scan from WHO
// Example: http://localhost:4200/?origin=who&taskId=0b2fb698-6e1d-4682-a986-78b115178d94
const taskId = getWHOTaskIdFromUrl();
if (taskId) await store.loadWHOTask(taskId);
store.setReviewStrategy(new WHOReviewStrategy({ store }));
store.reviewStrategy?.loadTask();
}
})();

Expand Down
Loading