mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-19 02:51:47 +08:00
feat(core): rewrite page-mode-switch with RadioGroup, bind hotkey with cmdk (#7758)
close AF-1170 - bump `@toeverything/theme` - refactor page-mode-switch - use global `<RadioGroup />` - reuse for doc history - remove `styled` usage - bind hotkey via cmdk - Update `<RadioGroup />` color scheme with latest design system - Update right sidebar header tab style - Update tooltip with shortcut for app nav button
This commit is contained in:
@@ -17,12 +17,7 @@ export function ShareHeader({
|
||||
}) {
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<EditorModeSwitch
|
||||
isPublic
|
||||
docCollection={docCollection}
|
||||
pageId={pageId}
|
||||
publicMode={publishMode}
|
||||
/>
|
||||
<EditorModeSwitch isPublic pageId={pageId} publicMode={publishMode} />
|
||||
<BlocksuiteHeaderTitle
|
||||
docCollection={docCollection}
|
||||
pageId={pageId}
|
||||
|
||||
@@ -81,10 +81,7 @@ export function JournalPageHeader({ page, workspace }: PageHeaderProps) {
|
||||
<Header className={styles.header} ref={containerRef}>
|
||||
<ViewTitle title={title} />
|
||||
<ViewIcon icon="journal" />
|
||||
<EditorModeSwitch
|
||||
docCollection={workspace.docCollection}
|
||||
pageId={page?.id}
|
||||
/>
|
||||
<EditorModeSwitch pageId={page?.id} />
|
||||
<div className={styles.journalWeekPicker}>
|
||||
<JournalWeekDatePicker
|
||||
docCollection={workspace.docCollection}
|
||||
@@ -138,10 +135,7 @@ export function NormalPageHeader({ page, workspace }: PageHeaderProps) {
|
||||
<Header className={styles.header} ref={containerRef}>
|
||||
<ViewTitle title={title} />
|
||||
<ViewIcon icon={currentMode ?? 'page'} />
|
||||
<EditorModeSwitch
|
||||
docCollection={workspace.docCollection}
|
||||
pageId={page?.id}
|
||||
/>
|
||||
<EditorModeSwitch pageId={page?.id} />
|
||||
<BlocksuiteHeaderTitle
|
||||
inputHandleRef={titleInputHandleRef}
|
||||
pageId={page?.id}
|
||||
|
||||
Reference in New Issue
Block a user