feat: import profiles with enter

This commit is contained in:
Slinetrac
2025-10-14 15:54:26 +08:00
parent 2ba2f4d42c
commit 98527d5038
2 changed files with 11 additions and 0 deletions

View File

@@ -1068,6 +1068,16 @@ const ProfilePage = () => {
value={url}
variant="outlined"
onChange={(e) => setUrl(e.target.value)}
onKeyDown={(event) => {
if (event.key !== "Enter" || event.nativeEvent.isComposing) {
return;
}
if (!url || disabled || loading) {
return;
}
event.preventDefault();
void onImport();
}}
placeholder={t("Profile URL")}
slotProps={{
input: {