added support for custom color schemes for local shell profiles

This commit is contained in:
Eugene 2024-10-20 22:19:06 +02:00
parent 2ecccad2db
commit e84cbd82d8
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
2 changed files with 37 additions and 26 deletions

View file

@ -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')
.header
.title(translate) Run as administrator
toggle(
[(ngModel)]='profile.options.runAsAdministrator',
)
.form-line(*ngIf='uac?.isAvailable')
.header
.title(translate) Run as administrator
toggle(
[(ngModel)]='profile.options.runAsAdministrator',
)
.mb-3
label(translate) Working directory
.mb-3
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
label(translate) Environment
environment-editor(
type='text',
[(model)]='profile.options.env',
)
.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
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')

View file

@ -1,3 +1,4 @@
import deepClone from 'clone-deep'
import { Injectable, Optional, Inject } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent, PromptModalComponent, ConfigService, PartialProfile, Profile } from 'tabby-core'
@ -180,9 +181,7 @@ export class SaveAsProfileContextMenu extends TabContextMenuItemProvider {
return
}
const options = {
...tab.profile.options,
}
const options = deepClone(tab.profile.options)
const cwd = await tab.session?.getWorkingDirectory() ?? tab.profile.options.cwd
if (cwd) {