diff --git a/dev/prod/package.json b/dev/prod/package.json index 55ed99d7e2..d33dd4ebd0 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -71,7 +71,7 @@ "@hcengineering/contact-assets": "~0.6.0", "@hcengineering/activity": "~0.6.0", "@hcengineering/activity-assets": "~0.6.0", - "@hcengineering/activity-resources": "~0.6.0", + "@hcengineering/activity-resources": "~0.6.1", "@hcengineering/automation": "~0.6.0", "@hcengineering/automation-assets": "~0.6.0", "@hcengineering/automation-resources": "~0.6.0", diff --git a/models/activity/src/index.ts b/models/activity/src/index.ts index 303ee80558..223b2c4826 100644 --- a/models/activity/src/index.ts +++ b/models/activity/src/index.ts @@ -13,12 +13,12 @@ // limitations under the License. // -import type { TxViewlet } from '@hcengineering/activity' +import type { ActivityFilter, DisplayTx, TxViewlet } from '@hcengineering/activity' import activity from '@hcengineering/activity' import core, { Class, Doc, DocumentQuery, DOMAIN_MODEL, Ref, Tx } from '@hcengineering/core' import { Builder, Model } from '@hcengineering/model' import { TDoc } from '@hcengineering/model-core' -import type { Asset, IntlString } from '@hcengineering/platform' +import type { Asset, IntlString, Resource } from '@hcengineering/platform' import { AnyComponent } from '@hcengineering/ui' @Model(activity.class.TxViewlet, core.class.Doc, DOMAIN_MODEL) @@ -36,6 +36,12 @@ export class TTxViewlet extends TDoc implements TxViewlet { hideOnRemove!: boolean } -export function createModel (builder: Builder): void { - builder.createModel(TTxViewlet) +@Model(activity.class.ActivityFilter, core.class.Class, DOMAIN_MODEL) +export class TActivityFilter extends TDoc implements ActivityFilter { + label!: IntlString + filter!: Resource<(txes: DisplayTx[]) => DisplayTx[]> +} + +export function createModel (builder: Builder): void { + builder.createModel(TTxViewlet, TActivityFilter) } diff --git a/models/attachment/src/index.ts b/models/attachment/src/index.ts index 18221c70ac..e5d83c10a5 100644 --- a/models/attachment/src/index.ts +++ b/models/attachment/src/index.ts @@ -96,6 +96,11 @@ export function createModel (builder: Builder): void { attachment.ids.TxAttachmentCreate ) + builder.createDoc(activity.class.ActivityFilter, core.space.Model, { + label: attachment.string.FilterAttachments, + filter: attachment.filter.AttachmentsFilter + }) + builder.createDoc( view.class.ActionCategory, core.space.Model, diff --git a/models/attachment/src/plugin.ts b/models/attachment/src/plugin.ts index 240ba9b636..ee395c3ff2 100644 --- a/models/attachment/src/plugin.ts +++ b/models/attachment/src/plugin.ts @@ -13,11 +13,11 @@ // limitations under the License. // -import type { TxViewlet } from '@hcengineering/activity' +import type { DisplayTx, TxViewlet } from '@hcengineering/activity' import { attachmentId } from '@hcengineering/attachment' import attachment from '@hcengineering/attachment-resources/src/plugin' import type { Ref } from '@hcengineering/core' -import type { IntlString } from '@hcengineering/platform' +import type { IntlString, Resource } from '@hcengineering/platform' import { mergeIds } from '@hcengineering/platform' import type { AnyComponent } from '@hcengineering/ui' import type { ActionCategory } from '@hcengineering/view' @@ -38,7 +38,8 @@ export default mergeIds(attachmentId, attachment, { SavedAttachments: '' as IntlString, Description: '' as IntlString, PinAttachment: '' as IntlString, - UnPinAttachment: '' as IntlString + UnPinAttachment: '' as IntlString, + FilterAttachments: '' as IntlString }, ids: { TxAttachmentCreate: '' as Ref @@ -48,5 +49,8 @@ export default mergeIds(attachmentId, attachment, { }, category: { Attachments: '' as Ref + }, + filter: { + AttachmentsFilter: '' as Resource<(txes: DisplayTx[]) => DisplayTx[]> } }) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index e85a9b0e12..beeea80e80 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -473,6 +473,16 @@ export function createModel (builder: Builder, options = { addApplication: true chunter.ids.TxBacklinkRemove ) + builder.createDoc(activity.class.ActivityFilter, core.space.Model, { + label: chunter.string.FilterComments, + filter: chunter.filter.CommentsFilter + }) + + builder.createDoc(activity.class.ActivityFilter, core.space.Model, { + label: chunter.string.FilterBacklinks, + filter: chunter.filter.BacklinksFilter + }) + builder.mixin(chunter.class.ChunterMessage, core.class.Class, view.mixin.ClassFilters, { filters: ['space', 'modifiedOn', 'createBy', '_class'] }) diff --git a/models/chunter/src/plugin.ts b/models/chunter/src/plugin.ts index cc04baf59e..2e4d429349 100644 --- a/models/chunter/src/plugin.ts +++ b/models/chunter/src/plugin.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import type { TxViewlet } from '@hcengineering/activity' +import type { DisplayTx, TxViewlet } from '@hcengineering/activity' import { Channel, chunterId } from '@hcengineering/chunter' import chunter from '@hcengineering/chunter-resources/src/plugin' import type { Ref, Space } from '@hcengineering/core' @@ -67,7 +67,9 @@ export default mergeIds(chunterId, chunter, { SavedMessages: '' as IntlString, ThreadMessage: '' as IntlString, Reactions: '' as IntlString, - Emoji: '' as IntlString + Emoji: '' as IntlString, + FilterComments: '' as IntlString, + FilterBacklinks: '' as IntlString }, viewlet: { Chat: '' as Ref @@ -89,5 +91,9 @@ export default mergeIds(chunterId, chunter, { }, function: { ChunterBrowserVisible: '' as Resource<(spaces: Space[]) => boolean> + }, + filter: { + CommentsFilter: '' as Resource<(txes: DisplayTx[]) => DisplayTx[]>, + BacklinksFilter: '' as Resource<(txes: DisplayTx[]) => DisplayTx[]> } }) diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 4e6259e40a..fc9ead5394 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -87,7 +87,7 @@ {#if $$slots.header}
{#if $$slots.header}{/if} -
+
diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 7a5f435593..ae23bfed58 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -527,6 +527,7 @@ input.search { .min-h-7 { min-height: 1.75rem; } .min-h-30 { min-height: 7.5rem; } .min-h-60 { min-height: 15rem; } +.max-w-2 { max-width: .5rem; } .max-w-9 { max-width: 2.25rem; } .max-w-30 { max-width: 7.5rem; } .max-w-60 { max-width: 15rem; } diff --git a/packages/ui/src/components/CheckBox.svelte b/packages/ui/src/components/CheckBox.svelte index 7b121561f4..dcde7d5520 100644 --- a/packages/ui/src/components/CheckBox.svelte +++ b/packages/ui/src/components/CheckBox.svelte @@ -34,7 +34,7 @@ } -