mirror of
https://github.com/outline/outline.git
synced 2025-12-21 10:39:41 -06:00
Bring back notice menu (#10860)
* fix: notice menu regression * fix: local var
This commit is contained in:
@@ -93,6 +93,7 @@ export function SelectionToolbar(props: Props) {
|
||||
selection.node.type.name === "embed";
|
||||
|
||||
const isCodeSelection = isInCode(state, { onlyBlock: true });
|
||||
const isNoticeSelection = isInNotice(state);
|
||||
|
||||
if (isEmbedSelection && !readOnly) {
|
||||
setActiveToolbar(Toolbar.Media);
|
||||
@@ -102,6 +103,8 @@ export function SelectionToolbar(props: Props) {
|
||||
setActiveToolbar(Toolbar.Menu);
|
||||
} else if (!selection.empty) {
|
||||
setActiveToolbar(Toolbar.Menu);
|
||||
} else if (isNoticeSelection && selection.empty) {
|
||||
setActiveToolbar(Toolbar.Menu);
|
||||
} else if (selection.empty) {
|
||||
setActiveToolbar(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user