Skip to content

Commit

Permalink
✨ Feature(custom): refactor all main ipc event
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Jun 12, 2024
1 parent 106290f commit 5ddc182
Show file tree
Hide file tree
Showing 91 changed files with 1,924 additions and 1,806 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"got": "^12.6.0",
"highlight.js": "^11.9.0",
"hpagent": "^1.2.0",
"keycode": "^2.2.0",
"lowdb": "^1.0.0",
"marked": "^9.1.5",
"mime-types": "^2.1.35",
Expand Down
3 changes: 2 additions & 1 deletion public/i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ LANG_DISPLAY_LABEL: 'English'
ABOUT: About
OPEN_MAIN_WINDOW: Open Main Window
OPEN_MINI_WINDOW: Open Mini Window
HIDE_MINI_WINDOW: Hide Mini Window
CHOOSE_DEFAULT_PICBED: Choose Default Picbed
OPEN_UPDATE_HELPER: Open Update Helper
RELOAD_APP: Reload App
Expand Down Expand Up @@ -311,7 +312,7 @@ SETTINGS_SYNC_MANAGE_CONFIG: Manage configuration
SETTINGS_AUTO_IMPORT: Auto import config in manage page
SETTINGS_AUTO_IMPORT_SELECT_PICBED: Select picbed
SETTINGS_TAB_SYSTEM: System
SETTINGS_TAB_SYNC_CONFIG: Sync and Configuration
SETTINGS_TAB_SYNC_CONFIG: Configuration
SETTINGS_TAB_UPLOAD: Upload
SETTINGS_TAB_ADVANCED: Advanced
SETTINGS_TAB_UPDATE: Update
Expand Down
1 change: 1 addition & 0 deletions public/i18n/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ LANG_DISPLAY_LABEL: 中文
ABOUT: 关于
OPEN_MAIN_WINDOW: 打开主窗口
OPEN_MINI_WINDOW: 打开mini窗口
HIDE_MINI_WINDOW: 隐藏mini窗口
CHOOSE_DEFAULT_PICBED: 选择默认图床
OPEN_UPDATE_HELPER: 打开更新助手
RELOAD_APP: 重启应用
Expand Down
1 change: 1 addition & 0 deletions public/i18n/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ LANG_DISPLAY_LABEL: 繁體中文
ABOUT: 關於
OPEN_MAIN_WINDOW: 打開主視窗
OPEN_MINI_WINDOW: 打開mini視窗
HIDE_MINI_WINDOW: 隱藏mini視窗
CHOOSE_DEFAULT_PICBED: 選擇預設圖床
OPEN_UPDATE_HELPER: 開啟更新助手
RELOAD_APP: 重啟程式
Expand Down
8 changes: 2 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,24 @@ import db from '@/utils/db'
import { T } from '@/i18n/index'
import { store } from '@/store'
import { initTalkingData } from '@/utils/analytic'
import { getConfig, saveConfig, triggerRPC } from '@/utils/dataSender'
import { mainMixin } from '@/utils/mainMixin'
import { dragMixin } from '@/utils/mixin'
import { sendToMain } from '@/utils/common'
import { sendRPC, sendToMain, triggerRPC } from '@/utils/common'

webFrame.setVisualZoomLevelLimits(1, 1)

const app = createApp(App)

app.config.globalProperties.$$db = db
app.config.globalProperties.$T = T
app.config.globalProperties.getConfig = getConfig
app.config.globalProperties.triggerRPC = triggerRPC
app.config.globalProperties.saveConfig = saveConfig
app.config.globalProperties.sendRPC = sendRPC
app.config.globalProperties.sendToMain = sendToMain

app.mixin(mainMixin)
app.mixin(dragMixin)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

app.use(VueLazyLoad, {
error: `file://${__static.replace(/\\/g, '/')}/unknown-file-type.svg`
})
Expand All @@ -52,5 +49,4 @@ console.log(hljsCommon.highlightAuto('<h1>Highlight.js has been registered succe
app.use(hljsVuePlugin)
app.use(VueVideoPlayer)
app.mount('#app')

initTalkingData()
Loading

0 comments on commit 5ddc182

Please sign in to comment.