diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 697190fc012..b1696566e86 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -431,6 +431,9 @@ dependencies: '@rush-temp/model-preference': specifier: file:./projects/model-preference.tgz version: file:projects/model-preference.tgz + '@rush-temp/model-presence': + specifier: file:./projects/model-presence.tgz + version: file:projects/model-presence.tgz '@rush-temp/model-presentation': specifier: file:./projects/model-presentation.tgz version: file:projects/model-presentation.tgz @@ -686,6 +689,12 @@ dependencies: '@rush-temp/preference-assets': specifier: file:./projects/preference-assets.tgz version: file:projects/preference-assets.tgz(esbuild@0.20.1)(ts-node@10.9.2) + '@rush-temp/presence': + specifier: file:./projects/presence.tgz + version: file:projects/presence.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2) + '@rush-temp/presence-resources': + specifier: file:./projects/presence-resources.tgz + version: file:projects/presence-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2) '@rush-temp/presentation': specifier: file:./projects/presentation.tgz version: file:projects/presentation.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2) @@ -1607,9 +1616,6 @@ dependencies: fast-copy: specifier: ~3.0.1 version: 3.0.1 - fast-equals: - specifier: ^5.0.1 - version: 5.0.1 file-api: specifier: ^0.10.4 version: 0.10.4 @@ -25738,7 +25744,7 @@ packages: dev: false file:projects/model-all.tgz: - resolution: {integrity: sha512-t+T01n/lk1uFmDQvCw+ldE7yBemi2GcvJHXQKaRBXGprTf//JM9Wd9GgvQoYyQsQO7HA8ilAkmnVH3gfP7xxFg==, tarball: file:projects/model-all.tgz} + resolution: {integrity: sha512-POSTd7U69WG8HMf3/Budl2bpSfRrigifVT+i8kAOYT8EfuJvT0squXq0TMjYThMNQak91IwJF040+PjIWtlTBw==, tarball: file:projects/model-all.tgz} name: '@rush-temp/model-all' version: 0.0.0 dependencies: @@ -26157,6 +26163,24 @@ packages: - supports-color dev: false + file:projects/model-presence.tgz: + resolution: {integrity: sha512-bE9NfhmtkeenHePBuorhYSQloGaNnGqtlw2i8ObXBD2ecu21ArwfbrJdHnQiy+Qtq8rs3j+rcCV/BcWpJSBJYQ==, tarball: file:projects/model-presence.tgz} + name: '@rush-temp/model-presence' + version: 0.0.0 + dependencies: + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.6.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.6.2) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + prettier: 3.2.5 + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + dev: false + file:projects/model-presentation.tgz: resolution: {integrity: sha512-fwOpgUcuXhN/upzKDq9tRE1T4bWjBYLHGqHoqu3yrOo82+0aIM7qtCu4bzhl9AdLaOtD/5VYYzFCFWYo2KfRBQ==, tarball: file:projects/model-presentation.tgz} name: '@rush-temp/model-presentation' @@ -28634,6 +28658,82 @@ packages: - ts-node dev: false + file:projects/presence-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2): + resolution: {integrity: sha512-wPkp1Gl14BRxVtSA7GHeRGse3P/mNyw8ZMFaB+GWPy6uzKem9XOIIk6KKgvNgyZBZROcI9KxlEc5nCn6JUZNUw==, tarball: file:projects/presence-resources.tgz} + id: file:projects/presence-resources.tgz + name: '@rush-temp/presence-resources' + version: 0.0.0 + dependencies: + '@types/jest': 29.5.12 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.6.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.6.2) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.19)(ts-node@10.9.2) + fast-equals: 5.0.1 + jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2) + prettier: 3.2.5 + prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.19) + sass: 1.71.1 + svelte: 4.2.19 + svelte-check: 3.6.9(postcss-load-config@4.0.2)(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19) + svelte-eslint-parser: 0.33.1(svelte@4.2.19) + svelte-loader: 3.2.0(svelte@4.2.19) + svelte-preprocess: 5.1.3(postcss-load-config@4.0.2)(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19)(typescript@5.6.2) + ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.6.2) + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - '@types/node' + - babel-jest + - babel-plugin-macros + - coffeescript + - esbuild + - less + - node-notifier + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - supports-color + - ts-node + dev: false + + file:projects/presence.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2): + resolution: {integrity: sha512-UAKP+9sJPe3sFFYkuaoRLl5OGmzjdjb35+WCRBenMndS9HljrLekTZp2DL9F1XiyBa4OkB38vYYy2OoobeXx6Q==, tarball: file:projects/presence.tgz} + id: file:projects/presence.tgz + name: '@rush-temp/presence' + version: 0.0.0 + dependencies: + '@types/jest': 29.5.12 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.6.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.6.2) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2) + prettier: 3.2.5 + ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.6.2) + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - '@types/node' + - babel-jest + - babel-plugin-macros + - esbuild + - node-notifier + - supports-color + - ts-node + dev: false + file:projects/presentation.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2): resolution: {integrity: sha512-oPHDMQuOu5zTYR4++5vrc3LWTZgdZLCxCmnFGSHhNSOG0uRezdWBXlJyN0IL85CI2S03RO/WT16siUOrjG5vwA==, tarball: file:projects/presentation.tgz} id: file:projects/presentation.tgz @@ -28795,7 +28895,7 @@ packages: dev: false file:projects/prod.tgz(bufferutil@4.0.8)(sass@1.71.1)(ts-node@10.9.2)(utf-8-validate@6.0.4): - resolution: {integrity: sha512-5Lih7OOjrS1TenY/2rwnCFmfxjY0Ef0XgCiKURsCa6Rr5BixyOBIKDznMdFXIogr6vxKf0QWbpJVYm6iZE4J/A==, tarball: file:projects/prod.tgz} + resolution: {integrity: sha512-Vhce2P4UQlBdcnn6eYAjevEqIDE2pkstFrPKam87+2O8XmnR7ZPzuMVZwkWVbVmXsNjE0N9lKiKNYMdcW2ByRQ==, tarball: file:projects/prod.tgz} id: file:projects/prod.tgz name: '@rush-temp/prod' version: 0.0.0 diff --git a/desktop/package.json b/desktop/package.json index 468cdd5751b..ce572eaf13f 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -182,6 +182,8 @@ "@hcengineering/guest": "^0.6.4", "@hcengineering/guest-assets": "^0.6.0", "@hcengineering/guest-resources": "^0.6.0", + "@hcengineering/presence": "^0.6.0", + "@hcengineering/presence-resources": "^0.6.0", "@hcengineering/uploader": "^0.6.0", "@hcengineering/uploader-assets": "^0.6.0", "@hcengineering/uploader-resources": "^0.6.0", diff --git a/desktop/src/ui/platform.ts b/desktop/src/ui/platform.ts index 3f481785885..8785b3d8b6d 100644 --- a/desktop/src/ui/platform.ts +++ b/desktop/src/ui/platform.ts @@ -29,6 +29,7 @@ import { leadId } from '@hcengineering/lead' import login, { loginId } from '@hcengineering/login' import notification, { notificationId } from '@hcengineering/notification' import onboard, { onboardId } from '@hcengineering/onboard' +import presence, { presenceId } from '@hcengineering/presence' import { recruitId } from '@hcengineering/recruit' import rekoni from '@hcengineering/rekoni' import { requestId } from '@hcengineering/request' @@ -245,6 +246,7 @@ export async function configurePlatform (): Promise { setMetadata(uiPlugin.metadata.DefaultApplication, login.component.LoginApp) setMetadata(analyticsCollector.metadata.EndpointURL, config.ANALYTICS_COLLECTOR_URL) setMetadata(aiBot.metadata.EndpointURL, config.AI_URL) + setMetadata(presence.metadata.PresenceUrl, config.PRESENCE_URL ?? '') const languages = myBranding.languages !== undefined && myBranding.languages !== '' ? myBranding.languages.split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh', 'fr', 'cs', 'it'] @@ -303,6 +305,7 @@ export async function configurePlatform (): Promise { addLocation(productsId, async () => await import('@hcengineering/products-resources')) addLocation(documentsId, async () => await import('@hcengineering/controlled-documents-resources')) addLocation(uploaderId, async () => await import('@hcengineering/uploader-resources')) + addLocation(presenceId, async () => await import('@hcengineering/presence-resources')) addLocation(githubId, async () => await import(/* webpackChunkName: "github" */ '@hcengineering/github-resources')) addLocation( desktopPreferencesId, @@ -313,7 +316,7 @@ export async function configurePlatform (): Promise { addLocation(printId, () => import(/* webpackChunkName: "print" */ '@hcengineering/print-resources')) addLocation(textEditorId, () => import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources')) addLocation(testManagementId, () => import(/* webpackChunkName: "test-management" */ '@hcengineering/test-management-resources')) - addLocation(surveyId, () => import(/* webpackChunkName: "uploader" */ '@hcengineering/survey-resources')) + addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources')) setMetadata(client.metadata.FilterModel, 'ui') setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin]) diff --git a/desktop/src/ui/types.ts b/desktop/src/ui/types.ts index 14aca214cb6..195ac20381e 100644 --- a/desktop/src/ui/types.ts +++ b/desktop/src/ui/types.ts @@ -35,6 +35,7 @@ export interface Config { DESKTOP_UPDATES_URL?: string DESKTOP_UPDATES_CHANNEL?: string TELEGRAM_BOT_URL?: string + PRESENCE_URL?: string STATS_URL?: string } diff --git a/dev/prod/package.json b/dev/prod/package.json index f75d8ba8341..a6eec50d274 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -213,6 +213,8 @@ "@hcengineering/print": "^0.6.0", "@hcengineering/print-assets": "^0.6.0", "@hcengineering/print-resources": "^0.6.0", + "@hcengineering/presence": "^0.6.0", + "@hcengineering/presence-resources": "^0.6.0", "@hcengineering/uploader": "^0.6.0", "@hcengineering/uploader-assets": "^0.6.0", "@hcengineering/uploader-resources": "^0.6.0", diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index f4e20c97faf..54141344df2 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -62,6 +62,7 @@ import { viewId } from '@hcengineering/view' import workbench, { workbenchId } from '@hcengineering/workbench' import { testManagementId } from '@hcengineering/test-management' import { surveyId } from '@hcengineering/survey' +import presence, { presenceId } from '@hcengineering/presence' import { bitrixId } from '@hcengineering/bitrix' @@ -161,6 +162,7 @@ export interface Config { PREVIEW_CONFIG?: string UPLOAD_CONFIG?: string STATS_URL?: string + PRESENCE_URL?: string USE_BINARY_PROTOCOL?: boolean, TRANSACTOR_OVERRIDE?: string } @@ -342,6 +344,7 @@ export async function configurePlatform() { setMetadata(love.metadata.WebSocketURL, config.LIVEKIT_WS) setMetadata(print.metadata.PrintURL, config.PRINT_URL) setMetadata(sign.metadata.SignURL, config.SIGN_URL) + setMetadata(presence.metadata.PresenceUrl, config.PRESENCE_URL ?? '') const languages = myBranding.languages ? (myBranding.languages as string).split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh', 'fr', 'cs', 'it'] @@ -409,7 +412,8 @@ export async function configurePlatform() { addLocation(textEditorId, () => import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources')) addLocation(uploaderId, () => import(/* webpackChunkName: "uploader" */ '@hcengineering/uploader-resources')) addLocation(testManagementId, () => import(/* webpackChunkName: "test-management" */ '@hcengineering/test-management-resources')) - addLocation(surveyId, () => import(/* webpackChunkName: "uploader" */ '@hcengineering/survey-resources')) + addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources')) + addLocation(presenceId, () => import(/* webpackChunkName: "presence" */ '@hcengineering/presence-resources')) setMetadata(client.metadata.FilterModel, 'ui') setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin]) diff --git a/models/all/package.json b/models/all/package.json index 141d6e641ab..e15bd0faf02 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -112,6 +112,7 @@ "@hcengineering/model-ai-bot": "^0.6.0", "@hcengineering/model-server-fulltext": "^0.6.0", "@hcengineering/model-test-management": "^0.6.0", - "@hcengineering/model-survey": "^0.6.0" + "@hcengineering/model-survey": "^0.6.0", + "@hcengineering/model-presence": "^0.6.0" } } diff --git a/models/all/src/index.ts b/models/all/src/index.ts index 49c616188bf..82fae835237 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -106,6 +106,7 @@ import { } from '@hcengineering/model-server-controlled-documents' import { serverFulltextId, createModel as serverFulltextModel } from '@hcengineering/model-server-fulltext' import { surveyId, createModel as surveyModel } from '@hcengineering/model-survey' +import { presenceId, createModel as presenceModel } from '@hcengineering/model-presence' import { type Plugin } from '@hcengineering/platform' @@ -422,6 +423,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[ } ], [surveyModel, surveyId], + [presenceModel, presenceId], [serverCoreModel, serverCoreId], [serverAttachmentModel, serverAttachmentId], diff --git a/models/presence/.eslintrc.js b/models/presence/.eslintrc.js new file mode 100644 index 00000000000..c1cf82cba08 --- /dev/null +++ b/models/presence/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/models/presence/.npmignore b/models/presence/.npmignore new file mode 100644 index 00000000000..e3ec093c383 --- /dev/null +++ b/models/presence/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/models/presence/config/rig.json b/models/presence/config/rig.json new file mode 100644 index 00000000000..2f6be366054 --- /dev/null +++ b/models/presence/config/rig.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig", + "rigProfile": "model" +} diff --git a/models/presence/package.json b/models/presence/package.json new file mode 100644 index 00000000000..6eb2d0d6ad2 --- /dev/null +++ b/models/presence/package.json @@ -0,0 +1,41 @@ +{ + "name": "@hcengineering/model-presence", + "version": "0.6.0", + "main": "lib/index.js", + "svelte": "src/index.ts", + "types": "types/index.d.ts", + "author": "Hardcore Engineering Inc.", + "template": "@hcengineering/model-package", + "license": "EPL-2.0", + "scripts": { + "build": "compile", + "build:watch": "compile", + "format": "format src", + "_phase:build": "compile transpile src", + "_phase:format": "format src", + "_phase:validate": "compile validate" + }, + "devDependencies": { + "@hcengineering/platform-rig": "^0.6.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-n": "^15.4.0", + "eslint": "^8.54.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-config-standard-with-typescript": "^40.0.0", + "prettier": "^3.1.0", + "typescript": "^5.3.3" + }, + "dependencies": { + "@hcengineering/core": "^0.6.32", + "@hcengineering/model": "^0.6.11", + "@hcengineering/model-core": "^0.6.0", + "@hcengineering/model-presentation": "^0.6.0", + "@hcengineering/model-workbench": "^0.6.1", + "@hcengineering/platform": "^0.6.11", + "@hcengineering/ui": "^0.6.15", + "@hcengineering/presence": "^0.6.0", + "@hcengineering/presence-resources": "^0.6.0" + } +} diff --git a/models/presence/src/index.ts b/models/presence/src/index.ts new file mode 100644 index 00000000000..0bb8843cfdd --- /dev/null +++ b/models/presence/src/index.ts @@ -0,0 +1,31 @@ +// +// Copyright © 2024 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { type Builder } from '@hcengineering/model' +import core from '@hcengineering/model-core' +import presentation from '@hcengineering/model-presentation' +import workbench from '@hcengineering/model-workbench' + +import presence from './plugin' + +export { presenceId } from '@hcengineering/presence' +export { presence as default } + +export function createModel (builder: Builder): void { + builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, { + extension: workbench.extensions.WorkbenchExtensions, + component: presence.component.WorkbenchExtension + }) +} diff --git a/models/presence/src/plugin.ts b/models/presence/src/plugin.ts new file mode 100644 index 00000000000..1cb9b1449d3 --- /dev/null +++ b/models/presence/src/plugin.ts @@ -0,0 +1,25 @@ +// +// Copyright © 2024 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { mergeIds } from '@hcengineering/platform' +import { type AnyComponent } from '@hcengineering/ui' +import { presenceId } from '@hcengineering/presence' +import presence from '@hcengineering/presence-resources/src/plugin' + +export default mergeIds(presenceId, presence, { + component: { + WorkbenchExtension: '' as AnyComponent + } +}) diff --git a/models/presence/tsconfig.json b/models/presence/tsconfig.json new file mode 100644 index 00000000000..9765b6086db --- /dev/null +++ b/models/presence/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "declarationDir": "./types", + "tsBuildInfoFile": ".build/build.tsbuildinfo" + } +} \ No newline at end of file diff --git a/packages/panel/package.json b/packages/panel/package.json index 6e20928a5cb..87c8acbb8a0 100644 --- a/packages/panel/package.json +++ b/packages/panel/package.json @@ -45,6 +45,7 @@ "@hcengineering/chunter": "^0.6.20", "@hcengineering/presentation": "^0.6.3", "@hcengineering/activity": "^0.6.0", - "@hcengineering/calendar": "^0.6.24" + "@hcengineering/calendar": "^0.6.24", + "@hcengineering/presence": "^0.6.0" } } diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 9cbe0a16cf1..c0f76bed038 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -29,6 +29,7 @@ } from '@hcengineering/ui' import type { ButtonItem } from '@hcengineering/ui' import { getResource } from '@hcengineering/platform' + import presence from '@hcengineering/presence' export let title: string | undefined = undefined export let withoutActivity: boolean = false @@ -41,6 +42,7 @@ export let isSub: boolean = true export let isAside: boolean = true export let isUtils: boolean = true + export let isPresence: boolean = true export let isCustomAttr: boolean = true export let floatAside: boolean = false export let allowClose: boolean = true @@ -146,6 +148,8 @@ dispatch('select', result.detail) }} > + + {#if !withoutTitle} {#if $$slots.title} @@ -156,6 +160,12 @@ {/if} + + {#if isPresence} + + {/if} + + diff --git a/packages/ui/src/components/Header.svelte b/packages/ui/src/components/Header.svelte index 6fe72d133a2..b047f257dda 100644 --- a/packages/ui/src/components/Header.svelte +++ b/packages/ui/src/components/Header.svelte @@ -35,6 +35,7 @@ export let hideSearch: boolean = false export let hideActions: boolean = false export let hideExtra: boolean = false + export let hidePresence: boolean = false export let overflowExtra: boolean = false export let noPrint: boolean = false export let freezeBefore: boolean = false @@ -149,6 +150,11 @@
+ {#if $$slots.presence && !hidePresence} +
+ +
+ {/if} {#if $$slots.search}