From 0a57f57a93f5adbd613ed259e0ae03af24e365d8 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Fri, 25 Mar 2022 22:15:16 +0900 Subject: [PATCH] Disable angular tooltip animation globally --- .../src/app/components/app/app.component.ts | 11 +++- .../reward-stats/reward-stats.component.html | 58 +------------------ frontend/src/styles.scss | 4 -- 3 files changed, 11 insertions(+), 62 deletions(-) diff --git a/frontend/src/app/components/app/app.component.ts b/frontend/src/app/components/app/app.component.ts index 0cb6ef051..e060fae54 100644 --- a/frontend/src/app/components/app/app.component.ts +++ b/frontend/src/app/components/app/app.component.ts @@ -1,28 +1,33 @@ import { Location } from '@angular/common'; import { Component, HostListener, OnInit, Inject, LOCALE_ID, HostBinding } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; -import { WebsocketService } from '../../services/websocket.service'; import { StateService } from 'src/app/services/state.service'; +import { NgbTooltipConfig } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], + providers: [NgbTooltipConfig] }) export class AppComponent implements OnInit { link: HTMLElement = document.getElementById('canonical'); constructor( public router: Router, - private websocketService: WebsocketService, private stateService: StateService, private location: Location, + tooltipConfig: NgbTooltipConfig, @Inject(LOCALE_ID) private locale: string, ) { if (this.locale.startsWith('ar') || this.locale.startsWith('fa') || this.locale.startsWith('he')) { this.dir = 'rtl'; this.class = 'rtl-layout'; } + + tooltipConfig.animation = false; + tooltipConfig.container = 'body'; + tooltipConfig.triggers = 'hover'; } @HostBinding('attr.dir') dir = 'ltr'; diff --git a/frontend/src/app/components/reward-stats/reward-stats.component.html b/frontend/src/app/components/reward-stats/reward-stats.component.html index 861921ca6..a42a2a132 100644 --- a/frontend/src/app/components/reward-stats/reward-stats.component.html +++ b/frontend/src/app/components/reward-stats/reward-stats.component.html @@ -2,7 +2,7 @@
Miners Reward
-
@@ -14,7 +14,7 @@
Reward Per Tx
-
{{ rewardStats.rewardPerTx | amountShortener }} @@ -27,7 +27,7 @@
Average Fee
-
{{ rewardStats.feePerTx | amountShortener }} sats/tx @@ -65,55 +65,3 @@
- - \ No newline at end of file diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 54476206c..ae3971276 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -655,10 +655,6 @@ h1, h2, h3 { margin-top: 0.75rem !important; } -.tooltip-inner { - max-width: inherit; -} - .alert-mempool { color: #ffffff; background-color: #653b9c;