mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-04 10:29:55 +00:00
ю
This commit is contained in:
parent
889a60ba3b
commit
b52055785a
57
Makefile
57
Makefile
@ -1,57 +0,0 @@
|
|||||||
MAC_WS="/tmp/elements-build"
|
|
||||||
MAC_OUTPUT="./dist/Elements-Electron.pkg"
|
|
||||||
FULL_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:]; print(v.split("-0-g")[0])')
|
|
||||||
SHORT_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:].split("-")[0]; print(v)')
|
|
||||||
|
|
||||||
builtin_plugins = terminus-core terminus-settings terminus-terminal
|
|
||||||
|
|
||||||
all: run
|
|
||||||
|
|
||||||
run:
|
|
||||||
DEV=1 TERMINUS_PLUGINS=$$PWD ./node_modules/.bin/electron ./app --debug
|
|
||||||
|
|
||||||
lint:
|
|
||||||
tslint -c tslint.json app/src/*.ts app/src/**/*.ts
|
|
||||||
|
|
||||||
build:
|
|
||||||
DEV=1 ./node_modules/.bin/webpack --progress --display-modules
|
|
||||||
|
|
||||||
watch:
|
|
||||||
DEV=1 ./node_modules/.bin/webpack --progress -w
|
|
||||||
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
echo :: Building application
|
|
||||||
./node_modules/.bin/build --dir --win --em.version=$(FULL_VERSION)
|
|
||||||
cp ./app/assets/img/disk.ico dist/win-unpacked/
|
|
||||||
|
|
||||||
build-mac:
|
|
||||||
echo :: Building application
|
|
||||||
./node_modules/.bin/build --dir --mac --em.version=$(FULL_VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
package-mac: driver-mac build-mac
|
|
||||||
rm -rf $(MAC_WS) || true
|
|
||||||
mkdir -p $(MAC_WS)
|
|
||||||
mkdir -p $(MAC_WS)/app/Applications
|
|
||||||
mkdir -p $(MAC_WS)/driver/Library/Extensions
|
|
||||||
cp -Rv dist/mac/ELEMENTS.app $(MAC_WS)/app/Applications/
|
|
||||||
cp -Rv dist/ElementsDriver.kext $(MAC_WS)/driver/Library/Extensions
|
|
||||||
pkgbuild --root $(MAC_WS)/app \
|
|
||||||
--component-plist ./build/mac/Elements.component.plist \
|
|
||||||
--version $(SHORT_VERSION) \
|
|
||||||
--scripts ./build/mac \
|
|
||||||
$(MAC_WS)/Elements.pkg
|
|
||||||
pkgbuild --root $(MAC_WS)/driver \
|
|
||||||
--component-plist ./build/mac/ElementsDriver.component.plist \
|
|
||||||
--scripts ./build/mac \
|
|
||||||
$(MAC_WS)/ElementsDriver.pkg
|
|
||||||
cp ./build/mac/AFPTuner.pkg $(MAC_WS)/
|
|
||||||
|
|
||||||
productbuild --distribution "./build/mac/Distribution.xml" \
|
|
||||||
--package-path $(MAC_WS) \
|
|
||||||
--version $(SHORT_VERSION) \
|
|
||||||
--sign "Developer ID Installer: Syslink GmbH (V4JSMC46SY)" \
|
|
||||||
$(MAC_OUTPUT)
|
|
||||||
|
|
||||||
.PHONY: run native build coverage
|
|
@ -20,7 +20,8 @@ if (process.env.DEV) {
|
|||||||
|
|
||||||
nodeModule.globalPaths.unshift(path.join(
|
nodeModule.globalPaths.unshift(path.join(
|
||||||
path.dirname(require('electron').remote.app.getPath('exe')),
|
path.dirname(require('electron').remote.app.getPath('exe')),
|
||||||
'resources/builtin-plugins/node_modules',
|
(process.platform == 'darwin') ? '../Resources' : 'resources',
|
||||||
|
'builtin-plugins/node_modules',
|
||||||
))
|
))
|
||||||
nodeModule.globalPaths.unshift(path.join(
|
nodeModule.globalPaths.unshift(path.join(
|
||||||
require('electron').remote.app.getPath('appData'),
|
require('electron').remote.app.getPath('appData'),
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
"mac": {
|
"mac": {
|
||||||
"category": "public.app-category.video",
|
"category": "public.app-category.video",
|
||||||
"icon": "./build/mac/icon.icns",
|
"icon": "./build/mac/icon.icns",
|
||||||
"identity": "Syslink GmbH"
|
"identity": null
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
|
11
scripts/build-macos.js
Executable file
11
scripts/build-macos.js
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const builder = require('electron-builder').build
|
||||||
|
const vars = require('./vars')
|
||||||
|
|
||||||
|
builder({
|
||||||
|
dir: true,
|
||||||
|
mac: ['dmg'],
|
||||||
|
extraMetadata: {
|
||||||
|
version: vars.version,
|
||||||
|
},
|
||||||
|
})
|
@ -56,7 +56,7 @@ title-bar(
|
|||||||
)
|
)
|
||||||
i.fa.fa-close
|
i.fa.fa-close
|
||||||
|
|
||||||
start-page(*ngIf='app.tabs.length == 0')
|
start-page(*ngIf='ready && app.tabs.length == 0')
|
||||||
|
|
||||||
tab-body(
|
tab-body(
|
||||||
*ngFor='let tab of app.tabs; trackBy: tab?.id',
|
*ngFor='let tab of app.tabs; trackBy: tab?.id',
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
animation: 0.5s ease-out fadeIn;
|
animation: 0.5s ease-out fadeIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabs-height: 40px;
|
$tabs-height: 36px;
|
||||||
$tab-border-radius: 4px;
|
$tab-border-radius: 4px;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject } from '@angular/core'
|
import { Component, Inject, Input } from '@angular/core'
|
||||||
import { trigger, style, animate, transition, state } from '@angular/animations'
|
import { trigger, style, animate, transition, state } from '@angular/animations'
|
||||||
import { ToasterConfig } from 'angular2-toaster'
|
import { ToasterConfig } from 'angular2-toaster'
|
||||||
|
|
||||||
@ -21,20 +21,20 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
|||||||
animations: [
|
animations: [
|
||||||
trigger('animateTab', [
|
trigger('animateTab', [
|
||||||
state('in', style({
|
state('in', style({
|
||||||
'flex-grow': '1000',
|
|
||||||
'flex-basis': '200px',
|
'flex-basis': '200px',
|
||||||
|
'width': '200px',
|
||||||
})),
|
})),
|
||||||
transition(':enter', [
|
transition(':enter', [
|
||||||
style({
|
style({
|
||||||
'flex-grow': '1',
|
|
||||||
'flex-basis': '1px',
|
'flex-basis': '1px',
|
||||||
|
'width': '1px',
|
||||||
}),
|
}),
|
||||||
animate('250ms ease-in-out')
|
animate('250ms ease-in-out')
|
||||||
]),
|
]),
|
||||||
transition(':leave', [
|
transition(':leave', [
|
||||||
animate('250ms ease-in-out', style({
|
animate('250ms ease-in-out', style({
|
||||||
'flex-grow': '1',
|
|
||||||
'flex-basis': '1px',
|
'flex-basis': '1px',
|
||||||
|
'width': '1px',
|
||||||
}))
|
}))
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -43,6 +43,7 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
|||||||
export class AppRootComponent {
|
export class AppRootComponent {
|
||||||
toasterConfig: ToasterConfig
|
toasterConfig: ToasterConfig
|
||||||
Platform = Platform
|
Platform = Platform
|
||||||
|
@Input() ready = false
|
||||||
private logger: Logger
|
private logger: Logger
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
@ -131,6 +132,7 @@ export class AppRootComponent {
|
|||||||
|
|
||||||
async ngOnInit () {
|
async ngOnInit () {
|
||||||
await this.tabRecovery.recoverTabs()
|
await this.tabRecovery.recoverTabs()
|
||||||
|
this.ready = true
|
||||||
this.tabRecovery.saveTabs(this.app.tabs)
|
this.tabRecovery.saveTabs(this.app.tabs)
|
||||||
|
|
||||||
if (this.app.tabs.length === 0) {
|
if (this.app.tabs.length === 0) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$tabs-height: 40px;
|
$tabs-height: 36px;
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
line-height: $tabs-height - 2px;
|
line-height: $tabs-height - 2px;
|
||||||
@ -13,7 +13,7 @@ $tabs-height: 40px;
|
|||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
transition: 0.25s ease-out all;
|
transition: 0.125s ease-out all;
|
||||||
|
|
||||||
border-top: 1px solid transparent;
|
border-top: 1px solid transparent;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ $tabs-height: 40px;
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
line-height: 38px;
|
line-height: 35px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: 0.25s all;
|
transition: 0.25s all;
|
||||||
}
|
}
|
||||||
@ -44,12 +44,12 @@ $tabs-height: 40px;
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
$button-size: $tabs-height * 0.6;
|
$button-size: 23px;
|
||||||
width: $button-size;
|
width: $button-size;
|
||||||
height: $button-size;
|
height: $button-size;
|
||||||
border-radius: $button-size / 2;
|
border-radius: $button-size / 2;
|
||||||
line-height: $button-size * 0.8;
|
line-height: $button-size * 0.87;
|
||||||
margin-top: ($tabs-height - $button-size) * 0.4;
|
margin-top: ($tabs-height - $button-size) * 0.5;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -96,83 +96,72 @@ app-root {
|
|||||||
|
|
||||||
&> .content {
|
&> .content {
|
||||||
.tab-bar {
|
.tab-bar {
|
||||||
&>button {
|
.btn-tab-bar {
|
||||||
|
background: transparent;
|
||||||
&:hover { background: $button-hover-bg !important; }
|
&:hover { background: $button-hover-bg !important; }
|
||||||
&:active { background: $button-active-bg !important; }
|
&:active { background: $button-active-bg !important; }
|
||||||
|
|
||||||
&:not(:hover):not(:active) {
|
|
||||||
background: $body-bg2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&>.tabs {
|
&>.tabs {
|
||||||
tab-header {
|
tab-header {
|
||||||
.wrapper {
|
background: $body-bg;
|
||||||
.index {
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
.index {
|
||||||
text-align: center;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
.name {
|
||||||
color: $body-color;
|
text-align: center;
|
||||||
border: none;
|
}
|
||||||
transition: 0.25s all;
|
|
||||||
}
|
button {
|
||||||
|
color: $body-color;
|
||||||
|
border: none;
|
||||||
|
transition: 0.25s all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tabs-on-top .tab-bar {
|
&.tabs-on-top .tab-bar {
|
||||||
margin-top: 3px;
|
margin-top: -1px;
|
||||||
|
border-bottom: 1px solid $window-border;
|
||||||
&>button {
|
|
||||||
border-bottom: 1px solid $window-border;
|
|
||||||
}
|
|
||||||
|
|
||||||
tab-header {
|
tab-header {
|
||||||
.wrapper {
|
margin-bottom: -1px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-bottom: 1px solid $window-border;
|
border-bottom: 1px solid $window-border;
|
||||||
border-top-left-radius: $tab-border-radius;
|
border-top-left-radius: $tab-border-radius;
|
||||||
border-top-right-radius: $tab-border-radius;
|
border-top-right-radius: $tab-border-radius;
|
||||||
}
|
|
||||||
|
|
||||||
&.active .wrapper {
|
&.active {
|
||||||
border: 1px solid $window-border;
|
border: 1px solid $window-border;
|
||||||
border-bottom: 1px solid transparent;
|
border-bottom: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.has-activity:not(.active) .wrapper {
|
&.has-activity:not(.active) {
|
||||||
border-top: 1px solid $green;
|
border-top: 1px solid $green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.tabs-on-top) .tab-bar {
|
&:not(.tabs-on-top) .tab-bar {
|
||||||
margin-bottom: 3px;
|
margin-bottom: -1px;
|
||||||
|
border-top: 1px solid $window-border;
|
||||||
&>button {
|
|
||||||
border-top: 1px solid $window-border;
|
|
||||||
}
|
|
||||||
|
|
||||||
tab-header {
|
tab-header {
|
||||||
.wrapper {
|
margin-top: -1px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-top: 1px solid $window-border;
|
border-top: 1px solid $window-border;
|
||||||
border-bottom-left-radius: $tab-border-radius;
|
border-bottom-left-radius: $tab-border-radius;
|
||||||
border-bottom-right-radius: $tab-border-radius;
|
border-bottom-right-radius: $tab-border-radius;
|
||||||
}
|
|
||||||
|
|
||||||
&.active .wrapper {
|
&.active {
|
||||||
border: 1px solid $window-border;
|
border: 1px solid $window-border;
|
||||||
border-top: 1px solid transparent;
|
border-top: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.has-activity:not(.active) .wrapper {
|
&.has-activity:not(.active) {
|
||||||
border-bottom: 1px solid $green;
|
border-bottom: 1px solid $green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user