Feature(custom): rewrite upload config and plugin page

This commit is contained in:
Kuingsmile
2025-08-07 14:52:46 +08:00
parent ca95b7aa49
commit a9c7cecd00
29 changed files with 5198 additions and 1801 deletions

View File

@@ -122,12 +122,12 @@ if (db.get(configPaths.settings.miniWindowOntop)) {
}
const renameWindowOptions = {
height: 175,
width: 300,
height: 250,
width: 350,
show: true,
fullscreenable: false,
resizable: false,
vibrancy: 'ultra-dark',
icon: logo,
resizable: true,
webPreferences: {
sandbox: false,
preload: preloadPath,

View File

@@ -74,7 +74,7 @@ const getPluginList = async (): Promise<IPicGoPlugin[]> => {
fullName: pluginList[i],
author: pluginPKG.author.name || pluginPKG.author,
description: pluginPKG.description,
logo: 'file://' + path.join(pluginPath, 'logo.png').split(path.sep).join('/'),
logo: path.join(pluginPath, 'logo.png').split(path.sep).join('/'),
version: pluginPKG.version,
gui,
config: {

View File

@@ -13,6 +13,7 @@ import { uploadChoosedFiles, uploadClipboardFiles } from 'apis/app/uploader/apis
import windowManager from 'apis/app/window/windowManager'
import axios from 'axios'
import { app, dialog, globalShortcut, Notification, protocol, screen, shell } from 'electron'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import updater from 'electron-updater'
import fs from 'fs-extra'
@@ -167,10 +168,17 @@ class LifeCycle {
#onReady () {
const readyFunction = async () => {
if (process.env.NODE_ENV !== 'production') {
installExtension(VUEJS_DEVTOOLS).then(name => {
console.log(`Added Extension: ${JSON.stringify(name)}`)
}).catch(err => {
console.log('An error occurred: ', err)
})
const setwin = windowManager.get(IWindowList.SETTING_WINDOW)
setwin?.webContents?.openDevTools({ mode: 'detach' })
}
windowManager.create(IWindowList.TRAY_WINDOW)
windowManager.create(IWindowList.SETTING_WINDOW)
const setwin = windowManager.get(IWindowList.SETTING_WINDOW)
setwin?.webContents?.openDevTools({ mode: 'detach' })
const isAutoListenClipboard = db.get(configPaths.settings.isAutoListenClipboard) || false
const ClipboardWatcher = clipboardPoll
if (isAutoListenClipboard) {