tabby/tabby-settings/src/settings.ts

81 lines
2.2 KiB
TypeScript
Raw Normal View History

2021-04-05 10:32:37 +00:00
import { Injectable } from '@angular/core'
import { SettingsTabProvider } from './api'
import { HotkeySettingsTabComponent } from './components/hotkeySettingsTab.component'
import { WindowSettingsTabComponent } from './components/windowSettingsTab.component'
2021-06-05 15:38:11 +00:00
import { VaultSettingsTabComponent } from './components/vaultSettingsTab.component'
2021-07-24 14:31:32 +00:00
import { ConfigSyncSettingsTabComponent } from './components/configSyncSettingsTab.component'
import { ProfilesSettingsTabComponent } from './components/profilesSettingsTab.component'
2022-01-08 15:02:56 +00:00
import { TranslateService } from 'tabby-core'
2021-04-05 10:32:37 +00:00
/** @hidden */
@Injectable()
export class HotkeySettingsTabProvider extends SettingsTabProvider {
id = 'hotkeys'
icon = 'keyboard'
2022-01-08 15:02:56 +00:00
title = this.translate.instant('Hotkeys')
constructor (private translate: TranslateService) { super() }
2021-04-05 10:32:37 +00:00
getComponentType (): any {
return HotkeySettingsTabComponent
}
}
/** @hidden */
@Injectable()
export class WindowSettingsTabProvider extends SettingsTabProvider {
id = 'window'
icon = 'window-maximize'
2022-01-08 15:02:56 +00:00
title = this.translate.instant('Window')
constructor (private translate: TranslateService) { super() }
2021-04-05 10:32:37 +00:00
getComponentType (): any {
return WindowSettingsTabComponent
}
}
2021-06-05 15:38:11 +00:00
/** @hidden */
@Injectable()
export class VaultSettingsTabProvider extends SettingsTabProvider {
id = 'vault'
icon = 'key'
title = 'Vault'
getComponentType (): any {
return VaultSettingsTabComponent
}
}
/** @hidden */
@Injectable()
export class ProfilesSettingsTabProvider extends SettingsTabProvider {
id = 'profiles'
icon = 'window-restore'
2022-01-08 15:02:56 +00:00
title = this.translate.instant('Profiles & connections')
2021-10-24 20:50:21 +00:00
prioritized = true
2022-01-08 15:02:56 +00:00
constructor (private translate: TranslateService) { super() }
getComponentType (): any {
return ProfilesSettingsTabComponent
}
}
2021-07-24 14:31:32 +00:00
/** @hidden */
@Injectable()
export class ConfigSyncSettingsTabProvider extends SettingsTabProvider {
id = 'config-sync'
icon = 'cloud'
2022-01-08 15:02:56 +00:00
title = this.translate.instant('Config sync')
constructor (private translate: TranslateService) { super() }
2021-07-24 14:31:32 +00:00
getComponentType (): any {
return ConfigSyncSettingsTabComponent
}
}