mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 22:14:55 +00:00
fixed #9953 - use ng-bootstrap tooltips
This commit is contained in:
@@ -35,7 +35,8 @@ title-bar(
|
|||||||
[@animateTab]='{value: "in", params: {size: targetTabSize}}',
|
[@animateTab]='{value: "in", params: {size: targetTabSize}}',
|
||||||
[@.disabled]='hasVerticalTabs() || !config.store.accessibility.animations',
|
[@.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',
|
||||||
|
[ngbTooltip]='tab.customTitle || tab.title'
|
||||||
)
|
)
|
||||||
|
|
||||||
.btn-group.background
|
.btn-group.background
|
||||||
@@ -43,7 +44,7 @@ title-bar(
|
|||||||
*ngFor='let button of leftToolbarButtons'
|
*ngFor='let button of leftToolbarButtons'
|
||||||
)
|
)
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
[title]='button.label',
|
[ngbTooltip]='button.label',
|
||||||
(click)='button.run && button.run()',
|
(click)='button.run && button.run()',
|
||||||
[fastHtmlBind]='button.icon'
|
[fastHtmlBind]='button.icon'
|
||||||
)
|
)
|
||||||
@@ -55,7 +56,7 @@ title-bar(
|
|||||||
)
|
)
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
[hidden]='activeTransfers.length == 0',
|
[hidden]='activeTransfers.length == 0',
|
||||||
title='File transfers',
|
[ngbTooltip]='"File transfers"|translate',
|
||||||
ngbDropdownToggle
|
ngbDropdownToggle
|
||||||
) !{require('../icons/transfers.svg')}
|
) !{require('../icons/transfers.svg')}
|
||||||
transfers-menu(
|
transfers-menu(
|
||||||
@@ -75,14 +76,14 @@ title-bar(
|
|||||||
*ngFor='let button of rightToolbarButtons'
|
*ngFor='let button of rightToolbarButtons'
|
||||||
)
|
)
|
||||||
button.btn.btn-secondary.btn-tab-bar(
|
button.btn.btn-secondary.btn-tab-bar(
|
||||||
[title]='button.label',
|
[ngbTooltip]='button.label',
|
||||||
(click)='button.run && button.run()',
|
(click)='button.run && button.run()',
|
||||||
[fastHtmlBind]='button.icon'
|
[fastHtmlBind]='button.icon'
|
||||||
)
|
)
|
||||||
|
|
||||||
button.btn.btn-secondary.btn-tab-bar.btn-update(
|
button.btn.btn-secondary.btn-tab-bar.btn-update(
|
||||||
*ngIf='updatesAvailable',
|
*ngIf='updatesAvailable',
|
||||||
title='Update available - Click to install',
|
[ngbTooltip]='"Update available - Click to install"|translate',
|
||||||
(click)='updater.update()'
|
(click)='updater.update()'
|
||||||
) !{require('../icons/gift.svg')}
|
) !{require('../icons/gift.svg')}
|
||||||
|
|
||||||
|
@@ -13,7 +13,6 @@ profile-icon(
|
|||||||
)
|
)
|
||||||
|
|
||||||
.name(
|
.name(
|
||||||
[title]='tab.customTitle || tab.title',
|
|
||||||
[class.no-hover]='config.store.terminal.hideCloseButton && config.store.terminal.hideTabOptionsButton'
|
[class.no-hover]='config.store.terminal.hideCloseButton && config.store.terminal.hideTabOptionsButton'
|
||||||
cdkDrag,
|
cdkDrag,
|
||||||
cdkDragRootElement='tab-header',
|
cdkDragRootElement='tab-header',
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.icon(*ngIf='isDownload(transfer)') !{require('../icons/download.svg')}
|
.icon(*ngIf='isDownload(transfer)') !{require('../icons/download.svg')}
|
||||||
.icon(*ngIf='!isDownload(transfer)') !{require('../icons/upload.svg')}
|
.icon(*ngIf='!isDownload(transfer)') !{require('../icons/upload.svg')}
|
||||||
.main
|
.main
|
||||||
label.no-wrap([title]='transfer.getName()') {{transfer.getName()}}
|
label.no-wrap([ngbTooltip]='transfer.getName()') {{transfer.getName()}}
|
||||||
ngb-progressbar([type]='transfer.isComplete() ? "success" : transfer.isCancelled() ? "danger" : "info"', [value]='getProgress(transfer)')
|
ngb-progressbar([type]='transfer.isComplete() ? "success" : transfer.isCancelled() ? "danger" : "info"', [value]='getProgress(transfer)')
|
||||||
.metadata
|
.metadata
|
||||||
.size {{transfer.getSize()|filesize}}
|
.size {{transfer.getSize()|filesize}}
|
||||||
|
@@ -2,7 +2,7 @@ import { NgModule, ModuleWithProviders, LOCALE_ID } from '@angular/core'
|
|||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
||||||
import { CommonModule } from '@angular/common'
|
import { CommonModule } from '@angular/common'
|
||||||
import { FormsModule } from '@angular/forms'
|
import { FormsModule } from '@angular/forms'
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModule, NgbTooltipConfig } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { NgxFilesizeModule } from 'ngx-filesize'
|
import { NgxFilesizeModule } from 'ngx-filesize'
|
||||||
import { DragDropModule } from '@angular/cdk/drag-drop'
|
import { DragDropModule } from '@angular/cdk/drag-drop'
|
||||||
import { TranslateModule, TranslateCompiler, TranslateService, MissingTranslationHandler } from '@ngx-translate/core'
|
import { TranslateModule, TranslateCompiler, TranslateService, MissingTranslationHandler } from '@ngx-translate/core'
|
||||||
@@ -155,6 +155,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
|||||||
platform: PlatformService,
|
platform: PlatformService,
|
||||||
hotkeys: HotkeysService,
|
hotkeys: HotkeysService,
|
||||||
commands: CommandService,
|
commands: CommandService,
|
||||||
|
ngbTooltipConfig: NgbTooltipConfig,
|
||||||
public locale: LocaleService,
|
public locale: LocaleService,
|
||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
private profilesService: ProfilesService,
|
private profilesService: ProfilesService,
|
||||||
@@ -201,6 +202,10 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
|||||||
commands.run('core:profile-selector', {})
|
commands.run('core:profile-selector', {})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ngbTooltipConfig.openDelay = 750
|
||||||
|
ngbTooltipConfig.placement = 'top bottom auto'
|
||||||
|
ngbTooltipConfig.container = 'body'
|
||||||
}
|
}
|
||||||
|
|
||||||
async showSelector (provider: ProfileProvider<Profile>): Promise<void> {
|
async showSelector (provider: ProfileProvider<Profile>): Promise<void> {
|
||||||
|
@@ -16,14 +16,14 @@
|
|||||||
ng-container(*ngIf='state.resultCount > 0')
|
ng-container(*ngIf='state.resultCount > 0')
|
||||||
button.btn.btn-link(
|
button.btn.btn-link(
|
||||||
(click)='findPrevious()',
|
(click)='findPrevious()',
|
||||||
ngbTooltip='Search up',
|
[ngbTooltip]='"Search up"|translate',
|
||||||
placement='bottom',
|
placement='bottom',
|
||||||
[fastHtmlBind]='icons.arrowUp'
|
[fastHtmlBind]='icons.arrowUp'
|
||||||
)
|
)
|
||||||
|
|
||||||
button.btn.btn-link(
|
button.btn.btn-link(
|
||||||
(click)='findNext()',
|
(click)='findNext()',
|
||||||
ngbTooltip='Search down',
|
[ngbTooltip]='"Search down"|translate',
|
||||||
placement='bottom',
|
placement='bottom',
|
||||||
[fastHtmlBind]='icons.arrowDown'
|
[fastHtmlBind]='icons.arrowDown'
|
||||||
)
|
)
|
||||||
@@ -34,7 +34,7 @@ button.btn(
|
|||||||
(click)='options.caseSensitive = !options.caseSensitive; saveSearchOptions()',
|
(click)='options.caseSensitive = !options.caseSensitive; saveSearchOptions()',
|
||||||
[class.btn-link]='!options.caseSensitive',
|
[class.btn-link]='!options.caseSensitive',
|
||||||
[class.btn-info]='options.caseSensitive',
|
[class.btn-info]='options.caseSensitive',
|
||||||
ngbTooltip='Case sensitivity',
|
[ngbTooltip]='"Case sensitivity"|translate',
|
||||||
placement='bottom',
|
placement='bottom',
|
||||||
[fastHtmlBind]='icons.case'
|
[fastHtmlBind]='icons.case'
|
||||||
)
|
)
|
||||||
@@ -43,7 +43,7 @@ button.btn(
|
|||||||
(click)='options.regex = !options.regex; saveSearchOptions()',
|
(click)='options.regex = !options.regex; saveSearchOptions()',
|
||||||
[class.btn-link]='!options.regex',
|
[class.btn-link]='!options.regex',
|
||||||
[class.btn-info]='options.regex',
|
[class.btn-info]='options.regex',
|
||||||
ngbTooltip='Regular expression',
|
[ngbTooltip]='"Regular expression"|translate',
|
||||||
placement='bottom',
|
placement='bottom',
|
||||||
[fastHtmlBind]='icons.regexp'
|
[fastHtmlBind]='icons.regexp'
|
||||||
)
|
)
|
||||||
@@ -52,7 +52,7 @@ button.btn(
|
|||||||
(click)='options.wholeWord = !options.wholeWord; saveSearchOptions()',
|
(click)='options.wholeWord = !options.wholeWord; saveSearchOptions()',
|
||||||
[class.btn-link]='!options.wholeWord',
|
[class.btn-link]='!options.wholeWord',
|
||||||
[class.btn-info]='options.wholeWord',
|
[class.btn-info]='options.wholeWord',
|
||||||
ngbTooltip='Whole word',
|
[ngbTooltip]='"Whole word"|translate',
|
||||||
placement='bottom',
|
placement='bottom',
|
||||||
[fastHtmlBind]='icons.wholeWord'
|
[fastHtmlBind]='icons.wholeWord'
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user