feat(MyShares): show information about own share security options (#720)

* Provide security information about owned shares

* Add visitor count display for shares with max views

* Add password protection indicator to shares table

* Remove validation from MyShareSecurityDTO

* center lock icon and add spacing

* refactor: run formatter

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Aaron
2024-12-31 15:21:00 +01:00
committed by GitHub
parent 4d3aa398a2
commit b58dcdba0b
7 changed files with 60 additions and 9 deletions

View File

@@ -233,7 +233,7 @@ export class ShareService {
orderBy: {
expiration: "desc",
},
include: { recipients: true, files: true },
include: { recipients: true, files: true, security: true },
});
return shares.map((share) => {
@@ -241,6 +241,10 @@ export class ShareService {
...share,
size: share.files.reduce((acc, file) => acc + parseInt(file.size), 0),
recipients: share.recipients.map((recipients) => recipients.email),
security: {
maxViews: share.security?.maxViews,
passwordProtected: !!share.security?.password,
},
};
});
}