-
Mode
+
模式
{
size="icon"
onClick={() => setShowPromptPanel(false)}
className="h-6 w-6"
- title="Hide Prompt Panel"
+ title="隐藏提示面板"
>
×
@@ -163,7 +189,7 @@ export const PromptComposer: React.FC = () => {
'flex flex-col items-center p-3 rounded-lg border transition-all duration-200',
selectedTool === tool.id
? 'bg-yellow-400/10 border-yellow-400/50 text-yellow-400'
- : 'bg-gray-900 border-gray-700 text-gray-400 hover:bg-gray-800 hover:text-gray-300'
+ : 'bg-white border-yellow-400/50 text-gray-400 hover:bg-yellow-400 hover:text-white'
)}
>
@@ -173,42 +199,69 @@ export const PromptComposer: React.FC = () => {
- {/* File Upload */}
+ {/* 文件上传 */}
-
-
- {selectedTool === 'generate' ? 'Reference Images' : selectedTool === 'edit' ? 'Style References' : 'Upload Image'}
-
- {selectedTool === 'mask' && (
-
Edit an image with masks
- )}
- {selectedTool === 'generate' && (
-
Optional, up to 2 images
- )}
- {selectedTool === 'edit' && (
-
- {canvasImage ? 'Optional style references, up to 2 images' : 'Upload image to edit, up to 2 images'}
-
- )}
-
-
fileInputRef.current?.click()}
- className="w-full"
- disabled={
- (selectedTool === 'generate' && uploadedImages.length >= 2) ||
- (selectedTool === 'edit' && editReferenceImages.length >= 2)
- }
+
-
- Upload
-
+
+ {selectedTool === 'generate' ? '参考图像' : selectedTool === 'edit' ? '样式参考' : '上传图像'}
+
+ {selectedTool === 'mask' && (
+
使用遮罩编辑图像
+ )}
+ {selectedTool === 'generate' && (
+
可选,最多2张图像
+ )}
+ {selectedTool === 'edit' && (
+
+ {canvasImage ? '可选样式参考,最多2张图像' : '上传要编辑的图像,最多2张图像'}
+
+ )}
+
+
+
+
+
+
+
+ {isDragOver ? "释放文件以上传" : "拖拽图像到此处或点击上传"}
+
+
+ 支持 JPG, PNG, GIF 格式
+
+
+
fileInputRef.current?.click()}
+ className="mt-2"
+ disabled={
+ (selectedTool === 'generate' && uploadedImages.length >= 2) ||
+ (selectedTool === 'edit' && editReferenceImages.length >= 2)
+ }
+ >
+
+ 选择文件
+
+
+
{/* Show uploaded images preview */}
{((selectedTool === 'generate' && uploadedImages.length > 0) ||
@@ -218,45 +271,44 @@ export const PromptComposer: React.FC = () => {
selectedTool === 'generate' ? removeUploadedImage(index) : removeEditReferenceImage(index)}
- className="absolute top-1 right-1 bg-gray-900/80 text-gray-400 hover:text-gray-200 rounded-full p-1 transition-colors"
+ className="absolute top-1 right-1 bg-gray-100/80 text-gray-600 hover:text-gray-800 rounded-full p-1 transition-colors"
>
×
-
- Ref {index + 1}
+
+ 参考 {index + 1}
))}
)}
-
- {/* Prompt Input */}
+ {/* 提示输入 */}
-
- {selectedTool === 'generate' ? 'Describe what you want to create' : 'Describe your changes'}
+
+ {selectedTool === 'generate' ? '描述您想要创建的内容' : '描述您的修改'}
- {/* Generate Button */}
+ {/* 生成按钮 */}
{
{isGenerating ? (
<>
- Generating...
+ 生成中...
>
) : (
<>
- {selectedTool === 'generate' ? 'Generate' : 'Apply Edit'}
+ {selectedTool === 'generate' ? '生成' : '应用编辑'}
>
)}
- {/* Advanced Controls */}
+ {/* 高级控制 */}
setShowAdvanced(!showAdvanced)}
- className="flex items-center text-sm text-gray-400 hover:text-gray-300 transition-colors duration-200"
+ className="flex items-center text-sm text-gray-600 hover:text-gray-800 transition-colors duration-200"
>
{showAdvanced ? : }
- {showAdvanced ? 'Hide' : 'Show'} Advanced Controls
+ {showAdvanced ? '隐藏' : '显示'} 高级控制
setShowClearConfirm(!showClearConfirm)}
- className="flex items-center text-sm text-gray-400 hover:text-red-400 transition-colors duration-200 mt-2"
+ className="flex items-center text-sm text-gray-600 hover:text-red-500 transition-colors duration-200 mt-2"
>
- Clear Session
+ 清除会话
{showClearConfirm && (
-
-
- Are you sure you want to clear this session? This will remove all uploads, prompts, and canvas content.
+
+
+ 您确定要清除此会话吗?这将删除所有上传、提示和画布内容。
{
onClick={handleClearSession}
className="flex-1"
>
- Yes, Clear
+ 确认清除
{
onClick={() => setShowClearConfirm(false)}
className="flex-1"
>
- Cancel
+ 取消
@@ -339,10 +391,10 @@ export const PromptComposer: React.FC = () => {
{showAdvanced && (
)}
- {/* Keyboard Shortcuts */}
-
-
Shortcuts
-
+ {/* 键盘快捷键 */}
+
+
快捷键
+
- Generate
+ 生成
⌘ + Enter
- Re-roll
+ 重新生成
⇧ + R
- Edit mode
+ 编辑模式
E
- History
+ 历史记录
H
- Toggle Panel
+ 切换面板
P
- {/* Prompt Hints Modal */}
+ {/* 提示提示模态框 */}
>
);
diff --git a/src/components/PromptHints.tsx b/src/components/PromptHints.tsx
index a10e57e..b1bd46f 100644
--- a/src/components/PromptHints.tsx
+++ b/src/components/PromptHints.tsx
@@ -49,11 +49,11 @@ export const PromptHints: React.FC
= ({ open, onOpenChange })
return (
-
-
+
+
-
- Prompt Quality Tips
+
+ 提示质量技巧
@@ -68,15 +68,15 @@ export const PromptHints: React.FC = ({ open, onOpenChange })
{hint.category}
- {hint.text}
+ {hint.text}
{hint.example}
))}
-
-
- Best practice: Write full sentences that describe the complete scene,
- not just keywords. Think "paint me a picture with words."
+
+
+ 最佳实践: 写完整的句子来描述整个场景,
+ 而不仅仅是关键词。想象"用文字为我画一幅画"。
diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx
index c6ffaf8..e7dae03 100644
--- a/src/components/ui/Button.tsx
+++ b/src/components/ui/Button.tsx
@@ -8,10 +8,10 @@ const buttonVariants = cva(
variants: {
variant: {
default: 'bg-yellow-400 text-gray-900 hover:bg-yellow-300 focus-visible:ring-yellow-400',
- secondary: 'bg-gray-800 text-gray-100 hover:bg-gray-700 focus-visible:ring-gray-600',
- outline: 'border border-gray-600 bg-transparent text-gray-300 hover:bg-gray-800 hover:text-gray-100',
- ghost: 'text-gray-400 hover:bg-gray-800 hover:text-gray-100',
- destructive: 'bg-red-600 text-white hover:bg-red-700 focus-visible:ring-red-500',
+ secondary: 'bg-gray-100 text-gray-900 hover:bg-gray-200 focus-visible:ring-gray-300',
+ outline: 'border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-100 hover:text-gray-900',
+ ghost: 'text-gray-500 hover:bg-gray-100 hover:text-gray-900',
+ destructive: 'bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-400',
},
size: {
default: 'h-10 px-4 py-2',
diff --git a/src/components/ui/Input.tsx b/src/components/ui/Input.tsx
index 89f0fc5..e591590 100644
--- a/src/components/ui/Input.tsx
+++ b/src/components/ui/Input.tsx
@@ -9,7 +9,7 @@ export const Input = React.forwardRef(
(
return (