Add theme plugin duplicate file check. (#2078)

This commit is contained in:
longpanda
2022-12-20 20:02:06 +08:00
parent bf797ceadb
commit 9b7d6cbc3d
6 changed files with 50 additions and 11 deletions

View File

@@ -403,9 +403,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 +432,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);
}
});
}