Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: select the saved net interface #628

Merged
merged 2 commits into from
Mar 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions web/writing.html
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,14 @@ <h5 class="portlet__head">Webhook</h5>
selectElement.removeChild(selectElement.lastChild)
}
document.getElementById(`${label}_netInterface_select`).appendChild(df)
// 选中已保存的IPv4网卡
if (label === "ipv4") {
document.getElementById(`${label}_netInterface_select`).value = dnsConf[index].Ipv4NetInterface ? dnsConf[index].Ipv4NetInterface : interfaces[0].Name
}
// 选中已保存的IPv6网卡
if (label === "ipv6") {
document.getElementById(`${label}_netInterface_select`).value = dnsConf[index].Ipv6NetInterface ? dnsConf[index].Ipv6NetInterface : interfaces[0].Name
}
} else {
document.getElementById(`${label}_url_help`).innerHTML = '<span style="color: red">没有找到可用的网卡</span>'
}
Expand Down