mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(profile) display card creation date next to last modification
This commit is contained in:
parent
008d5c7520
commit
34a49b0750
@ -196,10 +196,16 @@
|
||||
|
||||
<section>
|
||||
<OpinionLegend :custom="profile.opinions" :used="usedOpinions" />
|
||||
<p v-if="!isStatic && profile.lastUpdate" class="text-muted small text-center">
|
||||
<T>profile.lastUpdate</T><T>quotation.colon</T>
|
||||
{{ $date($ulidTime(profile.lastUpdate)) }}
|
||||
</p>
|
||||
<ul v-if="!isStatic" class="list-inline text-muted small text-center">
|
||||
<li v-if="profile.id" class="list-inline-item">
|
||||
<T>profile.creation</T><T>quotation.colon</T>
|
||||
{{ $date($ulidTime(profile.id)) }}
|
||||
</li>
|
||||
<li v-if="profile.lastUpdate" class="list-inline-item">
|
||||
<T>profile.lastUpdate</T><T>quotation.colon</T>
|
||||
{{ $date($ulidTime(profile.lastUpdate)) }}
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -902,6 +902,7 @@ profile:
|
||||
invalidDate: 'Provided date is not valid'
|
||||
publicEvents:
|
||||
header: 'Events from the Queer Calendar'
|
||||
creation: 'Card created'
|
||||
lastUpdate: 'Card last updated'
|
||||
|
||||
share: 'Share'
|
||||
|
@ -1104,6 +1104,7 @@ profile:
|
||||
invalidDate: 'Provided date is not valid'
|
||||
publicEvents:
|
||||
header: 'Events from the Queer Calendar'
|
||||
creation: 'Card created'
|
||||
lastUpdate: 'Card last updated'
|
||||
|
||||
share: 'Share'
|
||||
|
@ -1728,7 +1728,8 @@ profile:
|
||||
invalidDate: 'Podana data nie jest poprawna'
|
||||
publicEvents:
|
||||
header: 'Wydarzenia z Kalendarza Queerowego'
|
||||
lastUpdate: 'Ostatnia aktualizacja wizytówki'
|
||||
creation: 'Wizytówka stworzona'
|
||||
lastUpdate: 'Ostatnia modyfikacja wizytówki'
|
||||
|
||||
census:
|
||||
header: 'Spis'
|
||||
|
@ -400,7 +400,7 @@ import type { Translator } from '~/src/translator.ts';
|
||||
import { useMainStore } from '~/store/index.ts';
|
||||
|
||||
interface ProfileFormData extends Omit<Profile, 'birthday' | 'linksMetadata' | 'verifiedLinks' | 'opinions' |
|
||||
'card' | 'cardDark' | 'lastUpdate'> {
|
||||
'card' | 'cardDark' | 'lastUpdate' | 'id'> {
|
||||
birthday: Date | null;
|
||||
opinions: OpinionFormValue[];
|
||||
}
|
||||
|
@ -325,6 +325,7 @@ const fetchProfiles = async (
|
||||
}) ?? {};
|
||||
|
||||
const profile_obj: Partial<Profile> = {
|
||||
id: propv('id', () => profile.id),
|
||||
opinions: propv('opinions', () => JSON.parse(profile.opinions)),
|
||||
names: propv('names', () => {
|
||||
return JSON.parse(profile.names).map((name: ValueOpinion) => {
|
||||
@ -618,7 +619,7 @@ const cleanupOpinions = (opinions: OpinionFormValue[]) => {
|
||||
};
|
||||
|
||||
type SaveProfile = Omit<Profile, 'linksMetadata' | 'verifiedLinks' | 'footerAreas' | 'credentials' |
|
||||
'card' | 'cardDark' | 'circle' | 'markdown' | 'events' | 'customEvents' | 'lastUpdate'>
|
||||
'card' | 'cardDark' | 'circle' | 'markdown' | 'events' | 'customEvents' | 'lastUpdate' | 'id'>
|
||||
& Partial<Pick<Profile, 'markdown' | 'events' | 'customEvents'>>
|
||||
& Pick<ProfileRow, 'footerAreas' | 'credentials'>;
|
||||
|
||||
@ -1010,7 +1011,7 @@ interface ProfileExportData {
|
||||
}
|
||||
|
||||
type ProfileExportProfile = Omit<Profile, 'linksMetadata' | 'verifiedLinks' | 'footerAreas' | 'credentials' |
|
||||
'card' | 'cardDark' | 'circle' | 'lastUpdate'>
|
||||
'card' | 'cardDark' | 'circle' | 'lastUpdate' | 'id'>
|
||||
& Pick<ProfileRow, 'footerAreas' | 'credentials'>;
|
||||
|
||||
router.get('/profile/export', handleErrorAsync(async (req: Request, res: Response) => {
|
||||
|
@ -2,6 +2,7 @@ import type { CustomEvent } from './calendar/helpers.ts';
|
||||
import type { Opinion } from './opinions.ts';
|
||||
|
||||
export interface Profile {
|
||||
id: string;
|
||||
names: NameOpinion[];
|
||||
pronouns: ValueOpinion[];
|
||||
description: string;
|
||||
@ -87,7 +88,7 @@ export interface ProfileV1 extends Omit<Profile, 'names' | 'pronouns' | 'words'
|
||||
}
|
||||
|
||||
export interface SaveProfilePayload extends Omit<Profile, 'linksMetadata' | 'verifiedLinks' | 'opinions' |
|
||||
'card' | 'cardDark' | 'lastUpdate'> {
|
||||
'card' | 'cardDark' | 'lastUpdate' | 'id'> {
|
||||
username: string;
|
||||
opinions: OpinionFormValue[];
|
||||
propagate: string[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user