diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 0bd60779eb..0516087a78 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -14,11 +14,31 @@ // import activity from '@anticrm/activity' -import type { Backlink, Channel, ChunterMessage, Comment, Message, SavedMessages, ThreadMessage } from '@anticrm/chunter' +import type { + Backlink, + Channel, + ChunterMessage, + Comment, + Message, + SavedMessages, + ThreadMessage +} from '@anticrm/chunter' import contact, { Employee } from '@anticrm/contact' import type { Account, Class, Doc, Domain, Ref, Space, Timestamp } from '@anticrm/core' import { IndexKind } from '@anticrm/core' -import { ArrOf, Builder, Collection, Index, Model, Prop, TypeMarkup, TypeRef, TypeString, TypeTimestamp, UX } from '@anticrm/model' +import { + ArrOf, + Builder, + Collection, + Index, + Model, + Prop, + TypeMarkup, + TypeRef, + TypeString, + TypeTimestamp, + UX +} from '@anticrm/model' import attachment from '@anticrm/model-attachment' import core, { TAttachedDoc, TSpace } from '@anticrm/model-core' import view from '@anticrm/model-view' @@ -131,11 +151,16 @@ export function createModel (builder: Builder): void { header: chunter.component.ChannelHeader }) - builder.createDoc(view.class.ViewletDescriptor, core.space.Model, { - label: chunter.string.Chat, - icon: view.icon.Table, - component: chunter.component.ChannelView - }, chunter.viewlet.Chat) + builder.createDoc( + view.class.ViewletDescriptor, + core.space.Model, + { + label: chunter.string.Chat, + icon: view.icon.Table, + component: chunter.component.ChannelView + }, + chunter.viewlet.Chat + ) builder.createDoc(view.class.Viewlet, core.space.Model, { attachTo: chunter.class.Message, @@ -225,91 +250,130 @@ export function createModel (builder: Builder): void { } }) - builder.createDoc(workbench.class.Application, core.space.Model, { - label: chunter.string.ApplicationLabelChunter, - icon: chunter.icon.Chunter, - hidden: false, - navigatorModel: { - specials: [ - { - id: 'archive', - component: workbench.component.Archive, - icon: view.icon.Archive, - label: workbench.string.Archive, - position: 'top', - visibleIf: workbench.function.HasArchiveSpaces, - spaceClass: chunter.class.Channel - }, - { - id: 'threads', - label: chunter.string.Threads, - icon: chunter.icon.Thread, - component: chunter.component.Threads, - position: 'top' - }, - { - id: 'savedMessages', - label: chunter.string.SavedMessages, - icon: chunter.icon.Bookmark, - component: chunter.component.SavedMessages - } - ], - spaces: [ - { - label: chunter.string.Channels, - spaceClass: chunter.class.Channel, - addSpaceLabel: chunter.string.CreateChannel, - createComponent: chunter.component.CreateChannel - } - ], - aside: chunter.component.ThreadView - } - }, chunter.app.Chunter) + builder.createDoc( + workbench.class.Application, + core.space.Model, + { + label: chunter.string.ApplicationLabelChunter, + icon: chunter.icon.Chunter, + hidden: false, + navigatorModel: { + specials: [ + { + id: 'spaceBrowser', + component: workbench.component.SpaceBrowser, + icon: workbench.icon.Search, + label: chunter.string.ChannelBrowser, + position: 'top', + spaceClass: chunter.class.Channel, + componentProps: { + _class: chunter.class.Channel, + label: chunter.string.ChannelBrowser, + createItemDialog: chunter.component.CreateChannel, + createItemLabel: chunter.string.CreateChannel + } + }, + { + id: 'archive', + component: workbench.component.Archive, + icon: view.icon.Archive, + label: workbench.string.Archive, + position: 'top', + visibleIf: workbench.function.HasArchiveSpaces, + spaceClass: chunter.class.Channel + }, + { + id: 'threads', + label: chunter.string.Threads, + icon: chunter.icon.Thread, + component: chunter.component.Threads, + position: 'top' + }, + { + id: 'savedMessages', + label: chunter.string.SavedMessages, + icon: chunter.icon.Bookmark, + component: chunter.component.SavedMessages + } + ], + spaces: [ + { + label: chunter.string.Channels, + spaceClass: chunter.class.Channel, + addSpaceLabel: chunter.string.CreateChannel, + createComponent: chunter.component.CreateChannel + } + ], + aside: chunter.component.ThreadView + } + }, + chunter.app.Chunter + ) builder.mixin(chunter.class.Comment, core.class.Class, view.mixin.AttributePresenter, { presenter: chunter.component.CommentPresenter }) - builder.createDoc(activity.class.TxViewlet, core.space.Model, { - objectClass: chunter.class.Comment, - icon: chunter.icon.Chunter, - txClass: core.class.TxCreateDoc, - component: chunter.activity.TxCommentCreate, - label: chunter.string.LeftComment, - display: 'content', - editable: true, - hideOnRemove: true - }, chunter.ids.TxCommentCreate) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: chunter.class.Comment, + icon: chunter.icon.Chunter, + txClass: core.class.TxCreateDoc, + component: chunter.activity.TxCommentCreate, + label: chunter.string.LeftComment, + display: 'content', + editable: true, + hideOnRemove: true + }, + chunter.ids.TxCommentCreate + ) // We need to define this one, to hide default attached object removed case - builder.createDoc(activity.class.TxViewlet, core.space.Model, { - objectClass: chunter.class.Comment, - icon: chunter.icon.Chunter, - txClass: core.class.TxRemoveDoc, - display: 'inline', - hideOnRemove: true - }, chunter.ids.TxCommentRemove) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: chunter.class.Comment, + icon: chunter.icon.Chunter, + txClass: core.class.TxRemoveDoc, + display: 'inline', + hideOnRemove: true + }, + chunter.ids.TxCommentRemove + ) - builder.createDoc(activity.class.TxViewlet, core.space.Model, { - objectClass: chunter.class.Backlink, - icon: chunter.icon.Chunter, - txClass: core.class.TxCreateDoc, - component: chunter.activity.TxBacklinkCreate, - label: chunter.string.MentionedIn, - labelComponent: chunter.activity.TxBacklinkReference, - display: 'emphasized', - editable: false, - hideOnRemove: true - }, chunter.ids.TxCommentCreate) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: chunter.class.Backlink, + icon: chunter.icon.Chunter, + txClass: core.class.TxCreateDoc, + component: chunter.activity.TxBacklinkCreate, + label: chunter.string.MentionedIn, + labelComponent: chunter.activity.TxBacklinkReference, + display: 'emphasized', + editable: false, + hideOnRemove: true + }, + chunter.ids.TxCommentCreate + ) // We need to define this one, to hide default attached object removed case - builder.createDoc(activity.class.TxViewlet, core.space.Model, { - objectClass: chunter.class.Backlink, - icon: chunter.icon.Chunter, - txClass: core.class.TxRemoveDoc, - display: 'inline', - hideOnRemove: true - }, chunter.ids.TxBacklinkRemove) + builder.createDoc( + activity.class.TxViewlet, + core.space.Model, + { + objectClass: chunter.class.Backlink, + icon: chunter.icon.Chunter, + txClass: core.class.TxRemoveDoc, + display: 'inline', + hideOnRemove: true + }, + chunter.ids.TxBacklinkRemove + ) } export { chunterOperation } from './migration' diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 21d6409395..2b1aef0ec7 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -83,6 +83,20 @@ export function createModel (builder: Builder): void { hidden: false, navigatorModel: { specials: [ + { + id: 'spaceBrowser', + component: workbench.component.SpaceBrowser, + icon: workbench.icon.Search, + label: lead.string.FunnelBrowser, + position: 'top', + spaceClass: chunter.class.Channel, + componentProps: { + _class: lead.class.Funnel, + label: lead.string.FunnelBrowser, + createItemDialog: lead.component.CreateFunnel, + createItemLabel: lead.string.CreateFunnel + } + }, { id: 'customers', label: lead.string.Customers, diff --git a/models/lead/src/plugin.ts b/models/lead/src/plugin.ts index 7e55778fa3..5c5c4fa4e9 100644 --- a/models/lead/src/plugin.ts +++ b/models/lead/src/plugin.ts @@ -30,7 +30,8 @@ export default mergeIds(leadId, lead, { Lead: '' as IntlString, Title: '' as IntlString, Assignee: '' as IntlString, - ManageFunnelStatuses: '' as IntlString + ManageFunnelStatuses: '' as IntlString, + FunnelBrowser: '' as IntlString }, component: { CreateFunnel: '' as AnyComponent, diff --git a/models/workbench/src/plugin.ts b/models/workbench/src/plugin.ts index 1b0f990b7b..105b73209e 100644 --- a/models/workbench/src/plugin.ts +++ b/models/workbench/src/plugin.ts @@ -21,11 +21,13 @@ import workbench, { workbenchId } from '@anticrm/workbench' export default mergeIds(workbenchId, workbench, { component: { ApplicationPresenter: '' as AnyComponent, - Archive: '' as AnyComponent + Archive: '' as AnyComponent, + SpaceBrowser: '' as AnyComponent }, string: { Archive: '' as IntlString, - Application: '' as IntlString + Application: '' as IntlString, + SpaceBrowser: '' as IntlString }, function: { HasArchiveSpaces: '' as Resource<(spaces: Space[]) => boolean> diff --git a/packages/presentation/lang/en.json b/packages/presentation/lang/en.json index b56c8ff544..0104d79040 100644 --- a/packages/presentation/lang/en.json +++ b/packages/presentation/lang/en.json @@ -15,6 +15,11 @@ "Search": "Search...", "Unassigned": "Unassigned", "CreateMore": "Create more", - "NumberMembers": "{count, plural, =0 {no members} =1 {1 member} other {# members}}" + "NumberMembers": "{count, plural, =0 {no members} =1 {1 member} other {# members}}", + "InThis": "In this {space}", + "NoMatchesInThis": "No matches in this {space}", + "NoMatchesFound": "No matches found", + "NotInThis": "Not in this {space}", + "Add": "Add" } } diff --git a/packages/presentation/lang/ru.json b/packages/presentation/lang/ru.json index d463e87ac8..6501865233 100644 --- a/packages/presentation/lang/ru.json +++ b/packages/presentation/lang/ru.json @@ -15,6 +15,11 @@ "Search": "Поиск...", "Unassigned": "Не назначен", "CreateMore": "Создать еще", - "NumberMembers": "{count, plural, =0 {нет участников} =1 {1 участник} other {# участника}}" + "NumberMembers": "{count, plural, =0 {нет участников} =1 {1 участник} other {# участника}}", + "InThis": "В этом {space}", + "NoMatchesInThis": "В этом {space} совпадения не обнаружены", + "NoMatchesFound": "Не найдено соответсвий", + "NotInThis": "Не в этом {space}", + "Add": "Добавить" } } diff --git a/packages/presentation/src/components/Members.svelte b/packages/presentation/src/components/Members.svelte index d66cfcc51a..86af0fa747 100644 --- a/packages/presentation/src/components/Members.svelte +++ b/packages/presentation/src/components/Members.svelte @@ -14,23 +14,99 @@ --> -