Various frontend improvements (#137)
* Various frontend improvements * Clean up import
This commit is contained in:
parent
e7fbcd4fa0
commit
34303163bc
apps/client/src
@ -136,6 +136,7 @@
|
|||||||
<hr class="m-0" />
|
<hr class="m-0" />
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<a
|
<a
|
||||||
|
*ngIf="user?.settings?.viewMode === 'DEFAULT'"
|
||||||
class="d-block d-sm-none"
|
class="d-block d-sm-none"
|
||||||
i18n
|
i18n
|
||||||
mat-menu-item
|
mat-menu-item
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
Valid until {{ user.subscription.expiresAt | date:
|
Valid until {{ user.subscription.expiresAt | date:
|
||||||
defaultDateFormat }}
|
defaultDateFormat }}
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="!user.subscription.expiresAt">
|
||||||
|
<button color="primary" disabled i18n mat-flat-button>
|
||||||
|
Upgrade
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex mt-4 py-1">
|
<div class="d-flex mt-4 py-1">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatCardModule } from '@angular/material/card';
|
||||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
@ -17,6 +18,7 @@ import { AccountPageComponent } from './account-page.component';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
GfPortfolioAccessTableModule,
|
GfPortfolioAccessTableModule,
|
||||||
|
MatButtonModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
|
@ -5,7 +5,7 @@ import { DataService } from '@ghostfolio/client/services/data.service';
|
|||||||
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
||||||
import { DEFAULT_DATE_FORMAT } from '@ghostfolio/common/config';
|
import { DEFAULT_DATE_FORMAT } from '@ghostfolio/common/config';
|
||||||
import { AdminData, User } from '@ghostfolio/common/interfaces';
|
import { AdminData, User } from '@ghostfolio/common/interfaces';
|
||||||
import { formatDistanceToNowStrict, isValid, parseISO, sub } from 'date-fns';
|
import { formatDistanceToNowStrict, isValid, parseISO } from 'date-fns';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
|
||||||
@ -76,16 +76,11 @@ export class AdminPageComponent implements OnInit {
|
|||||||
|
|
||||||
public formatDistanceToNow(aDateString: string) {
|
public formatDistanceToNow(aDateString: string) {
|
||||||
if (aDateString) {
|
if (aDateString) {
|
||||||
const distanceString = formatDistanceToNowStrict(
|
const distanceString = formatDistanceToNowStrict(parseISO(aDateString), {
|
||||||
sub(parseISO(aDateString), { seconds: 10 }),
|
|
||||||
{
|
|
||||||
addSuffix: true
|
addSuffix: true
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
return distanceString === 'less than a minute ago'
|
return distanceString === '0 seconds ago' ? 'just now' : distanceString;
|
||||||
? 'just now'
|
|
||||||
: distanceString;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
@ -2,17 +2,21 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h3 class="d-flex justify-content-center mb-3" i18n>Pricing Plans</h3>
|
<h3 class="d-flex justify-content-center mb-3" i18n>Pricing Plans</h3>
|
||||||
|
<mat-card class="mb-4">
|
||||||
|
<mat-card-content>
|
||||||
<p>
|
<p>
|
||||||
Our official
|
Our official
|
||||||
<strong>Ghostfolio</strong> cloud offering is the easiest way to get
|
<strong>Ghostfolio</strong> cloud offering is the easiest way to get
|
||||||
started. Due to the time it saves, this will be the best option for most
|
started. Due to the time it saves, this will be the best option for
|
||||||
people. The revenue is used for covering the hosting costs.
|
most people. The revenue is used for covering the hosting costs.
|
||||||
</p>
|
</p>
|
||||||
<p class="mb-5">
|
<p>
|
||||||
If you prefer to run <strong>Ghostfolio</strong> on your own
|
If you prefer to run <strong>Ghostfolio</strong> on your own
|
||||||
infrastructure, please find the source code and further instructions on
|
infrastructure, please find the source code and further instructions
|
||||||
<a href="https://github.com/ghostfolio/ghostfolio">GitHub</a>.
|
on <a href="https://github.com/ghostfolio/ghostfolio">GitHub</a>.
|
||||||
</p>
|
</p>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-4 mb-3">
|
<div class="col-xs-12 col-md-4 mb-3">
|
||||||
<mat-card class="d-flex flex-column h-100">
|
<mat-card class="d-flex flex-column h-100">
|
||||||
|
@ -126,14 +126,16 @@ ngx-skeleton-loader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-card-header-text {
|
.mat-card {
|
||||||
margin: 0 !important;
|
&:not([class*='mat-elevation-z']) {
|
||||||
}
|
|
||||||
|
|
||||||
.mat-card:not([class*='mat-elevation-z']) {
|
|
||||||
border: 1px solid
|
border: 1px solid
|
||||||
rgba(var(--dark-primary-text), var(--palette-foreground-divider-alpha));
|
rgba(var(--dark-primary-text), var(--palette-foreground-divider-alpha));
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-card-header-text {
|
||||||
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-row {
|
.mat-row {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user