Add option to show modified timestamp on shared docs (#9347)

* Add showLastModified option to Share models

- Add showLastModified column to shares table with migration
- Add showLastModified field to client and server Share models
- Add 'Show last modified' toggle in share popover (PublicAccess component)
- Update shares.update API route to handle showLastModified field
- Include share data in documents.info API response for shared documents
- Modify DocumentMeta visibility logic to show timestamp when showLastModified is enabled
- Add proper type definitions across component hierarchy
- Follow existing patterns used by allowIndexing option

* Applied automatic fixes

* refactor

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
codegen-sh[bot]
2025-05-31 11:29:55 -04:00
committed by GitHub
parent 6efcf1beee
commit 7a5480f12f
11 changed files with 118 additions and 15 deletions
+8 -4
View File
@@ -114,6 +114,14 @@ class Share extends IdModel<
@Column
domain: string | null;
@Default(true)
@Column
allowIndexing: boolean;
@Default(false)
@Column
showLastUpdated: boolean;
// hooks
@BeforeUpdate
@@ -185,10 +193,6 @@ class Share extends IdModel<
@Column(DataType.UUID)
documentId: string;
@Default(true)
@Column
allowIndexing: boolean;
revoke(ctx: APIContext) {
const { user } = ctx.context.auth;
this.revokedAt = new Date();