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/scripts/lang-sync.ts b/scripts/lang-sync.ts index 3e1c97a2e..7299bcb8a 100644 --- a/scripts/lang-sync.ts +++ b/scripts/lang-sync.ts @@ -4,8 +4,8 @@ * - 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); 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 79709ae0c..5cb31f77a 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -78,8 +78,10 @@ "codelyzer": "^6.0.2", "eslint": "^8.54.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" } @@ -7403,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", @@ -7498,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", diff --git a/ui/package.json b/ui/package.json index 078cb2354..60c130e2d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -80,8 +80,10 @@ "codelyzer": "^6.0.2", "eslint": "^8.54.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..00c03aee8 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({ diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts index a31da1a25..3dc597fed 100644 --- a/ui/src/app/app.module.ts +++ b/ui/src/app/app.module.ts @@ -1,24 +1,22 @@ +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'; @NgModule({ declarations: [ 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..16290ae04 100644 --- a/ui/src/app/core/accessories/accessories.service.ts +++ b/ui/src/app/core/accessories/accessories.service.ts @@ -1,12 +1,11 @@ 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 { AuthService } from '../auth/auth.service'; +import { IoNamespace, WsService } from '../ws.service'; import { ServiceTypeX } from './accessories.interfaces'; import { InfoModalComponent } from './info-modal/info-modal.component'; 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.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.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.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.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.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.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.ts b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts index fca9bcf1d..1d59eecea 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({ 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.ts b/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.ts index 22d384f7f..8fcb1b948 100644 --- a/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.component.ts +++ b/ui/src/app/core/accessories/types/securitysystem/securitysystem.manage.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 '../../accessories.interfaces'; diff --git a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts b/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts index 58927e963..3a3d7f9bd 100644 --- a/ui/src/app/core/accessories/types/smokesensor/smokesensor.component.ts +++ b/ui/src/app/core/accessories/types/smokesensor/smokesensor.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/speaker/speaker.component.ts b/ui/src/app/core/accessories/types/speaker/speaker.component.ts index 9a3c9742c..c0f789ab1 100644 --- a/ui/src/app/core/accessories/types/speaker/speaker.component.ts +++ b/ui/src/app/core/accessories/types/speaker/speaker.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 { SpeakerManageComponent } from './speaker.manage.component'; @Component({ 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.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.ts b/ui/src/app/core/accessories/types/valve/valve.manage.component.ts index 4109ab76b..26cd76ec3 100644 --- a/ui/src/app/core/accessories/types/valve/valve.manage.component.ts +++ b/ui/src/app/core/accessories/types/valve/valve.manage.component.ts @@ -1,8 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { Subject } from 'rxjs'; import { ServiceTypeX } from '../../accessories.interfaces'; -import { Subject } from 'rxjs'; @Component({ selector: 'app-valve-manage', diff --git a/ui/src/app/core/accessories/types/window/window.component.ts b/ui/src/app/core/accessories/types/window/window.component.ts index 606bb1718..70cf3b300 100644 --- a/ui/src/app/core/accessories/types/window/window.component.ts +++ b/ui/src/app/core/accessories/types/window/window.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 { WindowManageComponent } from './window.manage.component'; @Component({ 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.ts b/ui/src/app/core/accessories/types/windowcovering/windowcovering.component.ts index 73ab97218..53ed63999 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({ 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..16dc7703d 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.ts b/ui/src/app/core/backup-restore/backup-restore.component.ts index f8ea46d33..1d066995a 100644 --- a/ui/src/app/core/backup-restore/backup-restore.component.ts +++ b/ui/src/app/core/backup-restore/backup-restore.component.ts @@ -1,16 +1,20 @@ -import { Component, OnInit, OnDestroy, Input } from '@angular/core'; import { HttpEventType, HttpResponse } from '@angular/common/http'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { Router } from '@angular/router'; import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { saveAs } from 'file-saver'; +import { ToastrService } from 'ngx-toastr'; import { Terminal } from 'xterm'; import { FitAddon } from 'xterm-addon-fit'; -import { ToastrService } from 'ngx-toastr'; - +import { ScheduledBackupsComponent } from './scheduled-backups/scheduled-backups.component'; import { ApiService } from '@/app/core/api.service'; import { WsService } from '@/app/core/ws.service'; -import { ScheduledBackupsComponent } from './scheduled-backups/scheduled-backups.component'; @Component({ selector: 'app-backup-restore', 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/qrcode/qrcode.component.ts b/ui/src/app/core/components/qrcode/qrcode.component.ts index 0a986d6ea..7a213e6ae 100644 --- a/ui/src/app/core/components/qrcode/qrcode.component.ts +++ b/ui/src/app/core/components/qrcode/qrcode.component.ts @@ -1,4 +1,10 @@ -import { Component, ElementRef, Input, OnChanges, ViewChild } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnChanges, + ViewChild, +} from '@angular/core'; import * as QRCode from 'qrcode'; @Component({ diff --git a/ui/src/app/core/components/schema-form/schema-form.component.ts b/ui/src/app/core/components/schema-form/schema-form.component.ts index 9c72731e2..6e1b9c8cb 100644 --- a/ui/src/app/core/components/schema-form/schema-form.component.ts +++ b/ui/src/app/core/components/schema-form/schema-form.component.ts @@ -1,4 +1,9 @@ -import { Component, OnInit, Input, Output } from '@angular/core'; +import { + Component, + Input, + OnInit, + Output, +} from '@angular/core'; import { EventEmitter } from '@angular/core'; @Component({ diff --git a/ui/src/app/core/core.module.ts b/ui/src/app/core/core.module.ts index e0ff1bbca..b413a5668 100644 --- a/ui/src/app/core/core.module.ts +++ b/ui/src/app/core/core.module.ts @@ -1,21 +1,20 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; import { Bootstrap4FrameworkModule } from '@oznu/ngx-bs4-jsonform'; - -import { SpinnerComponent } from './components/spinner/spinner.component'; -import { ConvertTempPipe } from './pipes/convert-temp.pipe'; -import { ReplacePipe } from './pipes/replace.pipe'; -import { ExternalLinkIconPipe } from './pipes/external-link-icon.pipe'; -import { PluginsMarkdownDirective } from './directives/plugins.markdown.directive'; -import { LongClickDirective } from './directives/longclick.directive'; import { BackupRestoreComponent } from './backup-restore/backup-restore.component'; import { ScheduledBackupsComponent } from './backup-restore/scheduled-backups/scheduled-backups.component'; import { ConfirmComponent } from './components/confirm/confirm.component'; -import { SchemaFormComponent } from './components/schema-form/schema-form.component'; import { QrcodeComponent } from './components/qrcode/qrcode.component'; -import { RtlDirective } from './directives/rtl.directive'; +import { SchemaFormComponent } from './components/schema-form/schema-form.component'; +import { SpinnerComponent } from './components/spinner/spinner.component'; import { JsonSchemaFormPatchDirective } from './directives/json-schema-form-patch.directive'; +import { LongClickDirective } from './directives/longclick.directive'; +import { PluginsMarkdownDirective } from './directives/plugins.markdown.directive'; +import { RtlDirective } from './directives/rtl.directive'; +import { ConvertTempPipe } from './pipes/convert-temp.pipe'; +import { ExternalLinkIconPipe } from './pipes/external-link-icon.pipe'; +import { ReplacePipe } from './pipes/replace.pipe'; import { InformationComponent } from '@/app/core/components/information/information.component'; @NgModule({ diff --git a/ui/src/app/core/directives/json-schema-form-patch.directive.ts b/ui/src/app/core/directives/json-schema-form-patch.directive.ts index 26d5c2d69..0274cea67 100644 --- a/ui/src/app/core/directives/json-schema-form-patch.directive.ts +++ b/ui/src/app/core/directives/json-schema-form-patch.directive.ts @@ -1,4 +1,10 @@ -import {Directive, Host, Input, Optional, Self} from '@angular/core'; +import { + Directive, + Host, + Input, + Optional, + Self, +} from '@angular/core'; import {JsonSchemaFormComponent} from '@oznu/ngx-bs4-jsonform'; import {cloneDeep, merge, uniqueId} from 'lodash-es'; diff --git a/ui/src/app/core/directives/longclick.directive.ts b/ui/src/app/core/directives/longclick.directive.ts index cb1f826b2..468521e4e 100644 --- a/ui/src/app/core/directives/longclick.directive.ts +++ b/ui/src/app/core/directives/longclick.directive.ts @@ -1,4 +1,11 @@ -import { OnDestroy, Directive, EventEmitter, HostListener, Input, Output } from '@angular/core'; +import { + Directive, + EventEmitter, + HostListener, + Input, + OnDestroy, + Output, +} from '@angular/core'; @Directive({ selector: '[appLongclick]', diff --git a/ui/src/app/core/directives/rtl.directive.ts b/ui/src/app/core/directives/rtl.directive.ts index 7707817d3..6c79d6b90 100644 --- a/ui/src/app/core/directives/rtl.directive.ts +++ b/ui/src/app/core/directives/rtl.directive.ts @@ -1,4 +1,9 @@ -import { Directive, ElementRef, Input, OnInit } from '@angular/core'; +import { + Directive, + ElementRef, + Input, + OnInit, +} from '@angular/core'; import { SettingsService } from '@/app/core/settings.service'; @Directive({ diff --git a/ui/src/app/core/locales.ts b/ui/src/app/core/locales.ts index 85dba25c4..d3e3dc0a9 100644 --- a/ui/src/app/core/locales.ts +++ b/ui/src/app/core/locales.ts @@ -1,31 +1,30 @@ import { registerLocaleData } from '@angular/common'; - -import localeEn from '@angular/common/locales/en'; +import localeBg from '@angular/common/locales/bg'; +import localeCa from '@angular/common/locales/ca'; +import localeCs from '@angular/common/locales/cs'; import localeDe from '@angular/common/locales/de'; +import localeEn from '@angular/common/locales/en'; +import localeEs from '@angular/common/locales/es'; import localeFr from '@angular/common/locales/fr'; -import localePl from '@angular/common/locales/pl'; -import localeCs from '@angular/common/locales/cs'; -import localeRu from '@angular/common/locales/ru'; -import localeZhCn from '@angular/common/locales/zh-Hans'; -import localeZhTw from '@angular/common/locales/zh-Hant'; +import localeHE from '@angular/common/locales/he'; import localeHu from '@angular/common/locales/hu'; -import localeJa from '@angular/common/locales/ja'; -import localeEs from '@angular/common/locales/es'; -import localeNl from '@angular/common/locales/nl'; -import localeTr from '@angular/common/locales/tr'; -import localeIt from '@angular/common/locales/it'; -import localeBg from '@angular/common/locales/bg'; -import localeSv from '@angular/common/locales/sv'; -import localeNo from '@angular/common/locales/nb'; -import localeSl from '@angular/common/locales/sl'; -import localePt from '@angular/common/locales/pt'; import localeId from '@angular/common/locales/id'; -import localeCa from '@angular/common/locales/ca'; +import localeIt from '@angular/common/locales/it'; +import localeJa from '@angular/common/locales/ja'; import localeKo from '@angular/common/locales/ko'; import localeMk from '@angular/common/locales/mk'; +import localeNo from '@angular/common/locales/nb'; +import localeNl from '@angular/common/locales/nl'; +import localePl from '@angular/common/locales/pl'; +import localePt from '@angular/common/locales/pt'; +import localeRu from '@angular/common/locales/ru'; +import localeSl from '@angular/common/locales/sl'; +import localeSv from '@angular/common/locales/sv'; import localeTh from '@angular/common/locales/th'; +import localeTr from '@angular/common/locales/tr'; import localeUk from '@angular/common/locales/uk'; -import localeHE from '@angular/common/locales/he'; +import localeZhCn from '@angular/common/locales/zh-Hans'; +import localeZhTw from '@angular/common/locales/zh-Hant'; registerLocaleData(localeEn); registerLocaleData(localeDe); diff --git a/ui/src/app/core/log.service.ts b/ui/src/app/core/log.service.ts index 8d2ef4f46..1a697bc5e 100644 --- a/ui/src/app/core/log.service.ts +++ b/ui/src/app/core/log.service.ts @@ -1,11 +1,10 @@ -import { Injectable, ElementRef } from '@angular/core'; -import { Terminal, ITerminalOptions } from 'xterm'; -import { FitAddon } from 'xterm-addon-fit'; -import { WebLinksAddon } from 'xterm-addon-web-links'; +import { ElementRef, Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; - -import { WsService, IoNamespace } from '@/app/core/ws.service'; +import { ITerminalOptions, Terminal } from 'xterm'; +import { FitAddon } from 'xterm-addon-fit'; +import { WebLinksAddon } from 'xterm-addon-web-links'; +import { IoNamespace, WsService } from '@/app/core/ws.service'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/manage-plugins/bridge-plugins-modal/bridge-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/bridge-plugins-modal/bridge-plugins-modal.component.ts index f0b53821b..e781c4b82 100644 --- a/ui/src/app/core/manage-plugins/bridge-plugins-modal/bridge-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/bridge-plugins-modal/bridge-plugins-modal.component.ts @@ -2,10 +2,9 @@ import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { SettingsService } from '@/app/core/settings.service'; import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-bridge-plugins-modal', diff --git a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts index 18ca7c191..dd69c4025 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.component.ts @@ -1,14 +1,20 @@ -import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import { debounceTime, skip } from 'rxjs/operators'; - -import { environment } from '@/environments/environment'; import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; import { NotificationService } from '@/app/core/notification.service'; +import { WsService } from '@/app/core/ws.service'; +import { environment } from '@/environments/environment'; @Component({ selector: 'app-custom-plugins', diff --git a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.module.ts b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.module.ts index ffae1b0c3..c72f1f17d 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.module.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.module.ts @@ -1,18 +1,16 @@ -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 { Bootstrap4FrameworkModule } from '@oznu/ngx-bs4-jsonform'; import { NgxMdModule } from 'ngx-md'; - -import { CoreModule } from '@/app/core/core.module'; -import { CustomPluginsService } from './custom-plugins.service'; - import { CustomPluginsComponent } from './custom-plugins.component'; -import { HomebridgeGoogleSmarthomeComponent } from './homebridge-google-smarthome/homebridge-google-smarthome.component'; +import { CustomPluginsService } from './custom-plugins.service'; import { HomebridgeDeconzComponent } from './homebridge-deconz/homebridge-deconz.component'; +import { HomebridgeGoogleSmarthomeComponent } from './homebridge-google-smarthome/homebridge-google-smarthome.component'; import { HomebridgeHueComponent } from './homebridge-hue/homebridge-hue.component'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.service.ts b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.service.ts index f549ae223..a00c5f00e 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.service.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/custom-plugins.service.ts @@ -1,9 +1,8 @@ import { Injectable } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; - import { ApiService } from '../../api.service'; -import { HomebridgeGoogleSmarthomeComponent } from './homebridge-google-smarthome/homebridge-google-smarthome.component'; import { CustomPluginsComponent } from './custom-plugins.component'; +import { HomebridgeGoogleSmarthomeComponent } from './homebridge-google-smarthome/homebridge-google-smarthome.component'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/manage-plugins/custom-plugins/homebridge-deconz/homebridge-deconz.component.ts b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-deconz/homebridge-deconz.component.ts index 6b052c35d..a7bc4c933 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/homebridge-deconz/homebridge-deconz.component.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-deconz/homebridge-deconz.component.ts @@ -1,8 +1,7 @@ import { Component } from '@angular/core'; 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/manage-plugins/custom-plugins/homebridge-google-smarthome/homebridge-google-smarthome.component.ts b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-google-smarthome/homebridge-google-smarthome.component.ts index a5d0dfa12..8a7b28ff6 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/homebridge-google-smarthome/homebridge-google-smarthome.component.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-google-smarthome/homebridge-google-smarthome.component.ts @@ -1,12 +1,16 @@ -import { Component, OnInit, OnDestroy, Input } from '@angular/core'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; +import { JwtHelperService } from '@auth0/angular-jwt'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; -import { JwtHelperService } from '@auth0/angular-jwt'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { SettingsService } from '@/app/core/settings.service'; import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-homebridge-google-smarthome', diff --git a/ui/src/app/core/manage-plugins/custom-plugins/homebridge-hue/homebridge-hue.component.ts b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-hue/homebridge-hue.component.ts index 800946aba..87be7ccd4 100644 --- a/ui/src/app/core/manage-plugins/custom-plugins/homebridge-hue/homebridge-hue.component.ts +++ b/ui/src/app/core/manage-plugins/custom-plugins/homebridge-hue/homebridge-hue.component.ts @@ -1,8 +1,7 @@ import { Component } from '@angular/core'; 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/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts index bff339ae9..1edce20c7 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.ts @@ -1,15 +1,19 @@ -import { Component, OnInit, Input, OnDestroy } from '@angular/core'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { Terminal } from 'xterm'; import { FitAddon } from 'xterm-addon-fit'; - import { ApiService } from '@/app/core/api.service'; +import { NotificationService } from '@/app/core/notification.service'; import { SettingsService } from '@/app/core/settings.service'; import { WsService } from '@/app/core/ws.service'; -import { NotificationService } from '@/app/core/notification.service'; @Component({ selector: 'app-manage-plugins-modal', diff --git a/ui/src/app/core/manage-plugins/manage-plugins.module.ts b/ui/src/app/core/manage-plugins/manage-plugins.module.ts index 3529e3349..4b304596d 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins.module.ts +++ b/ui/src/app/core/manage-plugins/manage-plugins.module.ts @@ -1,22 +1,21 @@ -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 { MonacoEditorModule } from 'ngx-monaco-editor'; - -import { CoreModule } from '@/app/core/core.module'; +import { BridgePluginsModalComponent } from './bridge-plugins-modal/bridge-plugins-modal.component'; +import { CustomPluginsModule } from './custom-plugins/custom-plugins.module'; import { InterpolateMdPipe } from './interpolate-md.pipe'; -import { ManagePluginsService } from './manage-plugins.service'; -import { SettingsPluginsModalComponent } from './settings-plugins-modal/settings-plugins-modal.component'; import { ManagePluginsModalComponent } from './manage-plugins-modal/manage-plugins-modal.component'; -import { CustomPluginsModule } from './custom-plugins/custom-plugins.module'; -import { UninstallPluginsModalComponent } from './uninstall-plugins-modal/uninstall-plugins-modal.component'; -import { NodeUpdateRequiredModalComponent } from './node-update-required-modal/node-update-required-modal.component'; +import { ManagePluginsService } from './manage-plugins.service'; import { ManualPluginConfigModalComponent } from './manual-plugin-config-modal/manual-plugin-config-modal.component'; +import { NodeUpdateRequiredModalComponent } from './node-update-required-modal/node-update-required-modal.component'; import { SelectPreviousVersionComponent } from './select-previous-version/select-previous-version.component'; -import { BridgePluginsModalComponent } from './bridge-plugins-modal/bridge-plugins-modal.component'; +import { SettingsPluginsModalComponent } from './settings-plugins-modal/settings-plugins-modal.component'; +import { UninstallPluginsModalComponent } from './uninstall-plugins-modal/uninstall-plugins-modal.component'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/core/manage-plugins/manage-plugins.service.ts b/ui/src/app/core/manage-plugins/manage-plugins.service.ts index 84b8939e7..df480c0d8 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins.service.ts +++ b/ui/src/app/core/manage-plugins/manage-plugins.service.ts @@ -1,18 +1,17 @@ import { Injectable } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { gte, minVersion } from 'semver'; import { ToastrService } from 'ngx-toastr'; - -import { SettingsService } from '@/app/core/settings.service'; -import { ApiService } from '@/app/core/api.service'; +import { gte, minVersion } from 'semver'; +import { BridgePluginsModalComponent } from './bridge-plugins-modal/bridge-plugins-modal.component'; import { CustomPluginsService } from './custom-plugins/custom-plugins.service'; import { ManagePluginsModalComponent } from './manage-plugins-modal/manage-plugins-modal.component'; -import { UninstallPluginsModalComponent } from './uninstall-plugins-modal/uninstall-plugins-modal.component'; -import { SettingsPluginsModalComponent } from './settings-plugins-modal/settings-plugins-modal.component'; -import { NodeUpdateRequiredModalComponent } from './node-update-required-modal/node-update-required-modal.component'; import { ManualPluginConfigModalComponent } from './manual-plugin-config-modal/manual-plugin-config-modal.component'; +import { NodeUpdateRequiredModalComponent } from './node-update-required-modal/node-update-required-modal.component'; import { SelectPreviousVersionComponent } from './select-previous-version/select-previous-version.component'; -import { BridgePluginsModalComponent } from './bridge-plugins-modal/bridge-plugins-modal.component'; +import { SettingsPluginsModalComponent } from './settings-plugins-modal/settings-plugins-modal.component'; +import { UninstallPluginsModalComponent } from './uninstall-plugins-modal/uninstall-plugins-modal.component'; +import { ApiService } from '@/app/core/api.service'; +import { SettingsService } from '@/app/core/settings.service'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/manage-plugins/manual-plugin-config-modal/manual-plugin-config-modal.component.ts b/ui/src/app/core/manage-plugins/manual-plugin-config-modal/manual-plugin-config-modal.component.ts index 1414cc432..488f27e43 100644 --- a/ui/src/app/core/manage-plugins/manual-plugin-config-modal/manual-plugin-config-modal.component.ts +++ b/ui/src/app/core/manage-plugins/manual-plugin-config-modal/manual-plugin-config-modal.component.ts @@ -2,13 +2,12 @@ import { Component, Input, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; -import { ToastrService } from 'ngx-toastr'; import * as JSON5 from 'json5'; - +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; -import { SettingsService } from '@/app/core/settings.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-manual-plugin-config-modal', diff --git a/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.ts b/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.ts index 197615962..bc91c0eda 100644 --- a/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.ts +++ b/ui/src/app/core/manage-plugins/node-update-required-modal/node-update-required-modal.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { minVersion, SemVer } from 'semver'; - +import { SemVer, minVersion } from 'semver'; import { SettingsService } from '@/app/core/settings.service'; @Component({ diff --git a/ui/src/app/core/manage-plugins/select-previous-version/select-previous-version.component.ts b/ui/src/app/core/manage-plugins/select-previous-version/select-previous-version.component.ts index 4d2655f04..8380491bf 100644 --- a/ui/src/app/core/manage-plugins/select-previous-version/select-previous-version.component.ts +++ b/ui/src/app/core/manage-plugins/select-previous-version/select-previous-version.component.ts @@ -1,9 +1,8 @@ import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-select-previous-version', diff --git a/ui/src/app/core/manage-plugins/settings-plugins-modal/settings-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/settings-plugins-modal/settings-plugins-modal.component.ts index 4e9fe81d1..182710103 100644 --- a/ui/src/app/core/manage-plugins/settings-plugins-modal/settings-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/settings-plugins-modal/settings-plugins-modal.component.ts @@ -1,12 +1,11 @@ -import { Component, OnInit, Input } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { v4 as uuid } from 'uuid'; - import { ApiService } from '@/app/core/api.service'; -import { SettingsService } from '@/app/core/settings.service'; import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; export interface PluginConfigBlock { config: Record; diff --git a/ui/src/app/core/manage-plugins/uninstall-plugins-modal/uninstall-plugins-modal.component.ts b/ui/src/app/core/manage-plugins/uninstall-plugins-modal/uninstall-plugins-modal.component.ts index 2b6dde754..4fc6d7305 100644 --- a/ui/src/app/core/manage-plugins/uninstall-plugins-modal/uninstall-plugins-modal.component.ts +++ b/ui/src/app/core/manage-plugins/uninstall-plugins-modal/uninstall-plugins-modal.component.ts @@ -1,8 +1,7 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; import { ManagePluginsModalComponent } from '@/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component'; diff --git a/ui/src/app/core/mobile-detect.service.ts b/ui/src/app/core/mobile-detect.service.ts index ba6871db6..fcfae9299 100644 --- a/ui/src/app/core/mobile-detect.service.ts +++ b/ui/src/app/core/mobile-detect.service.ts @@ -1,5 +1,4 @@ import { Injectable } from '@angular/core'; - import * as MobileDetect from 'mobile-detect'; const preventDefault = (e) => { diff --git a/ui/src/app/core/pipes/convert-temp.pipe.ts b/ui/src/app/core/pipes/convert-temp.pipe.ts index e85b73f8b..e0f00a9c1 100644 --- a/ui/src/app/core/pipes/convert-temp.pipe.ts +++ b/ui/src/app/core/pipes/convert-temp.pipe.ts @@ -1,5 +1,4 @@ import { Pipe, PipeTransform } from '@angular/core'; - import { SettingsService } from '@/app/core/settings.service'; @Pipe({ name: 'convertTemp' }) diff --git a/ui/src/app/core/settings.service.ts b/ui/src/app/core/settings.service.ts index b2d847745..e2c446d4d 100644 --- a/ui/src/app/core/settings.service.ts +++ b/ui/src/app/core/settings.service.ts @@ -1,11 +1,10 @@ import { Injectable } from '@angular/core'; import { Title } from '@angular/platform-browser'; -import { ToastrService } from 'ngx-toastr'; import { TranslateService } from '@ngx-translate/core'; +import * as dayjs from 'dayjs'; +import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import { first } from 'rxjs/operators'; -import * as dayjs from 'dayjs'; - import { ApiService } from '@/app/core/api.service'; interface EnvInterface { diff --git a/ui/src/app/core/terminal.service.ts b/ui/src/app/core/terminal.service.ts index 763a1728f..0c4fd7c69 100644 --- a/ui/src/app/core/terminal.service.ts +++ b/ui/src/app/core/terminal.service.ts @@ -1,11 +1,10 @@ -import { Injectable, ElementRef } from '@angular/core'; -import { Terminal, ITerminalOptions } from 'xterm'; -import { FitAddon } from 'xterm-addon-fit'; -import { WebLinksAddon } from 'xterm-addon-web-links'; +import { ElementRef, Injectable } from '@angular/core'; import { Subject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; - -import { WsService, IoNamespace } from '@/app/core/ws.service'; +import { ITerminalOptions, Terminal } from 'xterm'; +import { FitAddon } from 'xterm-addon-fit'; +import { WebLinksAddon } from 'xterm-addon-web-links'; +import { IoNamespace, WsService } from '@/app/core/ws.service'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/core/ws.service.ts b/ui/src/app/core/ws.service.ts index cafa8d93d..c0d260727 100644 --- a/ui/src/app/core/ws.service.ts +++ b/ui/src/app/core/ws.service.ts @@ -2,9 +2,8 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { Subject } from 'rxjs'; import { connect } from 'socket.io-client'; - -import { environment } from '@/environments/environment'; import { AuthService } from '@/app/core/auth/auth.service'; +import { environment } from '@/environments/environment'; export interface IoNamespace { connected?: Subject; diff --git a/ui/src/app/modules/accessories/accessories-routing.module.ts b/ui/src/app/modules/accessories/accessories-routing.module.ts index 516077f1d..303e27644 100644 --- a/ui/src/app/modules/accessories/accessories-routing.module.ts +++ b/ui/src/app/modules/accessories/accessories-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { AccessoriesComponent } from './accessories.component'; const routes: Routes = [ diff --git a/ui/src/app/modules/accessories/accessories.component.ts b/ui/src/app/modules/accessories/accessories.component.ts index 3d5d83dab..439c33103 100644 --- a/ui/src/app/modules/accessories/accessories.component.ts +++ b/ui/src/app/modules/accessories/accessories.component.ts @@ -1,14 +1,13 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ToastrService } from 'ngx-toastr'; -import { TranslateService } from '@ngx-translate/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { DragulaService } from 'ng2-dragula'; +import { ToastrService } from 'ngx-toastr'; import { Subscription } from 'rxjs'; - -import { SettingsService } from '@/app/core/settings.service'; +import { AddRoomModalComponent } from './add-room-modal/add-room-modal.component'; import { AccessoriesService } from '@/app/core/accessories/accessories.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; -import { AddRoomModalComponent } from './add-room-modal/add-room-modal.component'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-accessories', diff --git a/ui/src/app/modules/accessories/accessories.module.ts b/ui/src/app/modules/accessories/accessories.module.ts index 89395f5c3..d1ff9605f 100644 --- a/ui/src/app/modules/accessories/accessories.module.ts +++ b/ui/src/app/modules/accessories/accessories.module.ts @@ -1,18 +1,15 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; - -import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; import { DragulaModule } from 'ng2-dragula'; - -import { CoreModule } from '@/app/core/core.module'; -import { AccessoriesCoreModule } from '@/app/core/accessories/accessories.module'; import { AccessoriesRoutingModule } from './accessories-routing.module'; -import { DragHerePlaceholderComponent } from './drag-here-placeholder/drag-here-placeholder.component'; -import { AddRoomModalComponent } from './add-room-modal/add-room-modal.component'; - import { AccessoriesComponent } from './accessories.component'; +import { AddRoomModalComponent } from './add-room-modal/add-room-modal.component'; +import { DragHerePlaceholderComponent } from './drag-here-placeholder/drag-here-placeholder.component'; +import { AccessoriesCoreModule } from '@/app/core/accessories/accessories.module'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/accessories/add-room-modal/add-room-modal.component.ts b/ui/src/app/modules/accessories/add-room-modal/add-room-modal.component.ts index 76146a102..a9bb21ba7 100644 --- a/ui/src/app/modules/accessories/add-room-modal/add-room-modal.component.ts +++ b/ui/src/app/modules/accessories/add-room-modal/add-room-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'; @Component({ diff --git a/ui/src/app/modules/config-editor/config-editor-routing.module.ts b/ui/src/app/modules/config-editor/config-editor-routing.module.ts index 6a8bc4e1f..11129b987 100644 --- a/ui/src/app/modules/config-editor/config-editor-routing.module.ts +++ b/ui/src/app/modules/config-editor/config-editor-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { ConfigEditorComponent } from './config-editor.component'; import { ConfigEditorResolver } from './config-editor.resolver'; diff --git a/ui/src/app/modules/config-editor/config-editor.component.ts b/ui/src/app/modules/config-editor/config-editor.component.ts index 8a5f061f5..147f535db 100644 --- a/ui/src/app/modules/config-editor/config-editor.component.ts +++ b/ui/src/app/modules/config-editor/config-editor.component.ts @@ -1,17 +1,16 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrService } from 'ngx-toastr'; -import { NgxEditorModel } from 'ngx-monaco-editor'; +import { TranslateService } from '@ngx-translate/core'; import * as JSON5 from 'json5'; - +import { NgxEditorModel } from 'ngx-monaco-editor'; +import { ToastrService } from 'ngx-toastr'; +import { ConfigRestoreBackupComponent } from './config-restore-backup/config.restore-backup.component'; import { ApiService } from '@/app/core/api.service'; -import { SettingsService } from '@/app/core/settings.service'; -import { NotificationService } from '@/app/core/notification.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; import { MonacoEditorService } from '@/app/core/monaco-editor.service'; -import { ConfigRestoreBackupComponent } from './config-restore-backup/config.restore-backup.component'; +import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-config', diff --git a/ui/src/app/modules/config-editor/config-editor.module.ts b/ui/src/app/modules/config-editor/config-editor.module.ts index c2bf0dfe6..6497841f3 100644 --- a/ui/src/app/modules/config-editor/config-editor.module.ts +++ b/ui/src/app/modules/config-editor/config-editor.module.ts @@ -1,14 +1,13 @@ -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 { MonacoEditorModule } from 'ngx-monaco-editor'; - import { ConfigEditorRoutingModule } from './config-editor-routing.module'; -import { ConfigRestoreBackupComponent } from './config-restore-backup/config.restore-backup.component'; import { ConfigEditorComponent } from './config-editor.component'; import { ConfigEditorResolver } from './config-editor.resolver'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { ConfigRestoreBackupComponent } from './config-restore-backup/config.restore-backup.component'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/config-editor/config-editor.resolver.ts b/ui/src/app/modules/config-editor/config-editor.resolver.ts index 17b125d33..e4470d485 100644 --- a/ui/src/app/modules/config-editor/config-editor.resolver.ts +++ b/ui/src/app/modules/config-editor/config-editor.resolver.ts @@ -1,7 +1,11 @@ import { Injectable } from '@angular/core'; -import { Resolve, RouterStateSnapshot, ActivatedRouteSnapshot, Router } from '@angular/router'; +import { + ActivatedRouteSnapshot, + Resolve, + Router, + RouterStateSnapshot, +} from '@angular/router'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; @Injectable() diff --git a/ui/src/app/modules/config-editor/config-restore-backup/config.restore-backup.component.ts b/ui/src/app/modules/config-editor/config-restore-backup/config.restore-backup.component.ts index 407ab19ef..b18409fac 100644 --- a/ui/src/app/modules/config-editor/config-restore-backup/config.restore-backup.component.ts +++ b/ui/src/app/modules/config-editor/config-restore-backup/config.restore-backup.component.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/login/login.component.ts b/ui/src/app/modules/login/login.component.ts index 70c869033..a214fe603 100644 --- a/ui/src/app/modules/login/login.component.ts +++ b/ui/src/app/modules/login/login.component.ts @@ -1,11 +1,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { Validators, FormGroup, FormControl } from '@angular/forms'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; import { debounceTime } from 'rxjs/operators'; - -import { environment } from '@/environments/environment'; -import { SettingsService } from '@/app/core/settings.service'; import { AuthService } from '@/app/core/auth/auth.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { environment } from '@/environments/environment'; @Component({ selector: 'app-login', diff --git a/ui/src/app/modules/login/login.guard.ts b/ui/src/app/modules/login/login.guard.ts index 2bfd48161..2d3a1fbe1 100644 --- a/ui/src/app/modules/login/login.guard.ts +++ b/ui/src/app/modules/login/login.guard.ts @@ -1,6 +1,10 @@ import { Injectable } from '@angular/core'; -import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; - +import { + ActivatedRouteSnapshot, + CanActivate, + Router, + RouterStateSnapshot, +} from '@angular/router'; import { AuthService } from '@/app/core/auth/auth.service'; import { SettingsService } from '@/app/core/settings.service'; diff --git a/ui/src/app/modules/login/login.module.ts b/ui/src/app/modules/login/login.module.ts index 38f58aece..9458b52f9 100644 --- a/ui/src/app/modules/login/login.module.ts +++ b/ui/src/app/modules/login/login.module.ts @@ -1,8 +1,7 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { TranslateModule } from '@ngx-translate/core'; - import { LoginComponent } from './login.component'; import { LoginGuard } from './login.guard'; diff --git a/ui/src/app/modules/logs/logs-routing.module.ts b/ui/src/app/modules/logs/logs-routing.module.ts index f4b5320b9..dfa38a5a5 100644 --- a/ui/src/app/modules/logs/logs-routing.module.ts +++ b/ui/src/app/modules/logs/logs-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { LogsComponent } from './logs.component'; const routes: Routes = [ diff --git a/ui/src/app/modules/logs/logs.component.ts b/ui/src/app/modules/logs/logs.component.ts index b8341b35c..ff750cc8e 100644 --- a/ui/src/app/modules/logs/logs.component.ts +++ b/ui/src/app/modules/logs/logs.component.ts @@ -1,15 +1,21 @@ -import { Component, OnInit, HostListener, OnDestroy, ViewChild, ElementRef } from '@angular/core'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { TranslateService } from '@ngx-translate/core'; +import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; +import { + Component, + ElementRef, + HostListener, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { Subject } from 'rxjs'; +import { TranslateService } from '@ngx-translate/core'; import { saveAs } from 'file-saver'; import { ToastrService } from 'ngx-toastr'; - -import { SettingsService } from '@/app/core/settings.service'; +import { Subject } from 'rxjs'; import { ApiService } from '@/app/core/api.service'; -import { LogService } from '@/app/core/log.service'; import { ConfirmComponent } from '@/app/core/components/confirm/confirm.component'; +import { LogService } from '@/app/core/log.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-logs', diff --git a/ui/src/app/modules/logs/logs.module.ts b/ui/src/app/modules/logs/logs.module.ts index 117d93731..f69ed5395 100644 --- a/ui/src/app/modules/logs/logs.module.ts +++ b/ui/src/app/modules/logs/logs.module.ts @@ -1,7 +1,6 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - import { LogsRoutingModule } from './logs-routing.module'; import { LogsComponent } from './logs.component'; diff --git a/ui/src/app/modules/platform-tools/docker/container-restart/container-restart.component.ts b/ui/src/app/modules/platform-tools/docker/container-restart/container-restart.component.ts index 090a6a4cc..5da2a80fc 100644 --- a/ui/src/app/modules/platform-tools/docker/container-restart/container-restart.component.ts +++ b/ui/src/app/modules/platform-tools/docker/container-restart/container-restart.component.ts @@ -1,11 +1,10 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-container-restart', diff --git a/ui/src/app/modules/platform-tools/docker/docker-routing.module.ts b/ui/src/app/modules/platform-tools/docker/docker-routing.module.ts index ec44b7a82..5a159a01b 100644 --- a/ui/src/app/modules/platform-tools/docker/docker-routing.module.ts +++ b/ui/src/app/modules/platform-tools/docker/docker-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { StartupScriptComponent } from './startup-script/startup-script.component'; +import { RouterModule, Routes } from '@angular/router'; import { ContainerRestartComponent } from './container-restart/container-restart.component'; +import { StartupScriptComponent } from './startup-script/startup-script.component'; import { StartupScriptResolver } from './startup-script/startup-script.resolver'; const routes: Routes = [ diff --git a/ui/src/app/modules/platform-tools/docker/docker.module.ts b/ui/src/app/modules/platform-tools/docker/docker.module.ts index 83a56ec0e..7d55493e5 100644 --- a/ui/src/app/modules/platform-tools/docker/docker.module.ts +++ b/ui/src/app/modules/platform-tools/docker/docker.module.ts @@ -1,15 +1,14 @@ -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 { MonacoEditorModule } from 'ngx-monaco-editor'; - -import { CoreModule } from '@/app/core/core.module'; +import { ContainerRestartComponent } from './container-restart/container-restart.component'; import { DockerRoutingModule } from './docker-routing.module'; import { StartupScriptComponent } from './startup-script/startup-script.component'; -import { ContainerRestartComponent } from './container-restart/container-restart.component'; import { StartupScriptResolver } from './startup-script/startup-script.resolver'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.component.ts b/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.component.ts index dc33827e2..09667d443 100644 --- a/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.component.ts +++ b/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.component.ts @@ -1,13 +1,12 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; -import { ToastrService } from 'ngx-toastr'; import { NgxEditorModel } from 'ngx-monaco-editor'; - -import { SettingsService } from '@/app/core/settings.service'; +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; import { MonacoEditorService } from '@/app/core/monaco-editor.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-startup-script', diff --git a/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.resolver.ts b/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.resolver.ts index 96b2b7077..af1f055f4 100644 --- a/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.resolver.ts +++ b/ui/src/app/modules/platform-tools/docker/startup-script/startup-script.resolver.ts @@ -1,7 +1,11 @@ import { Injectable } from '@angular/core'; -import { Resolve, RouterStateSnapshot, ActivatedRouteSnapshot, Router } from '@angular/router'; +import { + ActivatedRouteSnapshot, + Resolve, + Router, + RouterStateSnapshot, +} from '@angular/router'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; @Injectable() diff --git a/ui/src/app/modules/platform-tools/linux/linux-routing.module.ts b/ui/src/app/modules/platform-tools/linux/linux-routing.module.ts index ba77a1c2b..b7936f1f9 100644 --- a/ui/src/app/modules/platform-tools/linux/linux-routing.module.ts +++ b/ui/src/app/modules/platform-tools/linux/linux-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { LinuxComponent } from './linux.component'; import { RestartLinuxComponent } from './restart-linux/restart-linux.component'; import { ShutdownLinuxComponent } from './shutdown-linux/shutdown-linux.component'; diff --git a/ui/src/app/modules/platform-tools/linux/linux.module.ts b/ui/src/app/modules/platform-tools/linux/linux.module.ts index 4827c7687..7474afee2 100644 --- a/ui/src/app/modules/platform-tools/linux/linux.module.ts +++ b/ui/src/app/modules/platform-tools/linux/linux.module.ts @@ -1,7 +1,6 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; - import { CoreModule } from '../../../../app/core/core.module'; import { LinuxRoutingModule } from './linux-routing.module'; import { LinuxComponent } from './linux.component'; diff --git a/ui/src/app/modules/platform-tools/linux/restart-linux/restart-linux.component.ts b/ui/src/app/modules/platform-tools/linux/restart-linux/restart-linux.component.ts index 7bdadfa9a..2e2f265c9 100644 --- a/ui/src/app/modules/platform-tools/linux/restart-linux/restart-linux.component.ts +++ b/ui/src/app/modules/platform-tools/linux/restart-linux/restart-linux.component.ts @@ -1,11 +1,10 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-restart-linux', diff --git a/ui/src/app/modules/platform-tools/linux/shutdown-linux/shutdown-linux.component.ts b/ui/src/app/modules/platform-tools/linux/shutdown-linux/shutdown-linux.component.ts index 4fb6938de..37c454874 100644 --- a/ui/src/app/modules/platform-tools/linux/shutdown-linux/shutdown-linux.component.ts +++ b/ui/src/app/modules/platform-tools/linux/shutdown-linux/shutdown-linux.component.ts @@ -1,11 +1,10 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-shutdown-linux', diff --git a/ui/src/app/modules/platform-tools/platform-tools-routing.module.ts b/ui/src/app/modules/platform-tools/platform-tools-routing.module.ts index ca630aeab..1cd085b5f 100644 --- a/ui/src/app/modules/platform-tools/platform-tools-routing.module.ts +++ b/ui/src/app/modules/platform-tools/platform-tools-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { diff --git a/ui/src/app/modules/platform-tools/platform-tools.module.ts b/ui/src/app/modules/platform-tools/platform-tools.module.ts index 57d8b29a8..3e4877f79 100644 --- a/ui/src/app/modules/platform-tools/platform-tools.module.ts +++ b/ui/src/app/modules/platform-tools/platform-tools.module.ts @@ -1,6 +1,5 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; - +import { NgModule } from '@angular/core'; import { PlatformToolsRoutingModule } from './platform-tools-routing.module'; @NgModule({ diff --git a/ui/src/app/modules/platform-tools/terminal/terminal-routing.module.ts b/ui/src/app/modules/platform-tools/terminal/terminal-routing.module.ts index 0f67a8f9c..bfe75a2d4 100644 --- a/ui/src/app/modules/platform-tools/terminal/terminal-routing.module.ts +++ b/ui/src/app/modules/platform-tools/terminal/terminal-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { TerminalComponent } from './terminal.component'; const routes: Routes = [ diff --git a/ui/src/app/modules/platform-tools/terminal/terminal.component.ts b/ui/src/app/modules/platform-tools/terminal/terminal.component.ts index e4e932f0d..2f4de24ce 100644 --- a/ui/src/app/modules/platform-tools/terminal/terminal.component.ts +++ b/ui/src/app/modules/platform-tools/terminal/terminal.component.ts @@ -1,6 +1,12 @@ -import { Component, OnInit, HostListener, OnDestroy, ViewChild, ElementRef } from '@angular/core'; +import { + Component, + ElementRef, + HostListener, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { Subject } from 'rxjs'; - import { TerminalService } from '@/app/core/terminal.service'; @Component({ diff --git a/ui/src/app/modules/platform-tools/terminal/terminal.module.ts b/ui/src/app/modules/platform-tools/terminal/terminal.module.ts index b7028721b..62da9654e 100644 --- a/ui/src/app/modules/platform-tools/terminal/terminal.module.ts +++ b/ui/src/app/modules/platform-tools/terminal/terminal.module.ts @@ -1,6 +1,5 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; - +import { NgModule } from '@angular/core'; import { TerminalRoutingModule } from './terminal-routing.module'; import { TerminalComponent } from './terminal.component'; diff --git a/ui/src/app/modules/plugins/donate-modal/donate-modal.component.ts b/ui/src/app/modules/plugins/donate-modal/donate-modal.component.ts index 9c167959e..1482761b8 100644 --- a/ui/src/app/modules/plugins/donate-modal/donate-modal.component.ts +++ b/ui/src/app/modules/plugins/donate-modal/donate-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'; @Component({ diff --git a/ui/src/app/modules/plugins/plugin-card/plugin-card.component.ts b/ui/src/app/modules/plugins/plugin-card/plugin-card.component.ts index 4d665d022..fa2607fa9 100644 --- a/ui/src/app/modules/plugins/plugin-card/plugin-card.component.ts +++ b/ui/src/app/modules/plugins/plugin-card/plugin-card.component.ts @@ -3,16 +3,15 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { gt } from 'semver'; - -import { SettingsService } from '@/app/core/settings.service'; import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; -import { NotificationService } from '@/app/core/notification.service'; +import { ConfirmComponent } from '@/app/core/components/confirm/confirm.component'; +import { InformationComponent } from '@/app/core/components/information/information.component'; import { ManagePluginsService } from '@/app/core/manage-plugins/manage-plugins.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; -import { ConfirmComponent } from '@/app/core/components/confirm/confirm.component'; +import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; import { DonateModalComponent } from '@/app/modules/plugins/donate-modal/donate-modal.component'; -import { InformationComponent } from '@/app/core/components/information/information.component'; @Component({ selector: 'app-plugin-card', diff --git a/ui/src/app/modules/plugins/plugins-routing.module.ts b/ui/src/app/modules/plugins/plugins-routing.module.ts index e03aac34f..ccf2733a4 100644 --- a/ui/src/app/modules/plugins/plugins-routing.module.ts +++ b/ui/src/app/modules/plugins/plugins-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { PluginsComponent } from './plugins.component'; const routes: Routes = [ diff --git a/ui/src/app/modules/plugins/plugins.component.ts b/ui/src/app/modules/plugins/plugins.component.ts index 3da041589..eeefed26a 100644 --- a/ui/src/app/modules/plugins/plugins.component.ts +++ b/ui/src/app/modules/plugins/plugins.component.ts @@ -1,15 +1,14 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { take } from 'rxjs/operators'; import { gt } from 'semver'; - -import { SettingsService } from '@/app/core/settings.service'; import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; import { ManagePluginsService } from '@/app/core/manage-plugins/manage-plugins.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-plugins', diff --git a/ui/src/app/modules/plugins/plugins.module.ts b/ui/src/app/modules/plugins/plugins.module.ts index 892f4523e..f836f67f4 100644 --- a/ui/src/app/modules/plugins/plugins.module.ts +++ b/ui/src/app/modules/plugins/plugins.module.ts @@ -1,15 +1,14 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - -import { CoreModule } from '@/app/core/core.module'; -import { ManagePluginsModule } from '@/app/core/manage-plugins/manage-plugins.module'; -import { PluginsRoutingModule } from './plugins-routing.module'; -import { PluginsComponent } from './plugins.component'; +import { TranslateModule } from '@ngx-translate/core'; import { DonateModalComponent } from './donate-modal/donate-modal.component'; import { PluginCardComponent } from './plugin-card/plugin-card.component'; +import { PluginsRoutingModule } from './plugins-routing.module'; +import { PluginsComponent } from './plugins.component'; +import { CoreModule } from '@/app/core/core.module'; +import { ManagePluginsModule } from '@/app/core/manage-plugins/manage-plugins.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/restart/restart.component.ts b/ui/src/app/modules/restart/restart.component.ts index fab3f0831..829478c75 100644 --- a/ui/src/app/modules/restart/restart.component.ts +++ b/ui/src/app/modules/restart/restart.component.ts @@ -1,12 +1,11 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; -import { WsService } from '@/app/core/ws.service'; -import { SettingsService } from '@/app/core/settings.service'; import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-restart', diff --git a/ui/src/app/modules/restart/restart.module.ts b/ui/src/app/modules/restart/restart.module.ts index 0dd56a29e..deb269b21 100644 --- a/ui/src/app/modules/restart/restart.module.ts +++ b/ui/src/app/modules/restart/restart.module.ts @@ -1,9 +1,8 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; - -import { CoreModule } from '@/app/core/core.module'; import { RestartComponent } from './restart.component'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/settings/remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component.ts b/ui/src/app/modules/settings/remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component.ts index 8e138cb1d..86cc21504 100644 --- a/ui/src/app/modules/settings/remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component.ts +++ b/ui/src/app/modules/settings/remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrService } from 'ngx-toastr'; import { TranslateService } from '@ngx-translate/core'; +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/settings/reset-homebridge-modal/reset-homebridge-modal.component.ts b/ui/src/app/modules/settings/reset-homebridge-modal/reset-homebridge-modal.component.ts index ebc3114e3..3e7962f99 100644 --- a/ui/src/app/modules/settings/reset-homebridge-modal/reset-homebridge-modal.component.ts +++ b/ui/src/app/modules/settings/reset-homebridge-modal/reset-homebridge-modal.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { Router } from '@angular/router'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; diff --git a/ui/src/app/modules/settings/settings-routing.module.ts b/ui/src/app/modules/settings/settings-routing.module.ts index 832929181..0a3c4e9a6 100644 --- a/ui/src/app/modules/settings/settings-routing.module.ts +++ b/ui/src/app/modules/settings/settings-routing.module.ts @@ -1,8 +1,7 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { AdminGuard } from '@/app/core/auth/admin.guard'; +import { RouterModule, Routes } from '@angular/router'; import { SettingsComponent } from './settings.component'; +import { AdminGuard } from '@/app/core/auth/admin.guard'; const routes: Routes = [ { diff --git a/ui/src/app/modules/settings/settings.component.ts b/ui/src/app/modules/settings/settings.component.ts index f89ccb240..f7d3de0be 100644 --- a/ui/src/app/modules/settings/settings.component.ts +++ b/ui/src/app/modules/settings/settings.component.ts @@ -1,25 +1,26 @@ import { Component, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormControl, FormGroup, FormControl } from '@angular/forms'; -import { ToastrService } from 'ngx-toastr'; +import { + FormControl, + FormGroup, + UntypedFormBuilder, + UntypedFormControl, +} from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; +import { ToastrService } from 'ngx-toastr'; import { debounceTime } from 'rxjs/operators'; import * as semver from 'semver'; - -import { SettingsService } from '@/app/core/settings.service'; -import { ApiService } from '@/app/core/api.service'; -import { NotificationService } from '@/app/core/notification.service'; - -import { - RemoveAllCachedAccessoriesModalComponent, -} from './remove-all-cached-accessories-modal/remove-all-cached-accessories-modal.component'; +// eslint-disable-next-line max-len +import { RemoveAllCachedAccessoriesModalComponent } from './remove-all-cached-accessories-modal/remove-all-cached-accessories-modal.component'; +// eslint-disable-next-line max-len +import { RemoveSingleCachedAccessoryModalComponent } from './remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component'; import { ResetHomebridgeModalComponent } from './reset-homebridge-modal/reset-homebridge-modal.component'; -import { - RemoveSingleCachedAccessoryModalComponent, -} from './remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component'; -import { UnpairAccessoryModalComponent } from './unpair-accessory-modal/unpair-accessory-modal.component'; import { SelectNetworkInterfacesComponent } from './select-network-interfaces/select-network-interfaces.component'; +import { UnpairAccessoryModalComponent } from './unpair-accessory-modal/unpair-accessory-modal.component'; +import { ApiService } from '@/app/core/api.service'; +import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; @Component({ selector: 'app-settings', diff --git a/ui/src/app/modules/settings/settings.module.ts b/ui/src/app/modules/settings/settings.module.ts index c9e913611..d74c0be2c 100644 --- a/ui/src/app/modules/settings/settings.module.ts +++ b/ui/src/app/modules/settings/settings.module.ts @@ -1,20 +1,17 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - +import { TranslateModule } from '@ngx-translate/core'; +// eslint-disable-next-line max-len +import { RemoveAllCachedAccessoriesModalComponent } from './remove-all-cached-accessories-modal/remove-all-cached-accessories-modal.component'; +// eslint-disable-next-line max-len +import { RemoveSingleCachedAccessoryModalComponent } from './remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component'; +import { ResetHomebridgeModalComponent } from './reset-homebridge-modal/reset-homebridge-modal.component'; +import { SelectNetworkInterfacesComponent } from './select-network-interfaces/select-network-interfaces.component'; import { SettingsRoutingModule } from './settings-routing.module'; import { SettingsComponent } from './settings.component'; -import { ResetHomebridgeModalComponent } from './reset-homebridge-modal/reset-homebridge-modal.component'; import { UnpairAccessoryModalComponent } from './unpair-accessory-modal/unpair-accessory-modal.component'; -import { - RemoveAllCachedAccessoriesModalComponent, -} from './remove-all-cached-accessories-modal/remove-all-cached-accessories-modal.component'; -import { - RemoveSingleCachedAccessoryModalComponent, -} from './remove-single-cached-accessory-modal/remove-single-cached-accessory-modal.component'; -import { SelectNetworkInterfacesComponent } from './select-network-interfaces/select-network-interfaces.component'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/settings/unpair-accessory-modal/unpair-accessory-modal.component.ts b/ui/src/app/modules/settings/unpair-accessory-modal/unpair-accessory-modal.component.ts index 9b4178102..b63128f95 100644 --- a/ui/src/app/modules/settings/unpair-accessory-modal/unpair-accessory-modal.component.ts +++ b/ui/src/app/modules/settings/unpair-accessory-modal/unpair-accessory-modal.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrService } from 'ngx-toastr'; import { TranslateService } from '@ngx-translate/core'; +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/setup-wizard/setup-wizard-routing.module.ts b/ui/src/app/modules/setup-wizard/setup-wizard-routing.module.ts index a4f8e3e18..4ff2bfd6f 100644 --- a/ui/src/app/modules/setup-wizard/setup-wizard-routing.module.ts +++ b/ui/src/app/modules/setup-wizard/setup-wizard-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; - import { SetupWizardComponent } from './setup-wizard.component'; const routes: Routes = [ diff --git a/ui/src/app/modules/setup-wizard/setup-wizard.component.ts b/ui/src/app/modules/setup-wizard/setup-wizard.component.ts index b34829a32..5f274e9d3 100644 --- a/ui/src/app/modules/setup-wizard/setup-wizard.component.ts +++ b/ui/src/app/modules/setup-wizard/setup-wizard.component.ts @@ -1,16 +1,20 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AbstractControl, FormControl, FormGroup, Validators } from '@angular/forms'; -import { Router } from '@angular/router'; +import { + AbstractControl, + FormControl, + FormGroup, + Validators, +} from '@angular/forms'; import { Title } from '@angular/platform-browser'; +import { Router } from '@angular/router'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - -import { environment } from '@/environments/environment'; import { ApiService } from '@/app/core/api.service'; import { AuthService } from '@/app/core/auth/auth.service'; -import { SettingsService } from '@/app/core/settings.service'; import { BackupRestoreComponent } from '@/app/core/backup-restore/backup-restore.component'; +import { SettingsService } from '@/app/core/settings.service'; +import { environment } from '@/environments/environment'; @Component({ selector: 'app-setup-wizard', diff --git a/ui/src/app/modules/setup-wizard/setup-wizard.guard.ts b/ui/src/app/modules/setup-wizard/setup-wizard.guard.ts index db2490ae1..9abb824c0 100644 --- a/ui/src/app/modules/setup-wizard/setup-wizard.guard.ts +++ b/ui/src/app/modules/setup-wizard/setup-wizard.guard.ts @@ -1,6 +1,11 @@ -import { SettingsService } from '@/app/core/settings.service'; import { Injectable } from '@angular/core'; -import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; +import { + ActivatedRouteSnapshot, + CanActivate, + Router, + RouterStateSnapshot, +} from '@angular/router'; +import { SettingsService } from '@/app/core/settings.service'; @Injectable({ providedIn: 'root', diff --git a/ui/src/app/modules/setup-wizard/setup-wizard.module.ts b/ui/src/app/modules/setup-wizard/setup-wizard.module.ts index 54b7f37f6..0a0e40a97 100644 --- a/ui/src/app/modules/setup-wizard/setup-wizard.module.ts +++ b/ui/src/app/modules/setup-wizard/setup-wizard.module.ts @@ -1,13 +1,12 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - -import { CoreModule } from '@/app/core/core.module'; +import { TranslateModule } from '@ngx-translate/core'; import { SetupWizardRoutingModule } from './setup-wizard-routing.module'; import { SetupWizardComponent } from './setup-wizard.component'; import { SetupWizardGuard } from './setup-wizard.guard'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/status/status.component.ts b/ui/src/app/modules/status/status.component.ts index 56144e9f7..4c7604129 100644 --- a/ui/src/app/modules/status/status.component.ts +++ b/ui/src/app/modules/status/status.component.ts @@ -1,17 +1,16 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrService } from 'ngx-toastr'; import { GridsterConfig, GridsterItem } from 'angular-gridster2'; +import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import { take } from 'rxjs/operators'; - -import { WsService } from '@/app/core/ws.service'; +import { WidgetAddComponent } from './widget-add/widget-add.component'; +import { WidgetControlComponent } from './widget-control/widget-control.component'; import { AuthService } from '@/app/core/auth/auth.service'; -import { SettingsService } from '@/app/core/settings.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; import { NotificationService } from '@/app/core/notification.service'; -import { WidgetControlComponent } from './widget-control/widget-control.component'; -import { WidgetAddComponent } from './widget-add/widget-add.component'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-status', diff --git a/ui/src/app/modules/status/status.module.ts b/ui/src/app/modules/status/status.module.ts index 2c02e807a..312e395a8 100644 --- a/ui/src/app/modules/status/status.module.ts +++ b/ui/src/app/modules/status/status.module.ts @@ -1,34 +1,32 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { RouterModule } from '@angular/router'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { RouterModule } from '@angular/router'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { GridsterModule } from 'angular-gridster2'; -import { DragulaModule } from 'ng2-dragula'; import { ChartsModule } from 'ng2-charts'; - -import { CoreModule } from '@/app/core/core.module'; -import { ManagePluginsModule } from '@/app/core/manage-plugins/manage-plugins.module'; -import { AccessoriesCoreModule } from '@/app/core/accessories/accessories.module'; - +import { DragulaModule } from 'ng2-dragula'; import { StatusComponent } from './status.component'; -import { WidgetsComponent } from './widgets/widgets.component'; +import { WidgetAddComponent } from './widget-add/widget-add.component'; import { WidgetControlComponent } from './widget-control/widget-control.component'; +import { AccessoriesWidgetComponent } from './widgets/accessories-widget/accessories-widget.component'; +import { ChildBridgeWidgetComponent } from './widgets/child-bridge-widget/child-bridge-widget.component'; +import { ClockWidgetComponent } from './widgets/clock-widget/clock-widget.component'; +import { CpuWidgetComponent } from './widgets/cpu-widget/cpu-widget.component'; import { HapQrcodeWidgetComponent } from './widgets/hap-qrcode-widget/hap-qrcode-widget.component'; import { HomebridgeLogsWidgetComponent } from './widgets/homebridge-logs-widget/homebridge-logs-widget.component'; -import { TerminalWidgetComponent } from './widgets/terminal-widget/terminal-widget.component'; -import { CpuWidgetComponent } from './widgets/cpu-widget/cpu-widget.component'; -import { NetworkWidgetComponent } from './widgets/network-widget/network-widget.component'; -import { MemoryWidgetComponent } from './widgets/memory-widget/memory-widget.component'; -import { UptimeWidgetComponent } from './widgets/uptime-widget/uptime-widget.component'; import { HomebridgeStatusWidgetComponent } from './widgets/homebridge-status-widget/homebridge-status-widget.component'; +import { MemoryWidgetComponent } from './widgets/memory-widget/memory-widget.component'; +import { NetworkWidgetComponent } from './widgets/network-widget/network-widget.component'; import { SystemInfoWidgetComponent } from './widgets/system-info-widget/system-info-widget.component'; -import { WidgetAddComponent } from './widget-add/widget-add.component'; +import { TerminalWidgetComponent } from './widgets/terminal-widget/terminal-widget.component'; +import { UptimeWidgetComponent } from './widgets/uptime-widget/uptime-widget.component'; import { WeatherWidgetComponent } from './widgets/weather-widget/weather-widget.component'; -import { AccessoriesWidgetComponent } from './widgets/accessories-widget/accessories-widget.component'; -import { ClockWidgetComponent } from './widgets/clock-widget/clock-widget.component'; -import { ChildBridgeWidgetComponent } from './widgets/child-bridge-widget/child-bridge-widget.component'; +import { WidgetsComponent } from './widgets/widgets.component'; +import { AccessoriesCoreModule } from '@/app/core/accessories/accessories.module'; +import { CoreModule } from '@/app/core/core.module'; +import { ManagePluginsModule } from '@/app/core/manage-plugins/manage-plugins.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/status/widget-add/widget-add.component.ts b/ui/src/app/modules/status/widget-add/widget-add.component.ts index 1f1ef8512..0ba08cf30 100644 --- a/ui/src/app/modules/status/widget-add/widget-add.component.ts +++ b/ui/src/app/modules/status/widget-add/widget-add.component.ts @@ -1,7 +1,6 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; - import { SettingsService } from '@/app/core/settings.service'; @Component({ diff --git a/ui/src/app/modules/status/widget-control/widget-control.component.ts b/ui/src/app/modules/status/widget-control/widget-control.component.ts index ee676bcaa..bcf83e516 100644 --- a/ui/src/app/modules/status/widget-control/widget-control.component.ts +++ b/ui/src/app/modules/status/widget-control/widget-control.component.ts @@ -1,10 +1,16 @@ -import { Component, OnInit, Input } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; +import { Component, Input, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { Observable, of } from 'rxjs'; -import { debounceTime, distinctUntilChanged, map, tap, switchMap, catchError } from 'rxjs/operators'; - +import { + catchError, + debounceTime, + distinctUntilChanged, + map, + switchMap, + tap, +} from 'rxjs/operators'; import { environment } from '@/environments/environment'; @Component({ diff --git a/ui/src/app/modules/status/widgets/accessories-widget/accessories-widget.component.ts b/ui/src/app/modules/status/widgets/accessories-widget/accessories-widget.component.ts index 653fa419c..83fb2101c 100644 --- a/ui/src/app/modules/status/widgets/accessories-widget/accessories-widget.component.ts +++ b/ui/src/app/modules/status/widgets/accessories-widget/accessories-widget.component.ts @@ -1,10 +1,14 @@ -import { Component, OnInit, OnDestroy, Input } from '@angular/core'; -import { Subscription } from 'rxjs'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { DragulaService } from 'ng2-dragula'; - +import { Subscription } from 'rxjs'; +import { ServiceTypeX } from '@/app/core/accessories/accessories.interfaces'; import { AccessoriesService } from '@/app/core/accessories/accessories.service'; import { MobileDetectService } from '@/app/core/mobile-detect.service'; -import { ServiceTypeX } from '@/app/core/accessories/accessories.interfaces'; @Component({ selector: 'app-accessories-widget', diff --git a/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.ts b/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.ts index 4548cc230..76d74eef1 100644 --- a/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.ts +++ b/ui/src/app/modules/status/widgets/child-bridge-widget/child-bridge-widget.component.ts @@ -1,7 +1,11 @@ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { WsService } from '@/app/core/ws.service'; @Component({ diff --git a/ui/src/app/modules/status/widgets/clock-widget/clock-widget.component.ts b/ui/src/app/modules/status/widgets/clock-widget/clock-widget.component.ts index 94a737230..f1755d954 100644 --- a/ui/src/app/modules/status/widgets/clock-widget/clock-widget.component.ts +++ b/ui/src/app/modules/status/widgets/clock-widget/clock-widget.component.ts @@ -1,4 +1,9 @@ -import { Component, OnInit, OnDestroy, Input } from '@angular/core'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { Subscription, interval } from 'rxjs'; @Component({ diff --git a/ui/src/app/modules/status/widgets/cpu-widget/cpu-widget.component.ts b/ui/src/app/modules/status/widgets/cpu-widget/cpu-widget.component.ts index 74211c896..b4fe13d9a 100644 --- a/ui/src/app/modules/status/widgets/cpu-widget/cpu-widget.component.ts +++ b/ui/src/app/modules/status/widgets/cpu-widget/cpu-widget.component.ts @@ -1,10 +1,16 @@ -import { Component, OnInit, OnDestroy, ViewChild, ElementRef, Input } from '@angular/core'; -import { Subscription, interval } from 'rxjs'; +import { + Component, + ElementRef, + Input, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { ChartOptions } from 'chart.js'; -import { Color, BaseChartDirective } from 'ng2-charts'; - -import { WsService } from '@/app/core/ws.service'; +import { BaseChartDirective, Color } from 'ng2-charts'; +import { Subscription, interval } from 'rxjs'; import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-cpu-widget', diff --git a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.ts b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.ts index 1a6e13ae8..60f334556 100644 --- a/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.ts +++ b/ui/src/app/modules/status/widgets/hap-qrcode-widget/hap-qrcode-widget.component.ts @@ -1,6 +1,11 @@ -import { Component, OnInit, ElementRef, ViewChild, Input } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnInit, + ViewChild, +} from '@angular/core'; import { Subject } from 'rxjs'; - import { WsService } from '@/app/core/ws.service'; @Component({ diff --git a/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts b/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts index 24e2f6545..4a534badd 100644 --- a/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts +++ b/ui/src/app/modules/status/widgets/homebridge-logs-widget/homebridge-logs-widget.component.ts @@ -1,7 +1,13 @@ -import { Component, OnInit, ViewChild, ElementRef, Input, OnDestroy } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { Subject } from 'rxjs'; import { ITerminalOptions } from 'xterm'; - import { LogService } from '@/app/core/log.service'; @Component({ diff --git a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.ts b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.ts index 25e26d294..da88822a4 100644 --- a/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.ts +++ b/ui/src/app/modules/status/widgets/homebridge-status-widget/homebridge-status-widget.component.ts @@ -1,9 +1,8 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ToastrService } from 'ngx-toastr'; - -import { WsService } from '@/app/core/ws.service'; -import { SettingsService } from '@/app/core/settings.service'; import { ManagePluginsService } from '@/app/core/manage-plugins/manage-plugins.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-homebridge-status-widget', diff --git a/ui/src/app/modules/status/widgets/memory-widget/memory-widget.component.ts b/ui/src/app/modules/status/widgets/memory-widget/memory-widget.component.ts index e159db64d..1d6a6e346 100644 --- a/ui/src/app/modules/status/widgets/memory-widget/memory-widget.component.ts +++ b/ui/src/app/modules/status/widgets/memory-widget/memory-widget.component.ts @@ -1,10 +1,15 @@ -import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; -import { interval, Subscription } from 'rxjs'; +import { + Component, + ElementRef, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { ChartOptions } from 'chart.js'; -import { Color, BaseChartDirective } from 'ng2-charts'; - -import { WsService } from '@/app/core/ws.service'; +import { BaseChartDirective, Color } from 'ng2-charts'; +import { Subscription, interval } from 'rxjs'; import { AuthService } from '@/app/core/auth/auth.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-memory-widget', diff --git a/ui/src/app/modules/status/widgets/network-widget/network-widget.component.ts b/ui/src/app/modules/status/widgets/network-widget/network-widget.component.ts index f7ed4e2dd..d783d30d1 100644 --- a/ui/src/app/modules/status/widgets/network-widget/network-widget.component.ts +++ b/ui/src/app/modules/status/widgets/network-widget/network-widget.component.ts @@ -1,10 +1,15 @@ -import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; -import { interval, Subscription } from 'rxjs'; +import { + Component, + ElementRef, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { ChartOptions } from 'chart.js'; -import { Color, BaseChartDirective } from 'ng2-charts'; - -import { WsService } from '@/app/core/ws.service'; +import { BaseChartDirective, Color } from 'ng2-charts'; +import { Subscription, interval } from 'rxjs'; import { AuthService } from '@/app/core/auth/auth.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-network-widget', diff --git a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.ts b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.ts index d2eb4c3dc..82caec6fd 100644 --- a/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.ts +++ b/ui/src/app/modules/status/widgets/system-info-widget/system-info-widget.component.ts @@ -1,10 +1,9 @@ import { Component, OnInit } from '@angular/core'; - -import { WsService } from '@/app/core/ws.service'; -import { AuthService } from '@/app/core/auth/auth.service'; -import { InformationComponent } from '@/app/core/components/information/information.component'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; +import { AuthService } from '@/app/core/auth/auth.service'; +import { InformationComponent } from '@/app/core/components/information/information.component'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-system-info-widget', diff --git a/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts b/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts index 606273d77..1311eff2a 100644 --- a/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts +++ b/ui/src/app/modules/status/widgets/terminal-widget/terminal-widget.component.ts @@ -1,7 +1,13 @@ -import { Component, OnInit, ViewChild, ElementRef, Input, OnDestroy } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnDestroy, + OnInit, + ViewChild, +} from '@angular/core'; import { Subject } from 'rxjs'; import { ITerminalOptions } from 'xterm'; - import { TerminalService } from '@/app/core/terminal.service'; @Component({ diff --git a/ui/src/app/modules/status/widgets/uptime-widget/uptime-widget.component.ts b/ui/src/app/modules/status/widgets/uptime-widget/uptime-widget.component.ts index eb56e10aa..2234f9713 100644 --- a/ui/src/app/modules/status/widgets/uptime-widget/uptime-widget.component.ts +++ b/ui/src/app/modules/status/widgets/uptime-widget/uptime-widget.component.ts @@ -1,8 +1,7 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { interval, Subscription } from 'rxjs'; - -import { WsService } from '@/app/core/ws.service'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Subscription, interval } from 'rxjs'; import { AuthService } from '@/app/core/auth/auth.service'; +import { WsService } from '@/app/core/ws.service'; @Component({ selector: 'app-uptime-widget', diff --git a/ui/src/app/modules/status/widgets/weather-widget/weather-widget.component.ts b/ui/src/app/modules/status/widgets/weather-widget/weather-widget.component.ts index 8010fe29a..0fa9e9fb3 100644 --- a/ui/src/app/modules/status/widgets/weather-widget/weather-widget.component.ts +++ b/ui/src/app/modules/status/widgets/weather-widget/weather-widget.component.ts @@ -1,11 +1,15 @@ -import { Component, OnInit, Input, OnDestroy } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; +import { + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { Subject, Subscription, interval } from 'rxjs'; import * as dayjs from 'dayjs'; - -import { WsService } from '@/app/core/ws.service'; +import { Subject, Subscription, interval } from 'rxjs'; import { AuthService } from '@/app/core/auth/auth.service'; +import { WsService } from '@/app/core/ws.service'; import { environment } from '@/environments/environment'; @Component({ diff --git a/ui/src/app/modules/status/widgets/widgets.component.ts b/ui/src/app/modules/status/widgets/widgets.component.ts index 5b94f0a2d..1eab87a69 100644 --- a/ui/src/app/modules/status/widgets/widgets.component.ts +++ b/ui/src/app/modules/status/widgets/widgets.component.ts @@ -1,21 +1,27 @@ import { - Component, OnInit, Input, ComponentFactoryResolver, - ApplicationRef, Injector, ElementRef, EmbeddedViewRef, OnDestroy, + ApplicationRef, + Component, + ComponentFactoryResolver, + ElementRef, + EmbeddedViewRef, + Injector, + Input, + OnDestroy, + OnInit, } from '@angular/core'; - +import { AccessoriesWidgetComponent } from './accessories-widget/accessories-widget.component'; +import { ChildBridgeWidgetComponent } from './child-bridge-widget/child-bridge-widget.component'; +import { ClockWidgetComponent } from './clock-widget/clock-widget.component'; +import { CpuWidgetComponent } from './cpu-widget/cpu-widget.component'; import { HapQrcodeWidgetComponent } from './hap-qrcode-widget/hap-qrcode-widget.component'; import { HomebridgeLogsWidgetComponent } from './homebridge-logs-widget/homebridge-logs-widget.component'; -import { TerminalWidgetComponent } from './terminal-widget/terminal-widget.component'; -import { CpuWidgetComponent } from './cpu-widget/cpu-widget.component'; -import { NetworkWidgetComponent } from './network-widget/network-widget.component'; -import { MemoryWidgetComponent } from './memory-widget/memory-widget.component'; -import { UptimeWidgetComponent } from './uptime-widget/uptime-widget.component'; import { HomebridgeStatusWidgetComponent } from './homebridge-status-widget/homebridge-status-widget.component'; +import { MemoryWidgetComponent } from './memory-widget/memory-widget.component'; +import { NetworkWidgetComponent } from './network-widget/network-widget.component'; import { SystemInfoWidgetComponent } from './system-info-widget/system-info-widget.component'; +import { TerminalWidgetComponent } from './terminal-widget/terminal-widget.component'; +import { UptimeWidgetComponent } from './uptime-widget/uptime-widget.component'; import { WeatherWidgetComponent } from './weather-widget/weather-widget.component'; -import { AccessoriesWidgetComponent } from './accessories-widget/accessories-widget.component'; -import { ClockWidgetComponent } from './clock-widget/clock-widget.component'; -import { ChildBridgeWidgetComponent } from './child-bridge-widget/child-bridge-widget.component'; @Component({ selector: 'app-widgets', diff --git a/ui/src/app/modules/users/users-add/users-add.component.ts b/ui/src/app/modules/users/users-add/users-add.component.ts index a20ad5848..dfb58f8b3 100644 --- a/ui/src/app/modules/users/users-add/users-add.component.ts +++ b/ui/src/app/modules/users/users-add/users-add.component.ts @@ -1,10 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { AbstractControl } from '@angular/forms'; -import { TranslateService } from '@ngx-translate/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/users/users-disable2fa/users-disable2fa.component.ts b/ui/src/app/modules/users/users-disable2fa/users-disable2fa.component.ts index df7c8d92c..d285aaf26 100644 --- a/ui/src/app/modules/users/users-disable2fa/users-disable2fa.component.ts +++ b/ui/src/app/modules/users/users-disable2fa/users-disable2fa.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit } from '@angular/core'; -import { UntypedFormGroup, UntypedFormControl, Validators, FormGroup, FormControl } from '@angular/forms'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { ToastrService } from 'ngx-toastr'; import { TranslateService } from '@ngx-translate/core'; - +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/users/users-edit/users-edit.component.ts b/ui/src/app/modules/users/users-edit/users-edit.component.ts index 376c3f0d4..083eb5f45 100644 --- a/ui/src/app/modules/users/users-edit/users-edit.component.ts +++ b/ui/src/app/modules/users/users-edit/users-edit.component.ts @@ -1,10 +1,9 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { AbstractControl } from '@angular/forms'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; - import { ApiService } from '@/app/core/api.service'; import { AuthService } from '@/app/core/auth/auth.service'; diff --git a/ui/src/app/modules/users/users-routing.module.ts b/ui/src/app/modules/users/users-routing.module.ts index 57771de0f..7697dd8d1 100644 --- a/ui/src/app/modules/users/users-routing.module.ts +++ b/ui/src/app/modules/users/users-routing.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import { RouterModule, Routes } from '@angular/router'; import { UsersComponent } from './users.component'; import { UsersResolver } from './users.resolver'; diff --git a/ui/src/app/modules/users/users-setup2fa/users-setup2fa.component.ts b/ui/src/app/modules/users/users-setup2fa/users-setup2fa.component.ts index 4372310d6..124044cdd 100644 --- a/ui/src/app/modules/users/users-setup2fa/users-setup2fa.component.ts +++ b/ui/src/app/modules/users/users-setup2fa/users-setup2fa.component.ts @@ -1,10 +1,15 @@ -import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core'; +import { + Component, + ElementRef, + Input, + OnInit, + ViewChild, +} from '@angular/core'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { UntypedFormGroup, UntypedFormControl, Validators, FormGroup, FormControl } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; -import { ToastrService } from 'ngx-toastr'; import * as dayjs from 'dayjs'; - +import { ToastrService } from 'ngx-toastr'; import { ApiService } from '@/app/core/api.service'; @Component({ diff --git a/ui/src/app/modules/users/users.component.ts b/ui/src/app/modules/users/users.component.ts index 49e9991b5..66b6116b8 100644 --- a/ui/src/app/modules/users/users.component.ts +++ b/ui/src/app/modules/users/users.component.ts @@ -1,15 +1,14 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; - -import { ApiService } from '@/app/core/api.service'; -import { AuthService } from '@/app/core/auth/auth.service'; import { UsersAddComponent } from './users-add/users-add.component'; +import { UsersDisable2faComponent } from './users-disable2fa/users-disable2fa.component'; import { UsersEditComponent } from './users-edit/users-edit.component'; import { UsersSetup2faComponent } from './users-setup2fa/users-setup2fa.component'; -import { UsersDisable2faComponent } from './users-disable2fa/users-disable2fa.component'; +import { ApiService } from '@/app/core/api.service'; +import { AuthService } from '@/app/core/auth/auth.service'; @Component({ selector: 'app-users', diff --git a/ui/src/app/modules/users/users.module.ts b/ui/src/app/modules/users/users.module.ts index 50bade72a..6a1493bbf 100644 --- a/ui/src/app/modules/users/users.module.ts +++ b/ui/src/app/modules/users/users.module.ts @@ -1,17 +1,16 @@ -import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { TranslateModule } from '@ngx-translate/core'; +import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; - -import { CoreModule } from '@/app/core/core.module'; -import { UsersRoutingModule } from './users-routing.module'; -import { UsersComponent } from './users.component'; +import { TranslateModule } from '@ngx-translate/core'; import { UsersAddComponent } from './users-add/users-add.component'; +import { UsersDisable2faComponent } from './users-disable2fa/users-disable2fa.component'; import { UsersEditComponent } from './users-edit/users-edit.component'; -import { UsersResolver } from './users.resolver'; +import { UsersRoutingModule } from './users-routing.module'; import { UsersSetup2faComponent } from './users-setup2fa/users-setup2fa.component'; -import { UsersDisable2faComponent } from './users-disable2fa/users-disable2fa.component'; +import { UsersComponent } from './users.component'; +import { UsersResolver } from './users.resolver'; +import { CoreModule } from '@/app/core/core.module'; @NgModule({ declarations: [ diff --git a/ui/src/app/modules/users/users.resolver.ts b/ui/src/app/modules/users/users.resolver.ts index 0874db3e5..2885c5da9 100644 --- a/ui/src/app/modules/users/users.resolver.ts +++ b/ui/src/app/modules/users/users.resolver.ts @@ -1,7 +1,11 @@ import { Injectable } from '@angular/core'; -import { Resolve, RouterStateSnapshot, ActivatedRouteSnapshot, Router } from '@angular/router'; +import { + ActivatedRouteSnapshot, + Resolve, + Router, + RouterStateSnapshot, +} from '@angular/router'; import { ToastrService } from 'ngx-toastr'; - import { ApiService } from '@/app/core/api.service'; @Injectable() diff --git a/ui/src/app/shared/layout/layout.component.ts b/ui/src/app/shared/layout/layout.component.ts index 60cedb099..615c1388d 100644 --- a/ui/src/app/shared/layout/layout.component.ts +++ b/ui/src/app/shared/layout/layout.component.ts @@ -1,19 +1,22 @@ -import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { + Component, + ElementRef, + OnInit, + ViewChild, +} from '@angular/core'; import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { lt } from 'semver'; +import { TranslateService } from '@ngx-translate/core'; import { throttleTime } from 'rxjs/operators'; - -import { environment } from '@/environments/environment'; -import { WsService } from '@/app/core/ws.service'; -import { SettingsService } from '@/app/core/settings.service'; +import { lt } from 'semver'; import { AuthService } from '@/app/core/auth/auth.service'; -import { NotificationService } from '@/app/core/notification.service'; - import { BackupRestoreComponent } from '@/app/core/backup-restore/backup-restore.component'; -import { ManagePluginsService } from '@/app/core/manage-plugins/manage-plugins.service'; import { ConfirmComponent } from '@/app/core/components/confirm/confirm.component'; +import { ManagePluginsService } from '@/app/core/manage-plugins/manage-plugins.service'; +import { NotificationService } from '@/app/core/notification.service'; +import { SettingsService } from '@/app/core/settings.service'; +import { WsService } from '@/app/core/ws.service'; +import { environment } from '@/environments/environment'; @Component({ selector: 'app-layout', diff --git a/ui/src/main.ts b/ui/src/main.ts index 0f416eb19..8a08cf421 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -1,6 +1,5 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; diff --git a/webpack.config.js b/webpack.config.js index 251471735..8539bc0c2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,8 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ - -const webpack = require('webpack'); const path = require('path'); - +const webpack = require('webpack'); const packageJson = require('./package.json'); const externals = {};