UBERF-4725 Migrate collaborative content (#5717)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-08-22 16:03:42 +05:00
committed by GitHub
parent 0e72b85978
commit df2a9b2708
97 changed files with 702 additions and 820 deletions
@@ -308,6 +308,7 @@
size: 'large',
fill: doc.color !== undefined ? getPlatformColorDef(doc.color, $themeStore.dark).icon : 'currentColor'
}}
disabled={readonly}
on:click={chooseIcon}
/>
</div>
+3 -11
View File
@@ -13,15 +13,8 @@
// limitations under the License.
//
import {
getCollaborativeDoc,
getCollaborativeDocId,
type AttachedData,
type Client,
type Ref,
type TxOperations
} from '@hcengineering/core'
import { documentId, type Document, type Teamspace } from '@hcengineering/document'
import { type AttachedData, type Client, type Ref, type TxOperations, makeCollaborativeDoc } from '@hcengineering/core'
import { type Document, type Teamspace, documentId } from '@hcengineering/document'
import { getMetadata, translate } from '@hcengineering/platform'
import presentation, { getClient } from '@hcengineering/presentation'
import { getCurrentResolvedLocation, getPanelURI, type Location, type ResolvedLocation } from '@hcengineering/ui'
@@ -39,11 +32,10 @@ export async function createEmptyDocument (
data: Partial<Pick<AttachedData<Document>, 'name' | 'icon' | 'color'>> = {}
): Promise<void> {
const name = await translate(document.string.Untitled, {})
const collaborativeDocId = getCollaborativeDocId(id, 'content')
const object: AttachedData<Document> = {
name,
content: getCollaborativeDoc(collaborativeDocId),
content: makeCollaborativeDoc(id, 'content'),
attachments: 0,
children: 0,
embeddings: 0,