feat(core): support install license for self hosted client (#12287)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added the ability to upload and replace license files for self-hosted team workspaces via a new modal dialog.
  - Introduced clearer UI flows for activating, deactivating, and managing team licenses, including one-time purchase licenses.
  - Provided direct links and guidance for requesting licenses and managing payments.

- **Enhancements**
  - Improved license management interface with updated button labels and descriptions.
  - Added new styles for better layout and clarity in license dialogs.
  - Updated internationalization with new and revised texts for license operations.

- **Bug Fixes**
  - Prevented duplicate opening of license or plan dialogs when already open.

- **Chores**
  - Updated support and pricing links for clarity and accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
JimmFly
2025-05-27 04:56:13 +00:00
parent 382c237dac
commit 1b715e588c
13 changed files with 714 additions and 75 deletions
+77 -8
View File
@@ -4454,7 +4454,7 @@ export function useAFFiNEI18N(): {
*/
["com.affine.payment.license-success.text-1"](): string;
/**
* `You can use this key to upgrade in Settings > Workspace > Billing > Upgrade`
* `You can use this key to upgrade in Settings > Workspace > License > Use purchased key`
*/
["com.affine.payment.license-success.hint"](): string;
/**
@@ -6025,13 +6025,61 @@ export function useAFFiNEI18N(): {
*/
["com.affine.settings.workspace.license.self-host-team.seats"](): string;
/**
* `Active key`
* `Use purchased key`
*/
["com.affine.settings.workspace.license.self-host-team.active-key"](): string;
["com.affine.settings.workspace.license.self-host-team.use-purchased-key"](): string;
/**
* `Upload license file`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file"](): string;
/**
* `Upload license file locally and verify the license information.`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.description"](): string;
/**
* `To purchase a license:`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.title"](): string;
/**
* `Workspace id`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.workspace-id"](): string;
/**
* `Click to upload`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.click-to-upload"](): string;
/**
* `Activation failed`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.failed"](): string;
/**
* `Activation Success`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.success.title"](): string;
/**
* `License has been successfully applied`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.success.description"](): string;
/**
* `If you encounter any issues, contact support@toeverything.info.`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.help"](): string;
/**
* `Deactivate`
*/
["com.affine.settings.workspace.license.self-host-team.deactivate-license"](): string;
/**
* `Replace your license file`
*/
["com.affine.settings.workspace.license.self-host-team.replace-license.title"](): string;
/**
* `Replace the existing license file with a new, updated version.`
*/
["com.affine.settings.workspace.license.self-host-team.replace-license.description"](): string;
/**
* `Upload license file`
*/
["com.affine.settings.workspace.license.self-host-team.replace-license.upload"](): string;
/**
* `Buy more seat`
*/
@@ -6049,13 +6097,17 @@ export function useAFFiNEI18N(): {
*/
["com.affine.settings.workspace.license.activate-success"](): string;
/**
* `Deactivate License`
* `Confirm deactivation?`
*/
["com.affine.settings.workspace.license.deactivate-modal.title"](): string;
/**
* `Are you sure you want to deactivate this license?`
* `After deactivation, you will need to upload a new license to continue using team feature`
*/
["com.affine.settings.workspace.license.deactivate-modal.description"](): string;
["com.affine.settings.workspace.license.deactivate-modal.description-license"](): string;
/**
* `Manage Payment`
*/
["com.affine.settings.workspace.license.deactivate-modal.manage-payment"](): string;
/**
* `License deactivated successfully.`
*/
@@ -9123,11 +9175,28 @@ export const TypedTrans: {
["1"]: JSX.Element;
}>>;
/**
* `If you encounter any issues, please contact our <1>customer support</1>. No license yet? <2>Click to purchase</2>.`
* `Activate using the local key from <1>Toeverything.Inc</1>`
*/
["com.affine.settings.workspace.license.self-host-team.team.license"]: ComponentType<TypedTransProps<Readonly<{}>, {
["1"]: JSX.Element;
}>>;
/**
* `Copy your workspace id and <1>reach out to us</1>.`
*/
["com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.content"]: ComponentType<TypedTransProps<Readonly<{}>, {
["1"]: JSX.Element;
}>>;
/**
* `If you encounter any issues, contact support@toeverything.info. No license yet? <1>Click to purchase</1>.`
*/
["com.affine.settings.workspace.license.activate-modal.tips"]: ComponentType<TypedTransProps<Readonly<{}>, {
["1"]: JSX.Element;
["2"]: JSX.Element;
}>>;
/**
* `This will make the workspace read-only. Your key remains usable elsewhere. Deactivation doesn't cancel your Team plan. To cancel, go to <1>Manage Payment</1>.`
*/
["com.affine.settings.workspace.license.deactivate-modal.description"]: ComponentType<TypedTransProps<Readonly<{}>, {
["1"]: JSX.Element;
}>>;
/**
* `The "<1>{{ name }}</1>" property will be removed. This action cannot be undone.`
+21 -5
View File
@@ -1103,7 +1103,7 @@
"com.affine.payment.license-success.title": "Thank you for your purchase!",
"com.affine.payment.license-success.text-1": "Thank you for purchasing the AFFiNE self-hosted license.",
"com.affine.payment.license-success.text-2": "If you have any questions, please contact our <1>customer support</1>.",
"com.affine.payment.license-success.hint": "You can use this key to upgrade in Settings > Workspace > Billing > Upgrade",
"com.affine.payment.license-success.hint": "You can use this key to upgrade in Settings > Workspace > License > Use purchased key",
"com.affine.payment.license-success.open-affine": "Open AFFiNE",
"com.affine.payment.license-success.copy": "Copied key to clipboard",
"com.affine.peek-view-controls.close": "Close",
@@ -1498,17 +1498,33 @@
"com.affine.settings.workspace.license.self-host": "Selfhosted workspace",
"com.affine.settings.workspace.license.self-host-team": "Self-host Team Workspace",
"com.affine.settings.workspace.license.self-host-team.team.description": "This license will expire on {{expirationDate}}, with {{leftDays}} days remaining.",
"com.affine.settings.workspace.license.self-host-team.team.license": "Activate using the local key from <1>Toeverything.Inc</1>",
"com.affine.settings.workspace.license.self-host-team.free.description": "Basic version: {{memberCount}} seats. For more, purchase or use activation key.",
"com.affine.settings.workspace.license.self-host-team.seats": "Seats",
"com.affine.settings.workspace.license.self-host-team.active-key": "Active key",
"com.affine.settings.workspace.license.self-host-team.use-purchased-key": "Use purchased key",
"com.affine.settings.workspace.license.self-host-team.upload-license-file": "Upload license file",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.description": "Upload license file locally and verify the license information.",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.title": "To purchase a license:",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.content": "Copy your workspace id and <1>reach out to us</1>.",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.tips.workspace-id": "Workspace id",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.click-to-upload": "Click to upload",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.failed": "Activation failed",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.success.title": "Activation Success",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.success.description": "License has been successfully applied",
"com.affine.settings.workspace.license.self-host-team.upload-license-file.help": "If you encounter any issues, contact support@toeverything.info.",
"com.affine.settings.workspace.license.self-host-team.deactivate-license": "Deactivate",
"com.affine.settings.workspace.license.self-host-team.replace-license.title": "Replace your license file",
"com.affine.settings.workspace.license.self-host-team.replace-license.description": "Replace the existing license file with a new, updated version.",
"com.affine.settings.workspace.license.self-host-team.replace-license.upload": "Upload license file",
"com.affine.settings.workspace.license.buy-more-seat": "Buy more seat",
"com.affine.settings.workspace.license.activate-modal.title": "Activate License",
"com.affine.settings.workspace.license.activate-modal.description": "Enter license key to activate this self host workspace.",
"com.affine.settings.workspace.license.activate-modal.tips": "If you encounter any issues, please contact our <1>customer support</1>. No license yet? <2>Click to purchase</2>.",
"com.affine.settings.workspace.license.activate-modal.tips": "If you encounter any issues, contact support@toeverything.info. No license yet? <1>Click to purchase</1>.",
"com.affine.settings.workspace.license.activate-success": "License activated successfully.",
"com.affine.settings.workspace.license.deactivate-modal.title": "Deactivate License",
"com.affine.settings.workspace.license.deactivate-modal.description": "Are you sure you want to deactivate this license?",
"com.affine.settings.workspace.license.deactivate-modal.title": "Confirm deactivation?",
"com.affine.settings.workspace.license.deactivate-modal.description": "This will make the workspace read-only. Your key remains usable elsewhere. Deactivation doesn't cancel your Team plan. To cancel, go to <1>Manage Payment</1>.",
"com.affine.settings.workspace.license.deactivate-modal.description-license": "After deactivation, you will need to upload a new license to continue using team feature",
"com.affine.settings.workspace.license.deactivate-modal.manage-payment": "Manage Payment",
"com.affine.settings.workspace.license.deactivate-success": "License deactivated successfully.",
"com.affine.settings.workspace.state.local": "Local",
"com.affine.settings.workspace.state.sync-affine-cloud": "Sync with AFFiNE Cloud",