feat: import profiles with enter
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
- 修改内核默认日志级别为 Info
|
||||
- 支持通过桌面快捷方式重新打开应用
|
||||
- 主界面“当前节点”卡片每 5 分钟自动测试延迟
|
||||
- 支持订阅界面输入链接后回车导入
|
||||
|
||||
### 🐞 修复问题
|
||||
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user