feat: Support export as Star Rail Gacha Log Format file (#39)

This commit is contained in:
TremblingMoeNew
2023-06-29 15:02:36 +08:00
committed by GitHub
parent f2592040cb
commit 4ab2f60b53
11 changed files with 38 additions and 42 deletions

View File

@ -4,6 +4,7 @@
<div>
<el-button type="primary" :icon="state.status === 'init' ? 'milk-tea': 'refresh-right'" class="focus:outline-none" :disabled="!allowClick()" plain @click="fetchData()" :loading="state.status === 'loading'">{{state.status === 'init' ? ui.button.load: ui.button.update}}</el-button>
<el-button icon="folder-opened" @click="saveExcel" class="focus:outline-none" :disabled="!gachaData" type="success" plain>{{ui.button.excel}}</el-button>
<el-button icon="folder-opened" @click="exportSRGFJSON" class="focus:outline-none" :disabled="!gachaData" type="success" plain>{{ui.button.srgf}}</el-button>
<el-tooltip v-if="detail && state.status !== 'loading'" :content="ui.hint.newAccount" placement="bottom">
<el-button @click="newUser()" plain icon="plus" class="focus:outline-none"></el-button>
</el-tooltip>
@ -227,6 +228,10 @@ const saveExcel = async () => {
await ipcRenderer.invoke('SAVE_EXCEL')
}
const exportSRGFJSON = () => {
ipcRenderer.invoke('EXPORT_SRGF_JSON')
}
const openCacheFolder = async () => {
await ipcRenderer.invoke('OPEN_CACHE_FOLDER')
}