1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-10 18:00:13 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Elias Schneider
a45184995f
chore(translations): update translations via Crowdin (#464)
* New translations en-us.ts (German)

* New translations en-us.ts (Spanish)

* New translations en-us.ts (French)

* New translations en-us.ts (Danish)

* New translations en-us.ts (Greek)

* New translations en-us.ts (Finnish)

* New translations en-us.ts (Hungarian)

* New translations en-us.ts (Italian)

* New translations en-us.ts (Japanese)

* New translations en-us.ts (Polish)

* New translations en-us.ts (Russian)

* New translations en-us.ts (Slovenian)

* New translations en-us.ts (Serbian (Cyrillic))

* New translations en-us.ts (Swedish)

* New translations en-us.ts (Ukrainian)

* New translations en-us.ts (Chinese Simplified)

* New translations en-us.ts (Chinese Traditional)

* New translations en-us.ts (Portuguese, Brazilian)

* New translations en-us.ts (Thai)

* New translations en-us.ts (Dutch, Belgium)

* New translations en-us.ts (Arabic, Egypt)
2024-05-03 17:24:27 +02:00
Elias Schneider
b717663b5c
feat: add name property to share (#462)
* add name property to share

* refactor: run formatter

* tests: adapt system tests

* tests: adapt second system test
2024-05-03 17:12:26 +02:00
34 changed files with 122 additions and 81 deletions

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Share" ADD COLUMN "name" TEXT;

View File

@ -75,6 +75,7 @@ model Share {
id String @id @default(uuid()) id String @id @default(uuid())
createdAt DateTime @default(now()) createdAt DateTime @default(now())
name String?
uploadLocked Boolean @default(false) uploadLocked Boolean @default(false)
isZipReady Boolean @default(false) isZipReady Boolean @default(false)
views Int @default(0) views Int @default(0)

View File

@ -13,7 +13,7 @@ export class ReverseShareTokenWithShares extends OmitType(ReverseShareDTO, [
@Type(() => OmitType(MyShareDTO, ["recipients", "hasPassword"] as const)) @Type(() => OmitType(MyShareDTO, ["recipients", "hasPassword"] as const))
shares: Omit< shares: Omit<
MyShareDTO, MyShareDTO,
"recipients" | "files" | "from" | "fromList" | "hasPassword" "recipients" | "files" | "from" | "fromList" | "hasPassword" | "size"
>[]; >[];
@Expose() @Expose()

View File

@ -18,6 +18,10 @@ export class CreateShareDTO {
@Length(3, 50) @Length(3, 50)
id: string; id: string;
@Length(3, 30)
@IsOptional()
name: string;
@IsString() @IsString()
expiration: string; expiration: string;

View File

@ -6,6 +6,9 @@ export class ShareDTO {
@Expose() @Expose()
id: string; id: string;
@Expose()
name?: string;
@Expose() @Expose()
expiration: Date; expiration: Date;
@ -23,6 +26,9 @@ export class ShareDTO {
@Expose() @Expose()
hasPassword: boolean; hasPassword: boolean;
@Expose()
size: number;
from(partial: Partial<ShareDTO>) { from(partial: Partial<ShareDTO>) {
return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true }); return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true });
} }

View File

@ -214,6 +214,7 @@ export class ShareService {
return shares.map((share) => { return shares.map((share) => {
return { return {
...share, ...share,
size: share.files.reduce((acc, file) => acc + parseInt(file.size), 0),
recipients: share.recipients.map((recipients) => recipients.email), recipients: share.recipients.map((recipients) => recipients.email),
}; };
}); });

View File

@ -432,7 +432,7 @@
" const responseBody = pm.response.json();", " const responseBody = pm.response.json();",
" pm.expect(responseBody).to.have.property(\"id\")", " pm.expect(responseBody).to.have.property(\"id\")",
" pm.expect(responseBody).to.have.property(\"expiration\")", " pm.expect(responseBody).to.have.property(\"expiration\")",
" pm.expect(Object.keys(responseBody).length).be.equal(3)", " pm.expect(Object.keys(responseBody).length).be.equal(4)",
"});", "});",
"" ""
], ],
@ -626,7 +626,7 @@
" const responseBody = pm.response.json();", " const responseBody = pm.response.json();",
" pm.expect(responseBody).to.have.property(\"id\")", " pm.expect(responseBody).to.have.property(\"id\")",
" pm.expect(responseBody).to.have.property(\"expiration\")", " pm.expect(responseBody).to.have.property(\"expiration\")",
" pm.expect(Object.keys(responseBody).length).be.equal(3)", " pm.expect(Object.keys(responseBody).length).be.equal(4)",
"});", "});",
"" ""
], ],

View File

@ -17,13 +17,9 @@ const showShareInformationsModal = (
const t = translateOutsideContext(); const t = translateOutsideContext();
const link = `${appUrl}/s/${share.id}`; const link = `${appUrl}/s/${share.id}`;
let shareSize: number = 0; const formattedShareSize = byteToHumanSizeString(share.size);
for (let file of share.files as FileMetaData[])
shareSize += parseInt(file.size);
const formattedShareSize = byteToHumanSizeString(shareSize);
const formattedMaxShareSize = byteToHumanSizeString(maxShareSize); const formattedMaxShareSize = byteToHumanSizeString(maxShareSize);
const shareSizeProgress = (shareSize / maxShareSize) * 100; const shareSizeProgress = (share.size / maxShareSize) * 100;
const formattedCreatedAt = moment(share.createdAt).format("LLL"); const formattedCreatedAt = moment(share.createdAt).format("LLL");
const formattedExpiration = const formattedExpiration =
@ -42,12 +38,18 @@ const showShareInformationsModal = (
</b> </b>
{share.id} {share.id}
</Text> </Text>
<Text size="sm">
<b>
<FormattedMessage id="account.shares.table.name" />:{" "}
</b>
{share.name || "-"}
</Text>
<Text size="sm"> <Text size="sm">
<b> <b>
<FormattedMessage id="account.shares.table.description" />:{" "} <FormattedMessage id="account.shares.table.description" />:{" "}
</b> </b>
{share.description || "No description"} {share.description || "-"}
</Text> </Text>
<Text size="sm"> <Text size="sm">
@ -75,15 +77,15 @@ const showShareInformationsModal = (
</Text> </Text>
<Flex align="center" justify="center"> <Flex align="center" justify="center">
{shareSize / maxShareSize < 0.1 && ( {share.size / maxShareSize < 0.1 && (
<Text size="xs" style={{ marginRight: "4px" }}> <Text size="xs" style={{ marginRight: "4px" }}>
{formattedShareSize} {formattedShareSize}
</Text> </Text>
)} )}
<Progress <Progress
value={shareSizeProgress} value={shareSizeProgress}
label={shareSize / maxShareSize >= 0.1 ? formattedShareSize : ""} label={share.size / maxShareSize >= 0.1 ? formattedShareSize : ""}
style={{ width: shareSize / maxShareSize < 0.1 ? "70%" : "80%" }} style={{ width: share.size / maxShareSize < 0.1 ? "70%" : "80%" }}
size="xl" size="xl"
radius="xl" radius="xl"
/> />

View File

@ -92,11 +92,16 @@ const CreateUploadModalBody = ({
.matches(new RegExp("^[a-zA-Z0-9_-]*$"), { .matches(new RegExp("^[a-zA-Z0-9_-]*$"), {
message: t("upload.modal.link.error.invalid"), message: t("upload.modal.link.error.invalid"),
}), }),
name: yup
.string()
.transform((value) => value || undefined)
.min(3, t("common.error.too-short", { length: 3 }))
.max(30, t("common.error.too-long", { length: 30 })),
password: yup password: yup
.string() .string()
.transform((value) => value || undefined) .transform((value) => value || undefined)
.min(3) .min(3, t("common.error.too-short", { length: 3 }))
.max(30), .max(30, t("common.error.too-long", { length: 30 })),
maxViews: yup maxViews: yup
.number() .number()
.transform((value) => value || undefined) .transform((value) => value || undefined)
@ -105,6 +110,7 @@ const CreateUploadModalBody = ({
const form = useForm({ const form = useForm({
initialValues: { initialValues: {
name: undefined,
link: generatedLink, link: generatedLink,
recipients: [] as string[], recipients: [] as string[],
password: undefined, password: undefined,
@ -154,6 +160,7 @@ const CreateUploadModalBody = ({
uploadCallback( uploadCallback(
{ {
id: values.link, id: values.link,
name: values.name,
expiration: expirationString, expiration: expirationString,
recipients: values.recipients, recipients: values.recipients,
description: values.description, description: values.description,
@ -308,14 +315,21 @@ const CreateUploadModalBody = ({
<Accordion> <Accordion>
<Accordion.Item value="description" sx={{ borderBottom: "none" }}> <Accordion.Item value="description" sx={{ borderBottom: "none" }}>
<Accordion.Control> <Accordion.Control>
<FormattedMessage id="upload.modal.accordion.description.title" /> <FormattedMessage id="upload.modal.accordion.name-and-description.title" />
</Accordion.Control> </Accordion.Control>
<Accordion.Panel> <Accordion.Panel>
<Stack align="stretch"> <Stack align="stretch">
<TextInput
variant="filled"
placeholder={t(
"upload.modal.accordion.name-and-description.name.placeholder",
)}
{...form.getInputProps("name")}
/>
<Textarea <Textarea
variant="filled" variant="filled"
placeholder={t( placeholder={t(
"upload.modal.accordion.description.placeholder", "upload.modal.accordion.name-and-description.description.placeholder",
)} )}
{...form.getInputProps("description")} {...form.getInputProps("description")}
/> />

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Months", "upload.modal.expires.month-plural": "Months",
"upload.modal.expires.year-singular": "Year", "upload.modal.expires.year-singular": "Year",
"upload.modal.expires.year-plural": "Years", "upload.modal.expires.year-plural": "Years",
"upload.modal.accordion.description.title": "Description", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Note for the recipients of this share", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Email recipients", "upload.modal.accordion.email.title": "Email recipients",
"upload.modal.accordion.email.placeholder": "Enter email recipients", "upload.modal.accordion.email.placeholder": "Enter email recipients",
"upload.modal.accordion.email.invalid-email": "Invalid email address", "upload.modal.accordion.email.invalid-email": "Invalid email address",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Måneder", "upload.modal.expires.month-plural": "Måneder",
"upload.modal.expires.year-singular": "År", "upload.modal.expires.year-singular": "År",
"upload.modal.expires.year-plural": "År", "upload.modal.expires.year-plural": "År",
"upload.modal.accordion.description.title": "Beskrivelse", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Bemærkning til modtagerne af dette share", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "E-mail modtagere", "upload.modal.accordion.email.title": "E-mail modtagere",
"upload.modal.accordion.email.placeholder": "Indtast e-mail modtagere", "upload.modal.accordion.email.placeholder": "Indtast e-mail modtagere",
"upload.modal.accordion.email.invalid-email": "Ugyldig e-mailadresse", "upload.modal.accordion.email.invalid-email": "Ugyldig e-mailadresse",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Monate", "upload.modal.expires.month-plural": "Monate",
"upload.modal.expires.year-singular": "Jahr", "upload.modal.expires.year-singular": "Jahr",
"upload.modal.expires.year-plural": "Year", "upload.modal.expires.year-plural": "Year",
"upload.modal.accordion.description.title": "Beschreibung", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Hinweis für die Empfänger dieser Freigabe", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Email Empfänger", "upload.modal.accordion.email.title": "Email Empfänger",
"upload.modal.accordion.email.placeholder": "Email der Empfänger eingeben", "upload.modal.accordion.email.placeholder": "Email der Empfänger eingeben",
"upload.modal.accordion.email.invalid-email": "Ungültige Emailadresse", "upload.modal.accordion.email.invalid-email": "Ungültige Emailadresse",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Μήνες", "upload.modal.expires.month-plural": "Μήνες",
"upload.modal.expires.year-singular": "Έτος", "upload.modal.expires.year-singular": "Έτος",
"upload.modal.expires.year-plural": "Έτη", "upload.modal.expires.year-plural": "Έτη",
"upload.modal.accordion.description.title": "Περιγραφή", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Σημείωση για τους παραλήπτες αυτής της κοινοποίησης", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Αποδέκτες email", "upload.modal.accordion.email.title": "Αποδέκτες email",
"upload.modal.accordion.email.placeholder": "Εισάγετε αποδέκτες email", "upload.modal.accordion.email.placeholder": "Εισάγετε αποδέκτες email",
"upload.modal.accordion.email.invalid-email": "Μη έγκυρη διεύθυνση e-mail", "upload.modal.accordion.email.invalid-email": "Μη έγκυρη διεύθυνση e-mail",

View File

@ -307,8 +307,9 @@ export default {
"upload.modal.expires.year-singular": "Year", "upload.modal.expires.year-singular": "Year",
"upload.modal.expires.year-plural": "Years", "upload.modal.expires.year-plural": "Years",
"upload.modal.accordion.description.title": "Description", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder":
"Note for the recipients of this share", "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Email recipients", "upload.modal.accordion.email.title": "Email recipients",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Meses", "upload.modal.expires.month-plural": "Meses",
"upload.modal.expires.year-singular": "Año", "upload.modal.expires.year-singular": "Año",
"upload.modal.expires.year-plural": "Años", "upload.modal.expires.year-plural": "Años",
"upload.modal.accordion.description.title": "Descripción", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Nota para los destinatarios de este compartido", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Correo de los destinatarios", "upload.modal.accordion.email.title": "Correo de los destinatarios",
"upload.modal.accordion.email.placeholder": "Ingresa los correos de los destinatarios", "upload.modal.accordion.email.placeholder": "Ingresa los correos de los destinatarios",
"upload.modal.accordion.email.invalid-email": "Dirección de correo inválida", "upload.modal.accordion.email.invalid-email": "Dirección de correo inválida",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Kuukautta", "upload.modal.expires.month-plural": "Kuukautta",
"upload.modal.expires.year-singular": "Vuosi", "upload.modal.expires.year-singular": "Vuosi",
"upload.modal.expires.year-plural": "Vuotta", "upload.modal.expires.year-plural": "Vuotta",
"upload.modal.accordion.description.title": "Kuvaus", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Huomautus tämän jaon vastaanottajille", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Sähköpostin vastaanottajat", "upload.modal.accordion.email.title": "Sähköpostin vastaanottajat",
"upload.modal.accordion.email.placeholder": "Syötä sähköpostin vastaanottajat", "upload.modal.accordion.email.placeholder": "Syötä sähköpostin vastaanottajat",
"upload.modal.accordion.email.invalid-email": "Virheellinen sähköpostiosoite", "upload.modal.accordion.email.invalid-email": "Virheellinen sähköpostiosoite",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Mois", "upload.modal.expires.month-plural": "Mois",
"upload.modal.expires.year-singular": "An", "upload.modal.expires.year-singular": "An",
"upload.modal.expires.year-plural": "Ans", "upload.modal.expires.year-plural": "Ans",
"upload.modal.accordion.description.title": "Description", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Note pour les destinataires de ce partage", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Adresse courriel des destinataires", "upload.modal.accordion.email.title": "Adresse courriel des destinataires",
"upload.modal.accordion.email.placeholder": "Saisir les destinataires de ce partage", "upload.modal.accordion.email.placeholder": "Saisir les destinataires de ce partage",
"upload.modal.accordion.email.invalid-email": "Courriel invalide", "upload.modal.accordion.email.invalid-email": "Courriel invalide",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Months", "upload.modal.expires.month-plural": "Months",
"upload.modal.expires.year-singular": "Year", "upload.modal.expires.year-singular": "Year",
"upload.modal.expires.year-plural": "Years", "upload.modal.expires.year-plural": "Years",
"upload.modal.accordion.description.title": "Description", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Note for the recipients of this share", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Email recipients", "upload.modal.accordion.email.title": "Email recipients",
"upload.modal.accordion.email.placeholder": "Enter email recipients", "upload.modal.accordion.email.placeholder": "Enter email recipients",
"upload.modal.accordion.email.invalid-email": "Invalid email address", "upload.modal.accordion.email.invalid-email": "Invalid email address",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Mesi", "upload.modal.expires.month-plural": "Mesi",
"upload.modal.expires.year-singular": "Anno", "upload.modal.expires.year-singular": "Anno",
"upload.modal.expires.year-plural": "Anni", "upload.modal.expires.year-plural": "Anni",
"upload.modal.accordion.description.title": "Descrizione", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Nota per i destinatari di questa condivisione", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Destinatari di posta elettronica", "upload.modal.accordion.email.title": "Destinatari di posta elettronica",
"upload.modal.accordion.email.placeholder": "Inserisci le email dei destinatari", "upload.modal.accordion.email.placeholder": "Inserisci le email dei destinatari",
"upload.modal.accordion.email.invalid-email": "Indirizzo email non valido", "upload.modal.accordion.email.invalid-email": "Indirizzo email non valido",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "ヶ月間", "upload.modal.expires.month-plural": "ヶ月間",
"upload.modal.expires.year-singular": "年間", "upload.modal.expires.year-singular": "年間",
"upload.modal.expires.year-plural": "年間", "upload.modal.expires.year-plural": "年間",
"upload.modal.accordion.description.title": "説明", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "この共有に関する受信者へのメモ", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "メールで受け取る相手", "upload.modal.accordion.email.title": "メールで受け取る相手",
"upload.modal.accordion.email.placeholder": "メールの宛先を入力", "upload.modal.accordion.email.placeholder": "メールの宛先を入力",
"upload.modal.accordion.email.invalid-email": "無効なメールアドレスです", "upload.modal.accordion.email.invalid-email": "無効なメールアドレスです",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Maanden", "upload.modal.expires.month-plural": "Maanden",
"upload.modal.expires.year-singular": "Jaar", "upload.modal.expires.year-singular": "Jaar",
"upload.modal.expires.year-plural": "Jaren", "upload.modal.expires.year-plural": "Jaren",
"upload.modal.accordion.description.title": "Beschrijving", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Opmerking voor de ontvangers van deze share", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "E-mail van de ontvangers", "upload.modal.accordion.email.title": "E-mail van de ontvangers",
"upload.modal.accordion.email.placeholder": "Voer e-mail ontvangers in", "upload.modal.accordion.email.placeholder": "Voer e-mail ontvangers in",
"upload.modal.accordion.email.invalid-email": "Ongeldig e-mailadres", "upload.modal.accordion.email.invalid-email": "Ongeldig e-mailadres",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Miesiące/ęcy", "upload.modal.expires.month-plural": "Miesiące/ęcy",
"upload.modal.expires.year-singular": "Rok", "upload.modal.expires.year-singular": "Rok",
"upload.modal.expires.year-plural": "Lat/a", "upload.modal.expires.year-plural": "Lat/a",
"upload.modal.accordion.description.title": "Opis", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Notatka dla odbiorców tego udziału", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Odbiorcy wiadomości e-mail", "upload.modal.accordion.email.title": "Odbiorcy wiadomości e-mail",
"upload.modal.accordion.email.placeholder": "Wprowadź adresatów wiadomości e-mail", "upload.modal.accordion.email.placeholder": "Wprowadź adresatów wiadomości e-mail",
"upload.modal.accordion.email.invalid-email": "Adres e-mail jest nieprawidłowy", "upload.modal.accordion.email.invalid-email": "Adres e-mail jest nieprawidłowy",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Meses", "upload.modal.expires.month-plural": "Meses",
"upload.modal.expires.year-singular": "Ano", "upload.modal.expires.year-singular": "Ano",
"upload.modal.expires.year-plural": "Anos", "upload.modal.expires.year-plural": "Anos",
"upload.modal.accordion.description.title": "Descrição", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Nota para os destinatários deste compartilhamento", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Destinatários de e-mail", "upload.modal.accordion.email.title": "Destinatários de e-mail",
"upload.modal.accordion.email.placeholder": "Insira os destinatários do e-mail", "upload.modal.accordion.email.placeholder": "Insira os destinatários do e-mail",
"upload.modal.accordion.email.invalid-email": "Endereço de e-mail inválido", "upload.modal.accordion.email.invalid-email": "Endereço de e-mail inválido",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Месяца(-ев)", "upload.modal.expires.month-plural": "Месяца(-ев)",
"upload.modal.expires.year-singular": "Год", "upload.modal.expires.year-singular": "Год",
"upload.modal.expires.year-plural": "Года (лет)", "upload.modal.expires.year-plural": "Года (лет)",
"upload.modal.accordion.description.title": "Описание", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Примечание для получателей этой загрузки", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Получатели письма", "upload.modal.accordion.email.title": "Получатели письма",
"upload.modal.accordion.email.placeholder": "Получатели e-mail", "upload.modal.accordion.email.placeholder": "Получатели e-mail",
"upload.modal.accordion.email.invalid-email": "Недопустимый адрес электронной почты", "upload.modal.accordion.email.invalid-email": "Недопустимый адрес электронной почты",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Meseci", "upload.modal.expires.month-plural": "Meseci",
"upload.modal.expires.year-singular": "Leto", "upload.modal.expires.year-singular": "Leto",
"upload.modal.expires.year-plural": "Leta", "upload.modal.expires.year-plural": "Leta",
"upload.modal.accordion.description.title": "Opis", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Sporočilo za prejemnika te delitve", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Prejemnik e-pošte", "upload.modal.accordion.email.title": "Prejemnik e-pošte",
"upload.modal.accordion.email.placeholder": "Vnesite prejemnika e-pošte", "upload.modal.accordion.email.placeholder": "Vnesite prejemnika e-pošte",
"upload.modal.accordion.email.invalid-email": "Neveljaven e-poštni naslov", "upload.modal.accordion.email.invalid-email": "Neveljaven e-poštni naslov",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Месеци", "upload.modal.expires.month-plural": "Месеци",
"upload.modal.expires.year-singular": "Година", "upload.modal.expires.year-singular": "Година",
"upload.modal.expires.year-plural": "Године", "upload.modal.expires.year-plural": "Године",
"upload.modal.accordion.description.title": "Опис", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Напомена за примаоце овог дељења", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Примаоци е-поште", "upload.modal.accordion.email.title": "Примаоци е-поште",
"upload.modal.accordion.email.placeholder": "Унесите примаоце е-поште", "upload.modal.accordion.email.placeholder": "Унесите примаоце е-поште",
"upload.modal.accordion.email.invalid-email": "Неисправна адреса е-поште", "upload.modal.accordion.email.invalid-email": "Неисправна адреса е-поште",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Månader", "upload.modal.expires.month-plural": "Månader",
"upload.modal.expires.year-singular": "År", "upload.modal.expires.year-singular": "År",
"upload.modal.expires.year-plural": "År", "upload.modal.expires.year-plural": "År",
"upload.modal.accordion.description.title": "Beskrivning", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Anteckning till mottagare av denna delning", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "E-postmottagare", "upload.modal.accordion.email.title": "E-postmottagare",
"upload.modal.accordion.email.placeholder": "Ange e-postmottagare", "upload.modal.accordion.email.placeholder": "Ange e-postmottagare",
"upload.modal.accordion.email.invalid-email": "Ogiltig e-postadress", "upload.modal.accordion.email.invalid-email": "Ogiltig e-postadress",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "เดือน", "upload.modal.expires.month-plural": "เดือน",
"upload.modal.expires.year-singular": "ปี", "upload.modal.expires.year-singular": "ปี",
"upload.modal.expires.year-plural": "ปี", "upload.modal.expires.year-plural": "ปี",
"upload.modal.accordion.description.title": "คำอธิบาย", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "หมายเหตุสำหรับผู้รับการแชร์นี้", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "ผู้รับอีเมล์", "upload.modal.accordion.email.title": "ผู้รับอีเมล์",
"upload.modal.accordion.email.placeholder": "ป้อนผู้รับอีเมล์", "upload.modal.accordion.email.placeholder": "ป้อนผู้รับอีเมล์",
"upload.modal.accordion.email.invalid-email": "ที่อยู่อีเมล์ไม่ถูกต้อง", "upload.modal.accordion.email.invalid-email": "ที่อยู่อีเมล์ไม่ถูกต้อง",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "Місяця(-ів)", "upload.modal.expires.month-plural": "Місяця(-ів)",
"upload.modal.expires.year-singular": "Рік", "upload.modal.expires.year-singular": "Рік",
"upload.modal.expires.year-plural": "Роки (роки)", "upload.modal.expires.year-plural": "Роки (роки)",
"upload.modal.accordion.description.title": "Опис", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "Примітка для одержувачів цього завантаження", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Одержувачі листа", "upload.modal.accordion.email.title": "Одержувачі листа",
"upload.modal.accordion.email.placeholder": "Одержувачі e-mail", "upload.modal.accordion.email.placeholder": "Одержувачі e-mail",
"upload.modal.accordion.email.invalid-email": "Неприпустима адреса електронної пошти", "upload.modal.accordion.email.invalid-email": "Неприпустима адреса електронної пошти",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "月", "upload.modal.expires.month-plural": "月",
"upload.modal.expires.year-singular": "1 年", "upload.modal.expires.year-singular": "1 年",
"upload.modal.expires.year-plural": "年", "upload.modal.expires.year-plural": "年",
"upload.modal.accordion.description.title": "描述", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "共享文件备注信息", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "邮件提醒", "upload.modal.accordion.email.title": "邮件提醒",
"upload.modal.accordion.email.placeholder": "收件人电子邮件地址", "upload.modal.accordion.email.placeholder": "收件人电子邮件地址",
"upload.modal.accordion.email.invalid-email": "邮件地址不可用", "upload.modal.accordion.email.invalid-email": "邮件地址不可用",

View File

@ -229,8 +229,9 @@ export default {
"upload.modal.expires.month-plural": "月", "upload.modal.expires.month-plural": "月",
"upload.modal.expires.year-singular": "年", "upload.modal.expires.year-singular": "年",
"upload.modal.expires.year-plural": "年", "upload.modal.expires.year-plural": "年",
"upload.modal.accordion.description.title": "描述", "upload.modal.accordion.name-and-description.title": "Name and description",
"upload.modal.accordion.description.placeholder": "分享檔案備註資訊", "upload.modal.accordion.name-and-description.name.placeholder": "Name",
"upload.modal.accordion.name-and-description.description.placeholder": "Note for the recipients of this share",
"upload.modal.accordion.email.title": "Email提醒", "upload.modal.accordion.email.title": "Email提醒",
"upload.modal.accordion.email.placeholder": "收件人Email地址", "upload.modal.accordion.email.placeholder": "收件人Email地址",
"upload.modal.accordion.email.invalid-email": "Email地址不可用", "upload.modal.accordion.email.invalid-email": "Email地址不可用",

View File

@ -68,15 +68,12 @@ const MyShares = () => {
<Table> <Table>
<thead> <thead>
<tr> <tr>
<th>
<FormattedMessage id="account.shares.table.id" />
</th>
<th> <th>
<FormattedMessage id="account.shares.table.name" /> <FormattedMessage id="account.shares.table.name" />
</th> </th>
<MediaQuery smallerThan="md" styles={{ display: "none" }}>
<th>
<FormattedMessage id="account.shares.table.description" />
</th>
</MediaQuery>
<th> <th>
<FormattedMessage id="account.shares.table.visitors" /> <FormattedMessage id="account.shares.table.visitors" />
</th> </th>
@ -90,18 +87,7 @@ const MyShares = () => {
{shares.map((share) => ( {shares.map((share) => (
<tr key={share.id}> <tr key={share.id}>
<td>{share.id}</td> <td>{share.id}</td>
<MediaQuery smallerThan="sm" styles={{ display: "none" }}> <td>{share.name}</td>
<td
style={{
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
maxWidth: "300px",
}}
>
{share.description || ""}
</td>
</MediaQuery>
<td>{share.views}</td> <td>{share.views}</td>
<td> <td>
{moment(share.expiration).unix() === 0 {moment(share.expiration).unix() === 0

View File

@ -91,13 +91,13 @@ const Share = ({ shareId }: { shareId: string }) => {
return ( return (
<> <>
<Meta <Meta
title={t("share.title", { shareId })} title={t("share.title", { shareId: share?.name || shareId })}
description={t("share.description")} description={t("share.description")}
/> />
<Group position="apart" mb="lg"> <Group position="apart" mb="lg">
<Box style={{ maxWidth: "70%" }}> <Box style={{ maxWidth: "70%" }}>
<Title order={3}>{share?.id}</Title> <Title order={3}>{share?.name || share?.id}</Title>
<Text size="sm">{share?.description}</Text> <Text size="sm">{share?.description}</Text>
</Box> </Box>
{share?.files.length > 1 && <DownloadAllButton shareId={shareId} />} {share?.files.length > 1 && <DownloadAllButton shareId={shareId} />}

View File

@ -2,15 +2,18 @@ import User from "./user.type";
export type Share = { export type Share = {
id: string; id: string;
name?: string;
files: any; files: any;
creator: User; creator: User;
description?: string; description?: string;
expiration: Date; expiration: Date;
size: number;
hasPassword: boolean; hasPassword: boolean;
}; };
export type CreateShare = { export type CreateShare = {
id: string; id: string;
name?: string;
description?: string; description?: string;
recipients: string[]; recipients: string[];
expiration: string; expiration: string;