From 623460105f836fc998a7236cde1a98a6eda58889 Mon Sep 17 00:00:00 2001 From: Raphii Date: Wed, 9 Nov 2022 10:07:11 +0100 Subject: [PATCH 01/21] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81b08973..34bdb774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.2.2] ### Fixed From 82a54082fa11076855a5f6528c177bc65d178795 Mon Sep 17 00:00:00 2001 From: Raphii Date: Sun, 13 Nov 2022 15:15:01 +0100 Subject: [PATCH 02/21] Made sleeping position animation automations automatically trigger when the automation is enabled. --- CHANGELOG.md | 5 +++++ .../sleeping-animations-automation.service.ts | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34bdb774..5ae1cb67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Made sleeping position animation automations automatically trigger when the automation is enabled. + ## [1.2.2] ### Fixed + - Fixed issue where the main window would load before the app was ready, due to a bug in a new version of the `tao` crate. ## [1.2.1] diff --git a/src/app/services/osc-automations/sleeping-animations-automation.service.ts b/src/app/services/osc-automations/sleeping-animations-automation.service.ts index 0d7df5bf..fed98f5a 100644 --- a/src/app/services/osc-automations/sleeping-animations-automation.service.ts +++ b/src/app/services/osc-automations/sleeping-animations-automation.service.ts @@ -6,7 +6,7 @@ import { SleepingAnimationsAutomationConfig, } from '../../models/automations'; import { cloneDeep } from 'lodash'; -import { combineLatest, filter, firstValueFrom, map, pairwise, startWith } from 'rxjs'; +import { combineLatest, debounceTime, filter, firstValueFrom, map, pairwise, startWith } from 'rxjs'; import { SleepService } from '../sleep.service'; import { SleepingPose } from '../../models/sleeping-pose'; import { OscService } from '../osc.service'; @@ -42,6 +42,14 @@ export class SleepingAnimationsAutomationService { combineLatest([ // Pose changes this.sleep.pose, + // Retrigger when automation is enabled + this.automationConfig.configs.pipe( + map((configs) => configs.SLEEPING_ANIMATIONS.enabled), + startWith(false), + pairwise(), + filter(([oldIsEnabled, newIsEnabled]) => !oldIsEnabled && newIsEnabled), + startWith(false), + ), // Retrigger when sleep mode is enabled this.sleep.mode.pipe( startWith(false), @@ -64,7 +72,7 @@ export class SleepingAnimationsAutomationService { }), startWith([]) ), - ]).subscribe(async ([pose]) => { + ]).pipe(debounceTime(0)).subscribe(async ([pose]) => { if (!this.config.enabled) return; if (this.config.onlyIfSleepModeEnabled && !(await firstValueFrom(this.sleep.mode))) return; if (this.config.onlyIfAllTrackersTurnedOff) { From 429130c9c945f7e3048a6126a8e57fcca8f158bc Mon Sep 17 00:00:00 2001 From: Raphii Date: Thu, 17 Nov 2022 15:27:31 +0100 Subject: [PATCH 03/21] WIP auto invite request accept --- src/app/app-routing.module.ts | 7 + src/app/app.module.ts | 2 + .../dashboard-navbar.component.html | 7 + .../dashboard-navbar.component.scss | 1 + src/app/services/vrchat.service.ts | 65 ++++++++- ...-invite-request-accept-view.component.html | 83 ++++++++++++ ...-invite-request-accept-view.component.scss | 128 ++++++++++++++++++ ...vite-request-accept-view.component.spec.ts | 23 ++++ ...to-invite-request-accept-view.component.ts | 33 +++++ src/assets/i18n/en.json | 1 + 10 files changed, 349 insertions(+), 1 deletion(-) create mode 100644 src/app/views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component.html create mode 100644 src/app/views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component.scss create mode 100644 src/app/views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component.spec.ts create mode 100644 src/app/views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 2d9e1eda..fd5e2f10 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -10,6 +10,9 @@ import { SleepDetectionViewComponent } from './views/dashboard-view/views/sleep- import { GpuAutomationsViewComponent } from './views/dashboard-view/views/gpu-automations-view/gpu-automations-view.component'; import { OscAutomationsViewComponent } from './views/dashboard-view/views/osc-automations-view/osc-automations-view.component'; import { StatusAutomationsViewComponent } from './views/dashboard-view/views/status-automations-view/status-automations-view.component'; +import { + AutoInviteRequestAcceptViewComponent +} from './views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component'; const routes: Routes = [ { @@ -41,6 +44,10 @@ const routes: Routes = [ path: 'statusAutomations', component: StatusAutomationsViewComponent, }, + { + path: 'autoInviteRequestAccept', + component: AutoInviteRequestAcceptViewComponent, + }, { path: 'settings', component: SettingsViewComponent, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 315f0662..9081aae6 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -74,6 +74,7 @@ import { VRChatLogService } from './services/vrchat-log.service'; import { StatusChangeForPlayerCountAutomationService } from './services/status-automations/status-change-for-player-count-automation.service'; import { MainStatusBarComponent } from './components/main-status-bar/main-status-bar.component'; import { OscControlService } from './services/osc-control.service'; +import { AutoInviteRequestAcceptViewComponent } from './views/dashboard-view/views/auto-invite-request-accept-view/auto-invite-request-accept-view.component'; export function createTranslateLoader(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/', '.json'); @@ -119,6 +120,7 @@ export function createTranslateLoader(http: HttpClient) { StatusAutomationsViewComponent, SleepingAnimationPresetModalComponent, MainStatusBarComponent, + AutoInviteRequestAcceptViewComponent, ], imports: [ CommonModule, diff --git a/src/app/components/dashboard-navbar/dashboard-navbar.component.html b/src/app/components/dashboard-navbar/dashboard-navbar.component.html index 8633524f..226f8dc3 100644 --- a/src/app/components/dashboard-navbar/dashboard-navbar.component.html +++ b/src/app/components/dashboard-navbar/dashboard-navbar.component.html @@ -53,6 +53,13 @@ + +