mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): cloud s subscription resume button's content is blank (#7783)
This commit is contained in:
@@ -10,7 +10,6 @@ import { SubscriptionPlan, SubscriptionStatus } from '@affine/graphql';
|
||||
import { Trans, useI18n } from '@affine/i18n';
|
||||
import { DoneIcon } from '@blocksuite/icons/rc';
|
||||
import { useLiveData, useService } from '@toeverything/infra';
|
||||
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
||||
import clsx from 'clsx';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { nanoid } from 'nanoid';
|
||||
@@ -424,15 +423,13 @@ const ResumeButton = () => {
|
||||
|
||||
return (
|
||||
<ResumeAction open={open} onOpenChange={setOpen}>
|
||||
<Button
|
||||
className={styles.resumeAction}
|
||||
onClick={handleClick}
|
||||
style={assignInlineVars({
|
||||
'--default-content': t['com.affine.payment.current-plan'](),
|
||||
'--hover-content': t['com.affine.payment.resume-renewal'](),
|
||||
})}
|
||||
>
|
||||
<span className={styles.resumeActionContent} />
|
||||
<Button className={styles.resumeAction} onClick={handleClick}>
|
||||
<span data-show-hover="true" className={clsx(styles.resumeContent)}>
|
||||
{t['com.affine.payment.resume-renewal']()}
|
||||
</span>
|
||||
<span data-show-hover="false" className={clsx(styles.resumeContent)}>
|
||||
{t['com.affine.payment.current-plan']()}
|
||||
</span>
|
||||
</Button>
|
||||
</ResumeAction>
|
||||
);
|
||||
|
||||
@@ -179,14 +179,16 @@ export const planAction = style({
|
||||
width: '100%',
|
||||
});
|
||||
export const resumeAction = style([planAction, {}]);
|
||||
export const resumeActionContent = style({
|
||||
':after': {
|
||||
content: 'var(--default-content)',
|
||||
},
|
||||
export const resumeContent = style({
|
||||
selectors: {
|
||||
[`${resumeAction}:hover &:after`]: {
|
||||
content: 'var(--hover-content)',
|
||||
},
|
||||
[`&[data-show-hover="true"], ${resumeAction}:hover &[data-show-hover="false"]`]:
|
||||
{
|
||||
display: 'none',
|
||||
},
|
||||
[`&[data-show-hover="false"], ${resumeAction}:hover &[data-show-hover="true"]`]:
|
||||
{
|
||||
display: 'block',
|
||||
},
|
||||
},
|
||||
});
|
||||
export const planBenefits = style({
|
||||
|
||||
Reference in New Issue
Block a user