diff --git a/config/live_preview.php b/config/live_preview.php index 6e213fc953f..925ac3be8fd 100644 --- a/config/live_preview.php +++ b/config/live_preview.php @@ -69,4 +69,19 @@ 'hot_reload_contents' => true, + /* + |-------------------------------------------------------------------------- + | Shared Preview Links + |-------------------------------------------------------------------------- + | + | How long shareable draft preview links should remain valid, in minutes. + | Set shared_link_banner to false to hide the "Draft preview" bar on + | shared frontend pages. Cascade still gets `shared_preview`. + | + */ + + 'shared_link_expiry' => 1440, + + 'shared_link_banner' => true, + ]; diff --git a/lang/en/messages.php b/lang/en/messages.php index 5899880f2c1..37019f02788 100644 --- a/lang/en/messages.php +++ b/lang/en/messages.php @@ -246,6 +246,9 @@ 'session_expiry_logging_out_in_seconds' => 'You have been inactive for a while and will be logged out in :seconds seconds.', 'session_expiry_new_window' => 'This will open in a new window. Return here after authenticating.', 'set_new_password_instructions' => 'Confirm your email address and create a new password.', + 'shared_preview_banner' => 'Draft preview · Expires :date', + 'shared_preview_banner_revision' => 'Revision preview · Expires :date', + 'shared_preview_link_copied' => 'Preview link copied. Expires in :hours hours.', 'show_slugs_instructions' => 'Show slugs in the tree view.', 'site_configure_attributes_instructions' => 'Add arbitrary attributes to your site\'s config which can be accessed in your templates. [Learn more](https://statamic.dev/multi-site#additional-attributes).', 'site_configure_handle_instructions' => 'A unique reference to this site. This cannot be easily changed later.', diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index 2c888064b35..5036dc4e018 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -101,23 +101,35 @@