introduce AttachmentPresenter

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-10-23 17:47:47 +02:00
parent 63a79a88d7
commit 6813bedc55
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
8 changed files with 994 additions and 924 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -121,9 +121,9 @@ export function createModel (builder: Builder): void {
members: []
})
// builder.mixin(chunter.class.Attachment, core.class.Class, view.mixin.AttributePresenter, {
// presenter: chunter.component.AttachmentPresenter
// })
builder.mixin(chunter.class.Attachment, core.class.Class, view.mixin.AttributePresenter, {
presenter: chunter.component.AttachmentPresenter
})
}
export default chunter

View File

@ -23,7 +23,8 @@ import type { AnyComponent } from '@anticrm/ui'
export default mergeIds(chunterId, chunter, {
component: {
AttachmentsPresenter: '' as AnyComponent
AttachmentsPresenter: '' as AnyComponent,
AttachmentPresenter: '' as AnyComponent
},
string: {
ApplicationLabelChunter: '' as IntlString

View File

@ -0,0 +1,25 @@
<!--
// Copyright © 2020, 2021 Anticrm Platform Contributors.
// Copyright © 2021 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import type { Attachment } from '@anticrm/chunter'
export let value: Attachment
</script>
{JSON.stringify(value)}

View File

@ -17,6 +17,7 @@ import CreateChannel from './components/CreateChannel.svelte'
import ChannelView from './components/ChannelView.svelte'
import Activity from './components/Activity.svelte'
import AttachmentsPresenter from './components/AttachmentsPresenter.svelte'
import AttachmentPresenter from './components/AttachmentPresenter.svelte'
export { AttachmentsPresenter }
@ -25,6 +26,7 @@ export default async () => ({
CreateChannel,
ChannelView,
Activity,
AttachmentsPresenter
AttachmentsPresenter,
AttachmentPresenter
}
})

View File

@ -85,7 +85,7 @@
</div>
<Table
_class={chunter.class.Attachment}
config={['name', 'file', 'type']}
config={['', 'file', 'type']}
options={ {} }
search=""
/>

File diff suppressed because it is too large Load Diff