added welcome tab (fixes #845)

This commit is contained in:
Eugene Pankov
2019-05-25 22:52:25 +02:00
parent 96f1342c84
commit 8e390eef05
7 changed files with 68 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
.mb-4
.terminus-logo
h1.terminus-title Terminus
sup α
.container
.text-center.mb-5 Thank you for downloading Terminus!
.form-line
.header
.title Enable analytics
.description Help us track the number of Terminus installs across the world!
toggle(
[(ngModel)]='config.store.enableAnalytics',
(ngModelChange)='config.save(); config.requestRestart()',
)
.text-center.mt-5
button.btn.btn-primary((click)='closeAndDisable()') Close and never show again

View File

@@ -0,0 +1,6 @@
:host {
display: flex;
flex-direction: column;
margin: auto;
flex: 0 1 500px;
}

View File

@@ -0,0 +1,26 @@
import { Component } from '@angular/core'
import { BaseTabComponent } from './baseTab.component'
import { ConfigService } from '../services/config.service'
import { AppService } from '../services/app.service'
/** @hidden */
@Component({
selector: 'welcome-page',
template: require('./welcomeTab.component.pug'),
styles: [require('./welcomeTab.component.scss')],
})
export class WelcomeTabComponent extends BaseTabComponent {
constructor (
private app: AppService,
public config: ConfigService,
) {
super()
this.setTitle('Welcome')
}
closeAndDisable () {
this.config.store.enableWelcomeTab = false
this.config.save()
this.app.closeTab(this)
}
}