Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup committed Oct 23, 2024
2 parents 5c6c811 + 28a497d commit d6ee0be
Show file tree
Hide file tree
Showing 52 changed files with 3,764 additions and 10,788 deletions.
7 changes: 7 additions & 0 deletions .docker/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ server {
add_header Cache-Control "public, max-age=604800";
expires 7d;
}

location /client/ws {
proxy_pass http://node:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true

[*.{php,html,twig,js,css,scss,json,yaml}]
[*.{php,html,twig,js,css,scss,json,yaml,jsx}]
indent_style = space
indent_size = 2

Expand Down
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"allowImportExportEverywhere": true
},
"rules": {
"react/require-default-props": "off",
"react/jsx-filename-extension": [
"warn",
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots-${{ matrix.browser }}
path: cypress/screenshots
Expand Down
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ All notable changes to this project will be documented in this file.

## Unreleased

## [2.1.0] - 2024-10-23

- [#135](https://github.com/os2display/display-client/pull/135)
- Fixed cursor being hidden when not in debug mode.
- Moved registration of listeners in useEffect.
- [#134](https://github.com/os2display/display-client/pull/134)
- Fixed remote loader for touch regions.
- [#133](https://github.com/os2display/display-client/pull/133)
- Added error message ER201 on screen when remote component could not load.
- Added error timestamp to remote component loader, to force reload on error.
- [#132](https://github.com/os2display/display-client/pull/132)
- Remove token errors after re-login.
- [#131](https://github.com/os2display/display-client/pull/131)
- Moved localstorage calls into helper class AppStorage.
- Cleaned up project structure.
- Fixed async flow for release check.
- Added previous boot timestamp (pb) to url.
- Try to refresh token on reauthenticate event.
- Added status and error to url.
- Added error code to login page, if set.
- [#130](https://github.com/os2display/display-client/pull/130)
- Fixed issue with svg loading.
- [#127](https://github.com/os2display/display-client/pull/127)
- Migrate from CRA to Vite
- Upgrade node from 14 -> 20
- Winston logging to Pino logging
- Set infrastructure node version to 20.
- Fixed base path to /client.
- [#118](https://github.com/os2display/display-client/pull/118)
- Added api url to localstorage.

## [2.0.4] - 2024-08-14

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

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

## [1.3.5] - 2023-09-14

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Start docker setup

```
# Install npm packages
docker compose run node yarn install
docker compose run --rm node yarn install
# Up the containers
docker compose up -d
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"

node:
image: node:14
image: node:20
command: yarn start
networks:
- app
Expand Down
9 changes: 9 additions & 0 deletions docs/error-codes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Error codes

* ER101: API returns 401. Token could not be refreshed. This could be caused by logging out in the admin.
* ER102: Token could not be refreshed in normal refresh token loop.
* ER103: Token refresh aborted, refresh token, iat and/or exp not set.
* ER104: Release file could not be loaded.
* ER105: Token is expired.
* ER106: Token is valid but should have been refreshed.
* ER201: Error loading slide template.
18 changes: 3 additions & 15 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="google" content="notranslate" />
<meta
name="description"
content="OS2Display client"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="manifest" href="/manifest.json" />
<title>OS2Display</title>
</head>
<body>
Expand All @@ -39,5 +26,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion infrastructure/itkdev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 AS APP_BUILDER
FROM node:20 AS APP_BUILDER
LABEL maintainer="ITK Dev <[email protected]>"

ARG APP_VERSION="develop"
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/os2display/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 AS APP_BUILDER
FROM node:20 AS APP_BUILDER
LABEL maintainer="ITK Dev <[email protected]>"

ARG APP_VERSION="develop"
Expand Down
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "display-client",
"version": "0.1.0",
"type": "module",
"version": "2.0.0",
"homepage": "/client/",
"private": true,
"dependencies": {
Expand All @@ -12,20 +13,18 @@
"jwt-decode": "^3.1.2",
"lodash.clonedeep": "^4.5.0",
"lodash.last": "^3.0.0",
"os2display-grid-generator": "^1.0.8",
"os2display-grid-generator": "^1.0.10",
"pino": "^9.1.0",
"prop-types": "^15.7.2",
"react": "^18.2.0",
"react-app-rewired": "^2.1.8",
"react-dom": "^18.2.0",
"react-intl": "^5.20.2",
"react-transition-group": "^4.4.2",
"rrule": "^2.7.2",
"sass": "^1.37.5",
"styled-components": "^5.3.1",
"suncalc": "^1.9.0",
"ulid": "^2.3.0",
"web-vitals": "^1.0.1",
"winston": "^3.3.3"
"ulid": "^2.3.0"
},
"scripts": {
"lint:js": "eslint --ext .js --ext .jsx ./src",
Expand All @@ -34,9 +33,9 @@
"lint:scss:fix": "stylelint --fix \"./src/**/*.scss\"",
"check-coding-standards": "npm run lint:js && npm run lint:scss",
"apply-coding-standards": "npm run lint:js:fix && npm run lint:scss:fix",
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"eject": "react-app-rewired eject"
"start": "vite --host 0.0.0.0",
"build": "vite build",
"serve": "vite preview"
},
"eslintConfig": {
"extends": [
Expand All @@ -57,17 +56,20 @@
]
},
"devDependencies": {
"react-scripts": "4.0.3",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@vitejs/plugin-react": "^4.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jsdoc": "^36.0.7",
"eslint-plugin-jsdoc": "^35.4.3",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-only-warn": "^1.0.3",
"eslint-plugin-prettier": "^3.4.0",
Expand All @@ -77,6 +79,8 @@
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recommended-scss": "^4.3.0",
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.19.0"
"stylelint-scss": "^3.19.0",
"vite": "^5.2.12",
"vite-plugin-svgr": "^4.2.0"
}
}
Loading

0 comments on commit d6ee0be

Please sign in to comment.