fix(core): wrong billing information display (#9117)

close AF-1935 AF-1933

fix(core): wrong billing information display

fix(core): add reminder for no cloud workspace in upgrade to team page
This commit is contained in:
JimmFly 2024-12-12 06:16:31 +00:00
parent 595125ebb3
commit c0e0b12857
No known key found for this signature in database
GPG Key ID: 126E0320FEB0D05C
5 changed files with 19 additions and 5 deletions

View File

@ -119,7 +119,7 @@ const TeamCard = () => {
workspaceSubscriptionService, workspaceSubscriptionService,
]); ]);
const expiration = teamSubscription?.end; const expiration = teamSubscription?.canceledAt;
const nextBillingDate = teamSubscription?.nextBillAt; const nextBillingDate = teamSubscription?.nextBillAt;
const recurring = teamSubscription?.recurring; const recurring = teamSubscription?.recurring;

View File

@ -233,15 +233,21 @@ const WorkspaceSelector = ({
return ( return (
<div> <div>
{cloudWorkspaces.length > 0 && {cloudWorkspaces.length > 0 ? (
cloudWorkspaces.map(workspace => ( cloudWorkspaces.map(workspace => (
<WorkspaceItem <WorkspaceItem
key={workspace.id} key={workspace.id}
meta={workspace} meta={workspace}
onSelect={handleSelect} onSelect={handleSelect}
/> />
))} ))
{cloudWorkspaces.length > 0 && <Divider size="thinner" />} ) : (
<div className={styles.noWorkspaceItem}>
{t['com.affine.upgrade-to-team-page.no-workspace-available']()}
</div>
)}
<Divider size="thinner" />
<MenuItem <MenuItem
className={styles.createWorkspaceItem} className={styles.createWorkspaceItem}
prefix={<NewPageIcon className={styles.itemIcon} fontSize={28} />} prefix={<NewPageIcon className={styles.itemIcon} fontSize={28} />}

View File

@ -57,6 +57,13 @@ export const createWorkspaceItem = style({
gap: '12px', gap: '12px',
}); });
export const noWorkspaceItem = style({
padding: '4px 12px',
fontSize: cssVar('fontSm'),
fontWeight: 500,
color: cssVarV2('text/secondary'),
});
export const itemContent = style({ export const itemContent = style({
fontSize: cssVar('fontSm'), fontSize: cssVar('fontSm'),
fontWeight: 500, fontWeight: 500,

View File

@ -19,6 +19,6 @@
"ru": 67, "ru": 67,
"sv-SE": 4, "sv-SE": 4,
"ur": 2, "ur": 2,
"zh-Hans": 92, "zh-Hans": 91,
"zh-Hant": 91 "zh-Hant": 91
} }

View File

@ -1596,6 +1596,7 @@
"com.affine.upgrade-to-team-page.create-and-upgrade-confirm.description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.", "com.affine.upgrade-to-team-page.create-and-upgrade-confirm.description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.",
"com.affine.upgrade-to-team-page.create-and-upgrade-confirm.placeholder": "Set a workspace name", "com.affine.upgrade-to-team-page.create-and-upgrade-confirm.placeholder": "Set a workspace name",
"com.affine.upgrade-to-team-page.create-and-upgrade-confirm.confirm": "Continue to Pricing", "com.affine.upgrade-to-team-page.create-and-upgrade-confirm.confirm": "Continue to Pricing",
"com.affine.upgrade-to-team-page.no-workspace-available": "No workspace available",
"com.affine.workspace.storage": "Workspace storage", "com.affine.workspace.storage": "Workspace storage",
"com.affine.cmdk.affine.category.affine.journal": "Journal", "com.affine.cmdk.affine.category.affine.journal": "Journal",
"com.affine.cmdk.affine.category.affine.date-picker": "Select a specific date" "com.affine.cmdk.affine.category.affine.date-picker": "Select a specific date"