Comment viewer moved to chunter

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-08-18 13:28:03 +02:00
parent fe8dbe9bd0
commit 3948111387
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
7 changed files with 14 additions and 19 deletions

View File

@ -22,4 +22,3 @@ 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'
export { default as CommentViewer } from './components/CommentViewer.svelte'

View File

@ -25,6 +25,7 @@
"@anticrm/presentation":"~0.6.1",
"@anticrm/chunter":"~0.6.0",
"svelte":"^3.37.0",
"@anticrm/text-editor":"~0.6.0"
"@anticrm/text-editor":"~0.6.0",
"@anticrm/contact": "~0.6.0"
}
}

View File

@ -19,11 +19,12 @@
import type { Doc } from '@anticrm/core'
import { Backlink as BacklinkComponent } from '@anticrm/presentation'
import type { Backlink } from '@anticrm/chunter'
import { CommentViewer } from '@anticrm/presentation'
import { ReferenceInput } from '@anticrm/text-editor'
import { createQuery } from '@anticrm/presentation'
import { Section, IconComments } from '@anticrm/ui'
import Bookmark from './icons/Bookmark.svelte'
import CommentViewer from './CommentViewer.svelte'
import chunter from '@anticrm/chunter'

View File

@ -14,15 +14,8 @@
-->
<script lang="ts">
import Avatar from './Avatar.svelte'
interface Person {
firstName: string
lastName: string
email: string
description: string
city: string
}
import type { Person } from '@anticrm/contact'
import { Avatar } from '@anticrm/presentation'
interface IMessage {
text: string

View File

@ -17,7 +17,7 @@
import { createEventDispatcher } from 'svelte'
import type { Ref, Space } from '@anticrm/core'
import { DatePicker, EditBox, Dialog, Tabs, Section, Grid, Row, TextArea, IconComments } from '@anticrm/ui'
import { UserBox, CommentViewer } from '@anticrm/presentation'
import { UserBox } from '@anticrm/presentation'
import { ReferenceInput } from '@anticrm/text-editor'
import type { Person } from '@anticrm/contact'
import File from './icons/File.svelte'
@ -57,10 +57,10 @@
<Row><ReferenceInput /></Row>
</Grid>
</Section>
<Section icon={IconComments} label={'Comments'}>
<!-- <Section icon={IconComments} label={'Comments'}>
<CommentViewer />
<div class="reference"><ReferenceInput /></div>
</Section>
</Section> -->
</Dialog>
<style lang="scss">

View File

@ -21,7 +21,7 @@ import { v4 as uuid } from 'uuid'
const BUCKET = 'anticrm-upload-9e4e89c'
async function awsUpload(file: UploadedFile) {
async function awsUpload (file: UploadedFile): Promise<S3.ManagedUpload.SendData> {
console.log(file)
const s3 = new S3()
const resp = await s3.upload({
@ -29,9 +29,10 @@ async function awsUpload(file: UploadedFile) {
Key: uuid(),
Body: file.data,
ContentType: file.mimetype,
ACL: 'public-read'
ACL: 'public-read'
}).promise()
console.log(resp)
return resp
}
/**
@ -48,8 +49,8 @@ export function start (port: number): void {
if (file !== undefined) {
awsUpload(file as UploadedFile)
.then(() => res.status(200).send())
.catch(error => console.log(error))
.then(() => res.status(200).send())
.catch(error => console.log(error))
} else {
res.status(400).send()
}