Plugson: cap Boot Conf Replace at 2 entries per mode (#3727)

Ventoy only supports replacing up to 2 config files per mode, but
Plugson's Boot Conf Replace page let users add unlimited entries with
no indication that anything past the 2nd is silently ignored. Block
the add action once 2 entries exist for the current tab and show a
warning instead.

Fixes #3593

Co-authored-by: Raj <raj@Rajs-MacBook-Pro.local>
This commit is contained in:
Prajwal Raj
2026-10-09 11:33:26 +08:00
committed by GitHub
co-authored by Raj
parent 2af829d020
commit ca92070fac
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -214,6 +214,11 @@
});
$("#id_conf_replace_tbl").on('click', '.ConfReplaceAddBtn', function() {
if (m_data_conf_replace[current_tab_index].length >= 2) {
Message.error(g_vtoy_cur_language.STR_CONF_REPLACE_MAX_ENTRY);
return;
}
if (g_current_language === 'en') {
$('#ConfReplaceForm #ConfReplaceForm_lang_1').text("ISO Path");
$('#ConfReplaceForm #ConfReplaceForm_lang_2').text(" OK");