mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 05:54:25 -04:00
(card) display last modification date
This commit is contained in:
parent
955ed07447
commit
6c40986151
@ -196,6 +196,10 @@
|
||||
|
||||
<section>
|
||||
<OpinionLegend :custom="profile.opinions" :used="usedOpinions" />
|
||||
<p v-if="!isStatic" class="text-muted small text-center">
|
||||
<T>profile.lastUpdate</T><T>quotation.colon</T>
|
||||
{{$date($ulidTime(profile.id))}}
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -875,6 +875,7 @@ profile:
|
||||
invalidDate: 'Provided date is not valid'
|
||||
publicEvents:
|
||||
header: 'Events from the Queer Calendar'
|
||||
lastUpdate: 'Card last updated'
|
||||
|
||||
share: 'Share'
|
||||
|
||||
|
@ -1064,6 +1064,7 @@ profile:
|
||||
invalidDate: 'Provided date is not valid'
|
||||
publicEvents:
|
||||
header: 'Events from the Queer Calendar'
|
||||
lastUpdate: 'Card last updated'
|
||||
|
||||
share: 'Share'
|
||||
|
||||
|
@ -1714,6 +1714,7 @@ profile:
|
||||
invalidDate: 'Podana data nie jest poprawna'
|
||||
publicEvents:
|
||||
header: 'Wydarzenia z Kalendarza Queerowego'
|
||||
lastUpdate: 'Ostatnia aktualizacja wizytówki'
|
||||
|
||||
census:
|
||||
header: 'Spis'
|
||||
|
@ -95,7 +95,10 @@ const plugin: Plugin = ({ app, store }, inject) => {
|
||||
}
|
||||
script.classList.add(`${name}-script`);
|
||||
// script.crossOrigin = 'true'; TODO proper fix (adding it breaks publift)
|
||||
script.addEventListener('load', () => resolve());
|
||||
script.addEventListener('load', () => {
|
||||
script.classList.add('loaded');
|
||||
resolve();
|
||||
});
|
||||
script.addEventListener('error', (event) => {
|
||||
reject(new LoadScriptError(name, src, typeof event === 'string' ? event : event.type));
|
||||
});
|
||||
@ -136,6 +139,11 @@ const plugin: Plugin = ({ app, store }, inject) => {
|
||||
return dt.toFormat('y-MM-dd HH:mm');
|
||||
});
|
||||
|
||||
inject('date', (timestamp: number): string => {
|
||||
const dt = DateTime.fromSeconds(timestamp);
|
||||
return dt.toFormat('y-MM-dd');
|
||||
});
|
||||
|
||||
inject('ulidTime', (ulid: string): number => {
|
||||
return decodeTime(ulid) / 1000;
|
||||
});
|
||||
|
@ -272,6 +272,7 @@ const fetchProfiles = async (db, username, self, opts = undefined) => {
|
||||
}) ?? {};
|
||||
|
||||
const profile_obj = {
|
||||
id: propv('id', () => profile.id),
|
||||
opinions: propv('opinions', () => JSON.parse(profile.opinions)),
|
||||
names: propv('names', () => {
|
||||
return JSON.parse(profile.names).map((name) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user