From d28082ee89a37786ddef42e3de96102891b49152 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Wed, 18 Aug 2021 18:15:16 +0200 Subject: [PATCH] Initial comments implementation Signed-off-by: Andrey Platov --- dev/storage/src/model.tx.json | 354 +++++++++--------- models/chunter/src/index.ts | 18 +- packages/presentation/src/index.ts | 1 - .../src/components/Activity.svelte | 39 +- .../src/components/Backlink.svelte | 10 +- plugins/chunter/src/index.ts | 13 +- .../src/components/EditCandidate.svelte | 5 +- .../src/components/TableView.svelte | 4 +- 8 files changed, 238 insertions(+), 206 deletions(-) rename {packages/presentation => plugins/chunter-resources}/src/components/Backlink.svelte (81%) diff --git a/dev/storage/src/model.tx.json b/dev/storage/src/model.tx.json index ab695b2783..00d033c741 100644 --- a/dev/storage/src/model.tx.json +++ b/dev/storage/src/model.tx.json @@ -1,25 +1,25 @@ [ { - "_id": "610f986c458521557bb213fe", + "_id": "611d2d25131730f65a01979e", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Obj", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0 } }, { - "_id": "610f986c458521557bb213ff", + "_id": "611d2d25131730f65a01979f", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Doc", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -27,13 +27,13 @@ } }, { - "_id": "610f986c458521557bb21400", + "_id": "611d2d25131730f65a0197a0", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Type", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -41,13 +41,13 @@ } }, { - "_id": "610f986c458521557bb21401", + "_id": "611d2d25131730f65a0197a1", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:TypeString", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -55,13 +55,13 @@ } }, { - "_id": "610f986c458521557bb21402", + "_id": "611d2d25131730f65a0197a2", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Attribute", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -69,13 +69,13 @@ } }, { - "_id": "610f986c458521557bb21403", + "_id": "611d2d25131730f65a0197a3", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Account", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -84,13 +84,13 @@ } }, { - "_id": "610f986c458521557bb21404", + "_id": "611d2d25131730f65a0197a4", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Space", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -99,13 +99,13 @@ } }, { - "_id": "610f986c458521557bb21405", + "_id": "611d2d25131730f65a0197a5", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Tx", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "domain": "tx", @@ -114,13 +114,13 @@ } }, { - "_id": "610f986c458521557bb21406", + "_id": "611d2d25131730f65a0197a6", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:TxCUD", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -128,13 +128,13 @@ } }, { - "_id": "610f986c458521557bb21407", + "_id": "611d2d25131730f65a0197a7", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:TxUpdateDoc", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -142,13 +142,13 @@ } }, { - "_id": "610f986c458521557bb21408", + "_id": "611d2d25131730f65a0197a8", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:TxMixin", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -156,13 +156,13 @@ } }, { - "_id": "610f986c458521557bb21409", + "_id": "611d2d25131730f65a0197a9", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:TxCreateDoc", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -170,13 +170,13 @@ } }, { - "_id": "610f986c458521557bb2140a", + "_id": "611d2d25131730f65a0197aa", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Class", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -185,13 +185,13 @@ } }, { - "_id": "610f986c458521557bb2140b", + "_id": "611d2d25131730f65a0197ab", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "core:class:Mixin", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053653, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -199,13 +199,13 @@ } }, { - "_id": "610f986c458521557bb2140c", + "_id": "611d2d25131730f65a0197ac", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "view:class:Viewlet", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -214,13 +214,13 @@ } }, { - "_id": "610f986c458521557bb2140d", + "_id": "611d2d25131730f65a0197ad", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "view:class:ViewletDescriptor", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -229,13 +229,13 @@ } }, { - "_id": "610f986c458521557bb2140e", + "_id": "611d2d25131730f65a0197ae", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "view:mixin:AttributePresenter", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -243,13 +243,13 @@ } }, { - "_id": "610f986c458521557bb2140f", + "_id": "611d2d25131730f65a0197af", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "view:mixin:AttributeEditor", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -257,11 +257,11 @@ } }, { - "_id": "610f986c458521557bb21410", + "_id": "611d2d25131730f65a0197b0", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "objectId": "core:class:TypeString", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -271,11 +271,11 @@ } }, { - "_id": "610f986c458521557bb21411", + "_id": "611d2d25131730f65a0197b1", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "objectId": "core:class:TypeString", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -285,13 +285,13 @@ } }, { - "_id": "610f986c458521557bb21412", + "_id": "611d2d25131730f65a0197b2", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "view:viewlet:Table", "objectClass": "view:class:ViewletDescriptor", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "label": "Table", @@ -300,13 +300,13 @@ } }, { - "_id": "610f986c458521557bb21413", + "_id": "611d2d25131730f65a0197b3", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "workbench:mixin:SpaceView", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -314,13 +314,13 @@ } }, { - "_id": "610f986c458521557bb21414", + "_id": "611d2d25131730f65a0197b4", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "workbench:class:Application", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -329,13 +329,13 @@ } }, { - "_id": "610f986c458521557bb21415", + "_id": "611d2d25131730f65a0197b5", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "contact:class:Contact", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "domain": "contact", @@ -344,13 +344,13 @@ } }, { - "_id": "610f986c458521557bb21416", + "_id": "611d2d25131730f65a0197b6", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "contact:class:Person", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012608, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -359,12 +359,12 @@ } }, { - "_id": "610f986c458521557bb21417", - "objectId": "610f986c458521557bb21418", + "_id": "611d2d25131730f65a0197b7", + "objectId": "611d2d25131730f65a0197b8", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012451, + "modifiedOn": 1629302053448, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -377,12 +377,12 @@ } }, { - "_id": "610f986c458521557bb21419", - "objectId": "610f986c458521557bb2141a", + "_id": "611d2d25131730f65a0197b9", + "objectId": "611d2d25131730f65a0197ba", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012451, + "modifiedOn": 1629302053448, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -395,12 +395,12 @@ } }, { - "_id": "610f986c458521557bb2141b", - "objectId": "610f986c458521557bb2141c", + "_id": "611d2d25131730f65a0197bb", + "objectId": "611d2d25131730f65a0197bc", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012451, + "modifiedOn": 1629302053448, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -413,12 +413,12 @@ } }, { - "_id": "610f986c458521557bb2141d", - "objectId": "610f986c458521557bb2141e", + "_id": "611d2d25131730f65a0197bd", + "objectId": "611d2d25131730f65a0197be", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012451, + "modifiedOn": 1629302053448, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -431,12 +431,12 @@ } }, { - "_id": "610f986c458521557bb2141f", - "objectId": "610f986c458521557bb21420", + "_id": "611d2d25131730f65a0197bf", + "objectId": "611d2d25131730f65a0197c0", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012451, + "modifiedOn": 1629302053448, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -449,13 +449,13 @@ } }, { - "_id": "610f986c458521557bb21421", + "_id": "611d2d25131730f65a0197c1", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "contact:class:Employee", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -463,13 +463,13 @@ } }, { - "_id": "610f986c458521557bb21422", + "_id": "611d2d25131730f65a0197c2", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "contact:class:Organization", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -477,13 +477,13 @@ } }, { - "_id": "610f986c458521557bb21423", + "_id": "611d2d25131730f65a0197c3", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "contact:space:Employee", "objectClass": "core:class:Space", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "name": "Employees", @@ -493,11 +493,11 @@ } }, { - "_id": "610f986c458521557bb21424", + "_id": "611d2d25131730f65a0197c4", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "objectId": "contact:class:Person", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -507,28 +507,42 @@ } }, { - "_id": "610f986c458521557bb21425", + "_id": "611d2d25131730f65a0197c5", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "chunter:class:Backlink", + "objectId": "chunter:class:Comment", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { - "domain": "backlinks", + "domain": "comment", "kind": 0, "extends": "core:class:Doc" } }, { - "_id": "610f986c458521557bb21426", + "_id": "611d2d25131730f65a0197c6", + "_class": "core:class:TxCreateDoc", + "space": "core:space:Tx", + "objectId": "chunter:class:Backlink", + "objectClass": "core:class:Class", + "objectSpace": "core:space:Model", + "modifiedOn": 1629302053654, + "modifiedBy": "core:account:System", + "attributes": { + "kind": 0, + "extends": "chunter:class:Comment" + } + }, + { + "_id": "611d2d25131730f65a0197c7", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "chunter:class:Message", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "domain": "chunter", @@ -537,13 +551,13 @@ } }, { - "_id": "610f986c458521557bb21427", + "_id": "611d2d25131730f65a0197c8", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "chunter:class:Channel", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053654, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -553,11 +567,11 @@ } }, { - "_id": "610f986c458521557bb21428", + "_id": "611d2d25131730f65a0197c9", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "objectId": "chunter:class:Channel", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -569,13 +583,13 @@ } }, { - "_id": "610f986c458521557bb21429", + "_id": "611d2d25131730f65a0197ca", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "chunter:viewlet:Chat", "objectClass": "view:class:ViewletDescriptor", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "label": "Chat", @@ -584,13 +598,13 @@ } }, { - "_id": "610f986c458521557bb2142a", + "_id": "611d2d25131730f65a0197cb", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2142b", + "objectId": "611d2d25131730f65a0197cc", "objectClass": "view:class:Viewlet", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "attachTo": "chunter:class:Message", @@ -600,13 +614,13 @@ } }, { - "_id": "610f986c458521557bb2142c", + "_id": "611d2d25131730f65a0197cd", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2142d", + "objectId": "611d2d25131730f65a0197ce", "objectClass": "workbench:class:Application", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "label": "chunter:string:ApplicationLabelChunter", @@ -624,13 +638,13 @@ } }, { - "_id": "610f986c458521557bb2142e", + "_id": "611d2d25131730f65a0197cf", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2142f", + "objectId": "611d2d25131730f65a0197d0", "objectClass": "chunter:class:Channel", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "name": "general", @@ -640,13 +654,13 @@ } }, { - "_id": "610f986c458521557bb21430", + "_id": "611d2d25131730f65a0197d1", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21431", + "objectId": "611d2d25131730f65a0197d2", "objectClass": "chunter:class:Channel", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "name": "random", @@ -656,13 +670,13 @@ } }, { - "_id": "610f986c458521557bb21432", + "_id": "611d2d25131730f65a0197d3", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "task:class:Task", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -670,12 +684,12 @@ } }, { - "_id": "610f986c458521557bb21433", - "objectId": "610f986c458521557bb21434", + "_id": "611d2d25131730f65a0197d4", + "objectId": "611d2d25131730f65a0197d5", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012492, + "modifiedOn": 1629302053498, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -688,12 +702,12 @@ } }, { - "_id": "610f986c458521557bb21435", - "objectId": "610f986c458521557bb21436", + "_id": "611d2d25131730f65a0197d6", + "objectId": "611d2d25131730f65a0197d7", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012492, + "modifiedOn": 1629302053498, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -706,12 +720,12 @@ } }, { - "_id": "610f986c458521557bb21437", - "objectId": "610f986c458521557bb21438", + "_id": "611d2d25131730f65a0197d8", + "objectId": "611d2d25131730f65a0197d9", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012492, + "modifiedOn": 1629302053498, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -724,13 +738,13 @@ } }, { - "_id": "610f986c458521557bb21439", + "_id": "611d2d25131730f65a0197da", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "task:class:Project", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -740,11 +754,11 @@ } }, { - "_id": "610f986c458521557bb2143a", + "_id": "611d2d25131730f65a0197db", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "objectId": "task:class:Project", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -757,13 +771,13 @@ } }, { - "_id": "610f986c458521557bb2143b", + "_id": "611d2d25131730f65a0197dc", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2143c", + "objectId": "611d2d25131730f65a0197dd", "objectClass": "view:class:Viewlet", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "attachTo": "task:class:Task", @@ -781,13 +795,13 @@ } }, { - "_id": "610f986c458521557bb2143d", + "_id": "611d2d25131730f65a0197de", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2143e", + "objectId": "611d2d25131730f65a0197df", "objectClass": "workbench:class:Application", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "label": "task:string:ApplicationLabelTask", @@ -805,13 +819,13 @@ } }, { - "_id": "610f986c458521557bb2143f", + "_id": "611d2d25131730f65a0197e0", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21440", + "objectId": "611d2d25131730f65a0197e1", "objectClass": "task:class:Project", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "name": "demo", @@ -821,13 +835,13 @@ } }, { - "_id": "610f986c458521557bb21441", + "_id": "611d2d25131730f65a0197e2", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "recruit:class:Applicant", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "domain": "recruit", @@ -836,12 +850,12 @@ } }, { - "_id": "610f986c458521557bb21442", - "objectId": "610f986c458521557bb21443", + "_id": "611d2d25131730f65a0197e3", + "objectId": "611d2d25131730f65a0197e4", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012602, + "modifiedOn": 1629302053609, "objectSpace": "core:space:Model", "objectClass": "core:class:Attribute", "attributes": { @@ -854,13 +868,13 @@ } }, { - "_id": "610f986c458521557bb21444", + "_id": "611d2d25131730f65a0197e5", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "recruit:class:Candidate", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -869,13 +883,13 @@ } }, { - "_id": "610f986c458521557bb21445", + "_id": "611d2d25131730f65a0197e6", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "recruit:class:Candidates", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -885,13 +899,13 @@ } }, { - "_id": "610f986c458521557bb21446", + "_id": "611d2d25131730f65a0197e7", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "recruit:class:Vacancy", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "kind": 0, @@ -901,11 +915,11 @@ } }, { - "_id": "610f986c458521557bb21447", + "_id": "611d2d25131730f65a0197e8", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "objectId": "recruit:class:Vacancy", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -918,11 +932,11 @@ } }, { - "_id": "610f986c458521557bb21448", + "_id": "611d2d25131730f65a0197e9", "_class": "core:class:TxMixin", "space": "core:space:Tx", "modifiedBy": "core:account:System", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "objectId": "recruit:class:Candidates", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", @@ -935,13 +949,13 @@ } }, { - "_id": "610f986c458521557bb21449", + "_id": "611d2d25131730f65a0197ea", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2144a", + "objectId": "611d2d25131730f65a0197eb", "objectClass": "workbench:class:Application", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "label": "recruit:string:RecruitApplication", @@ -965,13 +979,13 @@ } }, { - "_id": "610f986c458521557bb2144b", + "_id": "611d2d25131730f65a0197ec", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "recruit:space:CandidatesPublic", "objectClass": "recruit:class:Candidates", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "name": "public", @@ -981,13 +995,13 @@ } }, { - "_id": "610f986c458521557bb2144c", + "_id": "611d2d25131730f65a0197ed", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2144d", + "objectId": "611d2d25131730f65a0197ee", "objectClass": "view:class:Viewlet", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "attachTo": "recruit:class:Candidate", @@ -1002,13 +1016,13 @@ } }, { - "_id": "610f986c458521557bb2144e", + "_id": "611d2d25131730f65a0197ef", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2144f", + "objectId": "611d2d25131730f65a0197f0", "objectClass": "view:class:Viewlet", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "attachTo": "recruit:class:Applicant", @@ -1027,13 +1041,13 @@ } }, { - "_id": "610f986c458521557bb21450", + "_id": "611d2d25131730f65a0197f1", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", "objectId": "server-core:class:Trigger", "objectClass": "core:class:Class", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "domain": "model", @@ -1042,26 +1056,26 @@ } }, { - "_id": "610f986c458521557bb21451", + "_id": "611d2d25131730f65a0197f2", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21452", + "objectId": "611d2d25131730f65a0197f3", "objectClass": "server-core:class:Trigger", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "trigger": "server-chunter:trigger:OnMessage" } }, { - "_id": "610f986c458521557bb21453", + "_id": "611d2d25131730f65a0197f4", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21454", + "objectId": "611d2d25131730f65a0197f5", "objectClass": "contact:class:Employee", "objectSpace": "contact:space:Employee", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "firstName": "Rosamund", @@ -1072,26 +1086,26 @@ } }, { - "_id": "610f986c458521557bb21455", + "_id": "611d2d25131730f65a0197f6", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21456", + "objectId": "611d2d25131730f65a0197f7", "objectClass": "core:class:Account", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "email": "rosamund@hc.engineering" } }, { - "_id": "610f986c458521557bb21457", + "_id": "611d2d25131730f65a0197f8", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb21458", + "objectId": "611d2d25131730f65a0197f9", "objectClass": "contact:class:Employee", "objectSpace": "contact:space:Employee", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "firstName": "Elon", @@ -1102,26 +1116,26 @@ } }, { - "_id": "610f986c458521557bb21459", + "_id": "611d2d25131730f65a0197fa", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2145a", + "objectId": "611d2d25131730f65a0197fb", "objectClass": "core:class:Account", "objectSpace": "core:space:Model", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "email": "elon@hc.engineering" } }, { - "_id": "610f986c458521557bb2145b", + "_id": "611d2d25131730f65a0197fc", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2145c", + "objectId": "611d2d25131730f65a0197fd", "objectClass": "recruit:class:Candidate", "objectSpace": "recruit:space:CandidatesPublic", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "firstName": "Andrey", @@ -1132,13 +1146,13 @@ } }, { - "_id": "610f986c458521557bb2145d", + "_id": "611d2d25131730f65a0197fe", "_class": "core:class:TxCreateDoc", "space": "core:space:Tx", - "objectId": "610f986c458521557bb2145e", + "objectId": "611d2d25131730f65a0197ff", "objectClass": "recruit:class:Candidate", "objectSpace": "recruit:space:CandidatesPublic", - "modifiedOn": 1628412012609, + "modifiedOn": 1629302053655, "modifiedBy": "core:account:System", "attributes": { "firstName": "Marina", diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index ba39af96f2..f1af89ad68 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -17,7 +17,7 @@ import type { IntlString } from '@anticrm/platform' import { Builder, Model, UX } from '@anticrm/model' import type { Ref, Doc, Class, Domain } from '@anticrm/core' import core, { TSpace, TDoc } from '@anticrm/model-core' -import type { Backlink, Channel, Message } from '@anticrm/chunter' +import type { Backlink, Channel, Message, Comment } from '@anticrm/chunter' import type { AnyComponent } from '@anticrm/ui' import workbench from '@anticrm/model-workbench' @@ -26,7 +26,7 @@ import view from '@anticrm/model-view' import chunter from './plugin' export const DOMAIN_CHUNTER = 'chunter' as Domain -export const DOMAIN_BACKLINKS = 'backlinks' as Domain +export const DOMAIN_COMMENT = 'comment' as Domain @Model(chunter.class.Channel, core.class.Space) @UX(chunter.string.Channel, chunter.icon.Hashtag) @@ -37,16 +37,20 @@ export class TMessage extends TDoc implements Message { content!: string } -@Model(chunter.class.Backlink, core.class.Doc, DOMAIN_BACKLINKS) -export class TBacklink extends TDoc implements Backlink { +@Model(chunter.class.Comment, core.class.Doc, DOMAIN_COMMENT) +export class TComment extends TDoc implements Comment { objectId!: Ref - backlinkId!: Ref - backlinkClass!: Ref> message!: string } +@Model(chunter.class.Backlink, chunter.class.Comment) +export class TBacklink extends TComment implements Backlink { + backlinkId!: Ref + backlinkClass!: Ref> +} + export function createModel (builder: Builder): void { - builder.createModel(TChannel, TMessage, TBacklink) + builder.createModel(TChannel, TMessage, TComment, TBacklink) builder.mixin(chunter.class.Channel, core.class.Class, workbench.mixin.SpaceView, { view: { class: chunter.class.Message diff --git a/packages/presentation/src/index.ts b/packages/presentation/src/index.ts index f5f9afab42..52a6cd0583 100644 --- a/packages/presentation/src/index.ts +++ b/packages/presentation/src/index.ts @@ -21,4 +21,3 @@ export { default as UserInfo } from './components/UserInfo.svelte' export { default as Avatar } from './components/Avatar.svelte' export { default as MessageViewer } from './components/MessageViewer.svelte' export { default as AttributeEditor } from './components/AttributeEditor.svelte' -export { default as Backlink } from './components/Backlink.svelte' diff --git a/plugins/chunter-resources/src/components/Activity.svelte b/plugins/chunter-resources/src/components/Activity.svelte index 04992aa722..6c141702eb 100644 --- a/plugins/chunter-resources/src/components/Activity.svelte +++ b/plugins/chunter-resources/src/components/Activity.svelte @@ -16,37 +16,44 @@ -
+
+ + +{#if comments} + {#each comments as comment} + {/each} -
{/if}