mirror of
https://github.com/docmost/docmost.git
synced 2026-05-16 05:44:04 +08:00
feat: favorites (#2103)
* feat: favorites and templates(ee) * rename migrations * fix sidebar * cleanup tabs * fix * turn off templates * cleanup * uuid validation
This commit is contained in:
@@ -419,7 +419,7 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
.run(),
|
||||
},
|
||||
{
|
||||
title: "Draw.io (diagrams.net) ",
|
||||
title: "Draw.io (diagrams.net)",
|
||||
description: "Insert and design Drawio diagrams",
|
||||
searchTerms: ["drawio", "diagrams", "charts", "uml", "whiteboard"],
|
||||
icon: IconDrawio,
|
||||
@@ -688,8 +688,10 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
|
||||
export const getSuggestionItems = ({
|
||||
query,
|
||||
excludeItems,
|
||||
}: {
|
||||
query: string;
|
||||
excludeItems?: Set<string>;
|
||||
}): SlashMenuGroupedItemsType => {
|
||||
const search = query.toLowerCase();
|
||||
const filteredGroups: SlashMenuGroupedItemsType = {};
|
||||
@@ -706,6 +708,7 @@ export const getSuggestionItems = ({
|
||||
|
||||
for (const [group, items] of Object.entries(CommandGroups)) {
|
||||
const filteredItems = items.filter((item) => {
|
||||
if (excludeItems?.has(item.title)) return false;
|
||||
return (
|
||||
fuzzyMatch(search, item.title) ||
|
||||
item.description.toLowerCase().includes(search) ||
|
||||
|
||||
Reference in New Issue
Block a user