diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index c0f76bed038..53d931e9133 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -18,7 +18,7 @@ import { Writable, writable } from 'svelte/store' import activity from '@hcengineering/activity' - import { Doc } from '@hcengineering/core' + import { AccountRole, Doc, getCurrentAccount } from '@hcengineering/core' import { Component, deviceOptionsStore as deviceInfo, @@ -64,6 +64,11 @@ export let hideExtra: boolean = false export let overflowExtra: boolean = false + const account = getCurrentAccount() + $: isGuest = account.role === AccountRole.DocGuest + + $: showActivity = !withoutActivity && !isGuest + export function getAside (): string | boolean { return panel.getAside() } @@ -109,7 +114,7 @@ afterUpdate(async () => { const fn = await getResource(activity.function.ShouldScrollToActivity) - if (!withoutActivity && fn?.()) { + if (showActivity && fn?.()) { return } @@ -243,7 +248,7 @@ {#if $deviceInfo.isMobile}
- {#if !withoutActivity} + {#if showActivity} {#key object._id} - {#if !withoutActivity} + {#if showActivity} {#key object._id} - {#if !withoutActivity} + {#if showActivity} {#key object._id} import { Analytics } from '@hcengineering/analytics' import { + AccountRole, type Blob, Class, type CollaborativeDoc, type Doc, type Ref, generateId, + getCurrentAccount, makeDocCollabId } from '@hcengineering/core' import { IntlString, translate } from '@hcengineering/platform' import { + DrawingCmd, + KeyedAttribute, getAttribute, getClient, getFileUrl, getImageSize, - imageSizeToRatio, - KeyedAttribute, - DrawingCmd + imageSizeToRatio } from '@hcengineering/presentation' import { markupToJSON } from '@hcengineering/text' import { @@ -56,12 +58,6 @@ import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte' import { Doc as YDoc } from 'yjs' - import { Completion } from '../Completion' - import { deleteAttachment } from '../command/deleteAttachment' - import { textEditorCommandHandler } from '../commands' - import { EditorKitOptions, getEditorKit } from '../../src/kits/editor-kit' - import { Provider } from '../provider/types' - import { createLocalProvider, createRemoteProvider } from '../provider/utils' import textEditor, { CollaborationIds, CollaborationUser, @@ -69,6 +65,12 @@ TextEditorCommandHandler, TextEditorHandler } from '@hcengineering/text-editor' + import { EditorKitOptions, getEditorKit } from '../../src/kits/editor-kit' + import { Completion } from '../Completion' + import { deleteAttachment } from '../command/deleteAttachment' + import { textEditorCommandHandler } from '../commands' + import { Provider } from '../provider/types' + import { createLocalProvider, createRemoteProvider } from '../provider/utils' import { addTableHandler } from '../utils' import TextEditorToolbar from './TextEditorToolbar.svelte' @@ -79,11 +81,11 @@ import { FileUploadExtension } from './extension/fileUploadExt' import { ImageUploadExtension } from './extension/imageUploadExt' import { InlineCommandsExtension } from './extension/inlineCommands' + import { InlineCommentCollaborationExtension } from './extension/inlineComment' import { LeftMenuExtension } from './extension/leftMenu' + import { mermaidOptions } from './extension/mermaid' import { type FileAttachFunction } from './extension/types' import { completionConfig, inlineCommandsConfig } from './extensions' - import { mermaidOptions } from './extension/mermaid' - import { InlineCommentCollaborationExtension } from './extension/inlineComment' export let object: Doc export let attribute: KeyedAttribute @@ -118,6 +120,9 @@ const client = getClient() const dispatch = createEventDispatcher() + const account = getCurrentAccount() + $: isGuest = account.role === AccountRole.DocGuest + const objectClass = object._class const objectId = object._id const objectSpace = object.space @@ -433,7 +438,7 @@ onMount(async () => { await ph - if (enableInlineComments) { + if (enableInlineComments && !isGuest) { optionalExtensions.push( InlineCommentCollaborationExtension.configure({ ydoc, diff --git a/services/print/pod-print/src/print.ts b/services/print/pod-print/src/print.ts index 93913c69b89..dc14a6d3c85 100644 --- a/services/print/pod-print/src/print.ts +++ b/services/print/pod-print/src/print.ts @@ -66,21 +66,23 @@ export async function print (url: string, options?: PrintOptions): Promise { const header = document.querySelector('#page-header') - return header !== null ? header.innerHTML : undefined + return header?.innerHTML ?? '' }) const pageFooter = await page.evaluate(() => { const footer = document.querySelector('#page-footer') - return footer !== null ? footer.innerHTML : undefined + return footer?.innerHTML ?? '' }) + const displayHeaderFooter = pageHeader !== '' || pageFooter !== '' + res = await page.pdf({ format: 'A4', landscape: false, timeout: 0, headerTemplate: pageHeader, footerTemplate: pageFooter, - displayHeaderFooter: pageHeader !== undefined || pageFooter !== undefined, + displayHeaderFooter, margin: { top: '1.5cm', right: '1cm', diff --git a/tests/sanity/tests/tracker/public-link.spec.ts b/tests/sanity/tests/tracker/public-link.spec.ts index 90be2279793..4cd3fb8a9cf 100644 --- a/tests/sanity/tests/tracker/public-link.spec.ts +++ b/tests/sanity/tests/tracker/public-link.spec.ts @@ -45,7 +45,6 @@ test.describe('Tracker public link issues tests', () => { await clearPage.goto(link) const clearIssuesDetailsPage = new IssuesDetailsPage(clearPage) - await clearIssuesDetailsPage.waitDetailsOpened(publicLinkIssue.title) await clearIssuesDetailsPage.checkIssue({ ...publicLinkIssue, status: 'Backlog' @@ -91,7 +90,6 @@ test.describe('Tracker public link issues tests', () => { await setTestOptions(clearPage) const clearIssuesDetailsPage = new IssuesDetailsPage(clearPage) - await clearIssuesDetailsPage.waitDetailsOpened(publicLinkIssue.title) await clearIssuesDetailsPage.checkIssue({ ...publicLinkIssue, status: 'Backlog'