tabby/tabby-web-demo/src/profiles.ts

32 lines
915 B
TypeScript
Raw Normal View History

2021-07-11 16:00:59 +02:00
import { Injectable } from '@angular/core'
2021-07-16 23:59:45 +02:00
import { ProfileProvider, NewTabParameters, Profile, PartialProfile } from 'tabby-core'
2021-07-11 16:00:59 +02:00
import { DemoTerminalTabComponent } from './components/terminalTab.component'
@Injectable({ providedIn: 'root' })
2021-07-16 23:59:45 +02:00
export class DemoProfilesService extends ProfileProvider<Profile> {
2021-07-11 16:00:59 +02:00
id = 'demo'
name = 'Demo'
2021-07-16 23:59:45 +02:00
async getBuiltinProfiles (): Promise<PartialProfile<Profile>[]> {
2021-07-11 16:00:59 +02:00
return [
{
id: 'demo',
type: 'demo',
name: 'Demo VM terminal',
icon: 'fas fa-microchip',
isBuiltin: true,
},
]
}
async getNewTabParameters (_profile: Profile): Promise<NewTabParameters<DemoTerminalTabComponent>> {
return {
type: DemoTerminalTabComponent,
}
}
getDescription (_profile: Profile): string {
return ''
}
}