Skip to content

Commit

Permalink
Merge branch 'master' into RequestAPI-deviceFeaturesStates
Browse files Browse the repository at this point in the history
  • Loading branch information
Terdious authored Nov 2, 2022
2 parents 3ece7b8 + 12c54ee commit 1af6e66
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-master-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=critical
run: npm audit --production --audit-level=critical || true
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=critical
run: npm audit --production --audit-level=critical || true
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v2
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docker-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=critical
run: npm audit --production --audit-level=critical || true
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v2
with:
Expand Down Expand Up @@ -172,9 +172,8 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: 🔑 Login to GitHub Container Registry
uses: docker/login-action@v1
- name: 🔑 Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down
34 changes: 17 additions & 17 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"postbuild-with-stats": "cp ./old-sw.js ./build/sw.js",
"serve": "sirv build --port 8080 --cors --single",
"dev": "preact watch -p 1444 --template src/template.html",
"start-gateway": "cross-env GATEWAY_MODE=true preact watch -p 1445 --template src/template.html",
"eslint": "eslint src cypress --ext .json --ext .js --ext .jsx",
"compare-translations": "comparejson -e ./src/config/i18n/*.json && node ./cli/check_translations.js",
"prettier-check": "prettier --check '**/*.js' '**/*.jsx' '**/*.json'",
Expand Down Expand Up @@ -43,7 +44,7 @@
"prettier": "^1.17.1"
},
"dependencies": {
"@gladysassistant/gladys-gateway-js": "^4.2.0",
"@gladysassistant/gladys-gateway-js": "^4.3.1",
"@gladysassistant/theme-optimized": "^1.0.3",
"@jaames/iro": "^5.5.2",
"@yaireo/tagify": "^4.5.0",
Expand Down
5 changes: 3 additions & 2 deletions front/src/actions/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ function createActions(store) {
const status = get(e, 'response.status');
const error = get(e, 'response.data.error');
const gatewayErrorMessage = get(e, 'response.data.error_message');
if (status === 401 || status === 403) {
const errorMessageOtherFormat = get(e, 'response.data.message');
if (status === 401) {
state.session.reset();
actions.redirectToLogin();
} else if (error === 'GATEWAY_USER_NOT_LINKED') {
route('/link-gateway-user');
} else if (error === 'USER_NOT_ACCEPTED_LOCALLY') {
route('/link-gateway-user');
} else if (gatewayErrorMessage === 'NO_INSTANCE_FOUND') {
} else if (gatewayErrorMessage === 'NO_INSTANCE_FOUND' || errorMessageOtherFormat === 'NO_INSTANCE_DETECTED') {
route('/link-gateway-user');
} else {
console.error(e);
Expand Down
2 changes: 1 addition & 1 deletion front/src/config/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@
"gatewayLinkUser": {
"title": "Configurer Gladys Plus",
"label": "Sélectionnez votre utilisateur Gladys",
"description": "Avant de sélectionner votre utilisateur ici, vérifiez que celui-ci soit bien accepté locallement sur votre instance Gladys (dans \"Paramètres\" => \"Gladys Plus\" => \"Utilisateurs\").",
"description": "Avant de sélectionner votre utilisateur ici, vérifiez que celui-ci soit bien accepté localement sur votre instance Gladys (dans \"Paramètres\" => \"Gladys Plus\" => \"Utilisateurs\").",
"noInstanceFound": "Votre instance Gladys n'est pas connectée à la passerelle Gladys. Vous êtes-vous connecté à votre compte Gladys Plus dans votre installation Gladys ?",
"error": "Une erreur est survenue. Votre utilisateur est-il autorisé localement dans votre instance Gladys ?",
"saveButton": "Sauvegarder",
Expand Down
3 changes: 3 additions & 0 deletions front/src/utils/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export const DeviceFeatureCategoriesIcon = {
[DEVICE_FEATURE_CATEGORIES.TEMPERATURE_SENSOR]: {
[DEVICE_FEATURE_TYPES.SENSOR.DECIMAL]: 'thermometer'
},
[DEVICE_FEATURE_CATEGORIES.DEVICE_TEMPERATURE_SENSOR]: {
[DEVICE_FEATURE_TYPES.SENSOR.DECIMAL]: 'cpu'
},
[DEVICE_FEATURE_CATEGORIES.VIBRATION_SENSOR]: {
[DEVICE_FEATURE_TYPES.VIBRATION_SENSOR.BINARY]: 'alert-circle',
[DEVICE_FEATURE_TYPES.VIBRATION_SENSOR.STATUS]: 'alert-circle',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gladys",
"version": "4.11.2",
"version": "4.12.0",
"description": "A privacy-first, open-source home assistant",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit 1af6e66

Please sign in to comment.