mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
feat(core): believer subscription UI (#7431)
feat(core): switch ai and cloud plans position feat(core): impl lifetime subscription ui feat(core): adapt ui for lifetime status feat(core): add believer card in billing page
This commit is contained in:
@@ -3,6 +3,7 @@ import { atom } from 'jotai';
|
||||
import type { AuthProps } from '../components/affine/auth';
|
||||
import type { CreateWorkspaceMode } from '../components/affine/create-workspace-modal';
|
||||
import type { SettingProps } from '../components/affine/setting-modal';
|
||||
import type { ActiveTab } from '../components/affine/setting-modal/types';
|
||||
// modal atoms
|
||||
export const openWorkspacesModalAtom = atom(false);
|
||||
export const openCreateWorkspaceModalAtom = atom<CreateWorkspaceMode>(false);
|
||||
@@ -15,13 +16,20 @@ export const openHistoryTipsModalAtom = atom(false);
|
||||
|
||||
export const rightSidebarWidthAtom = atom(320);
|
||||
|
||||
export type SettingAtom = Pick<
|
||||
SettingProps,
|
||||
'activeTab' | 'workspaceMetadata'
|
||||
> & {
|
||||
export type PlansScrollAnchor =
|
||||
| 'aiPricingPlan'
|
||||
| 'cloudPricingPlan'
|
||||
| 'lifetimePricingPlan';
|
||||
export type SettingAtom = {
|
||||
open: boolean;
|
||||
scrollAnchor?: string;
|
||||
};
|
||||
workspaceMetadata?: SettingProps['workspaceMetadata'];
|
||||
} & (
|
||||
| {
|
||||
activeTab: 'plans';
|
||||
scrollAnchor?: PlansScrollAnchor;
|
||||
}
|
||||
| { activeTab: Exclude<ActiveTab, 'plans'> }
|
||||
);
|
||||
|
||||
export const openSettingModalAtom = atom<SettingAtom>({
|
||||
activeTab: 'appearance',
|
||||
|
||||
Reference in New Issue
Block a user