mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-02 22:31:49 +08:00
✨ Feature(custom): optimize i18n and platform funcs
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import picgo from '@core/picgo'
|
||||
import { app, IpcMainEvent, shell } from 'electron'
|
||||
import { app, shell } from 'electron'
|
||||
|
||||
import { IRPCActionType } from '#/types/enum'
|
||||
import { IIPCEvent } from '#/types/rpc'
|
||||
import { i18nManager } from '~/i18n'
|
||||
|
||||
export default [
|
||||
{
|
||||
action: IRPCActionType.GET_PLATFORM,
|
||||
handler: async (event: IIPCEvent) => {
|
||||
(event as IpcMainEvent).returnValue = process.platform
|
||||
}
|
||||
},
|
||||
{
|
||||
action: IRPCActionType.RELOAD_APP,
|
||||
handler: async () => {
|
||||
|
||||
@@ -4,8 +4,8 @@ import path from 'node:path'
|
||||
import { dbPathChecker } from '@core/datastore/dbChecker'
|
||||
import fs from 'fs-extra'
|
||||
import yaml from 'js-yaml'
|
||||
import { ILocales } from 'root/src/universal/types/i18n'
|
||||
|
||||
import { ILocales } from '#/types/i18n'
|
||||
import { i18nManager } from '~/i18n'
|
||||
|
||||
const configPath = dbPathChecker()
|
||||
|
||||
Reference in New Issue
Block a user