mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 14:04:56 +00:00
Merge branch 'master' of github.com:Eugeny/terminus
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
title-bar(*ngIf='config.store.appearance.frame == "full" && config.store.appearance.dock == "off"')
|
||||
title-bar(
|
||||
*ngIf='config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
|
||||
[class.inset]='hostApp.platform == Platform.macOS'
|
||||
)
|
||||
|
||||
.content(
|
||||
[class.tabs-on-top]='config.store.appearance.tabsOnTop'
|
||||
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top"'
|
||||
)
|
||||
.tab-bar
|
||||
.tab-bar(
|
||||
[class.inset]='hostApp.platform == Platform.macOS && config.store.appearance.frame == "thin" && config.store.appearance.tabsLocation == "top"'
|
||||
)
|
||||
.tabs
|
||||
tab-header(
|
||||
*ngFor='let tab of app.tabs; let idx = index',
|
||||
@@ -11,42 +16,45 @@ title-bar(*ngIf='config.store.appearance.frame == "full" && config.store.appeara
|
||||
[tab]='tab',
|
||||
[active]='tab == app.activeTab',
|
||||
[hasActivity]='tab.hasActivity',
|
||||
[class.drag-region]='hostApp.platform == Platform.macOS',
|
||||
@animateTab,
|
||||
(click)='app.selectTab(tab)',
|
||||
(closeClicked)='app.closeTab(tab)',
|
||||
)
|
||||
|
||||
button.btn.btn-secondary(
|
||||
*ngFor='let button of getLeftToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
.btn-group
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
*ngFor='let button of getLeftToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
.drag-space
|
||||
|
||||
.btn-group
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
*ngFor='let button of getRightToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
button.btn.btn-secondary(
|
||||
*ngFor='let button of getRightToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
.btn-group.window-controls(
|
||||
*ngIf='config.store.appearance.frame == "thin" && (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
button.btn.btn-secondary.btn-minimize(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.minimize()',
|
||||
)
|
||||
i.fa.fa-window-minimize
|
||||
button.btn.btn-secondary.btn-maximize(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.toggleMaximize()',
|
||||
)
|
||||
i.fa.fa-window-maximize
|
||||
button.btn.btn-secondary.btn-close(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.quit()',
|
||||
)
|
||||
i.fa.fa-close
|
||||
button.btn.btn-secondary.btn-minimize.btn-tab-bar(
|
||||
(click)='hostApp.minimize()',
|
||||
)
|
||||
i.fa.fa-window-minimize
|
||||
button.btn.btn-secondary.btn-maximize.btn-tab-bar(
|
||||
(click)='hostApp.toggleMaximize()',
|
||||
)
|
||||
i.fa.fa-window-maximize
|
||||
button.btn.btn-secondary.btn-close.btn-tab-bar(
|
||||
(click)='hostApp.quit()',
|
||||
)
|
||||
i.fa.fa-close
|
||||
|
||||
start-page(*ngIf='app.tabs.length == 0')
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
cursor: default;
|
||||
animation: 0.5s ease-out fadeIn;
|
||||
@@ -29,7 +30,7 @@ $tab-border-radius: 4px;
|
||||
height: $tabs-height;
|
||||
display: flex;
|
||||
|
||||
&>button {
|
||||
.btn-tab-bar {
|
||||
line-height: $tabs-height + 2px;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -48,7 +49,7 @@ $tab-border-radius: 4px;
|
||||
&.btn-minimize {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
&.btn-minimize, &.btn-maximize {
|
||||
font-size: 8px;
|
||||
}
|
||||
@@ -69,6 +70,14 @@ $tab-border-radius: 4px;
|
||||
flex: 1 0 25%;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
.window-controls {
|
||||
flex: 0 0 none;
|
||||
}
|
||||
|
||||
&.inset {
|
||||
padding-left: 85px;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-content {
|
||||
|
@@ -3,7 +3,7 @@ import { trigger, style, animate, transition, state } from '@angular/animations'
|
||||
import { ToasterConfig } from 'angular2-toaster'
|
||||
|
||||
import { ElectronService } from '../services/electron.service'
|
||||
import { HostAppService } from '../services/hostApp.service'
|
||||
import { HostAppService, Platform } from '../services/hostApp.service'
|
||||
import { HotkeysService } from '../services/hotkeys.service'
|
||||
import { Logger, LogService } from '../services/log.service'
|
||||
import { QuitterService } from '../services/quitter.service'
|
||||
@@ -43,6 +43,7 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
})
|
||||
export class AppRootComponent {
|
||||
toasterConfig: ToasterConfig
|
||||
Platform = Platform
|
||||
private logger: Logger
|
||||
|
||||
constructor(
|
||||
|
@@ -61,4 +61,8 @@ $tabs-height: 40px;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.drag-region {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ $titlebar-height: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&.inset-titlebar {
|
||||
&.inset {
|
||||
flex-basis: 36px;
|
||||
|
||||
.title {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Component, HostBinding } from '@angular/core'
|
||||
import { HostAppService, Platform } from '../services/hostApp.service'
|
||||
import { Component } from '@angular/core'
|
||||
|
||||
@Component({
|
||||
selector: 'title-bar',
|
||||
@@ -7,9 +6,4 @@ import { HostAppService, Platform } from '../services/hostApp.service'
|
||||
styles: [require('./titleBar.component.scss')],
|
||||
})
|
||||
export class TitleBarComponent {
|
||||
@HostBinding('class.inset-titlebar') insetTitlebar = false
|
||||
|
||||
constructor (public hostApp: HostAppService) {
|
||||
this.insetTitlebar = hostApp.platform == Platform.macOS
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
appearance:
|
||||
dock: 'off'
|
||||
dockScreen: 'current'
|
||||
dock: off
|
||||
dockScreen: current
|
||||
dockFill: 50
|
||||
tabsOnTop: true
|
||||
theme: 'Standard'
|
||||
frame: 'thin'
|
||||
tabsLocation: top
|
||||
theme: Standard
|
||||
frame: thin
|
||||
|
@@ -82,13 +82,14 @@ title-bar {
|
||||
}
|
||||
}
|
||||
|
||||
$border-color: #141414;
|
||||
|
||||
app-root {
|
||||
&> .content {
|
||||
background: $body-bg2;
|
||||
|
||||
.tab-bar {
|
||||
&>button {
|
||||
.btn-tab-bar {
|
||||
&:not(:hover):not(:active) {
|
||||
background: $body-bg2;
|
||||
}
|
||||
@@ -105,6 +106,8 @@ app-root {
|
||||
|
||||
tab-header {
|
||||
background: $body-bg2;
|
||||
border-left: 1px solid transparent;
|
||||
border-right: 1px solid transparent;
|
||||
|
||||
.index {
|
||||
color: #555;
|
||||
@@ -121,17 +124,22 @@ app-root {
|
||||
|
||||
&.active {
|
||||
background: $body-bg;
|
||||
border-left: 1px solid $border-color;
|
||||
border-right: 1px solid $border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.tabs-on-top .tab-bar {
|
||||
border-bottom: 1px solid $border-color;
|
||||
|
||||
tab-header {
|
||||
border-top: 1px solid transparent;
|
||||
|
||||
&.active {
|
||||
border-top: 1px solid $teal;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
&.has-activity:not(.active) {
|
||||
@@ -141,13 +149,14 @@ app-root {
|
||||
}
|
||||
|
||||
&:not(.tabs-on-top) .tab-bar {
|
||||
margin-bottom: 3px;
|
||||
border-top: 1px solid $border-color;
|
||||
|
||||
tab-header {
|
||||
border-bottom: 1px solid transparent;
|
||||
|
||||
&.active {
|
||||
border-bottom: 1px solid $teal;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
&.has-activity:not(.active) {
|
||||
|
Reference in New Issue
Block a user