mirror of
https://github.com/hexastack/hexabot
synced 2024-11-24 13:05:15 +00:00
fix(frontend): apply feedback's
This commit is contained in:
parent
3ab9e966a2
commit
889836e398
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
import { Box, FormHelperText, FormLabel } from "@mui/material";
|
import { Box, FormHelperText, FormLabel } from "@mui/material";
|
||||||
import { forwardRef } from "react";
|
import { forwardRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
import { useGet } from "@/hooks/crud/useGet";
|
import { useGet } from "@/hooks/crud/useGet";
|
||||||
import { useHasPermission } from "@/hooks/useHasPermission";
|
import { useHasPermission } from "@/hooks/useHasPermission";
|
||||||
@ -47,7 +46,6 @@ const AttachmentInput = forwardRef<HTMLDivElement, AttachmentThumbnailProps>(
|
|||||||
ref,
|
ref,
|
||||||
) => {
|
) => {
|
||||||
const hasPermission = useHasPermission();
|
const hasPermission = useHasPermission();
|
||||||
const { t } = useTranslation();
|
|
||||||
const handleChange = (attachment: IAttachment | null) => {
|
const handleChange = (attachment: IAttachment | null) => {
|
||||||
onChange && onChange(attachment?.id || null, attachment?.type || null);
|
onChange && onChange(attachment?.id || null, attachment?.type || null);
|
||||||
};
|
};
|
||||||
@ -84,9 +82,7 @@ const AttachmentInput = forwardRef<HTMLDivElement, AttachmentThumbnailProps>(
|
|||||||
enableMediaLibrary={enableMediaLibrary}
|
enableMediaLibrary={enableMediaLibrary}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : null}
|
||||||
t("message.no_attachment")
|
|
||||||
)}
|
|
||||||
{helperText ? (
|
{helperText ? (
|
||||||
<FormHelperText error={error}>{helperText}</FormHelperText>
|
<FormHelperText error={error}>{helperText}</FormHelperText>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
import { TOptionsBase } from "i18next";
|
import { TOptionsBase } from "i18next";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright © 2024 Hexastack. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||||
|
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||||
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
|
*/
|
||||||
|
|
||||||
import { translations } from ".";
|
import { translations } from ".";
|
||||||
|
|
||||||
import { TFilterNestedKeysOfType } from "@/types/common/object.types";
|
import { TFilterNestedKeysOfType } from "@/types/common/object.types";
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 Hexastack. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||||
|
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||||
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
|
*/
|
||||||
|
|
||||||
import en from "@/i18n/en/translation.json";
|
import en from "@/i18n/en/translation.json";
|
||||||
import fr from "@/i18n/fr/translation.json";
|
import fr from "@/i18n/fr/translation.json";
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||||
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
* 3. SaaS Restriction: This software, or any derivative of it, may not be used to offer a competing product or service (SaaS) without prior written consent from Hexastack. Offering the software as a service or using it in a commercial cloud environment without express permission is strictly prohibited.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type TFilterNestedKeysOfType<T, U = string> = T extends object
|
export type TFilterNestedKeysOfType<T, U = string> = T extends object
|
||||||
|
Loading…
Reference in New Issue
Block a user