u
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { PureComponent } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import TextSnippetOutlinedIcon from '@mui/icons-material/TextSnippetOutlined';
|
||||
import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf';
|
||||
@@ -9,7 +8,6 @@ import ChatBubbleOutlineRoundedIcon from '@mui/icons-material/ChatBubbleOutlineR
|
||||
import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined';
|
||||
import { tileBaseSx, TILE_SIZE } from 'dashgui/tiles';
|
||||
import SkeleHashImage from '../settings/SkeleHashImage';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import { generateTextThumbnail } from '../../utils/textThumbnail';
|
||||
import chatAutomat from '../../automats/chatAutomat';
|
||||
import {
|
||||
@@ -107,17 +105,12 @@ export class Attachment extends PureComponent {
|
||||
}
|
||||
|
||||
const trimmed = (textContent || '').trim();
|
||||
if (!trimmed) {
|
||||
enqueueSnackbar('Datei enthält keinen Text zum Erwähnen im Chat.', { variant: 'warning' });
|
||||
return;
|
||||
}
|
||||
if (!trimmed) return;
|
||||
|
||||
const size = attachment.size || new Blob([trimmed]).size;
|
||||
chatAutomat.actions.insertExtractionSnippet({
|
||||
text: trimmed,
|
||||
size,
|
||||
label: 'parsed invoice',
|
||||
});
|
||||
enqueueSnackbar('Text im Chat erwähnt', { variant: 'success' });
|
||||
};
|
||||
|
||||
handleDelete = (e) => {
|
||||
@@ -290,7 +283,6 @@ export class Attachment extends PureComponent {
|
||||
disabled={disabled}
|
||||
onClick={this.handleRescan}
|
||||
aria-label="Zu Text"
|
||||
title="Zu Text"
|
||||
sx={{
|
||||
bgcolor: SCRIM_ACTION,
|
||||
color: WHITE,
|
||||
@@ -311,7 +303,6 @@ export class Attachment extends PureComponent {
|
||||
disabled={disabled}
|
||||
onClick={this.handleMentionInChat}
|
||||
aria-label="Im Chat erwähnen"
|
||||
title="Im Chat erwähnen"
|
||||
sx={{
|
||||
bgcolor: SCRIM_ACTION,
|
||||
color: WHITE,
|
||||
@@ -331,7 +322,6 @@ export class Attachment extends PureComponent {
|
||||
disabled={disabled}
|
||||
onClick={this.handleDelete}
|
||||
aria-label="Löschen"
|
||||
title="Löschen"
|
||||
sx={{
|
||||
bgcolor: SCRIM_ACTION,
|
||||
color: WHITE,
|
||||
|
||||
Reference in New Issue
Block a user