|
3 | 3 | SettingsService,
|
4 | 4 | SETTINGS_CHANGE_EVENT,
|
5 | 5 | } from "../../services/settings-service";
|
6 |
| -import { ChevronDown, RefreshCw } from "lucide-react"; |
| 6 | +import { ChevronDown, RefreshCw, Settings, Zap } from "lucide-react"; |
7 | 7 | import { useTranslation } from "react-i18next";
|
8 | 8 | import { AIService } from "../../services/ai-service";
|
9 | 9 | import { OPENAI_PROVIDER_NAME } from "../../services/providers/openai-service";
|
@@ -101,38 +101,44 @@ export const ImageGenerationPage = () => {
|
101 | 101 | </div>
|
102 | 102 | )}
|
103 | 103 |
|
104 |
| - <div className="flex flex-row h-full"> |
| 104 | + <div className="flex flex-row justify-center h-full"> |
105 | 105 | {/* Left side - Controls */}
|
106 |
| - <div className="flex-1 p-6 overflow-y-auto frame-right-border"> |
107 |
| - <h1 className="mb-6 text-2xl font-semibold"> |
108 |
| - {t("imageGeneration.title")} |
109 |
| - </h1> |
110 |
| - |
| 106 | + <div className="flex-1 max-w-5xl p-6 overflow-y-auto"> |
111 | 107 | {/* Prompt input */}
|
112 | 108 | <div className="mb-6">
|
113 | 109 | <label className="block mb-2 text-sm font-medium text-gray-700">
|
114 | 110 | {t("imageGeneration.prompt")}
|
115 | 111 | </label>
|
116 |
| - <textarea |
117 |
| - value={prompt} |
118 |
| - onChange={(e) => setPrompt(e.target.value)} |
119 |
| - placeholder={t("imageGeneration.promptPlaceholder")} |
120 |
| - className="w-full p-3 input-box min-h-14" |
121 |
| - rows={4} |
122 |
| - /> |
123 |
| - </div> |
| 112 | + <div className="flex flex-row gap-2"> |
| 113 | + <textarea |
| 114 | + value={prompt} |
| 115 | + onChange={(e) => setPrompt(e.target.value)} |
| 116 | + placeholder={t("imageGeneration.promptPlaceholder")} |
| 117 | + className="w-full p-3 input-box min-h-14" |
| 118 | + rows={1} |
| 119 | + /> |
124 | 120 |
|
125 |
| - {/* Generation button */} |
126 |
| - <div className="flex justify-center mb-6"> |
127 |
| - <button |
128 |
| - onClick={handleGenerateImage} |
129 |
| - disabled={isGenerating || !prompt.trim() || isApiKeyMissing} |
130 |
| - className="px-8 py-2.5 text-white confirm-btn" |
131 |
| - > |
132 |
| - {isGenerating |
133 |
| - ? t("imageGeneration.generating") |
134 |
| - : t("imageGeneration.generateButton")} |
135 |
| - </button> |
| 121 | + <div className="flex flex-row gap-2 p-2 border border-gray-300 rounded-lg shadow-sm"> |
| 122 | + <button |
| 123 | + onClick={handleGenerateImage} |
| 124 | + disabled={isGenerating || !prompt.trim() || isApiKeyMissing} |
| 125 | + className="px-4 py-2.5 text-nowrap flex flex-row gap-1 text-white text-center confirm-btn" |
| 126 | + > |
| 127 | + <Settings></Settings> |
| 128 | + {t("imageGeneration.settingsButton")} |
| 129 | + </button> |
| 130 | + <button |
| 131 | + onClick={handleGenerateImage} |
| 132 | + disabled={isGenerating || !prompt.trim() || isApiKeyMissing} |
| 133 | + className="px-4 py-2.5 text-nowrap flex flex-row gap-1 text-white text-center confirm-btn" |
| 134 | + > |
| 135 | + <Zap></Zap> |
| 136 | + {isGenerating |
| 137 | + ? t("imageGeneration.generating") |
| 138 | + : t("imageGeneration.generateButton")} |
| 139 | + </button> |
| 140 | + </div> |
| 141 | + </div> |
136 | 142 | </div>
|
137 | 143 |
|
138 | 144 | <div className="flex items-center mb-4">
|
@@ -186,7 +192,7 @@ export const ImageGenerationPage = () => {
|
186 | 192 | </div>
|
187 | 193 |
|
188 | 194 | {/* Right side - Results */}
|
189 |
| - <div className="w-[420px] h-full p-6 overflow-y-auto"> |
| 195 | + <div className="hidden w-[420px] h-full p-6 overflow-y-auto"> |
190 | 196 | {/* Provider selection */}
|
191 | 197 | <div className="mb-6">
|
192 | 198 | <label className="block mb-2 text-sm font-medium text-gray-700">
|
|
0 commit comments