Merge pull request #61 from Ember-Moth/main

fix: 服务器编辑时合并协议默认配置
This commit is contained in:
web@ppanel 2025-11-04 19:51:05 -08:00 committed by GitHub
commit 2182400adc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,18 @@
<a name="readme-top"></a>
# Changelog
# [1.6.0](https://github.com/perfect-panel/ppanel-web/compare/v1.5.4...v1.6.0) (2025-10-28)
### ✨ Features
* Add server installation dialog and commands ([4429c9d](https://github.com/perfect-panel/ppanel-web/commit/4429c9d))
### 🐛 Bug Fixes
* Add typeRoots configuration to ensure type definitions are resolved correctly ([ad60ea9](https://github.com/perfect-panel/ppanel-web/commit/ad60ea9))
<a name="readme-top"></a>
# Changelog

View File

@ -356,7 +356,8 @@ export default function ServerForm(props: {
...initialValues,
protocols: PROTOCOLS.map((type) => {
const existingProtocol = initialValues.protocols?.find((p) => p.type === type);
return existingProtocol || getProtocolDefaultConfig(type);
const defaultConfig = getProtocolDefaultConfig(type);
return existingProtocol ? { ...defaultConfig, ...existingProtocol } : defaultConfig;
}),
});
}

View File

@ -1,6 +1,6 @@
{
"name": "ppanel-web",
"version": "1.5.4",
"version": "1.6.0",
"private": true,
"homepage": "https://github.com/perfect-panel/ppanel-web",
"bugs": {