mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 05:50:08 +00:00
copy notification
This commit is contained in:
parent
c90a5678cf
commit
b5f96a59f8
@ -2,6 +2,7 @@ import 'zone.js'
|
|||||||
import 'core-js/es7/reflect'
|
import 'core-js/es7/reflect'
|
||||||
import 'core-js/core/delay'
|
import 'core-js/core/delay'
|
||||||
import 'rxjs'
|
import 'rxjs'
|
||||||
|
import './toastr.scss'
|
||||||
|
|
||||||
// Always land on the start view
|
// Always land on the start view
|
||||||
location.hash = ''
|
location.hash = ''
|
||||||
|
16
app/src/toastr.scss
Normal file
16
app/src/toastr.scss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#toast-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.toast {
|
||||||
|
box-shadow: 0 1px 0 rgba(0,0,0,.25);
|
||||||
|
padding: 10px;
|
||||||
|
background-image: none;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
&.toast-info {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import { BehaviorSubject, Subject, Subscription } from 'rxjs'
|
import { BehaviorSubject, Subject, Subscription } from 'rxjs'
|
||||||
import 'rxjs/add/operator/bufferTime'
|
import { ToastrService } from 'ngx-toastr'
|
||||||
import { Component, NgZone, Inject, Optional, ViewChild, HostBinding, Input } from '@angular/core'
|
import { Component, NgZone, Inject, Optional, ViewChild, HostBinding, Input } from '@angular/core'
|
||||||
import { AppService, ConfigService, BaseTabComponent, ElectronService, ThemesService, HostAppService, HotkeysService, Platform } from 'terminus-core'
|
import { AppService, ConfigService, BaseTabComponent, ElectronService, ThemesService, HostAppService, HotkeysService, Platform } from 'terminus-core'
|
||||||
|
|
||||||
@ -54,6 +54,7 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
private electron: ElectronService,
|
private electron: ElectronService,
|
||||||
private terminalService: TerminalService,
|
private terminalService: TerminalService,
|
||||||
public config: ConfigService,
|
public config: ConfigService,
|
||||||
|
private toastr: ToastrService,
|
||||||
@Optional() @Inject(TerminalDecorator) private decorators: TerminalDecorator[],
|
@Optional() @Inject(TerminalDecorator) private decorators: TerminalDecorator[],
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
@ -219,6 +220,12 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
this.alternateScreenActive$.next(state)
|
this.alternateScreenActive$.next(state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const _copySelectionToClipboard = hterm.copySelectionToClipboard.bind(hterm)
|
||||||
|
hterm.copySelectionToClipboard = () => {
|
||||||
|
_copySelectionToClipboard()
|
||||||
|
this.toastr.info('Copied')
|
||||||
|
}
|
||||||
|
|
||||||
hterm.primaryScreen_.syncSelectionCaret = () => null
|
hterm.primaryScreen_.syncSelectionCaret = () => null
|
||||||
hterm.alternateScreen_.syncSelectionCaret = () => null
|
hterm.alternateScreen_.syncSelectionCaret = () => null
|
||||||
hterm.primaryScreen_.terminal = hterm
|
hterm.primaryScreen_.terminal = hterm
|
||||||
|
@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'
|
|||||||
import { BrowserModule } from '@angular/platform-browser'
|
import { BrowserModule } from '@angular/platform-browser'
|
||||||
import { FormsModule } from '@angular/forms'
|
import { FormsModule } from '@angular/forms'
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
||||||
|
import { ToastrModule } from 'ngx-toastr'
|
||||||
|
|
||||||
import { ToolbarButtonProvider, TabRecoveryProvider, ConfigProvider, HotkeysService, HotkeyProvider, AppService, ConfigService } from 'terminus-core'
|
import { ToolbarButtonProvider, TabRecoveryProvider, ConfigProvider, HotkeysService, HotkeyProvider, AppService, ConfigService } from 'terminus-core'
|
||||||
import { SettingsTabProvider } from 'terminus-settings'
|
import { SettingsTabProvider } from 'terminus-settings'
|
||||||
@ -41,6 +42,7 @@ import { hterm } from './hterm'
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
NgbModule,
|
NgbModule,
|
||||||
|
ToastrModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
SessionsService,
|
SessionsService,
|
||||||
|
@ -55,6 +55,7 @@ module.exports = {
|
|||||||
/^rxjs/,
|
/^rxjs/,
|
||||||
/^@angular/,
|
/^@angular/,
|
||||||
/^@ng-bootstrap/,
|
/^@ng-bootstrap/,
|
||||||
|
'ngx-toastr',
|
||||||
/^terminus-/,
|
/^terminus-/,
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user