summaryrefslogtreecommitdiffstats
path: root/ui/src/components/moment-time.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-03-08 14:29:17 -0400
committerDessalines <tyhou13@gmx.com>2020-03-08 14:29:17 -0400
commitcf516fcc83e1214f5822680656832485abd01aff (patch)
tree0436de8f58e85451bd5c4c6d96776a66b97f4767 /ui/src/components/moment-time.tsx
parent2eb681413d03b4e29d93bec833e01bc9431a7c63 (diff)
Show ago for user details. Fixes #586
Diffstat (limited to 'ui/src/components/moment-time.tsx')
-rw-r--r--ui/src/components/moment-time.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx
index 24ab2d89..e3fa0de3 100644
--- a/ui/src/components/moment-time.tsx
+++ b/ui/src/components/moment-time.tsx
@@ -9,6 +9,7 @@ interface MomentTimeProps {
when_?: string;
updated?: string;
};
+ showAgo?: boolean;
}
export class MomentTime extends Component<MomentTimeProps, any> {
@@ -32,7 +33,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
<svg class="icon icon-inline mr-1">
<use xlinkHref="#icon-edit-2"></use>
</svg>
- {moment.utc(this.props.data.updated).fromNow(true)}
+ {moment.utc(this.props.data.updated).fromNow(!this.props.showAgo)}
</span>
);
} else {
@@ -42,7 +43,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
className="pointer unselectable"
data-tippy-content={this.format(str)}
>
- {moment.utc(str).fromNow(true)}
+ {moment.utc(str).fromNow(!this.props.showAgo)}
</span>
);
}