diff --git a/.github/workflows/Attach Artifacts.yml b/.github/workflows/Attach Artifacts.yml index 7f0203286..f8e48a5dd 100644 --- a/.github/workflows/Attach Artifacts.yml +++ b/.github/workflows/Attach Artifacts.yml @@ -2,6 +2,8 @@ name: Manually Attach Artifacts ( If the automation fails ) run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }} on: + repository_dispatch: + types: [attach-artifacts] workflow_dispatch: inputs: tag: @@ -18,6 +20,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: 20.x + + - name: Get previous tag + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@v1" # Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format - name: Check for Tag name Format @@ -30,7 +36,7 @@ jobs: - name: Install package run: | export npm_config_prefix=$(pwd)/package - npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }} + npm install -g homebridge-config-ui-x@$${{ needs.analyze-tags.outputs.previous-tag }} - name: Remove invalid node-pty node-gyp run run: | @@ -39,11 +45,11 @@ jobs: - name: Create Bundle run: | tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz . - shasum -a 256 homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz > SHASUMS256.txt + shasum -a 256 homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz > SHASUMS256.txt - name: Attach Bundle uses: AButler/upload-release-assets@v2.0 with: - files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt' + files: 'homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz;SHASUMS256.txt' repo-token: ${{ secrets.GITHUB_TOKEN }} release-tag: ${{ github.event.inputs.tag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5691ac3cb..3f524197c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,9 +61,7 @@ jobs: tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz . shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt - - name: Attach Bundle - uses: AButler/upload-release-assets@v2.0 + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v2 with: - files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt' - repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: ${{ github.event.release.tag_name }} + event-type: attach-artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f809f684..9fbcc2f37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to homebridge-config-ui-x will be documented in this file. +## Beta-4.52.4 (TBD) + +### Notable Changes + + + +### i18n Changes + +- **i18n:** Update fr.json ([#1705](https://github.com/homebridge/homebridge-config-ui-x/pull/1705)) + +### Bug Fixes + ## 4.52.3 (2023-11-14) ### Bug Fixes diff --git a/extract-plugin-alias.js b/extract-plugin-alias.js index 5808ad271..9f548f660 100644 --- a/extract-plugin-alias.js +++ b/extract-plugin-alias.js @@ -4,8 +4,8 @@ * This script "mocks" homebridge and is used to extract the plugin alias and type. */ -const path = require('path'); const EventEmitter = require('events').EventEmitter; +const path = require('path'); let pluginAlias; let pluginType; diff --git a/package-lock.json b/package-lock.json index 6f9bd7889..89422ed4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-config-ui-x", - "version": "4.52.3", + "version": "4.52.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-config-ui-x", - "version": "4.52.3", + "version": "4.52.4", "funding": [ { "type": "github", @@ -23,23 +23,23 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.10", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.11", "@nestjs/axios": "3.0.1", - "@nestjs/common": "10.2.8", - "@nestjs/core": "10.2.8", + "@nestjs/common": "10.2.9", + "@nestjs/core": "10.2.9", "@nestjs/jwt": "10.2.0", "@nestjs/passport": "10.0.2", - "@nestjs/platform-fastify": "10.2.8", - "@nestjs/platform-socket.io": "10.2.8", - "@nestjs/swagger": "7.1.15", - "@nestjs/websockets": "10.2.8", + "@nestjs/platform-fastify": "10.2.9", + "@nestjs/platform-socket.io": "10.2.9", + "@nestjs/swagger": "7.1.16", + "@nestjs/websockets": "10.2.9", "@oznu/hap-client": "1.9.0", - "axios": "1.6.1", + "axios": "1.6.2", "class-transformer": "0.5.1", "class-validator": "0.14.0", "commander": "11.1.0", "dayjs": "1.11.10", - "emoji-js": "3.7.0", + "emoji-js": "3.8.0", "fastify": "4.24.3", "fs-extra": "11.1.1", "node-cache": "5.1.2", @@ -51,7 +51,7 @@ "reflect-metadata": "0.1.13", "rxjs": "7.8.1", "semver": "7.5.4", - "systeminformation": "5.21.16", + "systeminformation": "5.21.17", "tail": "2.2.6", "tar": "6.2.0", "tcp-port-used": "1.0.2", @@ -62,7 +62,7 @@ "homebridge-config-ui-x": "dist/bin/standalone.js" }, "devDependencies": { - "@nestjs/testing": "^10.2.7", + "@nestjs/testing": "^10.2.9", "@types/fs-extra": "^11.0.4", "@types/jest": "^29.5.8", "@types/lodash": "^4.14.201", @@ -74,8 +74,8 @@ "@types/tar": "^6.1.9", "@types/tcp-port-used": "^1.0.4", "@types/unzipper": "^0.10.9", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", @@ -93,10 +93,10 @@ "lodash": "^4.17.21", "nodemon": "^3.0.1", "otplib": "^12.0.1", - "prettier": "^3.0.3", + "prettier": "^3.1.0", "rimraf": "^5.0.5", "ts-jest": "^29.1.1", - "ts-loader": "^9.5.0", + "ts-loader": "^9.5.1", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "typescript": "^5.2.2", @@ -817,9 +817,9 @@ } }, "node_modules/@fastify/cors": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-8.4.0.tgz", - "integrity": "sha512-MlVvMTenltToByTpLwlWtO+7dQ3l2J+1OpmGrx9JpSNWo1d+dhfNCOi23zHhxdFhtpDzfwGwCsKu9DTeG7k7nQ==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-8.4.1.tgz", + "integrity": "sha512-iYQJtrY3pFiDS5mo5zRaudzg2OcUdJ96PD6xfkKOOEilly5nnrFZx/W6Sce2T79xxlEn2qpU3t5+qS2phS369w==", "dependencies": { "fastify-plugin": "^4.0.0", "mnemonist": "0.39.5" @@ -942,9 +942,9 @@ } }, "node_modules/@homebridge/node-pty-prebuilt-multiarch": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.10.tgz", - "integrity": "sha512-ttOE8QQRq/aRXDoKD2rfYEF50AiDLM9LPTohqCog1Z78g8k3Zqk15R/EHfTl/8cfw4l0fxt3y0dWL56wq79p2A==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.11.tgz", + "integrity": "sha512-g7XB2DxGXUuJV4ZS5+8BbztaeqKyihK1zowPL2EeLRp4wfew1qZ3Xw1FWYncpiuRbRvjXrEzXDkcTiYe/XC/ZA==", "hasInstallScript": true, "dependencies": { "nan": "^2.18.0", @@ -1882,9 +1882,9 @@ } }, "node_modules/@nestjs/common": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.2.8.tgz", - "integrity": "sha512-rmpwcdvq2IWMmsUVP8rsdKub6uDWk7dwCYo0aif50JTwcvcxzaP3iKVFKoSgvp0RKYu8h15+/AEOfaInmPpl0Q==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.2.9.tgz", + "integrity": "sha512-i7vb2zMLJUDIPqjfBhMkgIITK1AnKDkFYSsM+aaRHpNa9xv/CwsiQuINaXfzStMpnwjkq5FDE3aoF0wkTfD2cQ==", "dependencies": { "iterare": "1.2.1", "tslib": "2.6.2", @@ -1910,9 +1910,9 @@ } }, "node_modules/@nestjs/core": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.2.8.tgz", - "integrity": "sha512-9+MZ2s8ixfY9Bl/M9ofChiyYymcwdK9ZWNH4GDMF7Am7XRAQ1oqde6MYGG05rhQwiVXuTwaYLlXciJKfsrg5qg==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.2.9.tgz", + "integrity": "sha512-Hl6HC9hR7JD3YmzwcveBKeydaq9cguEsMdEghzLuVH3VEH0M+bTFHjCIKhsxMez4/O7/K6n3EhNx1Et4Z+BqWg==", "hasInstallScript": true, "dependencies": { "@nuxtjs/opencollective": "0.3.2", @@ -1987,11 +1987,11 @@ } }, "node_modules/@nestjs/platform-fastify": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.2.8.tgz", - "integrity": "sha512-ZeqIHeGLD7YgJ22K9AkyjcFv/yH/LH+HmujukBq/yDLFlJuurKCgbDPfL0PHq0RRMZu5CeB0dhs8+qihw96yjA==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.2.9.tgz", + "integrity": "sha512-kSkNivpAIwgt5Xnawwe8hfcafo9XMmnjNWcNCSXcjkic8pLPJvU4FD2D1+jmOWEx7uqFKKvg1Cf0Y6HenYfaMA==", "dependencies": { - "@fastify/cors": "8.4.0", + "@fastify/cors": "8.4.1", "@fastify/formbody": "7.4.0", "@fastify/middie": "8.3.0", "fastify": "4.24.3", @@ -2019,9 +2019,9 @@ } }, "node_modules/@nestjs/platform-socket.io": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.2.8.tgz", - "integrity": "sha512-P/Olw9alAaKD7Q1vS/ol7K81x1l7Bmi+AXthBNUPGMmG/W8kxO1krerW4rEhtF3BKJ0qJIa5bhDlb80p4lZcNA==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.2.9.tgz", + "integrity": "sha512-xuXsUWUtgzdRnNBSWZADQv0sShBOsyHK7iEwwIpFMerqbthSMwjsyUv0s3hDoPEnS6Nf4MMf2KReD5JBAnMBFQ==", "dependencies": { "socket.io": "4.7.2", "tslib": "2.6.2" @@ -2037,9 +2037,9 @@ } }, "node_modules/@nestjs/swagger": { - "version": "7.1.15", - "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.1.15.tgz", - "integrity": "sha512-ZaAO90R9MQXk4iLQLijIH6jrsllkUSYoh0Su6DECGgu8Y4Q/9LfdESwsZ9nmzr/48aLOu+wrv+cdI5Wr6fLKJw==", + "version": "7.1.16", + "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.1.16.tgz", + "integrity": "sha512-f9KBk/BX9MUKPTj7tQNYJ124wV/jP5W2lwWHLGwe/4qQXixuDOo39zP55HIJ44LE7S04B7BOeUOo9GBJD/vRcw==", "dependencies": { "@nestjs/mapped-types": "2.0.3", "js-yaml": "4.1.0", @@ -2068,9 +2068,9 @@ } }, "node_modules/@nestjs/testing": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-10.2.8.tgz", - "integrity": "sha512-9Kj5IQhM67/nj/MT6Wi2OmWr5YQnCMptwKVFrX1TDaikpY12196v7frk0jVjdT7wms7rV07GZle9I2z0aSjqtQ==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-10.2.9.tgz", + "integrity": "sha512-E+66R27Op+WAQHHH6RnUsz7QpKApl4Bn42nheCAGvS/sxbaDJ8RKtm4stE4Iz2aioPCUvRi8j4z8Ze73k0CcGQ==", "dev": true, "dependencies": { "tslib": "2.6.2" @@ -2095,9 +2095,9 @@ } }, "node_modules/@nestjs/websockets": { - "version": "10.2.8", - "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.2.8.tgz", - "integrity": "sha512-oZN1VJFApN7d2eftr65a36QrV0IJNGba4znqyjFnyGvtDWTDcQwzDcnEfvJBTTYhOSBNS7KDfVhne0ythkl6tg==", + "version": "10.2.9", + "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.2.9.tgz", + "integrity": "sha512-Hp/ioNMcBtCzkubgcDHeA5KH4YLBL1jHfMEacLctKDa20Kn/LFXhJhXVWEr4jEzUKXbD+Q+GyYk1V/1rJi6eHA==", "dependencies": { "iterare": "1.2.1", "object-hash": "3.0.0", @@ -2750,16 +2750,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", - "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", + "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/type-utils": "6.11.0", + "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -2785,15 +2785,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", - "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", + "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4" }, "engines": { @@ -2813,13 +2813,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", + "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2830,13 +2830,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", - "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", + "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/utils": "6.11.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2857,9 +2857,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", + "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2870,13 +2870,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", + "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/visitor-keys": "6.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2897,17 +2897,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/typescript-estree": "6.11.0", "semver": "^7.5.4" }, "engines": { @@ -2922,12 +2922,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", + "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/types": "6.11.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3502,9 +3502,9 @@ } }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3954,9 +3954,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001561", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz", - "integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==", + "version": "1.0.30001563", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz", + "integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==", "dev": true, "funding": [ { @@ -4965,9 +4965,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.581", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz", - "integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw==", + "version": "1.4.587", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.587.tgz", + "integrity": "sha512-RyJX0q/zOkAoefZhB9XHghGeATVP0Q3mwA253XD/zj2OeXc+JZB9pCaEv6R578JUYaWM9PRhye0kXvd/V1cQ3Q==", "dev": true }, "node_modules/emittery": { @@ -4983,16 +4983,16 @@ } }, "node_modules/emoji-datasource": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/emoji-datasource/-/emoji-datasource-7.0.2.tgz", - "integrity": "sha512-F5TTUSktTIfbjHIlaz8tjsQ8EAD0UpJtj1i5O13jQARWTddtFgam3nE1W5WgSQoqU/cuTnF1H9tK/wlCOyzfiA==" + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/emoji-datasource/-/emoji-datasource-15.0.1.tgz", + "integrity": "sha512-aF5Q6LCKXzJzpG4K0ETiItuzz0xLYxNexR9qWw45/shuuEDWZkOIbeGHA23uopOSYA/LmeZIXIFsySCx+YKg2g==" }, "node_modules/emoji-js": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/emoji-js/-/emoji-js-3.7.0.tgz", - "integrity": "sha512-YNJCF8DOYI1AZnkSIcJbmIN6rtXtSv5DObqzvHuGAP8VLQc15MMN+DG9rQVSfHPXGFkFub9pGvbiO4FNz5+sjg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/emoji-js/-/emoji-js-3.8.0.tgz", + "integrity": "sha512-A5FNHKlRPRo6RJWrrdGWnoolIBMkVXHy4qkO0V5ahekQPjfVECxvOOWADeAF/SbzRVA9Sxdj24FCoRYGt06skA==", "dependencies": { - "emoji-datasource": "7.0.2" + "emoji-datasource": "15.0.1" } }, "node_modules/emoji-regex": { @@ -5133,9 +5133,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.0.tgz", - "integrity": "sha512-lcCr3v3OLezdfFyx9r5NRYHOUTQNnFEQ9E87Mx8Kc+iqyJNkO7MJoB4GQRTlIMw9kLLTwGw0OAkm4BQQud/d9g==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", "dev": true }, "node_modules/es-set-tostringtag": { @@ -6213,9 +6213,9 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", @@ -6223,7 +6223,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flat-cache/node_modules/glob": { @@ -6835,9 +6835,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -9476,9 +9476,9 @@ } }, "node_modules/luxon": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.3.tgz", - "integrity": "sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", "engines": { "node": ">=12" } @@ -10361,9 +10361,9 @@ } }, "node_modules/pino": { - "version": "8.16.1", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.1.tgz", - "integrity": "sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA==", + "version": "8.16.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.2.tgz", + "integrity": "sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==", "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", @@ -10489,9 +10489,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -11602,9 +11602,9 @@ } }, "node_modules/systeminformation": { - "version": "5.21.16", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.16.tgz", - "integrity": "sha512-WJZdc5RbmDF1VOJcS+G2oIBeNgmMTyJ8+enHe9stIyBg2XhboUTsSfN9HrFMDV+fgXwJ50kNKgD3TzodsFgB+g==", + "version": "5.21.17", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.17.tgz", + "integrity": "sha512-JZYRCbIjk3WuBV59A9/rTla2rROX+aAJ9uo2Z1dI+bjieORcukClN8rlM1zE9NYKpULSbaGc+KKct/870lO0DA==", "os": [ "darwin", "linux", @@ -12036,9 +12036,9 @@ } }, "node_modules/ts-loader": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", - "integrity": "sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", + "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", "dev": true, "dependencies": { "chalk": "^4.1.0", diff --git a/package.json b/package.json index 678a41bd9..3163c7ed3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-config-ui-x", "displayName": "Homebridge UI", - "version": "4.52.3", + "version": "4.52.4", "description": "A web based management, configuration and control platform for Homebridge.", "license": "MIT", "author": "oznu ", @@ -32,7 +32,9 @@ "homebridge": "^1.6.0" }, "scripts": { - "check": "npm install && npm outdated", + "check": "npm run check:server && npm run check:ui", + "check:server": "npm install && npm outdated", + "check:ui": "npm install --prefix ui && npm outdated --prefix ui", "watch": "concurrently \"npm run watch:ui\" \"npm run watch:server\"", "watch:server": "nodemon", "watch:ui": "npm run start --prefix ui", @@ -56,23 +58,23 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "0.11.10", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.11", "@nestjs/axios": "3.0.1", - "@nestjs/common": "10.2.8", - "@nestjs/core": "10.2.8", + "@nestjs/common": "10.2.9", + "@nestjs/core": "10.2.9", "@nestjs/jwt": "10.2.0", "@nestjs/passport": "10.0.2", - "@nestjs/platform-fastify": "10.2.8", - "@nestjs/platform-socket.io": "10.2.8", - "@nestjs/swagger": "7.1.15", - "@nestjs/websockets": "10.2.8", + "@nestjs/platform-fastify": "10.2.9", + "@nestjs/platform-socket.io": "10.2.9", + "@nestjs/swagger": "7.1.16", + "@nestjs/websockets": "10.2.9", "@oznu/hap-client": "1.9.0", - "axios": "1.6.1", + "axios": "1.6.2", "class-transformer": "0.5.1", "class-validator": "0.14.0", "commander": "11.1.0", "dayjs": "1.11.10", - "emoji-js": "3.7.0", + "emoji-js": "3.8.0", "fastify": "4.24.3", "fs-extra": "11.1.1", "node-cache": "5.1.2", @@ -84,14 +86,14 @@ "reflect-metadata": "0.1.13", "rxjs": "7.8.1", "semver": "7.5.4", - "systeminformation": "5.21.16", + "systeminformation": "5.21.17", "tail": "2.2.6", "tar": "6.2.0", "tcp-port-used": "1.0.2", "unzipper": "0.10.14" }, "devDependencies": { - "@nestjs/testing": "^10.2.7", + "@nestjs/testing": "^10.2.9", "@types/fs-extra": "^11.0.4", "@types/jest": "^29.5.8", "@types/lodash": "^4.14.201", @@ -103,8 +105,8 @@ "@types/tar": "^6.1.9", "@types/tcp-port-used": "^1.0.4", "@types/unzipper": "^0.10.9", - "@typescript-eslint/eslint-plugin": "^6.10.0", - "@typescript-eslint/parser": "^6.10.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "babel-jest": "^29.7.0", "bash-color": "^0.0.4", "buffer-shims": "^1.0.0", @@ -122,10 +124,10 @@ "lodash": "^4.17.21", "nodemon": "^3.0.1", "otplib": "^12.0.1", - "prettier": "^3.0.3", + "prettier": "^3.1.0", "rimraf": "^5.0.5", "ts-jest": "^29.1.1", - "ts-loader": "^9.5.0", + "ts-loader": "^9.5.1", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "typescript": "^5.2.2", @@ -161,4 +163,4 @@ "smart home", "hb-service" ] -} \ No newline at end of file +} diff --git a/scripts/lang-sync.ts b/scripts/lang-sync.ts index 30ce49206..2cd2263bf 100644 --- a/scripts/lang-sync.ts +++ b/scripts/lang-sync.ts @@ -1,10 +1,12 @@ /** - * Script to copy new english translation strings to the other language files + * Script to: + * - copy new english translation strings to the other language files + * - remove old translation strings from the other language files */ -import * as fs from 'fs-extra'; import * as path from 'path'; +import * as fs from 'fs-extra'; const basePath = path.dirname(__dirname); @@ -18,11 +20,19 @@ for (const lang of langFiles) { const translationStrings = fs.readJsonSync(langPath); if (lang !== 'en.json') { + // find any keys in the main file that are not in the translation file, and add for (const [key, value] of Object.entries(main)) { if (!translationStrings.hasOwnProperty(key)) { translationStrings[key] = value; } } + + // find any keys in the translation file that are not in the main file, and remove + for (const key of Object.keys(translationStrings)) { + if (!main.hasOwnProperty(key)) { + delete translationStrings[key]; + } + } } // sort keys diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index 0953ce6b9..9b601fe58 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -421,12 +421,7 @@ export class HomebridgeServiceHelper { return; } - // allow the --strict-plugin-resolution flag on Homebridge v1.4.1 or later only - if ( - this.homebridgePackage && - process.env.UIX_STRICT_PLUGIN_RESOLUTION === '1' && - semver.gte(this.homebridgePackage.version, '1.4.1-beta.1') - ) { + if (this.homebridgePackage && process.env.UIX_STRICT_PLUGIN_RESOLUTION === '1') { if (!this.homebridgeOpts.includes('--strict-plugin-resolution')) { this.homebridgeOpts.push('--strict-plugin-resolution'); } @@ -1217,7 +1212,7 @@ export class HomebridgeServiceHelper { /** * Extract the Node.js tarball */ - public async extractNodejs(targetVersion: string, extractConfig) { + public async extractNodejs(targetVersion: string, extractConfig: tar.ExtractOptions) { const spinner = ora(`Installing Node.js ${targetVersion}`).start(); try { diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 14ada25e6..2e3d19ec4 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -283,8 +283,8 @@ export class StatusService { client.emit('homebridge-status', await this.getHomebridgeStats()); - // ipc status events are only available in Homebridge 1.3.3 or later - and when running in service mode - if (this.configService.serviceMode && this.configService.homebridgeVersion && semver.gt(this.configService.homebridgeVersion, '1.3.3-beta.5')) { + // ipc status events are only available when running in service mode + if (this.configService.serviceMode) { homebridgeStatusChangeSub = this.homebridgeStatusChange.subscribe(async () => { client.emit('homebridge-status', await this.getHomebridgeStats()); }); @@ -330,7 +330,7 @@ export class StatusService { * Check if homebridge is running on the local system */ public async checkHomebridgeStatus() { - if (this.configService.serviceMode && this.configService.homebridgeVersion && semver.gt(this.configService.homebridgeVersion, '1.3.3-beta.5')) { + if (this.configService.serviceMode) { return this.homebridgeStatus; } @@ -451,7 +451,7 @@ export class StatusService { try { const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data; - const currentLts = versionList.filter(x => x.lts)[0]; + const currentLts = versionList.filter((x: any) => x.lts)[0]; // See why this is set to 2.29 at https://homebridge.io/w/JJSun const glibcVersion = this.getGlibcVersion(); diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json index adba90d63..a0e6a99bf 100644 --- a/ui/.eslintrc.json +++ b/ui/.eslintrc.json @@ -19,6 +19,8 @@ "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", "plugin:@angular-eslint/template/process-inline-templates" ], + "plugins": [ + "import", "import-newlines", "sort-exports"], "rules": { "@angular-eslint/component-selector": [ "error", @@ -77,7 +79,12 @@ ], "id-blacklist": "off", "id-match": "off", + "import-newlines/enforce": ["error", 3], + "import/no-extraneous-dependencies": "off", + "import/order": ["warn", { "alphabetize": { "order": "asc" }, "newlines-between": "never" }], "no-underscore-dangle": "off", + "sort-exports/sort-exports": ["warn", { "sortDir": "asc" }], + "sort-imports": ["warn", { "ignoreDeclarationSort": true }], "space-before-function-paren": "error" } }, diff --git a/ui/package-lock.json b/ui/package-lock.json index d3073964a..c494f81a0 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -66,6 +66,8 @@ "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", "@types/emoji-js": "^3.5.2", + "@types/file-saver": "^2.0.7", + "@types/lodash-es": "^4.17.11", "@types/node": "^18.18.9", "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.5", @@ -76,8 +78,10 @@ "codelyzer": "^6.0.2", "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import-newlines": "^1.3.4", "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-prefer-arrow": "^1.2.3", + "eslint-plugin-sort-exports": "^0.8.0", "ts-node": "^10.9.1", "typescript": "^4.8.4" } @@ -3616,6 +3620,12 @@ "@types/send": "*" } }, + "node_modules/@types/file-saver": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz", + "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==", + "dev": true + }, "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", @@ -3643,6 +3653,21 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.14.201", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.201.tgz", + "integrity": "sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ==", + "dev": true + }, + "node_modules/@types/lodash-es": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.11.tgz", + "integrity": "sha512-eCw8FYAWHt2DDl77s+AMLLzPn310LKohruumpucZI4oOFJkIgnlaJcy23OKMJxx4r9PeTF13Gv6w+jqjWQaYUg==", + "dev": true, + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -5340,9 +5365,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001561", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz", - "integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==", + "version": "1.0.30001563", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz", + "integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==", "funding": [ { "type": "opencollective", @@ -5669,9 +5694,12 @@ "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" }, "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/component-inherit": { "version": "0.0.3", @@ -5896,9 +5924,9 @@ } }, "node_modules/copy-webpack-plugin/node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -6561,9 +6589,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.581", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz", - "integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw==" + "version": "1.4.587", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.587.tgz", + "integrity": "sha512-RyJX0q/zOkAoefZhB9XHghGeATVP0Q3mwA253XD/zj2OeXc+JZB9pCaEv6R578JUYaWM9PRhye0kXvd/V1cQ3Q==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -7377,6 +7405,21 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, + "node_modules/eslint-plugin-import-newlines": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.3.4.tgz", + "integrity": "sha512-Lmf/BbK+EQKUfjKPcZpslE/KTGYlgaI8ZJ/sYzdbb3BVTg5+GmLBLHBjsUKNEVRM1SEhDTF/didtOSYKi4tSnQ==", + "dev": true, + "bin": { + "import-linter": "lib/index.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-plugin-import/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7472,6 +7515,15 @@ "eslint": ">=2.0.0" } }, + "node_modules/eslint-plugin-sort-exports": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.8.0.tgz", + "integrity": "sha512-5x7kJNjIS5bSyehFJ6Gk2gh2wUPt/rmhwDHF8JPDicSH7bvrLRFdlkhHu74YqYBjEySHYaOZVoKNP90TjI0v6w==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -8128,9 +8180,9 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", @@ -8138,7 +8190,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -10690,9 +10742,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", - "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.0.tgz", + "integrity": "sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==", "dev": true, "optional": true, "bin": { diff --git a/ui/package.json b/ui/package.json index df025d28c..7eb85a8ab 100644 --- a/ui/package.json +++ b/ui/package.json @@ -68,6 +68,8 @@ "@angular/language-service": "^14.3.0", "@fortawesome/fontawesome-free": "^6.4.2", "@types/emoji-js": "^3.5.2", + "@types/file-saver": "^2.0.7", + "@types/lodash-es": "^4.17.11", "@types/node": "^18.18.9", "@types/qrcode": "^1.5.5", "@types/semver": "^7.5.5", @@ -78,8 +80,10 @@ "codelyzer": "^6.0.2", "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import-newlines": "^1.3.4", "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-prefer-arrow": "^1.2.3", + "eslint-plugin-sort-exports": "^0.8.0", "ts-node": "^10.9.1", "typescript": "^4.8.4" }, diff --git a/ui/src/app/app-routing.module.ts b/ui/src/app/app-routing.module.ts index 083715a25..ea035624d 100644 --- a/ui/src/app/app-routing.module.ts +++ b/ui/src/app/app-routing.module.ts @@ -1,19 +1,18 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { AuthGuard } from '@/app/core/auth/auth.guard'; +import { RouterModule, Routes } from '@angular/router'; import { AdminGuard } from '@/app/core/auth/admin.guard'; +import { AuthGuard } from '@/app/core/auth/auth.guard'; import { LoginComponent } from '@/app/modules/login/login.component'; import { LoginGuard } from '@/app/modules/login/login.guard'; +import { RestartComponent } from '@/app/modules/restart/restart.component'; import { SetupWizardGuard } from '@/app/modules/setup-wizard/setup-wizard.guard'; +import { StatusComponent } from '@/app/modules/status/status.component'; import { LayoutComponent } from '@/app/shared/layout/layout.component'; /* * The status and restart modules should not be lazy loaded * to ensure restarts after an update go smoothly */ -import { RestartComponent } from '@/app/modules/restart/restart.component'; -import { StatusComponent } from '@/app/modules/status/status.component'; const routes: Routes = [ { diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index cfc370ac2..f37287512 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -1,7 +1,6 @@ import { Component } from '@angular/core'; -import { Router, NavigationEnd } from '@angular/router'; +import { NavigationEnd, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; - import { SettingsService } from '@/app/core/settings.service'; @Component({ @@ -9,8 +8,6 @@ import { SettingsService } from '@/app/core/settings.service'; templateUrl: './app.component.html', }) export class AppComponent { - public langdir = 'ltr'; - constructor( router: Router, translate: TranslateService, @@ -50,18 +47,14 @@ export class AppComponent { 'he', ]; - // which langs should use RTL + // which languages should use RTL const rtlLanguages = [ 'he', ]; // watch for lang changes translate.onLangChange.subscribe(() => { - if (rtlLanguages.includes(translate.currentLang)) { - $settings.rtl = true; - } else { - $settings.rtl = false; - } + $settings.rtl = rtlLanguages.includes(translate.currentLang); }); const browserLang = languages.find(x => x === translate.getBrowserLang() || x === translate.getBrowserCultureLang()); diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts index a31da1a25..efbc158dd 100644 --- a/ui/src/app/app.module.ts +++ b/ui/src/app/app.module.ts @@ -1,29 +1,29 @@ +import { HttpClientModule } from '@angular/common/http'; +import { LOCALE_ID, NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { HttpClientModule } from '@angular/common/http'; -import { NgModule, LOCALE_ID } from '@angular/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrModule } from 'ngx-toastr'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; -import { MonacoEditorModule } from 'ngx-monaco-editor'; import { DragulaModule } from 'ng2-dragula'; - -import { CoreModule } from '@/app/core/core.module'; -import { AuthModule } from '@/app/core/auth/auth.module'; -import { onMonacoLoad } from '@/app/core/monaco-editor.service'; -import { supportedLocales } from '@/app/core/locales'; - -import { AppComponent } from './app.component'; +import { MonacoEditorModule } from 'ngx-monaco-editor'; +import { ToastrModule } from 'ngx-toastr'; import { AppRoutingModule } from './app-routing.module'; -import { LayoutComponent } from './shared/layout/layout.component'; +import { AppComponent } from './app.component'; +import { LoginModule } from './modules/login/login.module'; import { RestartModule } from './modules/restart/restart.module'; import { StatusModule } from './modules/status/status.module'; -import { LoginModule } from './modules/login/login.module'; +import { LayoutComponent } from './shared/layout/layout.component'; +import { AuthModule } from '@/app/core/auth/auth.module'; +import { CoreModule } from '@/app/core/core.module'; +import { supportedLocales } from '@/app/core/locales'; +import { onMonacoLoad } from '@/app/core/monaco-editor.service'; +import { RestartOptionsModalComponent } from '@/app/shared/layout/restart-options-modal/restart-options-modal.component'; @NgModule({ declarations: [ AppComponent, LayoutComponent, + RestartOptionsModalComponent, ], imports: [ BrowserModule, diff --git a/ui/src/app/core/accessories/accessories.module.ts b/ui/src/app/core/accessories/accessories.module.ts index 94fa94cb5..bda482932 100644 --- a/ui/src/app/core/accessories/accessories.module.ts +++ b/ui/src/app/core/accessories/accessories.module.ts @@ -1,61 +1,59 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; -import { NgxMdModule } from 'ngx-md'; import { InlineSVGModule } from 'ng-inline-svg'; import { NouisliderModule } from 'ng2-nouislider'; - -import { CoreModule } from '@/app/core/core.module'; +import { NgxMdModule } from 'ngx-md'; import { AccessoriesService } from './accessories.service'; - -import { SwitchComponent } from './types/switch/switch.component'; -import { StatelessprogrammableswitchComponent } from './types/statelessprogrammableswitch/statelessprogrammableswitch.component'; -import { ThermostatComponent } from './types/thermostat/thermostat.component'; -import { ThermostatManageComponent } from './types/thermostat/thermostat.manage.component'; -import { OutletComponent } from './types/outlet/outlet.component'; +import { AccessoryTileComponent } from './accessory-tile/accessory-tile.component'; +import { InfoModalComponent } from './info-modal/info-modal.component'; +import { AirpurifierComponent } from './types/airpurifier/airpurifier.component'; +import { AirpurifierManageComponent } from './types/airpurifier/airpurifier.manage.component'; +import { AirqualitysensorComponent } from './types/airqualitysensor/airqualitysensor.component'; +import { BatteryserviceComponent } from './types/batteryservice/batteryservice.component'; +import { ContactsensorComponent } from './types/contactsensor/contactsensor.component'; +import { DoorComponent } from './types/door/door.component'; +import { DoorManageComponent } from './types/door/door.manage.component'; import { FanComponent } from './types/fan/fan.component'; import { FanManageComponent } from './types/fan/fan.manage.component'; import { Fanv2Component } from './types/fanv2/fanv2.component'; import { Fanv2ManageComponent } from './types/fanv2/fanv2.manage.component'; -import { UnknownComponent } from './types/unknown/unknown.component'; +import { GaragedooropenerComponent } from './types/garagedooropener/garagedooropener.component'; +import { HeaterCoolerComponent } from './types/heatercooler/heatercooler.component'; +import { HeaterCoolerManageComponent } from './types/heatercooler/heatercooler.manage.component'; +import { HumidifierDehumidifierComponent } from './types/humidifierdehumidifier/humidifierdehumidifier.component'; +import { HumidifierDehumidifierManageComponent } from './types/humidifierdehumidifier/humidifierdehumidifier.manage.component'; +import { HumiditysensorComponent } from './types/humiditysensor/humiditysensor.component'; +import { IrrigationSystemComponent } from './types/irrigationsystem/irrigationsystem.component'; +import { LeaksensorComponent } from './types/leaksensor/leaksensor.component'; import { LightbulbComponent } from './types/lightbulb/lightbulb.component'; import { LightbulbManageComponent } from './types/lightbulb/lightbulb.manage.component'; import { LightsensorComponent } from './types/lightsensor/lightsensor.component'; import { LockmechanismComponent } from './types/lockmechanism/lockmechanism.component'; -import { TemperaturesensorComponent } from './types/temperaturesensor/temperaturesensor.component'; -import { GaragedooropenerComponent } from './types/garagedooropener/garagedooropener.component'; import { MotionsensorComponent } from './types/motionsensor/motionsensor.component'; import { OccupancysensorComponent } from './types/occupancysensor/occupancysensor.component'; -import { HumiditysensorComponent } from './types/humiditysensor/humiditysensor.component'; -import { AirqualitysensorComponent } from './types/airqualitysensor/airqualitysensor.component'; -import { WindowcoveringComponent } from './types/windowcovering/windowcovering.component'; -import { WindowcoveringManageComponent } from './types/windowcovering/windowcovering.manage.component'; -import { WindowComponent } from './types/window/window.component'; -import { WindowManageComponent } from './types/window/window.manage.component'; -import { DoorComponent } from './types/door/door.component'; -import { DoorManageComponent } from './types/door/door.manage.component'; -import { TelevisionComponent } from './types/television/television.component'; -import { ContactsensorComponent } from './types/contactsensor/contactsensor.component'; -import { BatteryserviceComponent } from './types/batteryservice/batteryservice.component'; -import { SpeakerComponent } from './types/speaker/speaker.component'; -import { SpeakerManageComponent } from './types/speaker/speaker.manage.component'; +import { OutletComponent } from './types/outlet/outlet.component'; import { SecuritysystemComponent } from './types/securitysystem/securitysystem.component'; import { SecuritysystemManageComponent } from './types/securitysystem/securitysystem.manage.component'; -import { LeaksensorComponent } from './types/leaksensor/leaksensor.component'; import { SmokesensorComponent } from './types/smokesensor/smokesensor.component'; +import { SpeakerComponent } from './types/speaker/speaker.component'; +import { SpeakerManageComponent } from './types/speaker/speaker.manage.component'; +import { StatelessprogrammableswitchComponent } from './types/statelessprogrammableswitch/statelessprogrammableswitch.component'; +import { SwitchComponent } from './types/switch/switch.component'; +import { TelevisionComponent } from './types/television/television.component'; +import { TemperaturesensorComponent } from './types/temperaturesensor/temperaturesensor.component'; +import { ThermostatComponent } from './types/thermostat/thermostat.component'; +import { ThermostatManageComponent } from './types/thermostat/thermostat.manage.component'; +import { UnknownComponent } from './types/unknown/unknown.component'; import { ValveComponent } from './types/valve/valve.component'; import { ValveManageComponent } from './types/valve/valve.manage.component'; -import { IrrigationSystemComponent } from './types/irrigationsystem/irrigationsystem.component'; -import { AirpurifierComponent } from './types/airpurifier/airpurifier.component'; -import { AirpurifierManageComponent } from './types/airpurifier/airpurifier.manage.component'; -import { HeaterCoolerComponent } from './types/heatercooler/heatercooler.component'; -import { HeaterCoolerManageComponent } from './types/heatercooler/heatercooler.manage.component'; -import { HumidifierDehumidifierComponent } from './types/humidifierdehumidifier/humidifierdehumidifier.component'; -import { HumidifierDehumidifierManageComponent } from './types/humidifierdehumidifier/humidifierdehumidifier.manage.component'; -import { InfoModalComponent } from './info-modal/info-modal.component'; -import { AccessoryTileComponent } from './accessory-tile/accessory-tile.component'; +import { WindowComponent } from './types/window/window.component'; +import { WindowManageComponent } from './types/window/window.manage.component'; +import { WindowcoveringComponent } from './types/windowcovering/windowcovering.component'; +import { WindowcoveringManageComponent } from './types/windowcovering/windowcovering.manage.component'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/core/accessories/accessories.service.ts b/ui/src/app/core/accessories/accessories.service.ts index d51f61588..36b8a135c 100644 --- a/ui/src/app/core/accessories/accessories.service.ts +++ b/ui/src/app/core/accessories/accessories.service.ts @@ -1,12 +1,10 @@ import { Injectable } from '@angular/core'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceType } from '@oznu/hap-client'; import { ToastrService } from 'ngx-toastr'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { Subject } from 'rxjs'; - -import { WsService, IoNamespace } from '../ws.service'; import { AuthService } from '../auth/auth.service'; -import { ApiService } from '../api.service'; +import { IoNamespace, WsService } from '../ws.service'; import { ServiceTypeX } from './accessories.interfaces'; import { InfoModalComponent } from './info-modal/info-modal.component'; @@ -46,7 +44,6 @@ export class AccessoriesService { public $toastr: ToastrService, private $ws: WsService, public $auth: AuthService, - private $api: ApiService, ) { } /** @@ -123,14 +120,14 @@ export class AccessoriesService { /** * Parse the incoming accessory data and refresh existing accessory statuses */ - private parseServices(services) { + private parseServices(services: any) { if (!this.accessories.services.length) { this.accessories.services = services; return; } // update the existing objects to avoid re-painting the dom element each refresh - services.forEach((service) => { + services.forEach((service: any) => { const existing = this.accessories.services.find(x => x.uniqueId === service.uniqueId); if (existing) { @@ -296,7 +293,7 @@ export class AccessoriesService { /** * */ - showAccessoryInformation(service) { + showAccessoryInformation(service: any) { const ref = this.modalService.open(InfoModalComponent, { size: 'lg', }); @@ -320,5 +317,4 @@ export class AccessoriesService { this.roomsOrdered = false; delete this.accessoryLayout; } - } diff --git a/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.ts b/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.ts index f5ef6094f..dedb98a0a 100644 --- a/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.ts +++ b/ui/src/app/core/accessories/accessory-tile/accessory-tile.component.ts @@ -16,5 +16,4 @@ export class AccessoryTileComponent implements OnInit { ngOnInit(): void { } - } diff --git a/ui/src/app/core/accessories/info-modal/info-modal.component.html b/ui/src/app/core/accessories/info-modal/info-modal.component.html index 502a8a4f0..a90504f8b 100644 --- a/ui/src/app/core/accessories/info-modal/info-modal.component.html +++ b/ui/src/app/core/accessories/info-modal/info-modal.component.html @@ -1,8 +1,7 @@ - \ No newline at end of file + + diff --git a/ui/src/app/core/accessories/info-modal/info-modal.component.ts b/ui/src/app/core/accessories/info-modal/info-modal.component.ts index 1691fdd03..c29688fd7 100644 --- a/ui/src/app/core/accessories/info-modal/info-modal.component.ts +++ b/ui/src/app/core/accessories/info-modal/info-modal.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '@/app/core/accessories/accessories.interfaces'; diff --git a/ui/src/app/core/accessories/types/airpurifier/airpurifier.component.ts b/ui/src/app/core/accessories/types/airpurifier/airpurifier.component.ts index 00453509f..18c50c823 100644 --- a/ui/src/app/core/accessories/types/airpurifier/airpurifier.component.ts +++ b/ui/src/app/core/accessories/types/airpurifier/airpurifier.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { AirpurifierManageComponent } from './airpurifier.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.html b/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.html index 776f6099b..fd62c300b 100644 --- a/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.html +++ b/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.html @@ -2,7 +2,7 @@ @@ -33,4 +33,4 @@
{{ 'accessories.control.label_rotation_speed' | translate }} - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.ts b/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.ts index 98d65c89a..aa4a7a445 100644 --- a/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.ts +++ b/ui/src/app/core/accessories/types/airpurifier/airpurifier.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-airpurifier-manage', diff --git a/ui/src/app/core/accessories/types/airqualitysensor/airqualitysensor.component.ts b/ui/src/app/core/accessories/types/airqualitysensor/airqualitysensor.component.ts index 5f1723509..fa3d08e6d 100644 --- a/ui/src/app/core/accessories/types/airqualitysensor/airqualitysensor.component.ts +++ b/ui/src/app/core/accessories/types/airqualitysensor/airqualitysensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/batteryservice/batteryservice.component.ts b/ui/src/app/core/accessories/types/batteryservice/batteryservice.component.ts index feacfff8d..c2b36dec0 100644 --- a/ui/src/app/core/accessories/types/batteryservice/batteryservice.component.ts +++ b/ui/src/app/core/accessories/types/batteryservice/batteryservice.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/contactsensor/contactsensor.component.ts b/ui/src/app/core/accessories/types/contactsensor/contactsensor.component.ts index 3d8f4f502..21fb8186a 100644 --- a/ui/src/app/core/accessories/types/contactsensor/contactsensor.component.ts +++ b/ui/src/app/core/accessories/types/contactsensor/contactsensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/door/door.component.ts b/ui/src/app/core/accessories/types/door/door.component.ts index eb6aea236..45c524a01 100644 --- a/ui/src/app/core/accessories/types/door/door.component.ts +++ b/ui/src/app/core/accessories/types/door/door.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { DoorManageComponent } from './door.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/door/door.manage.component.html b/ui/src/app/core/accessories/types/door/door.manage.component.html index b9297b831..6d7a2dc18 100644 --- a/ui/src/app/core/accessories/types/door/door.manage.component.html +++ b/ui/src/app/core/accessories/types/door/door.manage.component.html @@ -2,7 +2,7 @@ diff --git a/ui/src/app/core/accessories/types/door/door.manage.component.ts b/ui/src/app/core/accessories/types/door/door.manage.component.ts index fcaf6ee8b..be8f4ab5b 100644 --- a/ui/src/app/core/accessories/types/door/door.manage.component.ts +++ b/ui/src/app/core/accessories/types/door/door.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-door-manage', diff --git a/ui/src/app/core/accessories/types/fan/fan.component.ts b/ui/src/app/core/accessories/types/fan/fan.component.ts index 56e04f41f..535b182e7 100644 --- a/ui/src/app/core/accessories/types/fan/fan.component.ts +++ b/ui/src/app/core/accessories/types/fan/fan.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { FanManageComponent } from './fan.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/fan/fan.manage.component.html b/ui/src/app/core/accessories/types/fan/fan.manage.component.html index a6be9f8e8..466670101 100644 --- a/ui/src/app/core/accessories/types/fan/fan.manage.component.html +++ b/ui/src/app/core/accessories/types/fan/fan.manage.component.html @@ -2,7 +2,7 @@ @@ -34,4 +34,4 @@
{{ 'accessories.control.label_rotation_speed' | translate }} - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/fan/fan.manage.component.ts b/ui/src/app/core/accessories/types/fan/fan.manage.component.ts index 1fc4ca4a6..aec170939 100644 --- a/ui/src/app/core/accessories/types/fan/fan.manage.component.ts +++ b/ui/src/app/core/accessories/types/fan/fan.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-fan-manage', diff --git a/ui/src/app/core/accessories/types/fanv2/fanv2.component.ts b/ui/src/app/core/accessories/types/fanv2/fanv2.component.ts index 4e47a9769..59ab69cd9 100644 --- a/ui/src/app/core/accessories/types/fanv2/fanv2.component.ts +++ b/ui/src/app/core/accessories/types/fanv2/fanv2.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { Fanv2ManageComponent } from './fanv2.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.html b/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.html index 43f58c172..14ace7fea 100644 --- a/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.html +++ b/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.html @@ -2,7 +2,7 @@ @@ -34,4 +34,4 @@
{{ 'accessories.control.label_rotation_speed' | translate }} - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.ts b/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.ts index 7e74d32aa..ed2ae1919 100644 --- a/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.ts +++ b/ui/src/app/core/accessories/types/fanv2/fanv2.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-fanv2-manage', diff --git a/ui/src/app/core/accessories/types/garagedooropener/garagedooropener.component.ts b/ui/src/app/core/accessories/types/garagedooropener/garagedooropener.component.ts index c77c24bb4..b7717425b 100644 --- a/ui/src/app/core/accessories/types/garagedooropener/garagedooropener.component.ts +++ b/ui/src/app/core/accessories/types/garagedooropener/garagedooropener.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/heatercooler/heatercooler.component.ts b/ui/src/app/core/accessories/types/heatercooler/heatercooler.component.ts index 5ecafae76..d9af0dd8e 100644 --- a/ui/src/app/core/accessories/types/heatercooler/heatercooler.component.ts +++ b/ui/src/app/core/accessories/types/heatercooler/heatercooler.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { HeaterCoolerManageComponent } from './heatercooler.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.html b/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.html index 7fcda58d4..c3e7f87ab 100644 --- a/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.html +++ b/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.html @@ -2,7 +2,7 @@ @@ -63,4 +63,4 @@
{{ 'accessories.control.label_target_temperature' | translate }}
- \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.ts b/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.ts index 15cc52f02..ff4d17603 100644 --- a/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.ts +++ b/ui/src/app/core/accessories/types/heatercooler/heatercooler.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-heatercooler-manage', diff --git a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.component.ts b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.component.ts index fe94fba22..5423dabe6 100644 --- a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.component.ts +++ b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { HumidifierDehumidifierManageComponent } from './humidifierdehumidifier.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.html b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.html index 61d898a68..5bd80ec8e 100644 --- a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.html +++ b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.html @@ -2,7 +2,7 @@ @@ -65,4 +65,4 @@
{{ 'accessories.control.label_target_humidity' | translate }}
- \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.ts b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.ts index 262eb9e62..56f97a7e7 100644 --- a/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.ts +++ b/ui/src/app/core/accessories/types/humidifierdehumidifier/humidifierdehumidifier.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-humidifierdehumidifier-manage', diff --git a/ui/src/app/core/accessories/types/humiditysensor/humiditysensor.component.ts b/ui/src/app/core/accessories/types/humiditysensor/humiditysensor.component.ts index ed7acf3e4..9f04d7f6e 100644 --- a/ui/src/app/core/accessories/types/humiditysensor/humiditysensor.component.ts +++ b/ui/src/app/core/accessories/types/humiditysensor/humiditysensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/leaksensor/leaksensor.component.ts b/ui/src/app/core/accessories/types/leaksensor/leaksensor.component.ts index 69a91d857..7704a7b17 100644 --- a/ui/src/app/core/accessories/types/leaksensor/leaksensor.component.ts +++ b/ui/src/app/core/accessories/types/leaksensor/leaksensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html index 9f8735667..37553f096 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html @@ -1,4 +1,4 @@ -
@@ -8,4 +8,4 @@
{{ service.values.Brightness }}%
- \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts index fca9bcf1d..a3488e03b 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { LightbulbManageComponent } from './lightbulb.manage.component'; @Component({ @@ -30,7 +29,7 @@ export class LightbulbComponent implements OnInit { onLongClick() { if ('Brightness' in this.service.values) { const ref = this.modalService.open(LightbulbManageComponent, { - size: 'sm', + size: 'md', }); ref.componentInstance.service = this.service; } diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html index 33055c32a..c3d391da6 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html @@ -2,11 +2,11 @@ - - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.ts b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.ts index 3b13e081f..45b201473 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.ts +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-lightbulb-manage', diff --git a/ui/src/app/core/accessories/types/lightsensor/lightsensor.component.ts b/ui/src/app/core/accessories/types/lightsensor/lightsensor.component.ts index 0553d7e1e..82ee865bb 100644 --- a/ui/src/app/core/accessories/types/lightsensor/lightsensor.component.ts +++ b/ui/src/app/core/accessories/types/lightsensor/lightsensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/lockmechanism/lockmechanism.component.ts b/ui/src/app/core/accessories/types/lockmechanism/lockmechanism.component.ts index a6ee068d8..b69c82bdf 100644 --- a/ui/src/app/core/accessories/types/lockmechanism/lockmechanism.component.ts +++ b/ui/src/app/core/accessories/types/lockmechanism/lockmechanism.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/motionsensor/motionsensor.component.ts b/ui/src/app/core/accessories/types/motionsensor/motionsensor.component.ts index 83ad7d7c6..da3c41a3b 100644 --- a/ui/src/app/core/accessories/types/motionsensor/motionsensor.component.ts +++ b/ui/src/app/core/accessories/types/motionsensor/motionsensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/occupancysensor/occupancysensor.component.ts b/ui/src/app/core/accessories/types/occupancysensor/occupancysensor.component.ts index 72d71a7dc..f6cd0a53e 100644 --- a/ui/src/app/core/accessories/types/occupancysensor/occupancysensor.component.ts +++ b/ui/src/app/core/accessories/types/occupancysensor/occupancysensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/outlet/outlet.component.ts b/ui/src/app/core/accessories/types/outlet/outlet.component.ts index 8bb6b30db..d2dbc7eed 100644 --- a/ui/src/app/core/accessories/types/outlet/outlet.component.ts +++ b/ui/src/app/core/accessories/types/outlet/outlet.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/securitysystem/securitysystem.component.ts b/ui/src/app/core/accessories/types/securitysystem/securitysystem.component.ts index 38d491b7e..0b804d662 100644 --- a/ui/src/app/core/accessories/types/securitysystem/securitysystem.component.ts +++ b/ui/src/app/core/accessories/types/securitysystem/securitysystem.component.ts @@ -1,6 +1,5 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; - import { ServiceTypeX } from '../../accessories.interfaces'; import { SecuritysystemManageComponent } from './securitysystem.manage.component'; diff --git a/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.html b/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.html index 9c06dc856..752bdc866 100644 --- a/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.html +++ b/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.html @@ -2,7 +2,7 @@ @@ -25,4 +25,4 @@
{{ 'accessories.control.label_speaker_volume' | translate }} - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/speaker/speaker.manage.component.ts b/ui/src/app/core/accessories/types/speaker/speaker.manage.component.ts index d7713324b..18f682d04 100644 --- a/ui/src/app/core/accessories/types/speaker/speaker.manage.component.ts +++ b/ui/src/app/core/accessories/types/speaker/speaker.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-speaker-manage', diff --git a/ui/src/app/core/accessories/types/statelessprogrammableswitch/statelessprogrammableswitch.component.ts b/ui/src/app/core/accessories/types/statelessprogrammableswitch/statelessprogrammableswitch.component.ts index d92aaab45..02ec9a730 100644 --- a/ui/src/app/core/accessories/types/statelessprogrammableswitch/statelessprogrammableswitch.component.ts +++ b/ui/src/app/core/accessories/types/statelessprogrammableswitch/statelessprogrammableswitch.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/switch/switch.component.ts b/ui/src/app/core/accessories/types/switch/switch.component.ts index 638658bba..4cd065023 100644 --- a/ui/src/app/core/accessories/types/switch/switch.component.ts +++ b/ui/src/app/core/accessories/types/switch/switch.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/television/television.component.ts b/ui/src/app/core/accessories/types/television/television.component.ts index 086f5705d..be9c451a4 100644 --- a/ui/src/app/core/accessories/types/television/television.component.ts +++ b/ui/src/app/core/accessories/types/television/television.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/temperaturesensor/temperaturesensor.component.ts b/ui/src/app/core/accessories/types/temperaturesensor/temperaturesensor.component.ts index 3ac6f7234..6ac628ebc 100644 --- a/ui/src/app/core/accessories/types/temperaturesensor/temperaturesensor.component.ts +++ b/ui/src/app/core/accessories/types/temperaturesensor/temperaturesensor.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/thermostat/thermostat.component.ts b/ui/src/app/core/accessories/types/thermostat/thermostat.component.ts index b1cc457b0..83a468a52 100644 --- a/ui/src/app/core/accessories/types/thermostat/thermostat.component.ts +++ b/ui/src/app/core/accessories/types/thermostat/thermostat.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { ThermostatManageComponent } from './thermostat.manage.component'; @Component({ diff --git a/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.html b/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.html index 1bf646d5f..c7d727d03 100644 --- a/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.html +++ b/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.html @@ -2,7 +2,7 @@ @@ -39,4 +39,4 @@
{{ 'accessories.control.label_target_temperature' | translate }}
- \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.ts b/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.ts index e7001d36a..16c22f879 100644 --- a/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.ts +++ b/ui/src/app/core/accessories/types/thermostat/thermostat.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-thermostat-manage', diff --git a/ui/src/app/core/accessories/types/unknown/unknown.component.ts b/ui/src/app/core/accessories/types/unknown/unknown.component.ts index 46c0e6fcf..b31773bfe 100644 --- a/ui/src/app/core/accessories/types/unknown/unknown.component.ts +++ b/ui/src/app/core/accessories/types/unknown/unknown.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ diff --git a/ui/src/app/core/accessories/types/valve/valve.component.ts b/ui/src/app/core/accessories/types/valve/valve.component.ts index 98c0a4082..16887d61c 100644 --- a/ui/src/app/core/accessories/types/valve/valve.component.ts +++ b/ui/src/app/core/accessories/types/valve/valve.component.ts @@ -1,10 +1,14 @@ -import { Component, OnInit, Input, OnDestroy, OnChanges } from '@angular/core'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { Subscription, interval } from 'rxjs'; +import { filter } from 'rxjs/operators'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { ValveManageComponent } from './valve.manage.component'; -import { interval, Subscription } from 'rxjs'; -import { filter } from 'rxjs/operators'; @Component({ selector: 'app-valve', diff --git a/ui/src/app/core/accessories/types/valve/valve.manage.component.html b/ui/src/app/core/accessories/types/valve/valve.manage.component.html index 1d8ad3886..dfaf834ed 100644 --- a/ui/src/app/core/accessories/types/valve/valve.manage.component.html +++ b/ui/src/app/core/accessories/types/valve/valve.manage.component.html @@ -3,7 +3,7 @@ @@ -16,4 +16,4 @@ diff --git a/ui/src/app/core/accessories/types/window/window.manage.component.ts b/ui/src/app/core/accessories/types/window/window.manage.component.ts index aad6b8faf..a06db1b0e 100644 --- a/ui/src/app/core/accessories/types/window/window.manage.component.ts +++ b/ui/src/app/core/accessories/types/window/window.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-window-manage', diff --git a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.html b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.html index 46fdc3a50..4ec709a91 100644 --- a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.html +++ b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.html @@ -1,4 +1,4 @@ -
-
\ No newline at end of file +
diff --git a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.scss b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.scss index 9f06a9bdd..d090a4563 100644 --- a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.scss +++ b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.scss @@ -3,4 +3,4 @@ font-size: 1.4rem; text-transform: initial; } -} \ No newline at end of file +} diff --git a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.ts b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.ts index 73ab97218..6b1312d7a 100644 --- a/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.ts +++ b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ServiceTypeX } from '../../accessories.interfaces'; - import { WindowcoveringManageComponent } from './windowcovering.manage.component'; @Component({ @@ -28,7 +27,7 @@ export class WindowcoveringComponent implements OnInit { onLongClick() { const ref = this.modalService.open(WindowcoveringManageComponent, { - size: 'sm', + size: 'md', }); ref.componentInstance.service = this.service; } diff --git a/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.html b/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.html index 768c67106..e0adf6bd7 100644 --- a/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.html +++ b/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.html @@ -2,11 +2,11 @@ - \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.ts b/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.ts index e5ef5742c..7ce61b599 100644 --- a/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.ts +++ b/ui/src/app/core/accessories/types/windowcovering/windowcovering.manage.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ServiceTypeX } from '../../accessories.interfaces'; - import { Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { ServiceTypeX } from '../../accessories.interfaces'; @Component({ selector: 'app-windowcovering-manage', diff --git a/ui/src/app/core/api.service.ts b/ui/src/app/core/api.service.ts index af5be53ef..730ef4bd3 100644 --- a/ui/src/app/core/api.service.ts +++ b/ui/src/app/core/api.service.ts @@ -1,8 +1,7 @@ -import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; - -import { environment } from '@/environments/environment'; +import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; +import { environment } from '@/environments/environment'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/auth/admin.guard.ts b/ui/src/app/core/auth/admin.guard.ts index 9f07c168b..35f53b507 100644 --- a/ui/src/app/core/auth/admin.guard.ts +++ b/ui/src/app/core/auth/admin.guard.ts @@ -1,8 +1,12 @@ import { Injectable } from '@angular/core'; -import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; -import { Observable } from 'rxjs'; +import { +ActivatedRouteSnapshot, +CanActivate, +Router, +RouterStateSnapshot, +} from '@angular/router'; import { ToastrService } from 'ngx-toastr'; - +import { Observable } from 'rxjs'; import { AuthService } from './auth.service'; @Injectable({ diff --git a/ui/src/app/core/auth/auth.guard.ts b/ui/src/app/core/auth/auth.guard.ts index d30a92178..c9e533e3f 100644 --- a/ui/src/app/core/auth/auth.guard.ts +++ b/ui/src/app/core/auth/auth.guard.ts @@ -1,8 +1,12 @@ import { Injectable } from '@angular/core'; -import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; - -import { SettingsService } from '@/app/core/settings.service'; +import { + ActivatedRouteSnapshot, + CanActivate, + Router, + RouterStateSnapshot, +} from '@angular/router'; import { AuthService } from './auth.service'; +import { SettingsService } from '@/app/core/settings.service'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/auth/auth.module.ts b/ui/src/app/core/auth/auth.module.ts index 69470a17b..aa8acd713 100644 --- a/ui/src/app/core/auth/auth.module.ts +++ b/ui/src/app/core/auth/auth.module.ts @@ -1,16 +1,14 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { JwtModule } from '@auth0/angular-jwt'; import { TranslateModule } from '@ngx-translate/core'; - -import { environment } from '@/environments/environment'; -import { AuthService } from './auth.service'; -import { AuthGuard } from './auth.guard'; import { AdminGuard } from './admin.guard'; +import { AuthGuard } from './auth.guard'; +import { AuthService } from './auth.service'; +import { environment } from '@/environments/environment'; -// token getter -export const tokenGetter = () => localStorage.getItem(environment.jwt.tokenKey); +const tokenGetter = () => localStorage.getItem(environment.jwt.tokenKey); @NgModule({ imports: [ @@ -35,4 +33,7 @@ export const tokenGetter = () => localStorage.getItem(environment.jwt.tokenKey); ], exports: [], }) -export class AuthModule { } +class AuthModule { } + +// token getter +export { AuthModule, tokenGetter }; diff --git a/ui/src/app/core/auth/auth.service.ts b/ui/src/app/core/auth/auth.service.ts index 56b8c1795..15acf0e95 100644 --- a/ui/src/app/core/auth/auth.service.ts +++ b/ui/src/app/core/auth/auth.service.ts @@ -1,10 +1,9 @@ import { Injectable } from '@angular/core'; import { JwtHelperService } from '@auth0/angular-jwt'; import * as dayjs from 'dayjs'; - -import { environment } from '@/environments/environment'; import { ApiService } from '@/app/core/api.service'; import { SettingsService } from '@/app/core/settings.service'; +import { environment } from '@/environments/environment'; interface UserInterface { username?: string; diff --git a/ui/src/app/core/backup-restore/backup-restore.component.html b/ui/src/app/core/backup-restore/backup-restore.component.html index 4809ef947..54389b513 100644 --- a/ui/src/app/core/backup-restore/backup-restore.component.html +++ b/ui/src/app/core/backup-restore/backup-restore.component.html @@ -1,8 +1,7 @@ - diff --git a/ui/src/app/core/backup-restore/scheduled-backups/scheduled-backups.component.ts b/ui/src/app/core/backup-restore/scheduled-backups/scheduled-backups.component.ts index a220fefac..e09229f87 100644 --- a/ui/src/app/core/backup-restore/scheduled-backups/scheduled-backups.component.ts +++ b/ui/src/app/core/backup-restore/scheduled-backups/scheduled-backups.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; -import { ToastrService } from 'ngx-toastr'; import { saveAs } from 'file-saver'; - +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/core/components/confirm/confirm.component.html b/ui/src/app/core/components/confirm/confirm.component.html index 0a9c12ffe..21e5a8b9f 100644 --- a/ui/src/app/core/components/confirm/confirm.component.html +++ b/ui/src/app/core/components/confirm/confirm.component.html @@ -1,20 +1,25 @@ -