Feature(custom): optimize i18n and platform funcs

This commit is contained in:
Kuingsmile
2025-08-01 13:38:37 +08:00
parent 15e2f11b69
commit 70396c3e5c
38 changed files with 16 additions and 164 deletions

View File

@@ -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 () => {

View File

@@ -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()