mirror of
https://github.com/Eugeny/tabby
synced 2024-11-14 08:57:21 +00:00
added support for custom color schemes for local shell profiles
This commit is contained in:
parent
2ecccad2db
commit
e84cbd82d8
2 changed files with 37 additions and 26 deletions
|
@ -1,27 +1,39 @@
|
||||||
command-line-editor([model]='profile.options')
|
ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||||
|
li(ngbNavItem)
|
||||||
|
a(ngbNavLink, translate) General
|
||||||
|
ng-template(ngbNavContent)
|
||||||
|
command-line-editor([model]='profile.options')
|
||||||
|
|
||||||
.form-line(*ngIf='uac?.isAvailable')
|
.form-line(*ngIf='uac?.isAvailable')
|
||||||
.header
|
.header
|
||||||
.title(translate) Run as administrator
|
.title(translate) Run as administrator
|
||||||
toggle(
|
toggle(
|
||||||
[(ngModel)]='profile.options.runAsAdministrator',
|
[(ngModel)]='profile.options.runAsAdministrator',
|
||||||
)
|
)
|
||||||
|
|
||||||
.mb-3
|
.mb-3
|
||||||
label(translate) Working directory
|
label(translate) Working directory
|
||||||
|
|
||||||
.input-group
|
|
||||||
input.form-control(
|
|
||||||
type='text',
|
|
||||||
placeholder='Home directory',
|
|
||||||
[(ngModel)]='profile.options.cwd'
|
|
||||||
)
|
|
||||||
button.btn.btn-secondary((click)='pickWorkingDirectory()')
|
|
||||||
i.fas.fa-folder-open
|
|
||||||
|
|
||||||
.mb-3
|
.input-group
|
||||||
label(translate) Environment
|
input.form-control(
|
||||||
environment-editor(
|
type='text',
|
||||||
type='text',
|
placeholder='Home directory',
|
||||||
[(model)]='profile.options.env',
|
[(ngModel)]='profile.options.cwd'
|
||||||
)
|
)
|
||||||
|
button.btn.btn-secondary((click)='pickWorkingDirectory()')
|
||||||
|
i.fas.fa-folder-open
|
||||||
|
|
||||||
|
.mb-3
|
||||||
|
label(translate) Environment
|
||||||
|
environment-editor(
|
||||||
|
type='text',
|
||||||
|
[(model)]='profile.options.env',
|
||||||
|
)
|
||||||
|
|
||||||
|
li(ngbNavItem)
|
||||||
|
a(ngbNavLink, translate) Colors
|
||||||
|
ng-template(ngbNavContent)
|
||||||
|
color-scheme-selector([(model)]='profile.terminalColorScheme')
|
||||||
|
|
||||||
|
div([ngbNavOutlet]='nav')
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import deepClone from 'clone-deep'
|
||||||
import { Injectable, Optional, Inject } from '@angular/core'
|
import { Injectable, Optional, Inject } from '@angular/core'
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent, PromptModalComponent, ConfigService, PartialProfile, Profile } from 'tabby-core'
|
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent, PromptModalComponent, ConfigService, PartialProfile, Profile } from 'tabby-core'
|
||||||
|
@ -180,9 +181,7 @@ export class SaveAsProfileContextMenu extends TabContextMenuItemProvider {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = {
|
const options = deepClone(tab.profile.options)
|
||||||
...tab.profile.options,
|
|
||||||
}
|
|
||||||
|
|
||||||
const cwd = await tab.session?.getWorkingDirectory() ?? tab.profile.options.cwd
|
const cwd = await tab.session?.getWorkingDirectory() ?? tab.profile.options.cwd
|
||||||
if (cwd) {
|
if (cwd) {
|
||||||
|
|
Loading…
Reference in a new issue