mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 10:20:01 +00:00
attachments cleanup
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
b416925573
commit
c41a3222bd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@
|
||||
//
|
||||
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Builder, Model, Prop, UX, TypeString, Index } from '@anticrm/model'
|
||||
import { Builder, Model, Prop, UX, TypeString, Index, TypeTimestamp } from '@anticrm/model'
|
||||
import type { Ref, Doc, Class, Domain } from '@anticrm/core'
|
||||
import { IndexKind } from '@anticrm/core'
|
||||
import core, { TSpace, TDoc } from '@anticrm/model-core'
|
||||
@ -71,6 +71,9 @@ export class TAttachment extends TDoc implements Attachment {
|
||||
|
||||
@Prop(TypeString(), 'Type' as IntlString)
|
||||
type!: string
|
||||
|
||||
@Prop(TypeTimestamp(), 'Date' as IntlString)
|
||||
lastModified!: number
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
|
@ -45,4 +45,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
{time}
|
||||
<span style="white-space: nowrap;">{time}</span>
|
@ -27,7 +27,7 @@
|
||||
|
||||
<Table
|
||||
_class={chunter.class.Attachment}
|
||||
config={['', 'file', 'type']}
|
||||
config={['', 'lastModified']}
|
||||
options={ {} }
|
||||
search=""
|
||||
/>
|
||||
|
@ -52,6 +52,7 @@ export interface Attachment extends AttachedDoc {
|
||||
file: string
|
||||
size: number
|
||||
type: string
|
||||
lastModified: number
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,6 +53,7 @@
|
||||
file: uuid,
|
||||
type: file.type,
|
||||
size: file.size,
|
||||
lastModified: file.lastModified
|
||||
})
|
||||
} catch (err: any) {
|
||||
setPlatformStatus(unknownError(err))
|
||||
@ -67,10 +68,6 @@
|
||||
if (file !== undefined) { createAttachment(file) }
|
||||
}
|
||||
|
||||
const maxLenght: number = 52
|
||||
const trimFilename = (fname: string): string => (fname.length > maxLenght)
|
||||
? fname.substr(0, (maxLenght - 1) / 2) + '...' + fname.substr(-(maxLenght - 1) / 2)
|
||||
: fname
|
||||
</script>
|
||||
|
||||
<div class="attachments-container">
|
||||
@ -85,7 +82,7 @@
|
||||
</div>
|
||||
<Table
|
||||
_class={chunter.class.Attachment}
|
||||
config={['', 'modifiedOn']}
|
||||
config={['', 'lastModified']}
|
||||
options={ {} }
|
||||
search=""
|
||||
/>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user