mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
fixed tab header animations, allow disabling animations globally #6147
This commit is contained in:
@@ -26,7 +26,7 @@ title-bar(
|
|||||||
[tab]='tab',
|
[tab]='tab',
|
||||||
[active]='tab == app.activeTab',
|
[active]='tab == app.activeTab',
|
||||||
@animateTab,
|
@animateTab,
|
||||||
[@.disabled]='hasVerticalTabs()',
|
[@.disabled]='hasVerticalTabs() || !config.store.accessibility.animations',
|
||||||
(click)='app.selectTab(tab)',
|
(click)='app.selectTab(tab)',
|
||||||
[class.fully-draggable]='hostApp.platform != Platform.macOS',
|
[class.fully-draggable]='hostApp.platform != Platform.macOS',
|
||||||
[class.drag-region]='hostApp.platform == Platform.macOS && !(app.tabDragActive$|async)',
|
[class.drag-region]='hostApp.platform == Platform.macOS && !(app.tabDragActive$|async)',
|
||||||
|
@@ -25,8 +25,8 @@ import { AppService, FileTransfer, HostWindowService, PlatformService, ToolbarBu
|
|||||||
animations: [
|
animations: [
|
||||||
trigger('animateTab', [
|
trigger('animateTab', [
|
||||||
state('in', style({
|
state('in', style({
|
||||||
'flex-basis': '200px',
|
'flex-basis': 'auto',
|
||||||
width: '200px',
|
width: 'auto',
|
||||||
})),
|
})),
|
||||||
transition(':enter', [
|
transition(':enter', [
|
||||||
style({
|
style({
|
||||||
@@ -34,14 +34,14 @@ import { AppService, FileTransfer, HostWindowService, PlatformService, ToolbarBu
|
|||||||
width: '1px',
|
width: '1px',
|
||||||
}),
|
}),
|
||||||
animate('250ms ease-in-out', style({
|
animate('250ms ease-in-out', style({
|
||||||
'flex-basis': '200px',
|
'flex-basis': 'auto',
|
||||||
width: '200px',
|
width: 'auto',
|
||||||
})),
|
})),
|
||||||
]),
|
]),
|
||||||
transition(':leave', [
|
transition(':leave', [
|
||||||
style({
|
style({
|
||||||
'flex-basis': '200px',
|
'flex-basis': 'auto',
|
||||||
width: '200px',
|
width: 'auto',
|
||||||
}),
|
}),
|
||||||
animate('250ms ease-in-out', style({
|
animate('250ms ease-in-out', style({
|
||||||
'flex-basis': '1px',
|
'flex-basis': '1px',
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
accessibility:
|
||||||
|
animations: true
|
||||||
appearance:
|
appearance:
|
||||||
dock: off
|
dock: off
|
||||||
dockScreen: current
|
dockScreen: current
|
||||||
|
@@ -3,7 +3,11 @@
|
|||||||
|
|
||||||
.modal-body
|
.modal-body
|
||||||
.input
|
.input
|
||||||
.stroke(*ngFor='let stroke of value', [@animateKey]='true') {{stroke}}
|
.stroke(
|
||||||
|
*ngFor='let stroke of value',
|
||||||
|
[@animateKey]='true',
|
||||||
|
[@.disabled]='!config.store.accessibility.animations'
|
||||||
|
) {{stroke}}
|
||||||
|
|
||||||
.timeout
|
.timeout
|
||||||
div([style.width]='timeoutProgress + "%"')
|
div([style.width]='timeoutProgress + "%"')
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, Input } from '@angular/core'
|
import { Component, Input } from '@angular/core'
|
||||||
import { trigger, transition, style, animate } from '@angular/animations'
|
import { trigger, transition, style, animate } from '@angular/animations'
|
||||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { HotkeysService, BaseComponent, Keystroke } from 'tabby-core'
|
import { HotkeysService, BaseComponent, Keystroke, ConfigService } from 'tabby-core'
|
||||||
|
|
||||||
const INPUT_TIMEOUT = 1000
|
const INPUT_TIMEOUT = 1000
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ export class HotkeyInputModalComponent extends BaseComponent {
|
|||||||
constructor (
|
constructor (
|
||||||
private modalInstance: NgbActiveModal,
|
private modalInstance: NgbActiveModal,
|
||||||
public hotkeys: HotkeysService,
|
public hotkeys: HotkeysService,
|
||||||
|
public config: ConfigService,
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
this.hotkeys.clearCurrentKeystrokes()
|
this.hotkeys.clearCurrentKeystrokes()
|
||||||
|
@@ -105,6 +105,12 @@
|
|||||||
i.fas.fa-bug
|
i.fas.fa-bug
|
||||||
span(translate) Open DevTools
|
span(translate) Open DevTools
|
||||||
|
|
||||||
|
h3(translate) Accessibility
|
||||||
|
.form-line
|
||||||
|
.header
|
||||||
|
.title(translate) Enable animations
|
||||||
|
toggle([(ngModel)]='config.store.accessibility.animations', (ngModelChange)='saveConfiguration()')
|
||||||
|
|
||||||
ng-container(*ngFor='let provider of settingsProviders')
|
ng-container(*ngFor='let provider of settingsProviders')
|
||||||
li(*ngIf='provider.prioritized', [ngbNavItem]='provider.id')
|
li(*ngIf='provider.prioritized', [ngbNavItem]='provider.id')
|
||||||
a.d-flex.align-items-center(ngbNavLink)
|
a.d-flex.align-items-center(ngbNavLink)
|
||||||
|
@@ -36,6 +36,7 @@ terminal-toolbar([tab]='this')
|
|||||||
|
|
||||||
sftp-panel.bg-dark(
|
sftp-panel.bg-dark(
|
||||||
@panelSlide,
|
@panelSlide,
|
||||||
|
[@.disabled]='!config.store.accessibility.animations'
|
||||||
[(path)]='sftpPath',
|
[(path)]='sftpPath',
|
||||||
*ngIf='sftpPanelVisible',
|
*ngIf='sftpPanelVisible',
|
||||||
(click)='$event.stopPropagation()',
|
(click)='$event.stopPropagation()',
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
search-panel(
|
search-panel(
|
||||||
*ngIf='showSearchPanel && hasFocus',
|
*ngIf='showSearchPanel && hasFocus',
|
||||||
@toolbarSlide,
|
@toolbarSlide,
|
||||||
|
[@.disabled]='!config.store.accessibility.animations'
|
||||||
[frontend]='frontend',
|
[frontend]='frontend',
|
||||||
(close)='showSearchPanel = false; frontend?.cancelSearch()'
|
(close)='showSearchPanel = false; frontend?.cancelSearch()'
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user