mirror of
https://github.com/Eugeny/tabby
synced 2024-12-14 23:32:41 +00:00
28 lines
857 B
TypeScript
28 lines
857 B
TypeScript
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
import { Injectable } from '@angular/core'
|
|
import { ToolbarButtonProvider, ToolbarButton, TranslateService } from 'tabby-core'
|
|
import { TerminalService } from './services/terminal.service'
|
|
|
|
/** @hidden */
|
|
@Injectable()
|
|
export class ButtonProvider extends ToolbarButtonProvider {
|
|
constructor (
|
|
private terminal: TerminalService,
|
|
private translate: TranslateService,
|
|
) {
|
|
super()
|
|
}
|
|
|
|
provide (): ToolbarButton[] {
|
|
return [
|
|
{
|
|
icon: require('./icons/plus.svg'),
|
|
title: this.translate.instant('New terminal'),
|
|
touchBarNSImage: 'NSTouchBarAddDetailTemplate',
|
|
click: () => {
|
|
this.terminal.openTab()
|
|
},
|
|
},
|
|
]
|
|
}
|
|
}
|