aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2024-03-21 10:45:50 -0700
committerGitHub <noreply@github.com>2024-03-21 10:45:50 -0700
commit45efd28db7f1dfdb58d8d51513a68790e4d7d612 (patch)
tree86f8cd08154cd3d4cc15382f2de9ec54d156b718 /apps
parenta7dfec070a1dda79ade7cfea91b3dc7e74d184a6 (diff)
parent799347164f176448ad116f4faf9620fd333a407c (diff)
downloadnextcloud-server-45efd28db7f1dfdb58d8d51513a68790e4d7d612.tar.gz
nextcloud-server-45efd28db7f1dfdb58d8d51513a68790e4d7d612.zip
Merge pull request #44368 from nextcloud/feat/new-file-menu-icon-svg
feat: Add new mdi New file menu icons
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/ResponseDefinitions.php1
-rw-r--r--apps/files/openapi.json5
-rw-r--r--apps/files/src/newMenu/newFromTemplate.ts2
-rw-r--r--apps/files/src/types.ts1
4 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/lib/ResponseDefinitions.php b/apps/files/lib/ResponseDefinitions.php
index 5e565cc356d..a3b62549bcc 100644
--- a/apps/files/lib/ResponseDefinitions.php
+++ b/apps/files/lib/ResponseDefinitions.php
@@ -44,6 +44,7 @@ namespace OCA\Files;
* label: string,
* extension: string,
* iconClass: ?string,
+ * iconSvgInline: ?string,
* mimetypes: string[],
* ratio: ?float,
* actionLabel: string,
diff --git a/apps/files/openapi.json b/apps/files/openapi.json
index f9cdb67783d..b2ac9efe6c8 100644
--- a/apps/files/openapi.json
+++ b/apps/files/openapi.json
@@ -151,6 +151,7 @@
"label",
"extension",
"iconClass",
+ "iconSvgInline",
"mimetypes",
"ratio",
"actionLabel"
@@ -169,6 +170,10 @@
"type": "string",
"nullable": true
},
+ "iconSvgInline": {
+ "type": "string",
+ "nullable": true
+ },
"mimetypes": {
"type": "array",
"items": {
diff --git a/apps/files/src/newMenu/newFromTemplate.ts b/apps/files/src/newMenu/newFromTemplate.ts
index 5e69181995e..42e24c59de0 100644
--- a/apps/files/src/newMenu/newFromTemplate.ts
+++ b/apps/files/src/newMenu/newFromTemplate.ts
@@ -64,8 +64,8 @@ export function registerTemplateEntries() {
addNewFileMenuEntry({
id: `template-new-${provider.app}-${index}`,
displayName: provider.label,
- // TODO: migrate to inline svg
iconClass: provider.iconClass || 'icon-file',
+ iconSvgInline: provider.iconSvgInline,
enabled(context: Folder): boolean {
return (context.permissions & Permission.CREATE) !== 0
},
diff --git a/apps/files/src/types.ts b/apps/files/src/types.ts
index 0e9dd6fb531..aa9164c873f 100644
--- a/apps/files/src/types.ts
+++ b/apps/files/src/types.ts
@@ -117,6 +117,7 @@ export interface TemplateFile {
label: string
extension: string
iconClass?: string
+ iconSvgInline?: string
mimetypes: string[]
ratio?: number
templates?: Record<string, unknown>[]