mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 13:57:02 +08:00
feat: add download tips banner (#2151)
This commit is contained in:
@@ -10,12 +10,15 @@ export type Guide = {
|
||||
changeLog: boolean;
|
||||
// should show recording tips
|
||||
onBoarding: boolean;
|
||||
// should show download client tips
|
||||
downloadClientTip: boolean;
|
||||
};
|
||||
|
||||
const guidePrimitiveAtom = atomWithStorage<Guide>('helper-guide', {
|
||||
quickSearchTips: true,
|
||||
changeLog: true,
|
||||
onBoarding: true,
|
||||
downloadClientTip: true,
|
||||
});
|
||||
|
||||
export const guideQuickSearchTipsAtom = atom<
|
||||
@@ -67,3 +70,18 @@ export const guideOnboardingAtom = atom<
|
||||
}));
|
||||
}
|
||||
);
|
||||
export const guideDownloadClientTipAtom = atom<
|
||||
Guide['downloadClientTip'],
|
||||
[open: boolean],
|
||||
void
|
||||
>(
|
||||
get => {
|
||||
return get(guidePrimitiveAtom).downloadClientTip;
|
||||
},
|
||||
(_, set, open) => {
|
||||
set(guidePrimitiveAtom, tips => ({
|
||||
...tips,
|
||||
downloadClientTip: open,
|
||||
}));
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user