diff --git a/.github/workflows/Attach Artifacts.yml b/.github/workflows/Attach Artifacts.yml index 7f0203286..f8e48a5dd 100644 --- a/.github/workflows/Attach Artifacts.yml +++ b/.github/workflows/Attach Artifacts.yml @@ -2,6 +2,8 @@ name: Manually Attach Artifacts ( If the automation fails ) run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }} on: + repository_dispatch: + types: [attach-artifacts] workflow_dispatch: inputs: tag: @@ -18,6 +20,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: 20.x + + - name: Get previous tag + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@v1" # Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format - name: Check for Tag name Format @@ -30,7 +36,7 @@ jobs: - name: Install package run: | export npm_config_prefix=$(pwd)/package - npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }} + npm install -g homebridge-config-ui-x@$${{ needs.analyze-tags.outputs.previous-tag }} - name: Remove invalid node-pty node-gyp run run: | @@ -39,11 +45,11 @@ jobs: - name: Create Bundle run: | tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz . - shasum -a 256 homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz > SHASUMS256.txt + shasum -a 256 homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz > SHASUMS256.txt - name: Attach Bundle uses: AButler/upload-release-assets@v2.0 with: - files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt' + files: 'homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz;SHASUMS256.txt' repo-token: ${{ secrets.GITHUB_TOKEN }} release-tag: ${{ github.event.inputs.tag }} diff --git a/.github/workflows/alpha-release.yml b/.github/workflows/alpha-release.yml index 3f3f0fc87..fc1774a9d 100644 --- a/.github/workflows/alpha-release.yml +++ b/.github/workflows/alpha-release.yml @@ -6,23 +6,7 @@ on: workflow_dispatch: jobs: - build_and_test: - uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest - with: - enable_coverage: true - install_cmd: npm ci && cd ui && npm ci - secrets: - token: ${{ secrets.GITHUB_TOKEN }} - - lint: - needs: build_and_test - uses: homebridge/.github/.github/workflows/eslint.yml@latest - with: - install_cmd: npm ci && cd ui && npm ci - publish: - needs: lint - if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }} uses: homebridge/.github/.github/workflows/npm-publish.yml@latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5691ac3cb..3f524197c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,9 +61,7 @@ jobs: tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz . shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt - - name: Attach Bundle - uses: AButler/upload-release-assets@v2.0 + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v2 with: - files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt' - repo-token: ${{ secrets.GITHUB_TOKEN }} - release-tag: ${{ github.event.release.tag_name }} + event-type: attach-artifacts diff --git a/src/modules/status/status.service.ts b/src/modules/status/status.service.ts index 4f5b79c14..6550fc926 100644 --- a/src/modules/status/status.service.ts +++ b/src/modules/status/status.service.ts @@ -466,7 +466,7 @@ export class StatusService { try { const versionList = (await this.httpService.get('https://nodejs.org/dist/index.json').toPromise()).data; - const currentLts = versionList.filter(x => x.lts)[0]; + const currentLts = versionList.filter((x: any) => x.lts)[0]; // See why this is set to 2.29 at https://homebridge.io/w/JJSun const glibcVersion = this.getGlibcVersion(); diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index f37287512..7b1a258a8 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -70,11 +70,13 @@ export class AppComponent { } // ensure the menu closes when we navigate - router.events.subscribe((event) => { + router.events.subscribe((event: any) => { if (event instanceof NavigationEnd) { const dropdownMenu = window.document.querySelector('#navbarSupportedContent'); + const hamburgerMenuButton = window.document.querySelector('.navbar-toggler'); if (dropdownMenu) { dropdownMenu.classList.remove('show'); + hamburgerMenuButton.classList.add('collapsed'); } } }); diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts index 3d9a240aa..789b8d564 100644 --- a/ui/src/app/app.module.ts +++ b/ui/src/app/app.module.ts @@ -17,11 +17,13 @@ import { AuthModule } from '@/app/core/auth/auth.module'; import { CoreModule } from '@/app/core/core.module'; import { supportedLocales } from '@/app/core/locales'; import { onMonacoLoad } from '@/app/core/monaco-editor.service'; +import { RestartOptionsModalComponent } from '@/app/shared/layout/restart-options-modal/restart-options-modal.component'; @NgModule({ declarations: [ AppComponent, LayoutComponent, + RestartOptionsModalComponent, ], imports: [ BrowserModule, diff --git a/ui/src/app/core/accessories/accessories.service.ts b/ui/src/app/core/accessories/accessories.service.ts index 375b072da..f7794e77b 100644 --- a/ui/src/app/core/accessories/accessories.service.ts +++ b/ui/src/app/core/accessories/accessories.service.ts @@ -171,14 +171,14 @@ export class AccessoriesService { /** * Parse the incoming accessory data and refresh existing accessory statuses */ - private parseServices(services) { + private parseServices(services: any) { if (!this.accessories.services.length) { this.accessories.services = services; return; } // update the existing objects to avoid re-painting the dom element each refresh - services.forEach((service) => { + services.forEach((service: any) => { const existing = this.accessories.services.find(x => x.uniqueId === service.uniqueId); if (existing) { diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html index 9f8735667..37553f096 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.html @@ -1,4 +1,4 @@ -
@@ -8,4 +8,4 @@
{{ service.values.Brightness }}%
- \ No newline at end of file + diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts index 25453340a..ffa91f662 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.component.ts @@ -29,7 +29,7 @@ export class LightbulbComponent implements OnInit { onLongClick() { if ('Brightness' in this.service.values) { const ref = this.modalService.open(LightbulbManageComponent, { - size: 'sm', + size: 'md', }); ref.componentInstance.service = this.service; } diff --git a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html index 999cd0836..c3d391da6 100644 --- a/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html +++ b/ui/src/app/core/accessories/types/lightbulb/lightbulb.manage.component.html @@ -6,7 +6,7 @@