mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 03:56:15 -08:00
47 lines
1.8 KiB
TypeScript
47 lines
1.8 KiB
TypeScript
import { CommonModule } from '@angular/common';
|
|
import { Component, input, output, ViewEncapsulation } 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,
|
|
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>();
|
|
}
|