X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/3f09fb9a2389c5c212a70feada3206a3cb523c95..b4bb6efd3c36b1eaaa243cf63d1030001c7079d2:/Plugson/www/plugson_theme.html diff --git a/Plugson/www/plugson_theme.html b/Plugson/www/plugson_theme.html index e6f96a0..89f069f 100644 --- a/Plugson/www/plugson_theme.html +++ b/Plugson/www/plugson_theme.html @@ -71,6 +71,50 @@ + +
+
+

resolution_fit + —— 按照分辨率过滤

+
+ +
+
+
+ + + + + + + + + + + + + +
选项设置 +      + +
选项说明当设置多个主题时,在随机选择时是否按照当前分辨率过滤。   + 0 不过滤    + 1 过滤
+ 注意,这个选项必须在上面设置了多个主题配置文件,同时 "默认" 设置为 “随机选择” 时才有效,其他情况下均无效。
+ 关于这个选项的详细解释,请参考 resolution_fit 选项说明 +
Option Description + Filter by current resolution when you set more than one themes.    + 0 No filter    + 1 Filter
+ You can refer About resolution_fit for details about this option. +
+
+
+
@@ -239,6 +283,8 @@ } else { data.display_mode = 0; } + + data.resolution_fit = parseInt($('input:radio[name=id_ctrl_radio_res_fit]:checked').val()); } function VtoySaveCurrentPage() { @@ -249,6 +295,7 @@ method : 'save_theme', index: current_tab_index, display_mode: data.display_mode, + resolution_fit: data.resolution_fit, gfxmode: data.gfxmode, default_file: data.default_file }, function(e) { @@ -269,6 +316,12 @@ var $tbl = $("#id_theme_tbl_file tbody"); $tbl.empty(); + if (list.length > 1) { + $('#resolution_fit_div').show(); + } else { + $('#resolution_fit_div').hide(); + } + for (var i = 0; i < list.length; i++) { var $tr; td1 = '' + (i + 1) + ''; @@ -365,6 +418,8 @@ $('select[id=id_theme_sel_dismode').val('GUI'); } + $('input:radio[name=id_ctrl_radio_res_fit]')[data.resolution_fit].checked = true; + FillThemeFileTable(data.filelist, data.default_file); FillThemeFontTable(data.fontslist); } @@ -403,9 +458,13 @@ index: current_tab_index, path: data.path }, function(e) { - list.push(data); - FillThemeFileTable(list, m_data_theme[current_tab_index].default_file); - Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + if (e.result === 'success') { + list.push(data); + FillThemeFileTable(list, m_data_theme[current_tab_index].default_file); + Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + } else if (e.result === 'duplicate') { + Message.error(g_vtoy_cur_language.STR_DUPLICATE_PATH); + } }); } @@ -428,9 +487,13 @@ index: current_tab_index, path: data.path }, function(e) { - list.push(data); - FillThemeFontTable(list); - Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + if (e.result === 'success') { + list.push(data); + FillThemeFontTable(list); + Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + } else if (e.result === 'duplicate') { + Message.error(g_vtoy_cur_language.STR_DUPLICATE_PATH); + } }); } @@ -507,6 +570,8 @@ $('select[id=id_theme_sel_gfxmode]').change(VtoySaveCurrentPage); $('select[id=id_theme_sel_dismode]').change(VtoySaveCurrentPage); + $('#id_ctrl_radio_res_fit0').change(VtoySaveCurrentPage); + $('#id_ctrl_radio_res_fit1').change(VtoySaveCurrentPage); $('#id_tab_theme a[href="#tab_0"]').click(OnClickMultiModeTab); $('#id_tab_theme a[href="#tab_1"]').click(OnClickMultiModeTab);