mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-16 17:40:00 +00:00
Show custom profiles in default profiles selection
This commit is contained in:
parent
642db6a14a
commit
5d1a35a285
@ -12,10 +12,12 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
|||||||
[(ngModel)]='config.store.terminal.profile',
|
[(ngModel)]='config.store.terminal.profile',
|
||||||
(ngModelChange)='config.save()',
|
(ngModelChange)='config.save()',
|
||||||
)
|
)
|
||||||
|
optgroup([label]='"Custom Profiles"|translate')
|
||||||
option(
|
option(
|
||||||
*ngFor='let profile of profiles',
|
*ngFor='let profile of customProfiles',
|
||||||
[ngValue]='profile.id'
|
[ngValue]='profile.id'
|
||||||
) {{profile.name}}
|
) {{profile.name}}
|
||||||
|
optgroup([label]='"Built-in Profiles"|translate')
|
||||||
option(
|
option(
|
||||||
*ngFor='let profile of builtinProfiles',
|
*ngFor='let profile of builtinProfiles',
|
||||||
[ngValue]='profile.id'
|
[ngValue]='profile.id'
|
||||||
|
@ -21,6 +21,7 @@ interface CollapsableProfileGroup extends ProfileGroup {
|
|||||||
export class ProfilesSettingsTabComponent extends BaseComponent {
|
export class ProfilesSettingsTabComponent extends BaseComponent {
|
||||||
builtinProfiles: PartialProfile<Profile>[] = []
|
builtinProfiles: PartialProfile<Profile>[] = []
|
||||||
templateProfiles: PartialProfile<Profile>[] = []
|
templateProfiles: PartialProfile<Profile>[] = []
|
||||||
|
customProfiles: PartialProfile<Profile>[] = []
|
||||||
profileGroups: PartialProfileGroup<CollapsableProfileGroup>[]
|
profileGroups: PartialProfileGroup<CollapsableProfileGroup>[]
|
||||||
filter = ''
|
filter = ''
|
||||||
Platform = Platform
|
Platform = Platform
|
||||||
@ -42,6 +43,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
|
|||||||
async ngOnInit (): Promise<void> {
|
async ngOnInit (): Promise<void> {
|
||||||
this.refresh()
|
this.refresh()
|
||||||
this.builtinProfiles = (await this.profilesService.getProfiles()).filter(x => x.isBuiltin)
|
this.builtinProfiles = (await this.profilesService.getProfiles()).filter(x => x.isBuiltin)
|
||||||
|
this.customProfiles = (await this.profilesService.getProfiles()).filter(x => !x.isBuiltin)
|
||||||
this.templateProfiles = this.builtinProfiles.filter(x => x.isTemplate)
|
this.templateProfiles = this.builtinProfiles.filter(x => x.isTemplate)
|
||||||
this.builtinProfiles = this.builtinProfiles.filter(x => !x.isTemplate)
|
this.builtinProfiles = this.builtinProfiles.filter(x => !x.isTemplate)
|
||||||
this.refresh()
|
this.refresh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user