mirror of
https://github.com/Eugeny/tabby.git
synced 2025-03-01 15:06:27 +08: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(
|
||||
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(
|
||||
require('electron').remote.app.getPath('appData'),
|
||||
|
@ -52,7 +52,7 @@
|
||||
"mac": {
|
||||
"category": "public.app-category.video",
|
||||
"icon": "./build/mac/icon.icns",
|
||||
"identity": "Syslink GmbH"
|
||||
"identity": null
|
||||
},
|
||||
"linux": {
|
||||
"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
|
||||
|
||||
start-page(*ngIf='app.tabs.length == 0')
|
||||
start-page(*ngIf='ready && app.tabs.length == 0')
|
||||
|
||||
tab-body(
|
||||
*ngFor='let tab of app.tabs; trackBy: tab?.id',
|
||||
|
@ -11,7 +11,7 @@
|
||||
animation: 0.5s ease-out fadeIn;
|
||||
}
|
||||
|
||||
$tabs-height: 40px;
|
||||
$tabs-height: 36px;
|
||||
$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 { ToasterConfig } from 'angular2-toaster'
|
||||
|
||||
@ -21,20 +21,20 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
animations: [
|
||||
trigger('animateTab', [
|
||||
state('in', style({
|
||||
'flex-grow': '1000',
|
||||
'flex-basis': '200px',
|
||||
'width': '200px',
|
||||
})),
|
||||
transition(':enter', [
|
||||
style({
|
||||
'flex-grow': '1',
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
}),
|
||||
animate('250ms ease-in-out')
|
||||
]),
|
||||
transition(':leave', [
|
||||
animate('250ms ease-in-out', style({
|
||||
'flex-grow': '1',
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
}))
|
||||
])
|
||||
])
|
||||
@ -43,6 +43,7 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
export class AppRootComponent {
|
||||
toasterConfig: ToasterConfig
|
||||
Platform = Platform
|
||||
@Input() ready = false
|
||||
private logger: Logger
|
||||
|
||||
constructor (
|
||||
@ -131,6 +132,7 @@ export class AppRootComponent {
|
||||
|
||||
async ngOnInit () {
|
||||
await this.tabRecovery.recoverTabs()
|
||||
this.ready = true
|
||||
this.tabRecovery.saveTabs(this.app.tabs)
|
||||
|
||||
if (this.app.tabs.length === 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
$tabs-height: 40px;
|
||||
$tabs-height: 36px;
|
||||
|
||||
:host {
|
||||
line-height: $tabs-height - 2px;
|
||||
@ -13,7 +13,7 @@ $tabs-height: 40px;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
transition: 0.25s ease-out all;
|
||||
transition: 0.125s ease-out all;
|
||||
|
||||
border-top: 1px solid transparent;
|
||||
|
||||
@ -24,7 +24,7 @@ $tabs-height: 40px;
|
||||
margin-left: 10px;
|
||||
width: 20px;
|
||||
border-radius: 10px;
|
||||
line-height: 38px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
transition: 0.25s all;
|
||||
}
|
||||
@ -44,12 +44,12 @@ $tabs-height: 40px;
|
||||
background: transparent;
|
||||
opacity: 0;
|
||||
|
||||
$button-size: $tabs-height * 0.6;
|
||||
$button-size: 23px;
|
||||
width: $button-size;
|
||||
height: $button-size;
|
||||
border-radius: $button-size / 2;
|
||||
line-height: $button-size * 0.8;
|
||||
margin-top: ($tabs-height - $button-size) * 0.4;
|
||||
line-height: $button-size * 0.87;
|
||||
margin-top: ($tabs-height - $button-size) * 0.5;
|
||||
margin-right: 10px;
|
||||
|
||||
text-align: center;
|
||||
|
@ -96,83 +96,72 @@ app-root {
|
||||
|
||||
&> .content {
|
||||
.tab-bar {
|
||||
&>button {
|
||||
.btn-tab-bar {
|
||||
background: transparent;
|
||||
&:hover { background: $button-hover-bg !important; }
|
||||
&:active { background: $button-active-bg !important; }
|
||||
|
||||
&:not(:hover):not(:active) {
|
||||
background: $body-bg2;
|
||||
}
|
||||
}
|
||||
|
||||
&>.tabs {
|
||||
tab-header {
|
||||
.wrapper {
|
||||
.index {
|
||||
color: #555;
|
||||
}
|
||||
background: $body-bg;
|
||||
|
||||
.name {
|
||||
text-align: center;
|
||||
}
|
||||
.index {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
button {
|
||||
color: $body-color;
|
||||
border: none;
|
||||
transition: 0.25s all;
|
||||
}
|
||||
.name {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button {
|
||||
color: $body-color;
|
||||
border: none;
|
||||
transition: 0.25s all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.tabs-on-top .tab-bar {
|
||||
margin-top: 3px;
|
||||
|
||||
&>button {
|
||||
border-bottom: 1px solid $window-border;
|
||||
}
|
||||
margin-top: -1px;
|
||||
border-bottom: 1px solid $window-border;
|
||||
|
||||
tab-header {
|
||||
.wrapper {
|
||||
border: 1px solid transparent;
|
||||
border-bottom: 1px solid $window-border;
|
||||
border-top-left-radius: $tab-border-radius;
|
||||
border-top-right-radius: $tab-border-radius;
|
||||
}
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid transparent;
|
||||
border-bottom: 1px solid $window-border;
|
||||
border-top-left-radius: $tab-border-radius;
|
||||
border-top-right-radius: $tab-border-radius;
|
||||
|
||||
&.active .wrapper {
|
||||
&.active {
|
||||
border: 1px solid $window-border;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
&.has-activity:not(.active) .wrapper {
|
||||
&.has-activity:not(.active) {
|
||||
border-top: 1px solid $green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.tabs-on-top) .tab-bar {
|
||||
margin-bottom: 3px;
|
||||
|
||||
&>button {
|
||||
border-top: 1px solid $window-border;
|
||||
}
|
||||
margin-bottom: -1px;
|
||||
border-top: 1px solid $window-border;
|
||||
|
||||
tab-header {
|
||||
.wrapper {
|
||||
border: 1px solid transparent;
|
||||
border-top: 1px solid $window-border;
|
||||
border-bottom-left-radius: $tab-border-radius;
|
||||
border-bottom-right-radius: $tab-border-radius;
|
||||
}
|
||||
margin-top: -1px;
|
||||
border: 1px solid transparent;
|
||||
border-top: 1px solid $window-border;
|
||||
border-bottom-left-radius: $tab-border-radius;
|
||||
border-bottom-right-radius: $tab-border-radius;
|
||||
|
||||
&.active .wrapper {
|
||||
&.active {
|
||||
border: 1px solid $window-border;
|
||||
border-top: 1px solid transparent;
|
||||
}
|
||||
|
||||
&.has-activity:not(.active) .wrapper {
|
||||
&.has-activity:not(.active) {
|
||||
border-bottom: 1px solid $green;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user