refactor(config-page): update comments for clarity and remove unused service injection

This commit is contained in:
Ivan Kalashnikov 2026-01-17 15:30:52 +07:00
parent bb485df58a
commit f2b5cbb958
2 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ const filterGlobalConfigForm = (cfg: ConfigFormSection<any>): boolean => {
);
};
// Tab: General - Language, App Features, Misc, Short Syntax
// Tab: General - Language, App Features, Misc, Short Syntax, Sound (specified separately in html)
export const GLOBAL_GENERAL_FORM_CONFIG: ConfigFormConfig = [
LANGUAGE_SELECTION_FORM_FORM,
APP_FEATURES_FORM_CFG,

View file

@ -51,7 +51,6 @@ import { SyncWrapperService } from '../../imex/sync/sync-wrapper.service';
import { UserProfileService } from '../../features/user-profile/user-profile.service';
import { MatDialog } from '@angular/material/dialog';
import { DialogDisableProfilesConfirmationComponent } from '../../features/user-profile/dialog-disable-profiles-confirmation/dialog-disable-profiles-confirmation.component';
import { SuperSyncRestoreService } from '../../imex/sync/super-sync-restore.service';
import { DialogRestorePointComponent } from '../../imex/sync/dialog-restore-point/dialog-restore-point.component';
import { LegacySyncProvider } from '../../imex/sync/legacy-sync-provider.model';
import { DialogChangeEncryptionPasswordComponent } from '../../imex/sync/dialog-change-encryption-password/dialog-change-encryption-password.component';
@ -87,7 +86,6 @@ export class ConfigPageComponent implements OnInit, OnDestroy {
private readonly _snackService = inject(SnackService);
private readonly _userProfileService = inject(UserProfileService);
private readonly _matDialog = inject(MatDialog);
private readonly _superSyncRestoreService = inject(SuperSyncRestoreService);
readonly configService = inject(GlobalConfigService);
readonly syncSettingsService = inject(SyncConfigService);
@ -96,6 +94,7 @@ export class ConfigPageComponent implements OnInit, OnDestroy {
selectedTabIndex = 0;
// @todo - find better names for tabs configs forms
// Tab-specific form configurations
generalFormCfg: ConfigFormConfig;
timeTrackingFormCfg: ConfigFormConfig;
@ -167,7 +166,8 @@ export class ConfigPageComponent implements OnInit, OnDestroy {
}
private _updateKeyboardFormWithPluginShortcuts(shortcuts: PluginShortcutCfg[]): void {
// Find keyboard form section in plugins & shortcuts tab config
// @todo - make separate core shortcuts and plugins shortcuts settings
// Find keyboard form section in general tab configuration
const keyboardFormIndex = this.generalFormCfg.findIndex(
(section) => section.key === 'keyboard',
);