mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-10 18:00:13 +01:00
Compare commits
No commits in common. "a45184995f850964b8d5d6c3a9b2fea6f3e61d7e" and "0e12ba87bcb4a55ede81a9b86c2f2b7ad5d62bb7" have entirely different histories.
a45184995f
...
0e12ba87bc
@ -1,2 +0,0 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Share" ADD COLUMN "name" TEXT;
|
@ -75,7 +75,6 @@ model Share {
|
||||
id String @id @default(uuid())
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
name String?
|
||||
uploadLocked Boolean @default(false)
|
||||
isZipReady Boolean @default(false)
|
||||
views Int @default(0)
|
||||
|
@ -13,7 +13,7 @@ export class ReverseShareTokenWithShares extends OmitType(ReverseShareDTO, [
|
||||
@Type(() => OmitType(MyShareDTO, ["recipients", "hasPassword"] as const))
|
||||
shares: Omit<
|
||||
MyShareDTO,
|
||||
"recipients" | "files" | "from" | "fromList" | "hasPassword" | "size"
|
||||
"recipients" | "files" | "from" | "fromList" | "hasPassword"
|
||||
>[];
|
||||
|
||||
@Expose()
|
||||
|
@ -18,10 +18,6 @@ export class CreateShareDTO {
|
||||
@Length(3, 50)
|
||||
id: string;
|
||||
|
||||
@Length(3, 30)
|
||||
@IsOptional()
|
||||
name: string;
|
||||
|
||||
@IsString()
|
||||
expiration: string;
|
||||
|
||||
|
@ -6,9 +6,6 @@ export class ShareDTO {
|
||||
@Expose()
|
||||
id: string;
|
||||
|
||||
@Expose()
|
||||
name?: string;
|
||||
|
||||
@Expose()
|
||||
expiration: Date;
|
||||
|
||||
@ -26,9 +23,6 @@ export class ShareDTO {
|
||||
@Expose()
|
||||
hasPassword: boolean;
|
||||
|
||||
@Expose()
|
||||
size: number;
|
||||
|
||||
from(partial: Partial<ShareDTO>) {
|
||||
return plainToClass(ShareDTO, partial, { excludeExtraneousValues: true });
|
||||
}
|
||||
|
@ -214,7 +214,6 @@ export class ShareService {
|
||||
return shares.map((share) => {
|
||||
return {
|
||||
...share,
|
||||
size: share.files.reduce((acc, file) => acc + parseInt(file.size), 0),
|
||||
recipients: share.recipients.map((recipients) => recipients.email),
|
||||
};
|
||||
});
|
||||
|
@ -432,7 +432,7 @@
|
||||
" const responseBody = pm.response.json();",
|
||||
" pm.expect(responseBody).to.have.property(\"id\")",
|
||||
" pm.expect(responseBody).to.have.property(\"expiration\")",
|
||||
" pm.expect(Object.keys(responseBody).length).be.equal(4)",
|
||||
" pm.expect(Object.keys(responseBody).length).be.equal(3)",
|
||||
"});",
|
||||
""
|
||||
],
|
||||
@ -626,7 +626,7 @@
|
||||
" const responseBody = pm.response.json();",
|
||||
" pm.expect(responseBody).to.have.property(\"id\")",
|
||||
" pm.expect(responseBody).to.have.property(\"expiration\")",
|
||||
" pm.expect(Object.keys(responseBody).length).be.equal(4)",
|
||||
" pm.expect(Object.keys(responseBody).length).be.equal(3)",
|
||||
"});",
|
||||
""
|
||||
],
|
||||
|
@ -17,9 +17,13 @@ const showShareInformationsModal = (
|
||||
const t = translateOutsideContext();
|
||||
const link = `${appUrl}/s/${share.id}`;
|
||||
|
||||
const formattedShareSize = byteToHumanSizeString(share.size);
|
||||
let shareSize: number = 0;
|
||||
for (let file of share.files as FileMetaData[])
|
||||
shareSize += parseInt(file.size);
|
||||
|
||||
const formattedShareSize = byteToHumanSizeString(shareSize);
|
||||
const formattedMaxShareSize = byteToHumanSizeString(maxShareSize);
|
||||
const shareSizeProgress = (share.size / maxShareSize) * 100;
|
||||
const shareSizeProgress = (shareSize / maxShareSize) * 100;
|
||||
|
||||
const formattedCreatedAt = moment(share.createdAt).format("LLL");
|
||||
const formattedExpiration =
|
||||
@ -38,18 +42,12 @@ const showShareInformationsModal = (
|
||||
</b>
|
||||
{share.id}
|
||||
</Text>
|
||||
<Text size="sm">
|
||||
<b>
|
||||
<FormattedMessage id="account.shares.table.name" />:{" "}
|
||||
</b>
|
||||
{share.name || "-"}
|
||||
</Text>
|
||||
|
||||
<Text size="sm">
|
||||
<b>
|
||||
<FormattedMessage id="account.shares.table.description" />:{" "}
|
||||
</b>
|
||||
{share.description || "-"}
|
||||
{share.description || "No description"}
|
||||
</Text>
|
||||
|
||||
<Text size="sm">
|
||||
@ -77,15 +75,15 @@ const showShareInformationsModal = (
|
||||
</Text>
|
||||
|
||||
<Flex align="center" justify="center">
|
||||
{share.size / maxShareSize < 0.1 && (
|
||||
{shareSize / maxShareSize < 0.1 && (
|
||||
<Text size="xs" style={{ marginRight: "4px" }}>
|
||||
{formattedShareSize}
|
||||
</Text>
|
||||
)}
|
||||
<Progress
|
||||
value={shareSizeProgress}
|
||||
label={share.size / maxShareSize >= 0.1 ? formattedShareSize : ""}
|
||||
style={{ width: share.size / maxShareSize < 0.1 ? "70%" : "80%" }}
|
||||
label={shareSize / maxShareSize >= 0.1 ? formattedShareSize : ""}
|
||||
style={{ width: shareSize / maxShareSize < 0.1 ? "70%" : "80%" }}
|
||||
size="xl"
|
||||
radius="xl"
|
||||
/>
|
||||
|
@ -92,16 +92,11 @@ const CreateUploadModalBody = ({
|
||||
.matches(new RegExp("^[a-zA-Z0-9_-]*$"), {
|
||||
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
|
||||
.string()
|
||||
.transform((value) => value || undefined)
|
||||
.min(3, t("common.error.too-short", { length: 3 }))
|
||||
.max(30, t("common.error.too-long", { length: 30 })),
|
||||
.min(3)
|
||||
.max(30),
|
||||
maxViews: yup
|
||||
.number()
|
||||
.transform((value) => value || undefined)
|
||||
@ -110,7 +105,6 @@ const CreateUploadModalBody = ({
|
||||
|
||||
const form = useForm({
|
||||
initialValues: {
|
||||
name: undefined,
|
||||
link: generatedLink,
|
||||
recipients: [] as string[],
|
||||
password: undefined,
|
||||
@ -160,7 +154,6 @@ const CreateUploadModalBody = ({
|
||||
uploadCallback(
|
||||
{
|
||||
id: values.link,
|
||||
name: values.name,
|
||||
expiration: expirationString,
|
||||
recipients: values.recipients,
|
||||
description: values.description,
|
||||
@ -315,21 +308,14 @@ const CreateUploadModalBody = ({
|
||||
<Accordion>
|
||||
<Accordion.Item value="description" sx={{ borderBottom: "none" }}>
|
||||
<Accordion.Control>
|
||||
<FormattedMessage id="upload.modal.accordion.name-and-description.title" />
|
||||
<FormattedMessage id="upload.modal.accordion.description.title" />
|
||||
</Accordion.Control>
|
||||
<Accordion.Panel>
|
||||
<Stack align="stretch">
|
||||
<TextInput
|
||||
variant="filled"
|
||||
placeholder={t(
|
||||
"upload.modal.accordion.name-and-description.name.placeholder",
|
||||
)}
|
||||
{...form.getInputProps("name")}
|
||||
/>
|
||||
<Textarea
|
||||
variant="filled"
|
||||
placeholder={t(
|
||||
"upload.modal.accordion.name-and-description.description.placeholder",
|
||||
"upload.modal.accordion.description.placeholder",
|
||||
)}
|
||||
{...form.getInputProps("description")}
|
||||
/>
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Months",
|
||||
"upload.modal.expires.year-singular": "Year",
|
||||
"upload.modal.expires.year-plural": "Years",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Description",
|
||||
"upload.modal.accordion.description.placeholder": "Note for the recipients of this share",
|
||||
"upload.modal.accordion.email.title": "Email recipients",
|
||||
"upload.modal.accordion.email.placeholder": "Enter email recipients",
|
||||
"upload.modal.accordion.email.invalid-email": "Invalid email address",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Måneder",
|
||||
"upload.modal.expires.year-singular": "År",
|
||||
"upload.modal.expires.year-plural": "År",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Beskrivelse",
|
||||
"upload.modal.accordion.description.placeholder": "Bemærkning til modtagerne af dette share",
|
||||
"upload.modal.accordion.email.title": "E-mail modtagere",
|
||||
"upload.modal.accordion.email.placeholder": "Indtast e-mail modtagere",
|
||||
"upload.modal.accordion.email.invalid-email": "Ugyldig e-mailadresse",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Monate",
|
||||
"upload.modal.expires.year-singular": "Jahr",
|
||||
"upload.modal.expires.year-plural": "Year",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Beschreibung",
|
||||
"upload.modal.accordion.description.placeholder": "Hinweis für die Empfänger dieser Freigabe",
|
||||
"upload.modal.accordion.email.title": "Email Empfänger",
|
||||
"upload.modal.accordion.email.placeholder": "Email der Empfänger eingeben",
|
||||
"upload.modal.accordion.email.invalid-email": "Ungültige Emailadresse",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Μήνες",
|
||||
"upload.modal.expires.year-singular": "Έτος",
|
||||
"upload.modal.expires.year-plural": "Έτη",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Περιγραφή",
|
||||
"upload.modal.accordion.description.placeholder": "Σημείωση για τους παραλήπτες αυτής της κοινοποίησης",
|
||||
"upload.modal.accordion.email.title": "Αποδέκτες email",
|
||||
"upload.modal.accordion.email.placeholder": "Εισάγετε αποδέκτες email",
|
||||
"upload.modal.accordion.email.invalid-email": "Μη έγκυρη διεύθυνση e-mail",
|
||||
|
@ -307,9 +307,8 @@ export default {
|
||||
"upload.modal.expires.year-singular": "Year",
|
||||
"upload.modal.expires.year-plural": "Years",
|
||||
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"upload.modal.accordion.name-and-description.name.placeholder": "Name",
|
||||
"upload.modal.accordion.name-and-description.description.placeholder":
|
||||
"upload.modal.accordion.description.title": "Description",
|
||||
"upload.modal.accordion.description.placeholder":
|
||||
"Note for the recipients of this share",
|
||||
|
||||
"upload.modal.accordion.email.title": "Email recipients",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Meses",
|
||||
"upload.modal.expires.year-singular": "Año",
|
||||
"upload.modal.expires.year-plural": "Años",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Descripción",
|
||||
"upload.modal.accordion.description.placeholder": "Nota para los destinatarios de este compartido",
|
||||
"upload.modal.accordion.email.title": "Correo 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",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Kuukautta",
|
||||
"upload.modal.expires.year-singular": "Vuosi",
|
||||
"upload.modal.expires.year-plural": "Vuotta",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Kuvaus",
|
||||
"upload.modal.accordion.description.placeholder": "Huomautus tämän jaon vastaanottajille",
|
||||
"upload.modal.accordion.email.title": "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",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Mois",
|
||||
"upload.modal.expires.year-singular": "An",
|
||||
"upload.modal.expires.year-plural": "Ans",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Description",
|
||||
"upload.modal.accordion.description.placeholder": "Note pour les destinataires de ce partage",
|
||||
"upload.modal.accordion.email.title": "Adresse courriel des destinataires",
|
||||
"upload.modal.accordion.email.placeholder": "Saisir les destinataires de ce partage",
|
||||
"upload.modal.accordion.email.invalid-email": "Courriel invalide",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Months",
|
||||
"upload.modal.expires.year-singular": "Year",
|
||||
"upload.modal.expires.year-plural": "Years",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Description",
|
||||
"upload.modal.accordion.description.placeholder": "Note for the recipients of this share",
|
||||
"upload.modal.accordion.email.title": "Email recipients",
|
||||
"upload.modal.accordion.email.placeholder": "Enter email recipients",
|
||||
"upload.modal.accordion.email.invalid-email": "Invalid email address",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Mesi",
|
||||
"upload.modal.expires.year-singular": "Anno",
|
||||
"upload.modal.expires.year-plural": "Anni",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Descrizione",
|
||||
"upload.modal.accordion.description.placeholder": "Nota per i destinatari di questa condivisione",
|
||||
"upload.modal.accordion.email.title": "Destinatari di posta elettronica",
|
||||
"upload.modal.accordion.email.placeholder": "Inserisci le email dei destinatari",
|
||||
"upload.modal.accordion.email.invalid-email": "Indirizzo email non valido",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "ヶ月間",
|
||||
"upload.modal.expires.year-singular": "年間",
|
||||
"upload.modal.expires.year-plural": "年間",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "説明",
|
||||
"upload.modal.accordion.description.placeholder": "この共有に関する受信者へのメモ",
|
||||
"upload.modal.accordion.email.title": "メールで受け取る相手",
|
||||
"upload.modal.accordion.email.placeholder": "メールの宛先を入力",
|
||||
"upload.modal.accordion.email.invalid-email": "無効なメールアドレスです",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Maanden",
|
||||
"upload.modal.expires.year-singular": "Jaar",
|
||||
"upload.modal.expires.year-plural": "Jaren",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Beschrijving",
|
||||
"upload.modal.accordion.description.placeholder": "Opmerking voor de ontvangers van deze share",
|
||||
"upload.modal.accordion.email.title": "E-mail van de ontvangers",
|
||||
"upload.modal.accordion.email.placeholder": "Voer e-mail ontvangers in",
|
||||
"upload.modal.accordion.email.invalid-email": "Ongeldig e-mailadres",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Miesiące/ęcy",
|
||||
"upload.modal.expires.year-singular": "Rok",
|
||||
"upload.modal.expires.year-plural": "Lat/a",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Opis",
|
||||
"upload.modal.accordion.description.placeholder": "Notatka dla odbiorców tego udziału",
|
||||
"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.invalid-email": "Adres e-mail jest nieprawidłowy",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Meses",
|
||||
"upload.modal.expires.year-singular": "Ano",
|
||||
"upload.modal.expires.year-plural": "Anos",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Descrição",
|
||||
"upload.modal.accordion.description.placeholder": "Nota para os destinatários deste compartilhamento",
|
||||
"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.invalid-email": "Endereço de e-mail inválido",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Месяца(-ев)",
|
||||
"upload.modal.expires.year-singular": "Год",
|
||||
"upload.modal.expires.year-plural": "Года (лет)",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Описание",
|
||||
"upload.modal.accordion.description.placeholder": "Примечание для получателей этой загрузки",
|
||||
"upload.modal.accordion.email.title": "Получатели письма",
|
||||
"upload.modal.accordion.email.placeholder": "Получатели e-mail",
|
||||
"upload.modal.accordion.email.invalid-email": "Недопустимый адрес электронной почты",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Meseci",
|
||||
"upload.modal.expires.year-singular": "Leto",
|
||||
"upload.modal.expires.year-plural": "Leta",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Opis",
|
||||
"upload.modal.accordion.description.placeholder": "Sporočilo za prejemnika te delitve",
|
||||
"upload.modal.accordion.email.title": "Prejemnik e-pošte",
|
||||
"upload.modal.accordion.email.placeholder": "Vnesite prejemnika e-pošte",
|
||||
"upload.modal.accordion.email.invalid-email": "Neveljaven e-poštni naslov",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Месеци",
|
||||
"upload.modal.expires.year-singular": "Година",
|
||||
"upload.modal.expires.year-plural": "Године",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Опис",
|
||||
"upload.modal.accordion.description.placeholder": "Напомена за примаоце овог дељења",
|
||||
"upload.modal.accordion.email.title": "Примаоци е-поште",
|
||||
"upload.modal.accordion.email.placeholder": "Унесите примаоце е-поште",
|
||||
"upload.modal.accordion.email.invalid-email": "Неисправна адреса е-поште",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Månader",
|
||||
"upload.modal.expires.year-singular": "År",
|
||||
"upload.modal.expires.year-plural": "År",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Beskrivning",
|
||||
"upload.modal.accordion.description.placeholder": "Anteckning till mottagare av denna delning",
|
||||
"upload.modal.accordion.email.title": "E-postmottagare",
|
||||
"upload.modal.accordion.email.placeholder": "Ange e-postmottagare",
|
||||
"upload.modal.accordion.email.invalid-email": "Ogiltig e-postadress",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "เดือน",
|
||||
"upload.modal.expires.year-singular": "ปี",
|
||||
"upload.modal.expires.year-plural": "ปี",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "คำอธิบาย",
|
||||
"upload.modal.accordion.description.placeholder": "หมายเหตุสำหรับผู้รับการแชร์นี้",
|
||||
"upload.modal.accordion.email.title": "ผู้รับอีเมล์",
|
||||
"upload.modal.accordion.email.placeholder": "ป้อนผู้รับอีเมล์",
|
||||
"upload.modal.accordion.email.invalid-email": "ที่อยู่อีเมล์ไม่ถูกต้อง",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "Місяця(-ів)",
|
||||
"upload.modal.expires.year-singular": "Рік",
|
||||
"upload.modal.expires.year-plural": "Роки (роки)",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "Опис",
|
||||
"upload.modal.accordion.description.placeholder": "Примітка для одержувачів цього завантаження",
|
||||
"upload.modal.accordion.email.title": "Одержувачі листа",
|
||||
"upload.modal.accordion.email.placeholder": "Одержувачі e-mail",
|
||||
"upload.modal.accordion.email.invalid-email": "Неприпустима адреса електронної пошти",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "月",
|
||||
"upload.modal.expires.year-singular": "1 年",
|
||||
"upload.modal.expires.year-plural": "年",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "描述",
|
||||
"upload.modal.accordion.description.placeholder": "共享文件备注信息",
|
||||
"upload.modal.accordion.email.title": "邮件提醒",
|
||||
"upload.modal.accordion.email.placeholder": "收件人电子邮件地址",
|
||||
"upload.modal.accordion.email.invalid-email": "邮件地址不可用",
|
||||
|
@ -229,9 +229,8 @@ export default {
|
||||
"upload.modal.expires.month-plural": "月",
|
||||
"upload.modal.expires.year-singular": "年",
|
||||
"upload.modal.expires.year-plural": "年",
|
||||
"upload.modal.accordion.name-and-description.title": "Name and description",
|
||||
"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.description.title": "描述",
|
||||
"upload.modal.accordion.description.placeholder": "分享檔案備註資訊",
|
||||
"upload.modal.accordion.email.title": "Email提醒",
|
||||
"upload.modal.accordion.email.placeholder": "收件人Email地址",
|
||||
"upload.modal.accordion.email.invalid-email": "Email地址不可用",
|
||||
|
@ -68,12 +68,15 @@ const MyShares = () => {
|
||||
<Table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<FormattedMessage id="account.shares.table.id" />
|
||||
</th>
|
||||
<th>
|
||||
<FormattedMessage id="account.shares.table.name" />
|
||||
</th>
|
||||
<MediaQuery smallerThan="md" styles={{ display: "none" }}>
|
||||
<th>
|
||||
<FormattedMessage id="account.shares.table.description" />
|
||||
</th>
|
||||
</MediaQuery>
|
||||
|
||||
<th>
|
||||
<FormattedMessage id="account.shares.table.visitors" />
|
||||
</th>
|
||||
@ -87,7 +90,18 @@ const MyShares = () => {
|
||||
{shares.map((share) => (
|
||||
<tr key={share.id}>
|
||||
<td>{share.id}</td>
|
||||
<td>{share.name}</td>
|
||||
<MediaQuery smallerThan="sm" styles={{ display: "none" }}>
|
||||
<td
|
||||
style={{
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
maxWidth: "300px",
|
||||
}}
|
||||
>
|
||||
{share.description || ""}
|
||||
</td>
|
||||
</MediaQuery>
|
||||
<td>{share.views}</td>
|
||||
<td>
|
||||
{moment(share.expiration).unix() === 0
|
||||
|
@ -91,13 +91,13 @@ const Share = ({ shareId }: { shareId: string }) => {
|
||||
return (
|
||||
<>
|
||||
<Meta
|
||||
title={t("share.title", { shareId: share?.name || shareId })}
|
||||
title={t("share.title", { shareId })}
|
||||
description={t("share.description")}
|
||||
/>
|
||||
|
||||
<Group position="apart" mb="lg">
|
||||
<Box style={{ maxWidth: "70%" }}>
|
||||
<Title order={3}>{share?.name || share?.id}</Title>
|
||||
<Title order={3}>{share?.id}</Title>
|
||||
<Text size="sm">{share?.description}</Text>
|
||||
</Box>
|
||||
{share?.files.length > 1 && <DownloadAllButton shareId={shareId} />}
|
||||
|
@ -2,18 +2,15 @@ import User from "./user.type";
|
||||
|
||||
export type Share = {
|
||||
id: string;
|
||||
name?: string;
|
||||
files: any;
|
||||
creator: User;
|
||||
description?: string;
|
||||
expiration: Date;
|
||||
size: number;
|
||||
hasPassword: boolean;
|
||||
};
|
||||
|
||||
export type CreateShare = {
|
||||
id: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
recipients: string[];
|
||||
expiration: string;
|
||||
|
Loading…
Reference in New Issue
Block a user