mirror of
https://github.com/outline/outline.git
synced 2026-05-08 02:50:30 -05:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user