mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[WEB] Add AI generator items to the Insert menu (#33967)
* adding abstract generator in the dropdown * add abstract generator to Insert menu dropdown * add Keywords generator to Insert menu * adding title generator and removing some unused code * adding spanish translations * adding buildOpenGeneratorHandler * changing the approach to slots approach * removing the feature flag * niptick * rename the file * adding tests * [WEB] Style changes for Writefull pop-up component (#34067) GitOrigin-RevId: 0bc97c2c1f3dc458a2ca30e8cc54dddfd5bc9b3b
This commit is contained in:
@@ -127,6 +127,7 @@ const CommandDropdownChild = ({ item }: { item: Entry<TaggedCommand> }) => {
|
||||
onClick={onClickHandler}
|
||||
href={item.href}
|
||||
disabled={item.disabled}
|
||||
leadingIcon={item.leadingIcon}
|
||||
trailingIcon={
|
||||
item.shortcuts && <span>{formatShortcut(item.shortcuts[0])}</span>
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ const menubarExtraComponents = importOverleafModules(
|
||||
import: { default: ElementType }
|
||||
}[]
|
||||
|
||||
const insertMenuSections = importOverleafModules('insertMenuSections') as {
|
||||
import: { default: MenuSectionStructure[] }
|
||||
}[]
|
||||
|
||||
export const ToolbarMenuBar = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -157,6 +161,9 @@ export const ToolbarMenuBar = () => {
|
||||
id: 'insert-comment',
|
||||
children: ['comment'],
|
||||
},
|
||||
...insertMenuSections.flatMap(
|
||||
({ import: { default: sections } }) => sections
|
||||
),
|
||||
],
|
||||
[t]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user