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

32 lines
915 B
TypeScript
Raw Permalink Normal View History

2021-07-11 22:00:59 +08:00
import { Injectable } from '@angular/core'
2021-07-17 05:59:45 +08:00
import { ProfileProvider, NewTabParameters, Profile, PartialProfile } from 'tabby-core'
2021-07-11 22:00:59 +08:00
import { DemoTerminalTabComponent } from './components/terminalTab.component'
@Injectable({ providedIn: 'root' })
2021-07-17 05:59:45 +08:00
export class DemoProfilesService extends ProfileProvider<Profile> {
2021-07-11 22:00:59 +08:00
id = 'demo'
name = 'Demo'
2021-07-17 05:59:45 +08:00
async getBuiltinProfiles (): Promise<PartialProfile<Profile>[]> {
2021-07-11 22:00:59 +08: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 ''
}
}