mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-04 10:29:55 +00:00
Adding Tab Location "left"
This commit is contained in:
parent
a15e79ad5a
commit
5c7256ffe5
@ -3,99 +3,133 @@ title-bar(
|
|||||||
[class.inset]='hostApp.platform == Platform.macOS'
|
[class.inset]='hostApp.platform == Platform.macOS'
|
||||||
)
|
)
|
||||||
|
|
||||||
.content(
|
.wrap
|
||||||
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top"'
|
.tab-bar.vertical(
|
||||||
)
|
*ngIf='config.store.appearance.tabsLocation == "left"'
|
||||||
.tab-bar
|
)
|
||||||
.inset.background(*ngIf='hostApp.platform == Platform.macOS && config.store.appearance.frame == "thin" && config.store.appearance.tabsLocation == "top"')
|
.inset.background(*ngIf='hostApp.platform == Platform.macOS \
|
||||||
.tabs(
|
&& config.store.appearance.frame == "thin"')
|
||||||
dnd-sortable-container,
|
.tabs.vertical(
|
||||||
[sortableData]='app.tabs',
|
dnd-sortable-container,
|
||||||
)
|
[sortableData]='app.tabs',
|
||||||
tab-header(
|
)
|
||||||
*ngFor='let tab of app.tabs; let idx = index',
|
tab-header(
|
||||||
dnd-sortable,
|
*ngFor='let tab of app.tabs; let idx = index',
|
||||||
[sortableIndex]='idx',
|
dnd-sortable,
|
||||||
(onDragStart)='onTabDragStart()',
|
[sortableIndex]='idx',
|
||||||
(onDragEnd)='onTabDragEnd()',
|
(onDragStart)='onTabDragStart()',
|
||||||
|
(onDragEnd)='onTabDragEnd()',
|
||||||
|
|
||||||
[index]='idx',
|
[index]='idx',
|
||||||
[tab]='tab',
|
[tab]='tab',
|
||||||
[active]='tab == app.activeTab',
|
[active]='tab == app.activeTab',
|
||||||
[hasActivity]='tab.activity$|async',
|
[hasActivity]='tab.activity$|async',
|
||||||
@animateTab,
|
@animateTab,
|
||||||
(click)='app.selectTab(tab)',
|
(click)='app.selectTab(tab)',
|
||||||
[class.fully-draggable]='hostApp.platform != Platform.macOS',
|
[class.fully-draggable]='hostApp.platform != Platform.macOS',
|
||||||
[class.drag-region]='hostApp.platform == Platform.macOS && !tabsDragging',
|
[class.drag-region]='hostApp.platform == Platform.macOS && !tabsDragging',
|
||||||
)
|
[class.vertical]='true',
|
||||||
|
)
|
||||||
|
|
||||||
.btn-group.background
|
|
||||||
.d-flex(
|
|
||||||
*ngFor='let button of leftToolbarButtons',
|
|
||||||
ngbDropdown,
|
|
||||||
(openChange)='generateButtonSubmenu(button)',
|
|
||||||
)
|
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
|
||||||
[title]='button.title',
|
|
||||||
(click)='button.click && button.click()',
|
|
||||||
[fastHtmlBind]='button.icon',
|
|
||||||
ngbDropdownToggle,
|
|
||||||
)
|
|
||||||
div(*ngIf='button.submenu', ngbDropdownMenu)
|
|
||||||
button.dropdown-item.d-flex.align-items-center(
|
|
||||||
*ngFor='let item of button.submenuItems',
|
|
||||||
(click)='item.click()',
|
|
||||||
ngbDropdownItem,
|
|
||||||
)
|
|
||||||
.icon-wrapper(
|
|
||||||
*ngIf='hasIcons(button.submenuItems)',
|
|
||||||
[fastHtmlBind]='item.icon'
|
|
||||||
)
|
|
||||||
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
|
||||||
|
|
||||||
.drag-space.background([class.persistent]='config.store.appearance.frame == "thin" && hostApp.platform != Platform.macOS')
|
.content(
|
||||||
|
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left"',
|
||||||
|
[class.with-side-tab]='config.store.appearance.tabsLocation == "left"',
|
||||||
|
)
|
||||||
|
.tab-bar
|
||||||
|
.inset.background(*ngIf='hostApp.platform == Platform.macOS \
|
||||||
|
&& config.store.appearance.frame == "thin" \
|
||||||
|
&& (config.store.appearance.tabsLocation == "top" || config.store.appearance.tabsLocation == "left")')
|
||||||
|
.tabs(
|
||||||
|
*ngIf='config.store.appearance.tabsLocation != "left"'
|
||||||
|
dnd-sortable-container,
|
||||||
|
[sortableData]='app.tabs',
|
||||||
|
)
|
||||||
|
tab-header(
|
||||||
|
*ngFor='let tab of app.tabs; let idx = index',
|
||||||
|
dnd-sortable,
|
||||||
|
[sortableIndex]='idx',
|
||||||
|
(onDragStart)='onTabDragStart()',
|
||||||
|
(onDragEnd)='onTabDragEnd()',
|
||||||
|
|
||||||
.btn-group.background
|
[index]='idx',
|
||||||
.d-flex(
|
[tab]='tab',
|
||||||
*ngFor='let button of rightToolbarButtons',
|
[active]='tab == app.activeTab',
|
||||||
ngbDropdown,
|
[hasActivity]='tab.activity$|async',
|
||||||
(openChange)='generateButtonSubmenu(button)',
|
@animateTab,
|
||||||
)
|
(click)='app.selectTab(tab)',
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
[class.fully-draggable]='hostApp.platform != Platform.macOS',
|
||||||
[title]='button.title',
|
[class.drag-region]='hostApp.platform == Platform.macOS && !tabsDragging',
|
||||||
(click)='button.click && button.click()',
|
)
|
||||||
[fastHtmlBind]='button.icon',
|
|
||||||
ngbDropdownToggle,
|
|
||||||
)
|
|
||||||
div(*ngIf='button.submenu', ngbDropdownMenu)
|
|
||||||
button.dropdown-item.d-flex.align-items-center(
|
|
||||||
*ngFor='let item of button.submenuItems',
|
|
||||||
(click)='item.click()',
|
|
||||||
ngbDropdownItem,
|
|
||||||
)
|
|
||||||
.icon-wrapper(
|
|
||||||
*ngIf='hasIcons(button.submenuItems)',
|
|
||||||
[fastHtmlBind]='item.icon'
|
|
||||||
)
|
|
||||||
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
|
||||||
|
|
||||||
button.btn.btn-secondary.btn-tab-bar.btn-update(
|
.btn-group.background
|
||||||
*ngIf='updatesAvailable',
|
.d-flex(
|
||||||
title='Update available - Click to install',
|
*ngFor='let button of leftToolbarButtons',
|
||||||
(click)='updateApp()',
|
ngbDropdown,
|
||||||
[fastHtmlBind]='updateIcon'
|
(openChange)='generateButtonSubmenu(button)',
|
||||||
)
|
)
|
||||||
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
|
[title]='button.title',
|
||||||
|
(click)='button.click && button.click()',
|
||||||
|
[fastHtmlBind]='button.icon',
|
||||||
|
ngbDropdownToggle,
|
||||||
|
)
|
||||||
|
div(*ngIf='button.submenu', ngbDropdownMenu)
|
||||||
|
button.dropdown-item.d-flex.align-items-center(
|
||||||
|
*ngFor='let item of button.submenuItems',
|
||||||
|
(click)='item.click()',
|
||||||
|
ngbDropdownItem,
|
||||||
|
)
|
||||||
|
.icon-wrapper(
|
||||||
|
*ngIf='hasIcons(button.submenuItems)',
|
||||||
|
[fastHtmlBind]='item.icon'
|
||||||
|
)
|
||||||
|
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
||||||
|
|
||||||
window-controls.background(
|
.drag-space.background([class.persistent]='config.store.appearance.frame == "thin" && hostApp.platform != Platform.macOS')
|
||||||
*ngIf='config.store.appearance.frame == "thin" && (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
|
|
||||||
)
|
|
||||||
|
|
||||||
start-page(*ngIf='ready && app.tabs.length == 0')
|
.btn-group.background
|
||||||
|
.d-flex(
|
||||||
|
*ngFor='let button of rightToolbarButtons',
|
||||||
|
ngbDropdown,
|
||||||
|
(openChange)='generateButtonSubmenu(button)',
|
||||||
|
)
|
||||||
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
|
[title]='button.title',
|
||||||
|
(click)='button.click && button.click()',
|
||||||
|
[fastHtmlBind]='button.icon',
|
||||||
|
ngbDropdownToggle,
|
||||||
|
)
|
||||||
|
div(*ngIf='button.submenu', ngbDropdownMenu)
|
||||||
|
button.dropdown-item.d-flex.align-items-center(
|
||||||
|
*ngFor='let item of button.submenuItems',
|
||||||
|
(click)='item.click()',
|
||||||
|
ngbDropdownItem,
|
||||||
|
)
|
||||||
|
.icon-wrapper(
|
||||||
|
*ngIf='hasIcons(button.submenuItems)',
|
||||||
|
[fastHtmlBind]='item.icon'
|
||||||
|
)
|
||||||
|
div([class.ml-3]='hasIcons(button.submenuItems)') {{item.title}}
|
||||||
|
|
||||||
tab-body(
|
button.btn.btn-secondary.btn-tab-bar.btn-update(
|
||||||
*ngFor='let tab of unsortedTabs',
|
*ngIf='updatesAvailable',
|
||||||
[active]='tab == app.activeTab',
|
title='Update available - Click to install',
|
||||||
[tab]='tab',
|
(click)='updateApp()',
|
||||||
)
|
[fastHtmlBind]='updateIcon'
|
||||||
|
)
|
||||||
|
|
||||||
|
window-controls.background(
|
||||||
|
*ngIf='config.store.appearance.frame == "thin" \
|
||||||
|
&& (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
|
||||||
|
)
|
||||||
|
|
||||||
|
start-page(*ngIf='ready && app.tabs.length == 0')
|
||||||
|
|
||||||
|
tab-body(
|
||||||
|
*ngFor='let tab of unsortedTabs',
|
||||||
|
[active]='tab == app.activeTab',
|
||||||
|
[tab]='tab',
|
||||||
|
)
|
||||||
|
|
||||||
ng-template(ngbModalContainer)
|
ng-template(ngbModalContainer)
|
||||||
|
@ -15,10 +15,18 @@
|
|||||||
|
|
||||||
$tabs-height: 38px;
|
$tabs-height: 38px;
|
||||||
$tab-border-radius: 4px;
|
$tab-border-radius: 4px;
|
||||||
|
$side-tab-width: 200px;
|
||||||
|
|
||||||
|
.wrap {
|
||||||
|
display: flex;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
height: 100%;
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
@ -26,12 +34,24 @@ $tab-border-radius: 4px;
|
|||||||
&.tabs-on-top {
|
&.tabs-on-top {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.with-side-tab {
|
||||||
|
width: calc(100% - #{$side-tab-width});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-bar {
|
.tab-bar {
|
||||||
flex: none;
|
flex: none;
|
||||||
height: $tabs-height;
|
height: $tabs-height;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
&.vertical {
|
||||||
|
height: 100%;
|
||||||
|
width: $side-tab-width;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-tab-bar {
|
.btn-tab-bar {
|
||||||
line-height: $tabs-height + 2px;
|
line-height: $tabs-height + 2px;
|
||||||
@ -59,6 +79,12 @@ $tab-border-radius: 4px;
|
|||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
|
&.vertical {
|
||||||
|
width: $side-tab-width;
|
||||||
|
flex: auto;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&>.drag-space {
|
&>.drag-space {
|
||||||
|
@ -13,6 +13,11 @@ $tabs-height: 38px;
|
|||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
&.vertical {
|
||||||
|
flex: none;
|
||||||
|
height: $tabs-height;
|
||||||
|
}
|
||||||
|
|
||||||
.index {
|
.index {
|
||||||
flex: none;
|
flex: none;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -51,6 +51,13 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
|||||||
[value]='"bottom"'
|
[value]='"bottom"'
|
||||||
)
|
)
|
||||||
| At the bottom
|
| At the bottom
|
||||||
|
label.btn.btn-secondary(ngbButtonLabel)
|
||||||
|
input(
|
||||||
|
type='radio',
|
||||||
|
ngbButton,
|
||||||
|
[value]='"left"'
|
||||||
|
)
|
||||||
|
| At the left
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
.header
|
.header
|
||||||
|
@ -65,7 +65,7 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
const onConfigChange = () => {
|
const onConfigChange = () => {
|
||||||
this.configFile = config.readRaw()
|
this.configFile = config.readRaw()
|
||||||
this.padWindowControls = hostApp.platform === Platform.macOS
|
this.padWindowControls = hostApp.platform === Platform.macOS
|
||||||
&& config.store.appearance.tabsLocation === 'bottom'
|
&& config.store.appearance.tabsLocation !== 'top'
|
||||||
}
|
}
|
||||||
|
|
||||||
this.configSubscription = config.changed$.subscribe(onConfigChange)
|
this.configSubscription = config.changed$.subscribe(onConfigChange)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --progress --color",
|
"build": "webpack --progress --color",
|
||||||
"watch": "webpack --progress --color --watch",
|
"watch": "webpack --progress --color --watch",
|
||||||
"postinstall": "xcopy /i node_modules\\ssh2\\util\\pagent.exe util\\"
|
"postinstall": "xcopy /i /y node_modules\\ssh2\\util\\pagent.exe util\\"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
@ -348,7 +348,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
|
|
||||||
this.topPadded = this.hostApp.platform === Platform.macOS
|
this.topPadded = this.hostApp.platform === Platform.macOS
|
||||||
&& this.config.store.appearance.frame === 'thin'
|
&& this.config.store.appearance.frame === 'thin'
|
||||||
&& this.config.store.appearance.tabsLocation === 'bottom'
|
&& this.config.store.appearance.tabsLocation !== 'top'
|
||||||
|
|
||||||
if (this.config.store.terminal.background === 'colorScheme') {
|
if (this.config.store.terminal.background === 'colorScheme') {
|
||||||
if (this.config.store.terminal.colorScheme.background) {
|
if (this.config.store.terminal.colorScheme.background) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user