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