mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
File attachment in personal server (#4506)
Fixes https://github.com/mattermost/focalboard/issues/4497
This commit is contained in:
parent
345ff01539
commit
00d5679f42
@ -240,6 +240,20 @@ exports[`components/cardDialog limited card shows hidden view (no toolbar) 1`] =
|
||||
<div
|
||||
class="toolbar--right"
|
||||
>
|
||||
<div
|
||||
class="d-flex"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
>
|
||||
<i
|
||||
class="CompassIcon icon-paperclip"
|
||||
/>
|
||||
<span>
|
||||
Attach
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
aria-label="Close dialog"
|
||||
title="Close dialog"
|
||||
|
@ -159,7 +159,7 @@ const CardDialog = (props: Props): JSX.Element => {
|
||||
const attachmentBlock = createAttachmentBlock(uploadingBlock)
|
||||
attachmentBlock.isUploading = true
|
||||
dispatch(updateAttachments([attachmentBlock]))
|
||||
if (attachment.size > clientConfig.maxFileSize) {
|
||||
if (attachment.size > clientConfig.maxFileSize && Utils.isFocalboardPlugin()) {
|
||||
removeUploadingAttachment(uploadingBlock)
|
||||
sendFlashMessage({content: intl.formatMessage({id: 'AttachmentBlock.failed', defaultMessage: 'Unable to upload the file. Attachment size limit reached.'}), severity: 'normal'})
|
||||
} else {
|
||||
@ -262,7 +262,10 @@ const CardDialog = (props: Props): JSX.Element => {
|
||||
</>
|
||||
)
|
||||
|
||||
return (<>{attachBtn()}{following ? unfollowBtn : followBtn}</>)
|
||||
if (!isTemplate && Utils.isFocalboardPlugin() && !card?.limited) {
|
||||
return (<>{attachBtn()}{following ? unfollowBtn : followBtn}</>)
|
||||
}
|
||||
return (<>{attachBtn()}</>)
|
||||
}
|
||||
|
||||
const followingCards = useAppSelector(getUserBlockSubscriptionList)
|
||||
@ -276,7 +279,7 @@ const CardDialog = (props: Props): JSX.Element => {
|
||||
className='cardDialog'
|
||||
onClose={props.onClose}
|
||||
toolsMenu={!props.readonly && !card?.limited && menu}
|
||||
toolbar={!isTemplate && Utils.isFocalboardPlugin() && !card?.limited && toolbar}
|
||||
toolbar={toolbar}
|
||||
>
|
||||
{isTemplate &&
|
||||
<div className='banner'>
|
||||
|
Loading…
Reference in New Issue
Block a user