mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(editor): add recent open doc with mode button (#11419)
Closes: [BS-3013](https://linear.app/affine-design/issue/BS-3013/open-doc-分开两个按钮:一个快捷按钮和一个菜单) Split into two buttons: `recent open doc with mode button` and `open doc with dropdown menu`.
This commit is contained in:
@@ -716,18 +716,20 @@ function renderOpenDocMenu(
|
||||
}));
|
||||
if (!actions.length) return null;
|
||||
|
||||
const openDocMode = computed(
|
||||
() => settings.settingSignal.value.openDocMode ?? 'open-in-active-view'
|
||||
);
|
||||
const updateOpenDocMode = (mode: OpenDocMode) =>
|
||||
settings.openDocMode.set(mode);
|
||||
|
||||
return html`${keyed(
|
||||
target,
|
||||
html`
|
||||
<affine-open-doc-dropdown-menu
|
||||
.actions=${actions}
|
||||
.context=${ctx}
|
||||
.openDocMode$=${computed(
|
||||
() =>
|
||||
settings.settingSignal.value.openDocMode ?? 'open-in-active-view'
|
||||
)}
|
||||
.updateOpenDocMode=${(mode: OpenDocMode) =>
|
||||
settings.openDocMode.set(mode)}
|
||||
.openDocMode$=${openDocMode}
|
||||
.updateOpenDocMode=${updateOpenDocMode}
|
||||
>
|
||||
</affine-open-doc-dropdown-menu>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user