add hotkey in translator page
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-31 18:02:22 +08:00
parent 6d5a90407d
commit f1d139d9da

View File

@@ -187,8 +187,11 @@ export default function Translator() {
<Navbar></Navbar> <Navbar></Navbar>
<div className="w-screen flex flex-col md:flex-row md:justify-between gap-2 p-2"> <div className="w-screen flex flex-col md:flex-row md:justify-between gap-2 p-2">
<div className="card1 w-full md:w-1/2 flex flex-col-reverse gap-2"> <div className="card1 w-full md:w-1/2 flex flex-col-reverse gap-2">
<div className="textarea1 border-1 border-gray-200 rounded-2xl w-full h-64 p-2"> <div className="textarea1 border border-gray-200 rounded-2xl w-full h-64 p-2">
<textarea <textarea
onKeyDown={(e) => {
if (e.ctrlKey && e.key === "Enter") translate();
}}
onChange={handleInputChange} onChange={handleInputChange}
className="resize-none h-8/12 w-full focus:outline-0" className="resize-none h-8/12 w-full focus:outline-0"
></textarea> ></textarea>