X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/4bf43ab9d4e6b724836724c1d514760d164df79a..102b179cd99ebffd9372ca52b18c1b2d8f4e2fb7:/Plugson/www/plugson_password.html diff --git a/Plugson/www/plugson_password.html b/Plugson/www/plugson_password.html index 0f25bdd..3b96880 100644 --- a/Plugson/www/plugson_password.html +++ b/Plugson/www/plugson_password.html @@ -1,10 +1,12 @@
-
+
 

- +
+ +
@@ -162,7 +164,7 @@ } function CommonPasswordEntry(tbl, name, cn, en) { - var tr = ''+name+'' + + var tr = ''+name+'' + '  ' + '' + '' + cn + '' + @@ -234,7 +236,7 @@ } current_tab_index = index; - VtoyFillCurrentPageItem(m_data_pwd[index].tips); + VtoyFillCurrentPageItem(m_data_pwd[index]); } function VtoyGetCurrentPageItem(data) { @@ -462,9 +464,13 @@ function VtoySetPassword(common, type, cb, data) { path: data.path, pwd: data.pwd }, function(e) { - list.push(data); - FillMenuPwdTable(list); - Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + if (e.result === 'success') { + list.push(data); + FillMenuPwdTable(list); + Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + } else if (e.result === 'duplicate') { + Message.error(g_vtoy_cur_language.STR_DUPLICATE_PATH); + } }); } @@ -557,6 +563,27 @@ function VtoySetPassword(common, type, cb, data) { $('#id_tab_password a[href="#tab_4"]').click(OnClickMultiModeTab); $('#id_tab_password a[href="#tab_5"]').click(OnClickMultiModeTab); + function UpdateTabTitleIcon(data) { + CommonUpdateTabTitleIcon(data.exist_password, '#id_tab_password a[href="#tab_', 'password'); + } + $('#id_btn_reset').click(function() { + Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'password')}).on(function(e) { + if (e) { + callVtoySync({ + method : 'password_del', + index: current_tab_index, + path: g_del_all_path + }, function(data) { + + }); + + m_data_pwd[current_tab_index].list.length = 0; + VtoyFillCurrentPageItem(m_data_pwd[g_vtoy_data_default_index]); + VtoySaveCurrentPage(); + } + }); + }); + $('#id_tab_password a[href="#tab_0"]').tab('show'); VtoyFillCurrentPageItem(m_data_pwd[0]); VtoyPageLanguageChange(g_current_language);