mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
* chore(deps): upgrade Angular to 22.1 and Nx to 23.2 * fix(deps): complete Angular migrations after rebasing on master * fix(ci): use the Node pin for Windows runtime refresh * docs(deps): synchronize the workspace-shell Node requirements
55 lines
2.1 KiB
TypeScript
55 lines
2.1 KiB
TypeScript
import { CommonModule } from '@angular/common';
|
|
import {
|
|
Component,
|
|
input,
|
|
output,
|
|
ViewEncapsulation,
|
|
ChangeDetectionStrategy,
|
|
} from '@angular/core';
|
|
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
import { MatIconModule } from '@angular/material/icon';
|
|
import { MatSelectModule } from '@angular/material/select';
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
import { CoverSize, Language, Theme } from '@iptvnator/shared/interfaces';
|
|
import {
|
|
CoverSizeOption,
|
|
StartupBehaviorOption,
|
|
StartupWindowModeOption,
|
|
ThemeOption,
|
|
} from './settings.models';
|
|
|
|
@Component({
|
|
selector: 'app-settings-general-section',
|
|
imports: [
|
|
CommonModule,
|
|
MatCheckboxModule,
|
|
MatFormFieldModule,
|
|
MatIconModule,
|
|
MatSelectModule,
|
|
ReactiveFormsModule,
|
|
TranslateModule,
|
|
],
|
|
templateUrl: './settings-general-section.component.html',
|
|
encapsulation: ViewEncapsulation.None,
|
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection -- Preserve pre-Angular 22 eager checking during the framework upgrade.
|
|
changeDetection: ChangeDetectionStrategy.Eager,
|
|
styles: [':host { display: contents; }'],
|
|
})
|
|
export class SettingsGeneralSectionComponent {
|
|
readonly form = input.required<FormGroup>();
|
|
readonly languageEnum = input.required<typeof Language>();
|
|
readonly themeOptions = input.required<ThemeOption[]>();
|
|
readonly coverSizeOptions = input.required<CoverSizeOption[]>();
|
|
readonly startupBehaviorOptions = input.required<StartupBehaviorOption[]>();
|
|
readonly startupWindowModeOptions =
|
|
input.required<StartupWindowModeOption[]>();
|
|
/** Desktop only: the window-mode select needs the main-process mirror and F11 */
|
|
readonly supportsStartupWindowMode = input(false);
|
|
readonly supportsPortalConnectivityGuard = input(false);
|
|
|
|
readonly selectTheme = output<Theme>();
|
|
readonly selectCoverSize = output<CoverSize>();
|
|
}
|