mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 18:29:51 +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 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 type { Ref, Doc, Class, Domain } from '@anticrm/core'
|
||||||
import { IndexKind } from '@anticrm/core'
|
import { IndexKind } from '@anticrm/core'
|
||||||
import core, { TSpace, TDoc } from '@anticrm/model-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)
|
@Prop(TypeString(), 'Type' as IntlString)
|
||||||
type!: string
|
type!: string
|
||||||
|
|
||||||
|
@Prop(TypeTimestamp(), 'Date' as IntlString)
|
||||||
|
lastModified!: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createModel (builder: Builder): void {
|
export function createModel (builder: Builder): void {
|
||||||
|
@ -45,4 +45,4 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{time}
|
<span style="white-space: nowrap;">{time}</span>
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<Table
|
<Table
|
||||||
_class={chunter.class.Attachment}
|
_class={chunter.class.Attachment}
|
||||||
config={['', 'file', 'type']}
|
config={['', 'lastModified']}
|
||||||
options={ {} }
|
options={ {} }
|
||||||
search=""
|
search=""
|
||||||
/>
|
/>
|
||||||
|
@ -52,6 +52,7 @@ export interface Attachment extends AttachedDoc {
|
|||||||
file: string
|
file: string
|
||||||
size: number
|
size: number
|
||||||
type: string
|
type: string
|
||||||
|
lastModified: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
file: uuid,
|
file: uuid,
|
||||||
type: file.type,
|
type: file.type,
|
||||||
size: file.size,
|
size: file.size,
|
||||||
|
lastModified: file.lastModified
|
||||||
})
|
})
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setPlatformStatus(unknownError(err))
|
setPlatformStatus(unknownError(err))
|
||||||
@ -67,10 +68,6 @@
|
|||||||
if (file !== undefined) { createAttachment(file) }
|
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>
|
</script>
|
||||||
|
|
||||||
<div class="attachments-container">
|
<div class="attachments-container">
|
||||||
@ -85,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<Table
|
<Table
|
||||||
_class={chunter.class.Attachment}
|
_class={chunter.class.Attachment}
|
||||||
config={['', 'modifiedOn']}
|
config={['', 'lastModified']}
|
||||||
options={ {} }
|
options={ {} }
|
||||||
search=""
|
search=""
|
||||||
/>
|
/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user