Compare commits
6 Commits
a77e111742
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 72cb2b8d02 | |||
| a0c50bded9 | |||
| 09ada28f09 | |||
| ea28911822 | |||
| 0a88c7f14a | |||
| 1d7e363076 |
Generated
+3
-3
@@ -2716,9 +2716,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vuetify": {
|
"node_modules/vuetify": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-4.2.1.tgz",
|
||||||
"integrity": "sha512-KaMbAl57GG/zdLdL9dcMqEZligIK3jYvkPkpx+RS9DufD/TOfWKnlDTOUzoYlvmhT/3LfJ/usAt1bSoWfYX4JA==",
|
"integrity": "sha512-K3ZIqu7YkorQFB6//dR5KEBpbfOo+y/LkcGtknsnneE3JN1pW3R7o/JB9QDkJuP1ELhENIdBZIkiSmXu0dQ9lQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuetify/v0": "^1.2.1"
|
"@vuetify/v0": "^1.2.1"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
||||||
*
|
*
|
||||||
* Other modules register editors at the `documents_file_editor` integration
|
* Other modules register editors at the `documents_editor` integration
|
||||||
* point by including an entry in their `integrations.ts`:
|
* point by including an entry in their `integrations.ts`:
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* documents_file_editor: [{
|
* documents_editor: [{
|
||||||
* id: 'my_editor',
|
* id: 'my_editor',
|
||||||
* meta: { mimeTypes: ['text/plain'] },
|
* meta: { mimeTypes: ['text/plain'] },
|
||||||
* component: () => import('./components/MyEditor.vue'),
|
* component: () => import('./components/MyEditor.vue'),
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
import { useIntegrationStore } from '@KTXC'
|
import { useIntegrationStore } from '@KTXC'
|
||||||
import type { EntityObject } from '@DocumentsManager/models/entity'
|
import type { EntityObject } from '@DocumentsManager/models/entity'
|
||||||
|
|
||||||
const INTEGRATION_POINT = 'documents_file_editor'
|
const INTEGRATION_POINT = 'documents_editor'
|
||||||
|
|
||||||
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
||||||
if (pattern.endsWith('/*')) {
|
if (pattern.endsWith('/*')) {
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ function entityToViewerItem(entity: EntityObject): ViewerItem {
|
|||||||
return {
|
return {
|
||||||
id: String(entity.identifier ?? ''),
|
id: String(entity.identifier ?? ''),
|
||||||
title: entity.properties.label ?? String(entity.identifier ?? ''),
|
title: entity.properties.label ?? String(entity.identifier ?? ''),
|
||||||
mime: entity.properties.mime ?? '',
|
mime: 'image/webp',
|
||||||
meta: { collection: entity.collection ? String(entity.collection) : null },
|
meta: { collection: entity.collection ? String(entity.collection) : null },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user