Skip to content

Commit

Permalink
fix(chat): fix icon formats (Issue #2411, #2466) (#2470)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBondar authored Oct 29, 2024
1 parent a18697f commit 4717e49
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
FEATURES_ENDPOINTS,
FEATURES_ENDPOINTS_NAMES,
} from '@/src/constants/applications';
import { IMAGE_TYPES } from '@/src/constants/chat';
import { DEFAULT_VERSION } from '@/src/constants/public';

import { ApplicationWizardFooter } from '@/src/components/Common/ApplicationWizard/ApplicationWizardFooter';
Expand Down Expand Up @@ -179,7 +180,7 @@ export const CodeAppView: React.FC<ViewProps> = ({
customPlaceholder={t('No icon')}
className="max-w-full"
fileManagerModalTitle="Select application icon"
allowedTypes={['image/svg+xml']}
allowedTypes={IMAGE_TYPES}
error={errors.iconUrl?.message}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { FilesSelectors } from '@/src/store/files/files.reducers';
import { useAppDispatch, useAppSelector } from '@/src/store/hooks';
import { SettingsSelectors } from '@/src/store/settings/settings.reducers';

import { IMAGE_TYPES } from '@/src/constants/chat';
import { DEFAULT_VERSION } from '@/src/constants/public';

import { ApplicationWizardFooter } from '@/src/components/Common/ApplicationWizard/ApplicationWizardFooter';
Expand Down Expand Up @@ -143,7 +144,7 @@ export const CustomAppView: React.FC<ViewProps> = ({
customPlaceholder={t('No icon')}
className="max-w-full"
fileManagerModalTitle="Select application icon"
allowedTypes={['image/svg+xml']}
allowedTypes={IMAGE_TYPES}
error={errors.iconUrl?.message}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useAppDispatch, useAppSelector } from '@/src/store/hooks';
import { SettingsSelectors } from '@/src/store/settings/settings.reducers';
import { UISelectors } from '@/src/store/ui/ui.reducers';

import { IMAGE_TYPES } from '@/src/constants/chat';
import { DEFAULT_VERSION } from '@/src/constants/public';

import { TemperatureSlider } from '@/src/components/Chat/Temperature';
Expand Down Expand Up @@ -142,7 +143,7 @@ export const QuickAppView: React.FC<ViewProps> = ({
customPlaceholder={t('No icon')}
className="max-w-full"
fileManagerModalTitle="Select application icon"
allowedTypes={['image/svg+xml']}
allowedTypes={IMAGE_TYPES}
error={errors.iconUrl?.message}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const FieldErrorMessage = ({ error, className }: Props) => {
}

return (
<div className={classNames('mb-4 text-xxs text-error', className)}>
<div className={classNames('text-xxs text-error', className)}>
{t(error)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/chat/src/components/Files/AttachLinkDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const AttachLinkDialog = ({ onClose }: Props) => {
})}
/>

<FieldErrorMessage error={errors.href?.message} />
<FieldErrorMessage error={errors.href?.message} className="mb-4" />
</div>

<div className="mb-5">
Expand Down

0 comments on commit 4717e49

Please sign in to comment.