This commit is contained in:
hailin 2025-04-21 00:53:41 +08:00
parent e9dc494268
commit 34d4696cc5
5 changed files with 25 additions and 15 deletions

View File

@ -241,7 +241,7 @@ export const ChatInput: FC<ChatInputProps> = ({}) => {
className="ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring text-md flex w-full resize-none rounded-md border-none bg-transparent px-14 py-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
placeholder={t(
// `Ask anything. Type "@" for assistants, "/" for prompts, "#" for files, and "!" for tools.`
`Ask anything. Type @ / # !`
"inputPlaceholder"
)}
onValueChange={handleInputChange}
value={userInput}

View File

@ -3,6 +3,8 @@ import { ChangeEvent, FC, useState } from "react"
import { toast } from "sonner"
import { Input } from "./input"
import { useTranslation } from "react-i18next"
interface ImagePickerProps {
src: string
image: File | null
@ -20,6 +22,8 @@ const ImagePicker: FC<ImagePickerProps> = ({
width = 200,
height = 200
}) => {
const { t } = useTranslation()
const [previewSrc, setPreviewSrc] = useState<string>(src)
const [previewImage, setPreviewImage] = useState<File | null>(image)
@ -28,7 +32,7 @@ const ImagePicker: FC<ImagePickerProps> = ({
const file = e.target.files[0]
if (file.size > 6000000) {
toast.error("Image must be less than 6MB!")
toast.error(t("side.imageTooLarge"))
return
}
@ -42,7 +46,7 @@ const ImagePicker: FC<ImagePickerProps> = ({
const ctx = canvas.getContext("2d")
if (!ctx) {
toast.error("Unable to create canvas context.")
toast.error(t("side.canvasError"))
return
}

View File

@ -1,5 +1,5 @@
{
"Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.": "Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.",
"inputPlaceholder": "Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.",
"Company Name": "Jelly Drops LLC",
"Clock In": "Clock In",
@ -13,12 +13,6 @@
},
"login": {
"chatTime": {
"Today": "Today",
"Yesterday": "Yesterday",
"PreviousWeek": "Previous Week",
"Older": "Older"
},
"email": "Email",
"emailPlaceholder": "you@example.com",
"password": "Password",
@ -134,6 +128,12 @@
},
"side": {
"chatTime": {
"Today": "Today",
"Yesterday": "Yesterday",
"PreviousWeek": "Previous Week",
"Older": "Older"
},
"selectWorkspace": "Select workspace...",
"newWorkspace": "New Workspace",
"searchWorkspaces": "Search workspaces...",
@ -209,7 +209,9 @@
"toolDescriptionPlaceholder": "Tool description...",
"customHeadersLabel": "Custom Headers",
"schemaLabel": "Schema",
"dropFileHere": "Drop file here"
"dropFileHere": "Drop file here",
"imageTooLarge": "Image must be less than 6MB!",
"canvasError": "Unable to create canvas context."
},
"contentType": {

View File

@ -1,5 +1,5 @@
{
"Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.": "何でも聞いてください。「/」でプロンプト、「@」でファイル、「#」でツールを入力してください。",
"inputPlaceholder": "何でも聞いてください。「/」でプロンプト、「@」でファイル、「#」でツールを入力してください。",
"Company Name": "Jelly Drops LLC",
"Clock In": "出勤する",
"setup": {
@ -208,7 +208,9 @@
"toolDescriptionPlaceholder": "ツールの説明...",
"customHeadersLabel": "カスタムヘッダー",
"schemaLabel": "スキーマ",
"dropFileHere": "ここにファイルをドロップ"
"dropFileHere": "ここにファイルをドロップ",
"imageTooLarge": "画像は6MB未満である必要があります",
"canvasError": "キャンバスコンテキストを作成できませんでした。"
},
"contentType": {

View File

@ -1,5 +1,5 @@
{
"Ask anything. Type \"/\" for prompts, \"@\" for files, and \"#\" for tools.": "随便问点什么。输入“/”查找提示,“@”查找文件,“#”查找工具。",
"inputPlaceholder": "随便问点什么。输入“/”查找提示,“@”查找文件,“#”查找工具。",
"Company Name": "深圳果冻移民咨询有限责任公司",
"Clock In": "打卡",
"setup": {
@ -208,7 +208,9 @@
"toolDescriptionPlaceholder": "工具描述...",
"customHeadersLabel": "自定义请求头",
"schemaLabel": "Schema",
"dropFileHere": "将文件拖放到此处"
"dropFileHere": "将文件拖放到此处",
"imageTooLarge": "图片必须小于6MB",
"canvasError": "无法创建画布上下文。"
},
"contentType": {