mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-10 18:00:13 +01:00
Compare commits
2 Commits
0e12ba87bc
...
a45184995f
Author | SHA1 | Date | |
---|---|---|---|
|
a45184995f | ||
|
b717663b5c |
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Share" ADD COLUMN "name" TEXT;
|
@ -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)
|
||||||
|
@ -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()
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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 });
|
||||||
}
|
}
|
||||||
|
@ -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),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -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)",
|
||||||
"});",
|
"});",
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
@ -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")}
|
||||||
/>
|
/>
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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": "無効なメールアドレスです",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
@ -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": "Недопустимый адрес электронной почты",
|
||||||
|
@ -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",
|
||||||
|
@ -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": "Неисправна адреса е-поште",
|
||||||
|
@ -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",
|
||||||
|
@ -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": "ที่อยู่อีเมล์ไม่ถูกต้อง",
|
||||||
|
@ -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": "Неприпустима адреса електронної пошти",
|
||||||
|
@ -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": "邮件地址不可用",
|
||||||
|
@ -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地址不可用",
|
||||||
|
@ -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
|
||||||
|
@ -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} />}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user