|
|
|
@ -43,8 +43,11 @@ export const entry = { |
|
|
|
|
id: 'newFolder', |
|
|
|
|
displayName: t('files', 'New folder'), |
|
|
|
|
enabled: (context: Folder) => Boolean(context.permissions & Permission.CREATE) && Boolean(context.permissions & Permission.READ), |
|
|
|
|
iconSvgInline: FolderPlusSvg, |
|
|
|
|
|
|
|
|
|
// Make the svg icon color match the primary element color
|
|
|
|
|
iconSvgInline: FolderPlusSvg.replace(/viewBox/gi, 'style="color: var(--color-primary-element)" viewBox'), |
|
|
|
|
order: 0, |
|
|
|
|
|
|
|
|
|
async handler(context: Folder, content: Node[]) { |
|
|
|
|
const name = await newNodeName(t('files', 'New folder'), content) |
|
|
|
|
if (name === null) { |
|
|
|
|