Skip to content

Commit d6ee0be

Browse files
committed
Merge branch 'release/2.1.0'
2 parents 5c6c811 + 28a497d commit d6ee0be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3764
-10788
lines changed

.docker/vhost.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ server {
1010
add_header Cache-Control "public, max-age=604800";
1111
expires 7d;
1212
}
13+
14+
location /client/ws {
15+
proxy_pass http://node:3000;
16+
proxy_http_version 1.1;
17+
proxy_set_header Upgrade $http_upgrade;
18+
proxy_set_header Connection "upgrade";
19+
}
1320
}

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ end_of_line = LF
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11-
[*.{php,html,twig,js,css,scss,json,yaml}]
11+
[*.{php,html,twig,js,css,scss,json,yaml,jsx}]
1212
indent_style = space
1313
indent_size = 2
1414

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"allowImportExportEverywhere": true
1515
},
1616
"rules": {
17+
"react/require-default-props": "off",
1718
"react/jsx-filename-extension": [
1819
"warn",
1920
{

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Archive screenshots
5555
if: ${{ failure() }}
56-
uses: actions/upload-artifact@v2
56+
uses: actions/upload-artifact@v4
5757
with:
5858
name: cypress-screenshots-${{ matrix.browser }}
5959
path: cypress/screenshots

CHANGELOG.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ All notable changes to this project will be documented in this file.
44

55
## Unreleased
66

7+
## [2.1.0] - 2024-10-23
8+
9+
- [#135](https://github.com/os2display/display-client/pull/135)
10+
- Fixed cursor being hidden when not in debug mode.
11+
- Moved registration of listeners in useEffect.
12+
- [#134](https://github.com/os2display/display-client/pull/134)
13+
- Fixed remote loader for touch regions.
14+
- [#133](https://github.com/os2display/display-client/pull/133)
15+
- Added error message ER201 on screen when remote component could not load.
16+
- Added error timestamp to remote component loader, to force reload on error.
17+
- [#132](https://github.com/os2display/display-client/pull/132)
18+
- Remove token errors after re-login.
19+
- [#131](https://github.com/os2display/display-client/pull/131)
20+
- Moved localstorage calls into helper class AppStorage.
21+
- Cleaned up project structure.
22+
- Fixed async flow for release check.
23+
- Added previous boot timestamp (pb) to url.
24+
- Try to refresh token on reauthenticate event.
25+
- Added status and error to url.
26+
- Added error code to login page, if set.
27+
- [#130](https://github.com/os2display/display-client/pull/130)
28+
- Fixed issue with svg loading.
29+
- [#127](https://github.com/os2display/display-client/pull/127)
30+
- Migrate from CRA to Vite
31+
- Upgrade node from 14 -> 20
32+
- Winston logging to Pino logging
33+
- Set infrastructure node version to 20.
34+
- Fixed base path to /client.
35+
- [#118](https://github.com/os2display/display-client/pull/118)
36+
- Added api url to localstorage.
37+
738
## [2.0.4] - 2024-08-14
839

940
- [#128](https://github.com/os2display/display-client/pull/128)
@@ -37,7 +68,8 @@ All notable changes to this project will be documented in this file.
3768

3869
- [#119](https://github.com/os2display/display-client/pull/119)
3970
- Changed to v2 routing.
40-
- Limited the number of API calls by comparing relationsChecksum.
71+
- [#117](https://github.com/os2display/display-client/pull/117)
72+
- Limited the number of API calls by comparing relationsChecksum.
4173

4274
## [1.3.5] - 2023-09-14
4375

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Start docker setup
3838

3939
```
4040
# Install npm packages
41-
docker compose run node yarn install
41+
docker compose run --rm node yarn install
4242
4343
# Up the containers
4444
docker compose up -d

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
3030

3131
node:
32-
image: node:14
32+
image: node:20
3333
command: yarn start
3434
networks:
3535
- app

docs/error-codes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Error codes
2+
3+
* ER101: API returns 401. Token could not be refreshed. This could be caused by logging out in the admin.
4+
* ER102: Token could not be refreshed in normal refresh token loop.
5+
* ER103: Token refresh aborted, refresh token, iat and/or exp not set.
6+
* ER104: Release file could not be loaded.
7+
* ER105: Token is expired.
8+
* ER106: Token is valid but should have been refreshed.
9+
* ER201: Error loading slide template.

public/index.html renamed to index.html

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,15 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta name="google" content="notranslate" />
99
<meta
1010
name="description"
1111
content="OS2Display client"
1212
/>
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
13+
<link rel="manifest" href="/manifest.json" />
2714
<title>OS2Display</title>
2815
</head>
2916
<body>
@@ -39,5 +26,6 @@
3926
To begin the development, run `npm start` or `yarn start`.
4027
To create a production bundle, use `npm run build` or `yarn build`.
4128
-->
29+
<script type="module" src="/src/index.jsx"></script>
4230
</body>
4331
</html>

infrastructure/itkdev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16 AS APP_BUILDER
1+
FROM node:20 AS APP_BUILDER
22
LABEL maintainer="ITK Dev <[email protected]>"
33

44
ARG APP_VERSION="develop"

infrastructure/os2display/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16 AS APP_BUILDER
1+
FROM node:20 AS APP_BUILDER
22
LABEL maintainer="ITK Dev <[email protected]>"
33

44
ARG APP_VERSION="develop"

package.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "display-client",
3-
"version": "0.1.0",
3+
"type": "module",
4+
"version": "2.0.0",
45
"homepage": "/client/",
56
"private": true,
67
"dependencies": {
@@ -12,20 +13,18 @@
1213
"jwt-decode": "^3.1.2",
1314
"lodash.clonedeep": "^4.5.0",
1415
"lodash.last": "^3.0.0",
15-
"os2display-grid-generator": "^1.0.8",
16+
"os2display-grid-generator": "^1.0.10",
17+
"pino": "^9.1.0",
1618
"prop-types": "^15.7.2",
1719
"react": "^18.2.0",
18-
"react-app-rewired": "^2.1.8",
1920
"react-dom": "^18.2.0",
2021
"react-intl": "^5.20.2",
2122
"react-transition-group": "^4.4.2",
2223
"rrule": "^2.7.2",
2324
"sass": "^1.37.5",
2425
"styled-components": "^5.3.1",
2526
"suncalc": "^1.9.0",
26-
"ulid": "^2.3.0",
27-
"web-vitals": "^1.0.1",
28-
"winston": "^3.3.3"
27+
"ulid": "^2.3.0"
2928
},
3029
"scripts": {
3130
"lint:js": "eslint --ext .js --ext .jsx ./src",
@@ -34,9 +33,9 @@
3433
"lint:scss:fix": "stylelint --fix \"./src/**/*.scss\"",
3534
"check-coding-standards": "npm run lint:js && npm run lint:scss",
3635
"apply-coding-standards": "npm run lint:js:fix && npm run lint:scss:fix",
37-
"start": "react-app-rewired start",
38-
"build": "react-app-rewired build",
39-
"eject": "react-app-rewired eject"
36+
"start": "vite --host 0.0.0.0",
37+
"build": "vite build",
38+
"serve": "vite preview"
4039
},
4140
"eslintConfig": {
4241
"extends": [
@@ -57,17 +56,20 @@
5756
]
5857
},
5958
"devDependencies": {
60-
"react-scripts": "4.0.3",
59+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
60+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
6161
"@testing-library/jest-dom": "^5.11.4",
6262
"@testing-library/react": "^11.1.0",
6363
"@testing-library/user-event": "^12.1.10",
64+
"@vitejs/plugin-react": "^4.3.0",
65+
"@vitejs/plugin-react-swc": "^3.7.0",
6466
"babel-eslint": "^10.1.0",
6567
"eslint": "^7.32.0",
6668
"eslint-config-airbnb": "^18.2.1",
6769
"eslint-config-prettier": "^8.3.0",
6870
"eslint-plugin-cypress": "^2.11.3",
6971
"eslint-plugin-import": "^2.24.0",
70-
"eslint-plugin-jsdoc": "^36.0.7",
72+
"eslint-plugin-jsdoc": "^35.4.3",
7173
"eslint-plugin-jsx-a11y": "^6.4.1",
7274
"eslint-plugin-only-warn": "^1.0.3",
7375
"eslint-plugin-prettier": "^3.4.0",
@@ -77,6 +79,8 @@
7779
"stylelint-config-prettier": "^8.0.2",
7880
"stylelint-config-recommended-scss": "^4.3.0",
7981
"stylelint-prettier": "^1.2.0",
80-
"stylelint-scss": "^3.19.0"
82+
"stylelint-scss": "^3.19.0",
83+
"vite": "^5.2.12",
84+
"vite-plugin-svgr": "^4.2.0"
8185
}
8286
}

0 commit comments

Comments
 (0)