Feature/improve empty states (#1090)
* Improve empty states * Update changelog
This commit is contained in:
parent
e444d717e5
commit
2571e5b8c0
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Improved the empty state of the
|
||||||
|
- _Analysis_ section
|
||||||
|
- _Holdings_ section
|
||||||
|
- performance chart on the home page
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fixed the distorted tooltip in the performance chart on the home page
|
- Fixed the distorted tooltip in the performance chart on the home page
|
||||||
|
@ -4,11 +4,20 @@
|
|||||||
<div class="row w-100">
|
<div class="row w-100">
|
||||||
<div class="col p-0">
|
<div class="col p-0">
|
||||||
<div class="chart-container mx-auto position-relative">
|
<div class="chart-container mx-auto position-relative">
|
||||||
|
<div
|
||||||
|
*ngIf="hasPermissionToCreateOrder && historicalDataItems?.length === 0"
|
||||||
|
class="align-items-center d-flex h-100 justify-content-center w-100"
|
||||||
|
>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<gf-no-transactions-info-indicator></gf-no-transactions-info-indicator>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<gf-line-chart
|
<gf-line-chart
|
||||||
class="position-absolute"
|
class="position-absolute"
|
||||||
symbol="Performance"
|
symbol="Performance"
|
||||||
[currency]="user?.settings?.baseCurrency"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[historicalDataItems]="historicalDataItems"
|
[historicalDataItems]="historicalDataItems"
|
||||||
|
[hidden]="historicalDataItems?.length === 0"
|
||||||
[locale]="user?.settings?.locale"
|
[locale]="user?.settings?.locale"
|
||||||
[ngClass]="{ 'pr-3': deviceType === 'mobile' }"
|
[ngClass]="{ 'pr-3': deviceType === 'mobile' }"
|
||||||
[showGradient]="true"
|
[showGradient]="true"
|
||||||
@ -17,14 +26,6 @@
|
|||||||
[showYAxis]="false"
|
[showYAxis]="false"
|
||||||
></gf-line-chart>
|
></gf-line-chart>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
*ngIf="hasPermissionToCreateOrder && historicalDataItems?.length === 0"
|
|
||||||
class="align-items-center d-flex h-100 justify-content-center w-100"
|
|
||||||
>
|
|
||||||
<div class="d-flex justify-content-center">
|
|
||||||
<gf-no-transactions-info-indicator></gf-no-transactions-info-indicator>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview-container row mt-1">
|
<div class="overview-container row mt-1">
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
ngx-skeleton-loader {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,4 +142,15 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
*ngIf="
|
||||||
|
dataSource.data.length === 0 && hasPermissionToCreateActivity && !isLoading
|
||||||
|
"
|
||||||
|
class="p-3 text-center"
|
||||||
|
>
|
||||||
|
<gf-no-transactions-info-indicator
|
||||||
|
[hasBorder]="false"
|
||||||
|
></gf-no-transactions-info-indicator>
|
||||||
|
</div>
|
||||||
|
|
||||||
<mat-paginator class="d-none" [pageSize]="pageSize"></mat-paginator>
|
<mat-paginator class="d-none" [pageSize]="pageSize"></mat-paginator>
|
||||||
|
@ -27,6 +27,7 @@ import { Subject, Subscription } from 'rxjs';
|
|||||||
export class PositionsTableComponent implements OnChanges, OnDestroy, OnInit {
|
export class PositionsTableComponent implements OnChanges, OnDestroy, OnInit {
|
||||||
@Input() baseCurrency: string;
|
@Input() baseCurrency: string;
|
||||||
@Input() deviceType: string;
|
@Input() deviceType: string;
|
||||||
|
@Input() hasPermissionToCreateActivity: boolean;
|
||||||
@Input() hasPermissionToShowValues = true;
|
@Input() hasPermissionToShowValues = true;
|
||||||
@Input() locale: string;
|
@Input() locale: string;
|
||||||
@Input() pageSize = Number.MAX_SAFE_INTEGER;
|
@Input() pageSize = Number.MAX_SAFE_INTEGER;
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="investment-chart row">
|
<div class="row">
|
||||||
<div class="col-lg">
|
<div class="col-lg">
|
||||||
<h3 class="d-flex justify-content-center mb-3" i18n>Analysis</h3>
|
<h3 class="d-flex justify-content-center mb-3" i18n>Analysis</h3>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<div class="align-items-center d-flex mb-4">
|
<div class="align-items-center d-flex mb-4">
|
||||||
<div class="flex-grow-1 h5 mb-0 text-truncate" i18n>
|
<div
|
||||||
Investment Timeline
|
class="align-items-center d-flex flex-grow-1 h5 mb-0 text-truncate"
|
||||||
|
>
|
||||||
|
<span i18n>Investment Timeline</span>
|
||||||
|
<gf-premium-indicator
|
||||||
|
*ngIf="user?.subscription?.type === 'Basic'"
|
||||||
|
class="ml-1"
|
||||||
|
></gf-premium-indicator>
|
||||||
</div>
|
</div>
|
||||||
<gf-toggle
|
<gf-toggle
|
||||||
class="d-none d-lg-block"
|
class="d-none d-lg-block"
|
||||||
@ -15,25 +21,27 @@
|
|||||||
(change)="onChangeGroupBy($event.value)"
|
(change)="onChangeGroupBy($event.value)"
|
||||||
></gf-toggle>
|
></gf-toggle>
|
||||||
</div>
|
</div>
|
||||||
<gf-investment-chart
|
<div class="chart-container">
|
||||||
class="h-100"
|
<gf-investment-chart
|
||||||
[currency]="user?.settings?.baseCurrency"
|
class="h-100"
|
||||||
[daysInMarket]="daysInMarket"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView"
|
[daysInMarket]="daysInMarket"
|
||||||
[investments]="investments"
|
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView"
|
||||||
[locale]="user?.settings?.locale"
|
[investments]="investments"
|
||||||
[ngClass]="{ 'd-none': mode }"
|
[locale]="user?.settings?.locale"
|
||||||
></gf-investment-chart>
|
[ngClass]="{ 'd-none': mode }"
|
||||||
<gf-investment-chart
|
></gf-investment-chart>
|
||||||
class="h-100"
|
<gf-investment-chart
|
||||||
groupBy="month"
|
class="h-100"
|
||||||
[currency]="user?.settings?.baseCurrency"
|
groupBy="month"
|
||||||
[daysInMarket]="daysInMarket"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView"
|
[daysInMarket]="daysInMarket"
|
||||||
[investments]="investmentsByMonth"
|
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView"
|
||||||
[locale]="user?.settings?.locale"
|
[investments]="investmentsByMonth"
|
||||||
[ngClass]="{ 'd-none': !mode }"
|
[locale]="user?.settings?.locale"
|
||||||
></gf-investment-chart>
|
[ngClass]="{ 'd-none': !mode }"
|
||||||
|
></gf-investment-chart>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatCardModule } from '@angular/material/card';
|
||||||
import { GfInvestmentChartModule } from '@ghostfolio/client/components/investment-chart/investment-chart.module';
|
import { GfInvestmentChartModule } from '@ghostfolio/client/components/investment-chart/investment-chart.module';
|
||||||
import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module';
|
import { GfToggleModule } from '@ghostfolio/client/components/toggle/toggle.module';
|
||||||
|
import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator';
|
||||||
import { GfValueModule } from '@ghostfolio/ui/value';
|
import { GfValueModule } from '@ghostfolio/ui/value';
|
||||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ import { AnalysisPageComponent } from './analysis-page.component';
|
|||||||
AnalysisPageRoutingModule,
|
AnalysisPageRoutingModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
GfInvestmentChartModule,
|
GfInvestmentChartModule,
|
||||||
|
GfPremiumIndicatorModule,
|
||||||
GfToggleModule,
|
GfToggleModule,
|
||||||
GfValueModule,
|
GfValueModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
.investment-chart {
|
.chart-container {
|
||||||
.mat-card {
|
aspect-ratio: 16 / 9;
|
||||||
.mat-card-content {
|
|
||||||
aspect-ratio: 16 / 9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,14 @@
|
|||||||
<gf-positions-table
|
<gf-positions-table
|
||||||
[baseCurrency]="user?.settings?.baseCurrency"
|
[baseCurrency]="user?.settings?.baseCurrency"
|
||||||
[deviceType]="deviceType"
|
[deviceType]="deviceType"
|
||||||
|
[hasPermissionToCreateActivity]="hasPermissionToCreateOrder"
|
||||||
[locale]="user?.settings?.locale"
|
[locale]="user?.settings?.locale"
|
||||||
[positions]="positionsArray"
|
[positions]="positionsArray"
|
||||||
></gf-positions-table>
|
></gf-positions-table>
|
||||||
<div *ngIf="hasPermissionToCreateOrder" class="text-center">
|
<div
|
||||||
|
*ngIf="hasPermissionToCreateOrder && positionsArray?.length > 0"
|
||||||
|
class="text-center"
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
i18n
|
i18n
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<a
|
<a
|
||||||
class="align-items-center d-flex"
|
class="align-items-center d-flex"
|
||||||
|
title="Upgrade to Ghostfolio Premium"
|
||||||
[ngStyle]="{ 'pointer-events': enableLink ? 'initial' : 'none' }"
|
[ngStyle]="{ 'pointer-events': enableLink ? 'initial' : 'none' }"
|
||||||
[routerLink]="['/pricing']"
|
[routerLink]="['/pricing']"
|
||||||
><ion-icon class="text-muted" name="diamond-outline"></ion-icon
|
><ion-icon class="text-muted" name="diamond-outline"></ion-icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user