Skip to content

Commit 0f67d33

Browse files
committed
fix(agent-tars-web-ui): submit button position
1 parent 601df3e commit 0f67d33

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

multimodal/agent-tars-web-ui/src/v2/components/Welcome/WelcomePage.tsx

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -198,40 +198,42 @@ const WelcomePage: React.FC = () => {
198198
/>
199199

200200
{/* Submit button */}
201-
<motion.button
202-
whileTap={{ scale: 0.95 }}
203-
type="submit"
204-
disabled={!query.trim() || isLoading || isDirectChatLoading}
205-
className={`absolute right-3 top-1/2 transform -translate-y-1/2 p-3 rounded-xl transition-all duration-200 ${
206-
!query.trim() || isLoading || isDirectChatLoading
207-
? 'bg-gray-100 dark:bg-gray-700 text-gray-400 cursor-not-allowed'
208-
: 'bg-gradient-to-r from-indigo-500 to-purple-600 text-white shadow-md'
209-
}`}
210-
>
211-
{isLoading ? (
212-
<motion.div
213-
animate={{ rotate: 360 }}
214-
transition={{ duration: 1, repeat: Infinity, ease: 'linear' }}
215-
>
216-
<svg
217-
className="w-6 h-6"
218-
viewBox="0 0 24 24"
219-
fill="none"
220-
xmlns="http://www.w3.org/2000/svg"
201+
<div className="absolute right-3 inset-y-0 flex items-center">
202+
<motion.button
203+
whileTap={{ scale: 0.95 }}
204+
type="submit"
205+
disabled={!query.trim() || isLoading || isDirectChatLoading}
206+
className={`p-3 rounded-xl transition-all duration-200 ${
207+
!query.trim() || isLoading || isDirectChatLoading
208+
? 'bg-gray-100 dark:bg-gray-700 text-gray-400 cursor-not-allowed'
209+
: 'bg-gradient-to-r from-indigo-500 to-purple-600 text-white shadow-md'
210+
}`}
211+
>
212+
{isLoading ? (
213+
<motion.div
214+
animate={{ rotate: 360 }}
215+
transition={{ duration: 1, repeat: Infinity, ease: 'linear' }}
221216
>
222-
<path
223-
d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12"
224-
stroke="currentColor"
225-
strokeWidth="2"
226-
strokeLinecap="round"
227-
strokeLinejoin="round"
228-
/>
229-
</svg>
230-
</motion.div>
231-
) : (
232-
<FiArrowRight size={20} />
233-
)}
234-
</motion.button>
217+
<svg
218+
className="w-6 h-6"
219+
viewBox="0 0 24 24"
220+
fill="none"
221+
xmlns="http://www.w3.org/2000/svg"
222+
>
223+
<path
224+
d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12"
225+
stroke="currentColor"
226+
strokeWidth="2"
227+
strokeLinecap="round"
228+
strokeLinejoin="round"
229+
/>
230+
</svg>
231+
</motion.div>
232+
) : (
233+
<FiArrowRight size={20} />
234+
)}
235+
</motion.button>
236+
</div>
235237
</div>
236238
</div>
237239

0 commit comments

Comments
 (0)