Updated navigator layout (#5619)

Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
Alexander Platov
2024-06-05 12:50:13 +07:00
committed by GitHub
parent 07d35f0827
commit a437926f35
79 changed files with 1582 additions and 1012 deletions
@@ -33,13 +33,7 @@ import presentation, { copyDocumentContent, getClient } from '@hcengineering/pre
import contact, { type Employee, type PersonAccount } from '@hcengineering/contact'
import request, { RequestStatus } from '@hcengineering/request'
import textEditor, { isEmptyMarkup } from '@hcengineering/text-editor'
import {
getEventPositionElement,
showPopup,
getTreeCollapsed,
setTreeCollapsed,
type Location
} from '@hcengineering/ui'
import { getEventPositionElement, showPopup, type Location } from '@hcengineering/ui'
import { type KeyFilter } from '@hcengineering/view'
import chunter from '@hcengineering/chunter'
import documents, {
@@ -679,22 +673,6 @@ export async function canDeleteDocumentCategory (doc?: Doc | Doc[]): Promise<boo
return await checkPermission(client, documents.permission.DeleteDocumentCategory, (doc as DocumentCategory).space)
}
function getPrefixedTreeId (_id: string, prefix: string): string {
return `${prefix}_###_${_id}`
}
export function getPrefixedTreeCollapsed (_id: string, prefix: string): boolean {
if (_id === undefined || _id === 'undefined') return false
return getTreeCollapsed(prefix === '' ? _id : getPrefixedTreeId(_id, prefix))
}
export function setPrefixedTreeCollapsed (_id: string, prefix: string, collapsed: boolean): void {
if (_id === undefined || _id === 'undefined') return
setTreeCollapsed(prefix === '' ? _id : getPrefixedTreeId(_id, prefix), collapsed)
}
function getCurrentProjectId (space: Ref<DocumentSpace>): string {
return `${space}_###_project`
}