This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
forked from biuuu/genshin-wish-export
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
97 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
|
||
## TODO | ||
|
||
- [ ] 按需拉取寻访数据 | ||
- [x] 按需拉取寻访数据 | ||
- [ ] 自动定时更新寻访数据 | ||
|
||
## Devlopment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
import * as IconComponents from "@element-plus/icons-vue"; | ||
const weaponTypeNames = new Set([ | ||
'武器', 'Weapon', '무기', 'Arma', 'Arme', 'Оружие', 'อาวุธ', 'Vũ Khí', 'Waffe', 'Senjata' | ||
]) | ||
import { onBeforeUnmount } from 'vue' | ||
import * as IconComponents from '@element-plus/icons-vue' | ||
const { ipcRenderer } = require('electron') | ||
|
||
const characterTypeNames = new Set([ | ||
'角色', 'Character', '캐릭터', 'キャラクター', 'Personaje', 'Personnage', 'Персонажи', 'ตัวละคร', 'Nhân Vật', 'Figur', 'Karakter', 'Personagem' | ||
]) | ||
|
||
const isCharacter = (name) => characterTypeNames.has(name) | ||
const isWeapon = (name) => weaponTypeNames.has(name) | ||
|
||
const IconInstaller = (app) => { | ||
Object.values(IconComponents).forEach(component => { | ||
export const IconInstaller = (app) => { | ||
Object.values(IconComponents).forEach((component) => { | ||
app.component(component.name, component) | ||
}) | ||
} | ||
|
||
export { | ||
isWeapon, isCharacter, IconInstaller | ||
} | ||
/** | ||
* @param {Array<Parameters<import('electron')['ipcRenderer']['on']>>} params | ||
*/ | ||
export const componentSafeIpcRenderOn = (params) => { | ||
params.forEach((args) => { | ||
ipcRenderer.on(...args) | ||
}) | ||
onBeforeUnmount(() => { | ||
params.forEach((args) => { | ||
ipcRenderer.off(...args) | ||
}) | ||
}) | ||
} |
Oops, something went wrong.