Skip to content

Commit

Permalink
new: display share creation date when no description is present
Browse files Browse the repository at this point in the history
  • Loading branch information
ybizeul authored Sep 14, 2024
1 parent 222914d commit 86aa997
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion html/src/Components/ShareComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ export function ShareComponent(props: {share: Share}) {
<Group flex="1" gap="0" align="center">
<Stack flex="1" gap={0}>
<Anchor style={{ whiteSpace: "nowrap"}} component={Link} to={'/'+name}><Text>{name}</Text></Anchor>
{share.options.description && <Text w="100%" size="xs" c="gray">{share.options.description}</Text>}
<Text w="100%" size="xs" c="gray">
{share.options.description?share.options.description
:
t("created") + " " + new Date(share.created).toLocaleString([],{dateStyle:"long",timeStyle:"short"})
}
</Text>
</Stack>
<Stack gap="0" align="flex-end">
<Text mr="xs" size="xs" c="gray">{countString + (size?(' | ' + humanFileSize(size)):'')}</Text>
Expand Down
4 changes: 4 additions & 0 deletions html/src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ i18n
create_share: "Create Share",
your_shares: "Your Shares",
other_shares: "Other Shares",

guests_can_upload: "Guests can upload",
guests_can_download: "Guests can download",
guests_can_upload_and_download: "Guests can upload & download",
Expand All @@ -55,6 +56,7 @@ i18n
days_left: "days left",
unlimited: "Unlimited",
expired: "Expired",
created: "Created",

exposure: "Exposure",
guest_users_can: "Guest users can :",
Expand Down Expand Up @@ -88,6 +90,7 @@ i18n
create_share: "Créer un partage",
your_shares: "Vos Partages",
other_shares: "Autres Partages",

guests_can_upload: "Les invités peuvent envoyer",
guests_can_download: "Les invités peuvent télécharger",
guests_can_upload_and_download: "Les invités peuvent envoyer & télécharger",
Expand All @@ -98,6 +101,7 @@ i18n
days_left: "jours restant",
unlimited: "Illimité",
expired: "Expiré",
created: "Créé le",

exposure: "Type de partage",
guest_users_can: "Les invités peuvent :",
Expand Down

0 comments on commit 86aa997

Please sign in to comment.