|
@ -71,9 +71,9 @@ |
|
|
<div class="flex justify-between gap-4 text-sm mb-3"> |
|
|
<div class="flex justify-between gap-4 text-sm mb-3"> |
|
|
<span><fa icon="user" class="fa-fw text-slate-400"></fa> Rotary</span> |
|
|
<span><fa icon="user" class="fa-fw text-slate-400"></fa> Rotary</span> |
|
|
<span |
|
|
<span |
|
|
><fa icon="calendar" class="fa-fw text-slate-400"></fa> 8 days |
|
|
><fa icon="calendar" class="fa-fw text-slate-400"></fa |
|
|
ago</span |
|
|
>{{ timeSince }} |
|
|
> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="text-sm text-slate-500"> |
|
|
<div class="text-sm text-slate-500"> |
|
@ -138,6 +138,7 @@ import { accessToken } from "@/libs/crypto"; |
|
|
import { db } from "../db"; |
|
|
import { db } from "../db"; |
|
|
import { IIdentifier } from "@veramo/core"; |
|
|
import { IIdentifier } from "@veramo/core"; |
|
|
import { AppString } from "@/constants/app"; |
|
|
import { AppString } from "@/constants/app"; |
|
|
|
|
|
import * as moment from "moment"; |
|
|
|
|
|
|
|
|
@Options({ |
|
|
@Options({ |
|
|
components: {}, |
|
|
components: {}, |
|
@ -148,6 +149,7 @@ export default class ProjectViewView extends Vue { |
|
|
description = ""; |
|
|
description = ""; |
|
|
truncatedDesc = ""; |
|
|
truncatedDesc = ""; |
|
|
truncateLength = 40; |
|
|
truncateLength = 40; |
|
|
|
|
|
timeSince = ""; |
|
|
projectId = |
|
|
projectId = |
|
|
localStorage.getItem("projectId") === null |
|
|
localStorage.getItem("projectId") === null |
|
|
? "" |
|
|
? "" |
|
@ -175,6 +177,12 @@ export default class ProjectViewView extends Vue { |
|
|
console.log(resp.status, resp.data); |
|
|
console.log(resp.status, resp.data); |
|
|
if (resp.status === 200) { |
|
|
if (resp.status === 200) { |
|
|
const claim = resp.data.claim; |
|
|
const claim = resp.data.claim; |
|
|
|
|
|
const issuedAt = resp.data.issuedAt; |
|
|
|
|
|
const eventDate = new Date(issuedAt); |
|
|
|
|
|
const now = moment.now(); |
|
|
|
|
|
this.timeSince = moment.utc(now).to(eventDate); |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.timeSince); |
|
|
this.name = claim.name; |
|
|
this.name = claim.name; |
|
|
this.description = claim.description; |
|
|
this.description = claim.description; |
|
|
this.truncatedDesc = this.description.slice(0, this.truncateLength); |
|
|
this.truncatedDesc = this.description.slice(0, this.truncateLength); |
|
|