feat: import profiles with enter
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
- 修改内核默认日志级别为 Info
|
- 修改内核默认日志级别为 Info
|
||||||
- 支持通过桌面快捷方式重新打开应用
|
- 支持通过桌面快捷方式重新打开应用
|
||||||
- 主界面“当前节点”卡片每 5 分钟自动测试延迟
|
- 主界面“当前节点”卡片每 5 分钟自动测试延迟
|
||||||
|
- 支持订阅界面输入链接后回车导入
|
||||||
|
|
||||||
### 🐞 修复问题
|
### 🐞 修复问题
|
||||||
|
|
||||||
|
|||||||
@@ -1068,6 +1068,16 @@ const ProfilePage = () => {
|
|||||||
value={url}
|
value={url}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onChange={(e) => setUrl(e.target.value)}
|
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")}
|
placeholder={t("Profile URL")}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
input: {
|
input: {
|
||||||
|
|||||||
Reference in New Issue
Block a user