mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2025-04-21 07:50:19 +08:00
feat(uigf): support multiple account export
This commit is contained in:
@ -91,7 +91,7 @@ import Setting from './components/Setting.vue'
|
||||
import gachaDetail from './gachaDetail'
|
||||
import { version } from '../../package.json'
|
||||
import gachaType from '../gachaType.json'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const state = reactive({
|
||||
status: 'init',
|
||||
@ -239,7 +239,37 @@ const saveExcel = async () => {
|
||||
}
|
||||
|
||||
const exportUIGFJSON = () => {
|
||||
ipcRenderer.invoke('EXPORT_UIGF_JSON')
|
||||
let uidList = []
|
||||
dataMap.value.forEach(item => {
|
||||
uidList.push(item.uid)
|
||||
})
|
||||
|
||||
ElMessageBox({
|
||||
title: state.i18n.ui.uigf.title,
|
||||
message: `
|
||||
<div>
|
||||
${uidList.map(uid => `
|
||||
<div>
|
||||
<input type="checkbox" id="${uid}" value="${uid}" />
|
||||
<label for="${uid}">${uid}</label>
|
||||
</div>
|
||||
`).join('')}
|
||||
</div>
|
||||
`,
|
||||
dangerouslyUseHTMLString: true,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: state.i18n.ui.common.ok,
|
||||
cancelButtonText: state.i18n.ui.common.cancel,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
const selected_uids = uidList.filter(uid => document.getElementById(uid).checked);
|
||||
ipcRenderer.invoke('EXPORT_UIGF_JSON', selected_uids);
|
||||
}
|
||||
done();
|
||||
}
|
||||
}).then(() => {
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
const exportCommand = (type) => {
|
||||
@ -249,7 +279,6 @@ const exportCommand = (type) => {
|
||||
exportUIGFJSON()
|
||||
}
|
||||
}
|
||||
|
||||
const openCacheFolder = async () => {
|
||||
await ipcRenderer.invoke('OPEN_CACHE_FOLDER')
|
||||
}
|
||||
|
Reference in New Issue
Block a user