Disallow any types
This commit is contained in:
@@ -8,10 +8,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
Actions,
|
||||
ofType
|
||||
} from '@ngrx/effects';
|
||||
import { Actions, ofType } from '@ngrx/effects';
|
||||
import { NgIcon, provideIcons } from '@ng-icons/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { lucideX } from '@ng-icons/lucide';
|
||||
|
||||
@@ -14,7 +14,6 @@ import { lucideUserX, lucideBan } from '@ng-icons/lucide';
|
||||
import {
|
||||
Room,
|
||||
RoomMember,
|
||||
User,
|
||||
UserRole
|
||||
} from '../../../../core/models/index';
|
||||
import { RoomsActions } from '../../../../store/rooms/rooms.actions';
|
||||
|
||||
@@ -26,10 +26,7 @@ import {
|
||||
import { SettingsModalService, SettingsPage } from '../../../core/services/settings-modal.service';
|
||||
import { selectSavedRooms, selectCurrentRoom } from '../../../store/rooms/rooms.selectors';
|
||||
import { selectCurrentUser } from '../../../store/users/users.selectors';
|
||||
import {
|
||||
Room,
|
||||
UserRole
|
||||
} from '../../../core/models/index';
|
||||
import { Room, UserRole } from '../../../core/models/index';
|
||||
import { findRoomMember } from '../../../store/rooms/room-members.helpers';
|
||||
import { WebRTCService } from '../../../core/services/webrtc.service';
|
||||
|
||||
@@ -191,7 +188,6 @@ export class SettingsModalComponent {
|
||||
const targetId = this.modal.targetServerId();
|
||||
const currentRoomId = this.currentRoom()?.id ?? null;
|
||||
const selectedId = this.selectedServerId();
|
||||
|
||||
const hasSelected = !!selectedId && rooms.some((room) => room.id === selectedId);
|
||||
|
||||
if (!hasSelected) {
|
||||
|
||||
@@ -20,14 +20,8 @@ import { WebRTCService } from '../../../../core/services/webrtc.service';
|
||||
import { VoicePlaybackService } from '../../../voice/voice-controls/services/voice-playback.service';
|
||||
import { NotificationAudioService, AppSound } from '../../../../core/services/notification-audio.service';
|
||||
import { PlatformService } from '../../../../core/services/platform.service';
|
||||
import {
|
||||
loadVoiceSettingsFromStorage,
|
||||
saveVoiceSettingsToStorage
|
||||
} from '../../../../core/services/voice-settings.storage';
|
||||
import {
|
||||
SCREEN_SHARE_QUALITY_OPTIONS,
|
||||
ScreenShareQuality
|
||||
} from '../../../../core/services/webrtc';
|
||||
import { loadVoiceSettingsFromStorage, saveVoiceSettingsToStorage } from '../../../../core/services/voice-settings.storage';
|
||||
import { SCREEN_SHARE_QUALITY_OPTIONS, ScreenShareQuality } from '../../../../core/services/webrtc';
|
||||
|
||||
interface AudioDevice {
|
||||
deviceId: string;
|
||||
@@ -46,6 +40,10 @@ interface DesktopSettingsElectronApi {
|
||||
relaunchApp?: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
type DesktopSettingsWindow = Window & {
|
||||
electronAPI?: DesktopSettingsElectronApi;
|
||||
};
|
||||
|
||||
@Component({
|
||||
selector: 'app-voice-settings',
|
||||
standalone: true,
|
||||
@@ -87,7 +85,9 @@ export class VoiceSettingsComponent {
|
||||
askScreenShareQuality = signal(true);
|
||||
hardwareAcceleration = signal(true);
|
||||
hardwareAccelerationRestartRequired = signal(false);
|
||||
readonly selectedScreenShareQualityDescription = computed(() => this.screenShareQualityOptions.find((option) => option.id === this.screenShareQuality())?.description ?? '');
|
||||
readonly selectedScreenShareQualityDescription = computed(
|
||||
() => this.screenShareQualityOptions.find((option) => option.id === this.screenShareQuality())?.description ?? ''
|
||||
);
|
||||
|
||||
constructor() {
|
||||
this.loadVoiceSettings();
|
||||
@@ -294,7 +294,7 @@ export class VoiceSettingsComponent {
|
||||
|
||||
private getElectronApi(): DesktopSettingsElectronApi | null {
|
||||
return typeof window !== 'undefined'
|
||||
? (window as any).electronAPI as DesktopSettingsElectronApi
|
||||
? (window as DesktopSettingsWindow).electronAPI ?? null
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user