feat(core): support share edgeless mode (#4856)

Close #3287

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at d3fdf86</samp>

### Summary
📄🚀🔗

<!--
1.  📄 - This emoji represents the page and edgeless modes of sharing a page, as well as the GraphQL operations and types related to public pages.
2.  🚀 - This emoji represents the functionality of publishing and revoking public pages, as well as the confirmation modal and the notifications for the user.
3.  🔗 - This emoji represents the sharing URL and the query parameter for the share mode, as well as the hooks and functions that generate and use the URL.
-->
This pull request adds a feature to the frontend component of AFFiNE that allows the user to share a page in either `page` or `edgeless` mode, which affects the appearance and functionality of the page. It also adds the necessary GraphQL operations, types, and schema to support this feature in the backend, and updates the tests and the storybook stories accordingly.

*  Modify the `useIsSharedPage` hook to accept an optional `shareMode` argument and use the `getWorkspacePublicPagesQuery`, `publishPageMutation`, and `revokePublicPageMutation` from `@affine/graphql`
This commit is contained in:
JimmFly
2023-11-15 07:49:25 +00:00
committed by LongYinan
parent e7e617a791
commit ddd7cab414
39 changed files with 800 additions and 332 deletions
@@ -334,6 +334,21 @@
"com.affine.share-menu.ShareViaExportDescription": "Download a static copy of your page to share with others.",
"com.affine.share-menu.ShareWithLink": "Share with link",
"com.affine.share-menu.ShareWithLinkDescription": "Create a link you can easily share with anyone. The visitors will open your page in the form od a document",
"com.affine.share-menu.confirm-modify-mode.title": "Modify the sharing method?",
"com.affine.share-menu.confirm-modify-mode.description": "Once modified, new public link will be created. Please share it with others again.",
"com.affine.share-menu.confirm-modify-mode.confirm-button": "Modify",
"com.affine.share-menu.confirm-modify-mode.notification.success.title": "Modified successfully",
"com.affine.share-menu.confirm-modify-mode.notification.success.message": "You have changed the public link from {{preMode}} Mode to {{currentMode}} Mode.",
"com.affine.share-menu.confirm-modify-mode.notification.fail.title": "Failed to modify",
"com.affine.share-menu.confirm-modify-mode.notification.fail.message": "Please try again later.",
"com.affine.share-menu.create-public-link.notification.success.title": "Public link created",
"com.affine.share-menu.create-public-link.notification.success.message": "You can share this document with link.",
"com.affine.share-menu.create-public-link.notification.fail.title": "Failed to create public link",
"com.affine.share-menu.create-public-link.notification.fail.message": "Please try again later.",
"com.affine.share-menu.disable-publish-link.notification.success.title": "Public link disabled",
"com.affine.share-menu.disable-publish-link.notification.success.message": "This page is no longer shared publicly.",
"com.affine.share-menu.disable-publish-link.notification.fail.title": "Failed to disable public link",
"com.affine.share-menu.disable-publish-link.notification.fail.message": "Please try again later.",
"com.affine.shortcutsTitle.edgeless": "Edgeless",
"com.affine.shortcutsTitle.general": "General",
"com.affine.shortcutsTitle.markdownSyntax": "Markdown Syntax",