mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🔨 Refactor(custom): change type defination in universal to global
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends": ["config:recommended"]
|
||||||
"config:recommended"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { app, clipboard, dialog, shell } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { gte, lte } from 'semver'
|
import { gte, lte } from 'semver'
|
||||||
|
|
||||||
import type { IRemoteNotice, IRemoteNoticeAction, IRemoteNoticeLocalCountStorage } from '#/types/types'
|
|
||||||
import { showNotification } from '~/utils/common'
|
import { showNotification } from '~/utils/common'
|
||||||
import { IRemoteNoticeActionType, IRemoteNoticeTriggerCount } from '~/utils/enum'
|
import { IRemoteNoticeActionType, IRemoteNoticeTriggerCount } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,6 @@ import shortKeyService from 'apis/app/shortKey/shortKeyService'
|
|||||||
import GuiApi from 'apis/gui'
|
import GuiApi from 'apis/gui'
|
||||||
import { globalShortcut } from 'electron'
|
import { globalShortcut } from 'electron'
|
||||||
|
|
||||||
import type {
|
|
||||||
IKeyCommandType,
|
|
||||||
IPluginShortKeyConfig,
|
|
||||||
IShortKeyConfig,
|
|
||||||
IShortKeyConfigs,
|
|
||||||
IShortKeyHandler,
|
|
||||||
} from '#/types/types'
|
|
||||||
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import logger from '@core/picgo/logger'
|
import logger from '@core/picgo/logger'
|
||||||
|
|
||||||
import type { IShortKeyHandler } from '#/types/types'
|
|
||||||
|
|
||||||
class ShortKeyService {
|
class ShortKeyService {
|
||||||
private commandList = new Map<string, IShortKeyHandler>()
|
private commandList = new Map<string, IShortKeyHandler>()
|
||||||
registerCommand(command: string, handler: IShortKeyHandler) {
|
registerCommand(command: string, handler: IShortKeyHandler) {
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import fs from 'fs-extra'
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import pkg from 'root/package.json'
|
import pkg from 'root/package.json'
|
||||||
|
|
||||||
import type { IBounds, ImgInfo } from '#/types/types'
|
|
||||||
import { buildPicBedListMenu } from '~/events/remotes/menu'
|
import { buildPicBedListMenu } from '~/events/remotes/menu'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import clipboardPoll from '~/utils/clipboardPoll'
|
import clipboardPoll from '~/utils/clipboardPoll'
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import fs from 'fs-extra'
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import type { IPicGo } from 'piclist'
|
import type { IPicGo } from 'piclist'
|
||||||
|
|
||||||
import type { IFileWithPath, ImgInfo, IStringKeyMap, IUploadOption } from '#/types/types'
|
|
||||||
import { T as $t } from '~/i18n/index'
|
import { T as $t } from '~/i18n/index'
|
||||||
import { handleCopyUrl, handleUrlEncodeWithSetting } from '~/utils/common'
|
import { handleCopyUrl, handleUrlEncodeWithSetting } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import fs from 'fs-extra'
|
|||||||
import type { IPicGo } from 'piclist'
|
import type { IPicGo } from 'piclist'
|
||||||
import writeFile from 'write-file-atomic'
|
import writeFile from 'write-file-atomic'
|
||||||
|
|
||||||
import type { ImgInfo, IUploadOption } from '#/types/types'
|
|
||||||
import { GET_RENAME_FILE_NAME, RENAME_FILE_NAME } from '~/events/constant'
|
import { GET_RENAME_FILE_NAME, RENAME_FILE_NAME } from '~/events/constant'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { getClipboardFilePath, showNotification } from '~/utils/common'
|
import { getClipboardFilePath, showNotification } from '~/utils/common'
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import { CREATE_APP_MENU } from '@core/bus/constants'
|
|||||||
import db from '@core/datastore'
|
import db from '@core/datastore'
|
||||||
import { app, BrowserWindow, Rectangle } from 'electron'
|
import { app, BrowserWindow, Rectangle } from 'electron'
|
||||||
|
|
||||||
import type { IWindowListItem } from '#/types/electron'
|
|
||||||
import type { IBrowserWindowOptions } from '#/types/types'
|
|
||||||
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import windowList from 'apis/app/window/windowList'
|
import windowList from 'apis/app/window/windowList'
|
||||||
import { BrowserWindow } from 'electron'
|
import { BrowserWindow } from 'electron'
|
||||||
|
|
||||||
import type { IWindowListItem, IWindowManager } from '#/types/electron'
|
|
||||||
import { IWindowList } from '~/utils/enum'
|
import { IWindowList } from '~/utils/enum'
|
||||||
|
|
||||||
class WindowManager implements IWindowManager {
|
class WindowManager implements IWindowManager {
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import {
|
|||||||
} from '@core/bus/constants'
|
} from '@core/bus/constants'
|
||||||
import bus from '@core/bus/index'
|
import bus from '@core/bus/index'
|
||||||
|
|
||||||
import type { IFileWithPath } from '#/types/types'
|
|
||||||
|
|
||||||
export const uploadWithClipboardFiles = (): Promise<{
|
export const uploadWithClipboardFiles = (): Promise<{
|
||||||
success: boolean
|
success: boolean
|
||||||
result?: string[]
|
result?: string[]
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { debounce } from 'lodash-es'
|
|||||||
import { PicGo } from 'piclist'
|
import { PicGo } from 'piclist'
|
||||||
import pkg from 'root/package.json'
|
import pkg from 'root/package.json'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const CONFIG_PATH = dbPathChecker()
|
const CONFIG_PATH = dbPathChecker()
|
||||||
|
|
||||||
dbChecker()
|
dbChecker()
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import util from 'node:util'
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { ILogArgvTypeWithError } from '#/types/types'
|
|
||||||
|
|
||||||
const MB = 1024 * 1024
|
const MB = 1024 * 1024
|
||||||
const DEFAULT_LOG_FILE_SIZE_LIMIT = 10 * MB
|
const DEFAULT_LOG_FILE_SIZE_LIMIT = 10 * MB
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import OSS from 'ali-oss'
|
import OSS from 'ali-oss'
|
||||||
|
|
||||||
import type { IAliYunConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import AlistApi from '~/apis/delete/alist'
|
import AlistApi from '~/apis/delete/alist'
|
||||||
import AlistplistApi from '~/apis/delete/alistplist'
|
import AlistplistApi from '~/apis/delete/alistplist'
|
||||||
import AliyunApi from '~/apis/delete/aliyun'
|
import AliyunApi from '~/apis/delete/aliyun'
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { getRawData } from '~/utils/common'
|
import { getRawData } from '~/utils/common'
|
||||||
import { removeFileFromS3InMain } from '~/utils/deleteFunc'
|
import { removeFileFromS3InMain } from '~/utils/deleteFunc'
|
||||||
import { deleteFailedLog } from '~/utils/deleteLog'
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { getRawData } from '~/utils/common'
|
import { getRawData } from '~/utils/common'
|
||||||
import { removeFileFromDogeInMain } from '~/utils/deleteFunc'
|
import { removeFileFromDogeInMain } from '~/utils/deleteFunc'
|
||||||
import { deleteFailedLog } from '~/utils/deleteLog'
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Octokit } from '@octokit/rest'
|
import { Octokit } from '@octokit/rest'
|
||||||
|
|
||||||
import type { IGitHubConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { getRawData } from '~/utils/common'
|
import { getRawData } from '~/utils/common'
|
||||||
import { removeFileFromHuaweiInMain } from '~/utils/deleteFunc'
|
import { removeFileFromHuaweiInMain } from '~/utils/deleteFunc'
|
||||||
import { deleteFailedLog } from '~/utils/deleteLog'
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import axios, { AxiosResponse } from 'axios'
|
import axios, { AxiosResponse } from 'axios'
|
||||||
|
|
||||||
import type { IImgurConfig } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import https from 'node:https'
|
|||||||
|
|
||||||
import axios, { AxiosResponse } from 'axios'
|
import axios, { AxiosResponse } from 'axios'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
export default class LskyplistApi {
|
export default class LskyplistApi {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import axios, { AxiosResponse } from 'axios'
|
import axios, { AxiosResponse } from 'axios'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
export default class PiclistApi {
|
export default class PiclistApi {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import qiniu from 'qiniu'
|
import qiniu from 'qiniu'
|
||||||
|
|
||||||
import type { IQiniuConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
fileName: string
|
fileName: string
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { getRawData } from '~/utils/common'
|
import { getRawData } from '~/utils/common'
|
||||||
import { removeFileFromSFTPInMain } from '~/utils/deleteFunc'
|
import { removeFileFromSFTPInMain } from '~/utils/deleteFunc'
|
||||||
import { deleteFailedLog } from '~/utils/deleteLog'
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import axios, { AxiosResponse } from 'axios'
|
import axios, { AxiosResponse } from 'axios'
|
||||||
|
|
||||||
import type { ISMMSConfig } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import COS from 'cos-nodejs-sdk-v5'
|
import COS from 'cos-nodejs-sdk-v5'
|
||||||
|
|
||||||
import type { ITcYunConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
fileName: string
|
fileName: string
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import Upyun from 'upyun'
|
import Upyun from 'upyun'
|
||||||
|
|
||||||
import type { IUpYunConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
interface IConfigMap {
|
interface IConfigMap {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { AuthType, createClient, WebDAVClientOptions } from 'webdav'
|
import { AuthType, createClient, WebDAVClientOptions } from 'webdav'
|
||||||
|
|
||||||
import type { IWebdavPlistConfig, PartialKeys } from '#/types/types'
|
|
||||||
import { formatEndpoint } from '~/utils/common'
|
import { formatEndpoint } from '~/utils/common'
|
||||||
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
import { deleteFailedLog, deleteLog } from '~/utils/deleteLog'
|
||||||
|
|
||||||
|
|||||||
@@ -8,16 +8,6 @@ import { BrowserWindow, dialog, ipcMain, IpcMainEvent, MessageBoxOptions, Notifi
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
import type {
|
|
||||||
IGuiApi,
|
|
||||||
ImgInfo,
|
|
||||||
IShowFileExplorerOption,
|
|
||||||
IShowInputBoxOption,
|
|
||||||
IShowMessageBoxOption,
|
|
||||||
IShowMessageBoxResult,
|
|
||||||
IShowNotificationOption,
|
|
||||||
IUploadOption,
|
|
||||||
} from '#/types/types'
|
|
||||||
import { SHOW_INPUT_BOX } from '~/events/constant'
|
import { SHOW_INPUT_BOX } from '~/events/constant'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { handleCopyUrl } from '~/utils/common'
|
import { handleCopyUrl } from '~/utils/common'
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { createMenu } from 'apis/app/system'
|
|||||||
import { uploadChoosedFiles, uploadClipboardFiles } from 'apis/app/uploader/apis'
|
import { uploadChoosedFiles, uploadClipboardFiles } from 'apis/app/uploader/apis'
|
||||||
import windowManager from 'apis/app/window/windowManager'
|
import windowManager from 'apis/app/window/windowManager'
|
||||||
|
|
||||||
import type { IFileWithPath } from '#/types/types'
|
|
||||||
import { IWindowList } from '~/utils/enum'
|
import { IWindowList } from '~/utils/enum'
|
||||||
|
|
||||||
function initEventCenter() {
|
function initEventCenter() {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { app, BrowserWindow, dialog, Menu, MenuItem, MenuItemConstructorOptions,
|
|||||||
import { PicGo as PicGoCore } from 'piclist'
|
import { PicGo as PicGoCore } from 'piclist'
|
||||||
import pkg from 'root/package.json'
|
import pkg from 'root/package.json'
|
||||||
|
|
||||||
import type { IPicGoPlugin, IUploaderConfig } from '#/types/types'
|
|
||||||
import {
|
import {
|
||||||
PICGO_CONFIG_PLUGIN,
|
PICGO_CONFIG_PLUGIN,
|
||||||
PICGO_HANDLE_PLUGIN_DONE,
|
PICGO_HANDLE_PLUGIN_DONE,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import logger from '@core/picgo/logger'
|
import logger from '@core/picgo/logger'
|
||||||
import { ipcMain, IpcMainEvent, IpcMainInvokeEvent } from 'electron'
|
import { ipcMain, IpcMainEvent, IpcMainInvokeEvent } from 'electron'
|
||||||
|
|
||||||
import type { IRPCRoutes, IRPCServer } from '#/types/rpc'
|
|
||||||
import { RPC_ACTIONS, RPC_ACTIONS_INVOKE } from '~/events/constant'
|
import { RPC_ACTIONS, RPC_ACTIONS_INVOKE } from '~/events/constant'
|
||||||
import { galleryRouter } from '~/events/rpc/routes/gallery'
|
import { galleryRouter } from '~/events/rpc/routes/gallery'
|
||||||
import { manageRouter } from '~/events/rpc/routes/manage'
|
import { manageRouter } from '~/events/rpc/routes/manage'
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { IRPCHandler, IRPCRouter, IRPCRoutes } from '#/types/rpc'
|
|
||||||
import { IRPCType } from '~/utils/enum'
|
import { IRPCType } from '~/utils/enum'
|
||||||
|
|
||||||
interface IBatchAddParams {
|
interface IBatchAddParams {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import picgo from '@core/picgo'
|
|||||||
import GuiApi from 'apis/gui'
|
import GuiApi from 'apis/gui'
|
||||||
import { clipboard } from 'electron'
|
import { clipboard } from 'electron'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { ImgInfo } from '#/types/types'
|
|
||||||
import { RPCRouter } from '~/events/rpc/router'
|
import { RPCRouter } from '~/events/rpc/router'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
import { ICOREBuildInEvent, IPasteStyle, IRPCActionType, IRPCType } from '~/utils/enum'
|
import { ICOREBuildInEvent, IPasteStyle, IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { ManageApi } from '~/manage/manageApi'
|
import { ManageApi } from '~/manage/manageApi'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IObj } from '#/types/types'
|
|
||||||
import getManageApi from '~/manage/Main'
|
import getManageApi from '~/manage/Main'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import path from 'node:path'
|
|||||||
import { app, dialog, shell } from 'electron'
|
import { app, dialog, shell } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { downloadFileFromUrl } from '~/manage/utils/common'
|
import { downloadFileFromUrl } from '~/manage/utils/common'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import ALLApi from 'apis/delete/allApi'
|
import ALLApi from 'apis/delete/allApi'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { ImgInfo } from '#/types/types'
|
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import picgo from '@core/picgo'
|
import picgo from '@core/picgo'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { RPCRouter } from '~/events/rpc/router'
|
import { RPCRouter } from '~/events/rpc/router'
|
||||||
import deleteRoutes from '~/events/rpc/routes/picbed/delete'
|
import deleteRoutes from '~/events/rpc/routes/picbed/delete'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import { dialog, shell } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { IGuiMenuItem, PicGo as PicGoCore } from 'piclist'
|
import { IGuiMenuItem, PicGo as PicGoCore } from 'piclist'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IDispose, IPicGoPlugin } from '#/types/types'
|
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { handleStreamlinePluginName, showNotification, simpleClone } from '~/utils/common'
|
import { handleStreamlinePluginName, showNotification, simpleClone } from '~/utils/common'
|
||||||
import { ICOREBuildInEvent, IPicGoHelperType, IWindowList } from '~/utils/enum'
|
import { ICOREBuildInEvent, IPicGoHelperType, IWindowList } from '~/utils/enum'
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import picgo from '@core/picgo'
|
|||||||
import { IpcMainEvent, shell } from 'electron'
|
import { IpcMainEvent, shell } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IObj } from '#/types/types'
|
|
||||||
import { isAutoStartEnabled, setAutoStart } from '~/utils/autoStart'
|
import { isAutoStartEnabled, setAutoStart } from '~/utils/autoStart'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import bus from '@core/bus'
|
|||||||
import shortKeyHandler from 'apis/app/shortKey/shortKeyHandler'
|
import shortKeyHandler from 'apis/app/shortKey/shortKeyHandler'
|
||||||
import { Notification } from 'electron'
|
import { Notification } from 'electron'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IShortKeyConfig } from '#/types/types'
|
|
||||||
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
import { TOGGLE_SHORTKEY_MODIFIED_MODE } from '~/events/constant'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import picgo from '@core/picgo'
|
import picgo from '@core/picgo'
|
||||||
import { app, shell } from 'electron'
|
import { app, shell } from 'electron'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import { i18nManager } from '~/i18n'
|
import { i18nManager } from '~/i18n'
|
||||||
import { IRPCActionType } from '~/utils/enum'
|
import { IRPCActionType } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import windowManager from 'apis/app/window/windowManager'
|
import windowManager from 'apis/app/window/windowManager'
|
||||||
import { app, BrowserWindow } from 'electron'
|
import { app, BrowserWindow } from 'electron'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IMiniWindowPos, IPicGoPlugin } from '#/types/types'
|
|
||||||
import {
|
import {
|
||||||
buildMainPageMenu,
|
buildMainPageMenu,
|
||||||
buildMiniPageMenu,
|
buildMiniPageMenu,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import path from 'node:path'
|
|||||||
import { dbPathChecker, defaultConfigPath } from '@core/datastore/dbChecker'
|
import { dbPathChecker, defaultConfigPath } from '@core/datastore/dbChecker'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IToolboxCheckerMap, IToolboxFixMap } from '#/types/rpc'
|
|
||||||
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { dbPathChecker } from '@core/datastore/dbChecker'
|
|||||||
import type { IpcMainEvent } from 'electron'
|
import type { IpcMainEvent } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IToolboxCheckerMap, IToolboxFixMap } from '#/types/rpc'
|
|
||||||
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import fs from 'fs-extra'
|
|||||||
import { IConfig } from 'piclist'
|
import { IConfig } from 'piclist'
|
||||||
import tunnel from 'tunnel'
|
import tunnel from 'tunnel'
|
||||||
|
|
||||||
import type { IToolboxCheckerMap } from '#/types/rpc'
|
|
||||||
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
import { sendToolboxResWithType } from '~/events/rpc/routes/toolbox/utils'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
import { IToolboxItemCheckStatus, IToolboxItemType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { IpcMainEvent } from 'electron'
|
import { IpcMainEvent } from 'electron'
|
||||||
|
|
||||||
import type { IToolboxCheckArgs, IToolboxCheckerMap, IToolboxFixMap } from '#/types/rpc'
|
|
||||||
import { RPCRouter } from '~/events/rpc/router'
|
import { RPCRouter } from '~/events/rpc/router'
|
||||||
import { checkClipboardUploadMap, fixClipboardUploadMap } from '~/events/rpc/routes/toolbox/checkClipboardUpload'
|
import { checkClipboardUploadMap, fixClipboardUploadMap } from '~/events/rpc/routes/toolbox/checkClipboardUpload'
|
||||||
import { checkFileMap, fixFileMap } from '~/events/rpc/routes/toolbox/checkFile'
|
import { checkFileMap, fixFileMap } from '~/events/rpc/routes/toolbox/checkFile'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { IpcMainEvent } from 'electron'
|
import { IpcMainEvent } from 'electron'
|
||||||
|
|
||||||
import type { IToolboxCheckRes } from '#/types/rpc'
|
|
||||||
import { IRPCActionType } from '~/utils/enum'
|
import { IRPCActionType } from '~/utils/enum'
|
||||||
|
|
||||||
export function sendToolboxResWithType(type: string) {
|
export function sendToolboxResWithType(type: string) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import uploader from 'apis/app/uploader'
|
|||||||
import windowManager from 'apis/app/window/windowManager'
|
import windowManager from 'apis/app/window/windowManager'
|
||||||
import { Notification } from 'electron'
|
import { Notification } from 'electron'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import { RPCRouter } from '~/events/rpc/router'
|
import { RPCRouter } from '~/events/rpc/router'
|
||||||
import { T as $t } from '~/i18n'
|
import { T as $t } from '~/i18n'
|
||||||
import { generateShortUrl, handleCopyUrl, setTrayToolTip } from '~/utils/common'
|
import { generateShortUrl, handleCopyUrl, setTrayToolTip } from '~/utils/common'
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { uploadChoosedFiles, uploadClipboardFiles } from 'apis/app/uploader/apis'
|
import { uploadChoosedFiles, uploadClipboardFiles } from 'apis/app/uploader/apis'
|
||||||
|
|
||||||
import type { IIPCEvent } from '#/types/rpc'
|
|
||||||
import type { IFileWithPath } from '#/types/types'
|
|
||||||
import { RPCRouter } from '~/events/rpc/router'
|
import { RPCRouter } from '~/events/rpc/router'
|
||||||
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
import { IRPCActionType, IRPCType } from '~/utils/enum'
|
||||||
import getPicBeds from '~/utils/getPicBeds'
|
import getPicBeds from '~/utils/getPicBeds'
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import { I18n, ObjectAdapter } from '@piclist/i18n'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
|
|
||||||
import type { ILocales, ILocalesKey } from '#/types/i18n'
|
|
||||||
import type { II18nItem, IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const dirname = path.dirname(fileURLToPath(import.meta.url))
|
const dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||||
|
|
||||||
const builtinI18nList: II18nItem[] = [
|
const builtinI18nList: II18nItem[] = [
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import axios from 'axios'
|
|||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
import * as fastxml from 'fast-xml-parser'
|
import * as fastxml from 'fast-xml-parser'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import {
|
import {
|
||||||
ConcurrencyPromisePool,
|
ConcurrencyPromisePool,
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ipcMain, IpcMainEvent } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import got from 'got'
|
import got from 'got'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import {
|
import {
|
||||||
ConcurrencyPromisePool,
|
ConcurrencyPromisePool,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import FormData from 'form-data'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import got from 'got'
|
import got from 'got'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import {
|
import {
|
||||||
ConcurrencyPromisePool,
|
ConcurrencyPromisePool,
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import windowManager from 'apis/app/window/windowManager'
|
|||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { formatError } from '~/manage/utils/common'
|
import { formatError } from '~/manage/utils/common'
|
||||||
import ManageLogger from '~/manage/utils/logger'
|
import ManageLogger from '~/manage/utils/logger'
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import axios from 'axios'
|
|||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
import qiniu from 'qiniu'
|
import qiniu from 'qiniu'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import {
|
import {
|
||||||
ConcurrencyPromisePool,
|
ConcurrencyPromisePool,
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import windowManager from 'apis/app/window/windowManager'
|
|||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { ConcurrencyPromisePool, formatError, getAgent, getFileMimeType, NewDownloader } from '~/manage/utils/common'
|
import { ConcurrencyPromisePool, formatError, getAgent, getFileMimeType, NewDownloader } from '~/manage/utils/common'
|
||||||
import { dogecloudApi, DogecloudToken, getTempToken } from '~/manage/utils/dogeAPI'
|
import { dogecloudApi, DogecloudToken, getTempToken } from '~/manage/utils/dogeAPI'
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import path from 'node:path'
|
|||||||
import windowManager from 'apis/app/window/windowManager'
|
import windowManager from 'apis/app/window/windowManager'
|
||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
|
|
||||||
import type { Undefinable } from '#/types/manage'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { formatError } from '~/manage/utils/common'
|
import { formatError } from '~/manage/utils/common'
|
||||||
import ManageLogger from '~/manage/utils/logger'
|
import ManageLogger from '~/manage/utils/logger'
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { ipcMain, IpcMainEvent } from 'electron'
|
|||||||
import FormData from 'form-data'
|
import FormData from 'form-data'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { ConcurrencyPromisePool, formatError, getFileMimeType, gotUpload, NewDownloader } from '~/manage/utils/common'
|
import { ConcurrencyPromisePool, formatError, getFileMimeType, gotUpload, NewDownloader } from '~/manage/utils/common'
|
||||||
import { ManageLogger } from '~/manage/utils/logger'
|
import { ManageLogger } from '~/manage/utils/logger'
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import COS from 'cos-nodejs-sdk-v5'
|
|||||||
import { ipcMain, IpcMainEvent } from 'electron'
|
import { ipcMain, IpcMainEvent } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { formatError, getFileMimeType } from '~/manage/utils/common'
|
import { formatError, getFileMimeType } from '~/manage/utils/common'
|
||||||
import { ManageLogger } from '~/manage/utils/logger'
|
import { ManageLogger } from '~/manage/utils/logger'
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import FormData from 'form-data'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import Upyun from 'upyun'
|
import Upyun from 'upyun'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import {
|
import {
|
||||||
ConcurrencyPromisePool,
|
ConcurrencyPromisePool,
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { ipcMain, IpcMainEvent } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { AuthType, createClient, FileStat, ProgressEvent, WebDAVClient, WebDAVClientOptions } from 'webdav'
|
import { AuthType, createClient, FileStat, ProgressEvent, WebDAVClient, WebDAVClientOptions } from 'webdav'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { ConcurrencyPromisePool, formatError, getInnerAgent, NewDownloader } from '~/manage/utils/common'
|
import { ConcurrencyPromisePool, formatError, getInnerAgent, NewDownloader } from '~/manage/utils/common'
|
||||||
import ManageLogger from '~/manage/utils/logger'
|
import ManageLogger from '~/manage/utils/logger'
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { JSONStore } from '@piclist/store'
|
import { JSONStore } from '@piclist/store'
|
||||||
|
|
||||||
import type { IManageApiType, IManageConfigType } from '#/types/manage'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
interface IJSON {
|
interface IJSON {
|
||||||
[propsName: string]: string | number | IJSON
|
[propsName: string]: string | number | IJSON
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import path from 'node:path'
|
|||||||
import { app } from 'electron'
|
import { app } from 'electron'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IDownloadTask, IUploadTask } from '#/types/manage'
|
|
||||||
import { commonTaskStatus, downloadTaskSpecialStatus, uploadTaskSpecialStatus } from '~/utils/enum'
|
import { commonTaskStatus, downloadTaskSpecialStatus, uploadTaskSpecialStatus } from '~/utils/enum'
|
||||||
|
|
||||||
class UpDownTaskQueue {
|
class UpDownTaskQueue {
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import { ipcMain } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { get, set, unset } from 'lodash-es'
|
import { get, set, unset } from 'lodash-es'
|
||||||
|
|
||||||
import type { IManageApiType, IManageConfigType, IManageError, IPicBedMangeConfig } from '#/types/manage'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import API from '~/manage/apis/api'
|
import API from '~/manage/apis/api'
|
||||||
import ManageDB from '~/manage/datastore/db'
|
import ManageDB from '~/manage/datastore/db'
|
||||||
import { managePathChecker } from '~/manage/datastore/dbChecker'
|
import { managePathChecker } from '~/manage/datastore/dbChecker'
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent'
|
|||||||
import mime from 'mime'
|
import mime from 'mime'
|
||||||
import Downloader from 'nodejs-file-downloader'
|
import Downloader from 'nodejs-file-downloader'
|
||||||
|
|
||||||
import type { IHTTPProxy, IStringKeyMap } from '#/types/types'
|
|
||||||
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
import UpDownTaskQueue from '~/manage/datastore/upDownTaskQueue'
|
||||||
import { ManageLogger } from '~/manage/utils/logger'
|
import { ManageLogger } from '~/manage/utils/logger'
|
||||||
import { formatHttpProxy } from '~/utils/common'
|
import { formatHttpProxy } from '~/utils/common'
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import querystring from 'node:querystring'
|
|||||||
import picgo from '@core/picgo'
|
import picgo from '@core/picgo'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import type { IObj } from '#/types/types'
|
|
||||||
|
|
||||||
export interface DogecloudToken {
|
export interface DogecloudToken {
|
||||||
accessKeyId: string
|
accessKeyId: string
|
||||||
secretAccessKey: string
|
secretAccessKey: string
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import dayjs from 'dayjs'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { ILogColor, ILogger } from 'piclist/dist/types'
|
import { ILogColor, ILogger } from 'piclist/dist/types'
|
||||||
|
|
||||||
import type { IManageApiType, Undefinable } from '#/types/manage'
|
|
||||||
import type { ILogArgvType, ILogArgvTypeWithError } from '#/types/types'
|
|
||||||
import { enforceNumber } from '~/utils/common'
|
import { enforceNumber } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
import { ILogType } from '~/utils/enum'
|
import { ILogType } from '~/utils/enum'
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { app } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import multer from 'multer'
|
import multer from 'multer'
|
||||||
|
|
||||||
import type { ErrnoException, IObj, IServerConfig } from '#/types/types'
|
|
||||||
import routers from '~/server/routerManager'
|
import routers from '~/server/routerManager'
|
||||||
import { ensureHTTPLink, handleResponse } from '~/server/utils'
|
import { ensureHTTPLink, handleResponse } from '~/server/utils'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { routeHandler } from '#/types/types'
|
|
||||||
|
|
||||||
type HttpMethod = 'GET' | 'POST'
|
type HttpMethod = 'GET' | 'POST'
|
||||||
|
|
||||||
class Router {
|
class Router {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { app } from 'electron'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { marked } from 'marked'
|
import { marked } from 'marked'
|
||||||
|
|
||||||
import type { IHttpResponse, IStringKeyMap } from '#/types/types'
|
|
||||||
import { markdownContent } from '~/server/apiDoc'
|
import { markdownContent } from '~/server/apiDoc'
|
||||||
import router from '~/server/router'
|
import router from '~/server/router'
|
||||||
import { deleteChoosedFiles, handleResponse } from '~/server/utils'
|
import { deleteChoosedFiles, handleResponse } from '~/server/utils'
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import ALLApi from 'apis/delete/allApi'
|
|||||||
import GuiApi from 'apis/gui'
|
import GuiApi from 'apis/gui'
|
||||||
import { Notification } from 'electron'
|
import { Notification } from 'electron'
|
||||||
|
|
||||||
import type { IHttpResponse, ImgInfo, IObj } from '#/types/types'
|
|
||||||
import { T as $t } from '~/i18n/index'
|
import { T as $t } from '~/i18n/index'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
import { ICOREBuildInEvent, IWindowList } from '~/utils/enum'
|
import { ICOREBuildInEvent, IWindowList } from '~/utils/enum'
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import picgo from '@core/picgo'
|
|||||||
import logger from '@core/picgo/logger'
|
import logger from '@core/picgo/logger'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
import { encodeFilePath } from '~/utils/common'
|
import { encodeFilePath } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { dbPathChecker } from '@core/datastore/dbChecker'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
|
|
||||||
import type { ILocales } from '#/types/i18n'
|
|
||||||
import { i18nManager } from '~/i18n'
|
import { i18nManager } from '~/i18n'
|
||||||
|
|
||||||
const configPath = dbPathChecker()
|
const configPath = dbPathChecker()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import FormData from 'form-data'
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { isReactive, isRef, toRaw, unref } from 'vue'
|
import { isReactive, isRef, toRaw, unref } from 'vue'
|
||||||
|
|
||||||
import type { IHTTPProxy, IPrivateShowNotificationOption, IStringKeyMap } from '#/types/types'
|
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
import { IShortUrlServer } from '~/utils/enum'
|
import { IShortUrlServer } from '~/utils/enum'
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,5 @@
|
|||||||
import type { IBuildInCompressOptions, IBuildInWaterMarkOptions } from 'piclist'
|
import type { IBuildInCompressOptions, IBuildInWaterMarkOptions } from 'piclist'
|
||||||
|
|
||||||
import type {
|
|
||||||
IAliYunConfig,
|
|
||||||
IAwsS3PListUserConfig,
|
|
||||||
IGitHubConfig,
|
|
||||||
IImgurConfig,
|
|
||||||
ILocalConfig,
|
|
||||||
ILskyConfig,
|
|
||||||
IPicBedType,
|
|
||||||
IQiniuConfig,
|
|
||||||
IServerConfig,
|
|
||||||
ISftpPlistConfig,
|
|
||||||
IShortKeyConfig,
|
|
||||||
ISMMSConfig,
|
|
||||||
ISyncConfig,
|
|
||||||
ITcYunConfig,
|
|
||||||
IUploaderConfig,
|
|
||||||
IUpYunConfig,
|
|
||||||
IWebdavPlistConfig,
|
|
||||||
} from '#/types/types'
|
|
||||||
|
|
||||||
export type manualPageOpenType = 'window' | 'browser'
|
export type manualPageOpenType = 'window' | 'browser'
|
||||||
|
|
||||||
type IPicGoPlugins = Record<`picgo-plugin-${string}`, boolean>
|
type IPicGoPlugins = Record<`picgo-plugin-${string}`, boolean>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { NodeHttpHandler } from '@smithy/node-http-handler'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import type { ISftpPlistConfig } from 'piclist'
|
import type { ISftpPlistConfig } from 'piclist'
|
||||||
|
|
||||||
import type { IObj, IStringKeyMap } from '#/types/types'
|
|
||||||
import { getAgent } from '~/manage/utils/common'
|
import { getAgent } from '~/manage/utils/common'
|
||||||
import SSHClient from '~/utils/sshClient'
|
import SSHClient from '~/utils/sshClient'
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import crypto from 'node:crypto'
|
|||||||
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const AUTH_KEY_VALUE_RE = /(\w+)=["']?([^'"]{1,10000})["']?/
|
const AUTH_KEY_VALUE_RE = /(\w+)=["']?([^'"]{1,10000})["']?/
|
||||||
let NC = 0
|
let NC = 0
|
||||||
const NC_PAD = '00000000'
|
const NC_PAD = '00000000'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import picgo from '@core/picgo'
|
import picgo from '@core/picgo'
|
||||||
|
|
||||||
import type { IPicBedType } from '#/types/types'
|
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|
||||||
const getPicBeds = () => {
|
const getPicBeds = () => {
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
import picgo from '@core/picgo'
|
import picgo from '@core/picgo'
|
||||||
import { v4 as uuid } from 'uuid'
|
import { v4 as uuid } from 'uuid'
|
||||||
|
|
||||||
import type {
|
|
||||||
IPicGoPluginConfig,
|
|
||||||
IPicGoPluginOriginConfig,
|
|
||||||
IStringKeyMap,
|
|
||||||
IUploaderConfigItem,
|
|
||||||
IUploaderConfigListItem,
|
|
||||||
} from '#/types/types'
|
|
||||||
import { setTrayToolTip, trimValues } from '~/utils/common'
|
import { setTrayToolTip, trimValues } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
import type { IAppNotification } from '#/types/types'
|
|
||||||
|
|
||||||
export const notificationList: IAppNotification[] = []
|
export const notificationList: IAppNotification[] = []
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import db from '@core/datastore'
|
import db from '@core/datastore'
|
||||||
|
|
||||||
import type { ImgInfo } from '#/types/types'
|
|
||||||
import { generateShortUrl, handleUrlEncodeWithSetting } from '~/utils/common'
|
import { generateShortUrl, handleUrlEncodeWithSetting } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import fs from 'fs-extra'
|
|||||||
import { HttpsProxyAgent } from 'hpagent'
|
import { HttpsProxyAgent } from 'hpagent'
|
||||||
import { AuthType, createClient, WebDAVClientOptions } from 'webdav'
|
import { AuthType, createClient, WebDAVClientOptions } from 'webdav'
|
||||||
|
|
||||||
import type { IGalleryDBFile, IGalleryDBGalleryItem, ISyncConfig } from '#/types/types'
|
|
||||||
import { extractData, zipData } from '~/utils/common'
|
import { extractData, zipData } from '~/utils/common'
|
||||||
import { formatEndpoint } from '~/utils/common'
|
import { formatEndpoint } from '~/utils/common'
|
||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { getRawData } from '@/utils/common'
|
import { getRawData } from '@/utils/common'
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
export default class ALLApi {
|
export default class ALLApi {
|
||||||
static async delete(configMap: IStringKeyMap): Promise<boolean> {
|
static async delete(configMap: IStringKeyMap): Promise<boolean> {
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ import { useI18n } from 'vue-i18n'
|
|||||||
|
|
||||||
import $bus from '@/utils/bus'
|
import $bus from '@/utils/bus'
|
||||||
import { SHOW_INPUT_BOX, SHOW_INPUT_BOX_RESPONSE } from '@/utils/constant'
|
import { SHOW_INPUT_BOX, SHOW_INPUT_BOX_RESPONSE } from '@/utils/constant'
|
||||||
import type { IShowInputBoxOption } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const inputBoxValue = ref('')
|
const inputBoxValue = ref('')
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
import { getConfig } from '@/utils/dataSender'
|
import { getConfig } from '@/utils/dataSender'
|
||||||
import type { IPicGoPluginConfig, IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
config: any[]
|
config: any[]
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
export const useAppStore = defineStore('app', () => {
|
export const useAppStore = defineStore('app', () => {
|
||||||
const settings = ref<IStringKeyMap>({
|
const settings = ref<IStringKeyMap>({
|
||||||
app: {
|
app: {
|
||||||
|
|||||||
@@ -1294,8 +1294,6 @@ import { videoExt } from '@/manage/utils/videofile'
|
|||||||
import { trimPath } from '@/utils/common'
|
import { trimPath } from '@/utils/common'
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import { cancelDownloadLoadingFileList, refreshDownloadFileTransferList } from '@/utils/static'
|
import { cancelDownloadLoadingFileList, refreshDownloadFileTransferList } from '@/utils/static'
|
||||||
import type { IDownloadTask, IUploadTask } from '#/types/manage'
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|||||||
@@ -309,7 +309,6 @@ import { getConfig, removeConfig, saveConfig } from '@/manage/utils/dataSender'
|
|||||||
import { formatEndpoint } from '@/utils/common'
|
import { formatEndpoint } from '@/utils/common'
|
||||||
import { getConfig as getPicBedsConfig } from '@/utils/dataSender'
|
import { getConfig as getPicBedsConfig } from '@/utils/dataSender'
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IStringKeyMap, IUploaderConfigListItem } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const manageStore = useManageStore()
|
const manageStore = useManageStore()
|
||||||
|
|||||||
@@ -276,7 +276,6 @@ import { useManageStore } from '@/manage/store/manageStore'
|
|||||||
import { supportedPicBedList } from '@/manage/utils/constants'
|
import { supportedPicBedList } from '@/manage/utils/constants'
|
||||||
import { newBucketConfig } from '@/manage/utils/newBucketConfig'
|
import { newBucketConfig } from '@/manage/utils/newBucketConfig'
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const manageStore = useManageStore() as any
|
const manageStore = useManageStore() as any
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ import { fileCacheDbInstance } from '@/manage/store/bucketFileDb'
|
|||||||
import { customRenameFormatTable, formatFileSize } from '@/manage/utils/common'
|
import { customRenameFormatTable, formatFileSize } from '@/manage/utils/common'
|
||||||
import { getConfig, saveConfig } from '@/manage/utils/dataSender'
|
import { getConfig, saveConfig } from '@/manage/utils/dataSender'
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import Dexie, { Table } from 'dexie'
|
import Dexie, { Table } from 'dexie'
|
||||||
|
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* create a database for bucket file cache
|
* create a database for bucket file cache
|
||||||
*database name: bucketFileDb
|
*database name: bucketFileDb
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
import { getConfig } from '@/manage/utils/dataSender'
|
import { getConfig } from '@/manage/utils/dataSender'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
export const useManageStore = defineStore('manageConfig', {
|
export const useManageStore = defineStore('manageConfig', {
|
||||||
state: () => {
|
state: () => {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const AliyunAreaCodeName: IStringKeyMap = {
|
const AliyunAreaCodeName: IStringKeyMap = {
|
||||||
'oss-cn-hangzhou': '华东1(杭州)',
|
'oss-cn-hangzhou': '华东1(杭州)',
|
||||||
'oss-cn-shanghai': '华东2(上海)',
|
'oss-cn-shanghai': '华东2(上海)',
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { v4 as uuidv4 } from 'uuid'
|
|||||||
import { getConfig } from '@/manage/utils/dataSender'
|
import { getConfig } from '@/manage/utils/dataSender'
|
||||||
import { availableIconList } from '@/manage/utils/icon'
|
import { availableIconList } from '@/manage/utils/icon'
|
||||||
import { isNeedToShorten, safeSliceF } from '@/utils/common'
|
import { isNeedToShorten, safeSliceF } from '@/utils/common'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
export const isUrlEncode = (url: string): boolean => {
|
export const isUrlEncode = (url: string): boolean => {
|
||||||
url = url || ''
|
url = url || ''
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { createI18n } from 'vue-i18n'
|
|||||||
import en from '@/i18n/locales/en.json'
|
import en from '@/i18n/locales/en.json'
|
||||||
import zhCN from '@/i18n/locales/zh-CN.json'
|
import zhCN from '@/i18n/locales/zh-CN.json'
|
||||||
import zhTW from '@/i18n/locales/zh-TW.json'
|
import zhTW from '@/i18n/locales/zh-TW.json'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
type MessageSchema = typeof en
|
type MessageSchema = typeof en
|
||||||
|
|
||||||
const i18n = createI18n<MessageSchema, 'en' | 'zh-CN' | 'zh-TW'>({
|
const i18n = createI18n<MessageSchema, 'en' | 'zh-CN' | 'zh-TW'>({
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IObj } from '#/types/types'
|
|
||||||
|
|
||||||
export function saveConfig(config: IObj | string, value?: any) {
|
export function saveConfig(config: IObj | string, value?: any) {
|
||||||
const configObj = typeof config === 'string' ? { [config]: value } : config
|
const configObj = typeof config === 'string' ? { [config]: value } : config
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
const AUTH_KEY_VALUE_RE = /(\w+)=["']?([^'"]{1,10000})["']?/
|
const AUTH_KEY_VALUE_RE = /(\w+)=["']?([^'"]{1,10000})["']?/
|
||||||
let NC = 0
|
let NC = 0
|
||||||
const NC_PAD = '00000000'
|
const NC_PAD = '00000000'
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { createI18n } from 'vue-i18n'
|
|||||||
import en from '@/i18n/locales/en.json'
|
import en from '@/i18n/locales/en.json'
|
||||||
import zhCN from '@/i18n/locales/zh-CN.json'
|
import zhCN from '@/i18n/locales/zh-CN.json'
|
||||||
import zhTW from '@/i18n/locales/zh-TW.json'
|
import zhTW from '@/i18n/locales/zh-TW.json'
|
||||||
import type { IStringKeyMap } from '#/types/types'
|
|
||||||
|
|
||||||
import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from './bucketConfigCons'
|
import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from './bucketConfigCons'
|
||||||
type MessageSchema = typeof en
|
type MessageSchema = typeof en
|
||||||
|
|||||||
@@ -517,7 +517,6 @@ import $$db from '@/utils/db'
|
|||||||
import { IPasteStyle, IRPCActionType } from '@/utils/enum'
|
import { IPasteStyle, IRPCActionType } from '@/utils/enum'
|
||||||
import { picBedGlobal } from '@/utils/global'
|
import { picBedGlobal } from '@/utils/global'
|
||||||
import { picBedsCanbeDeleted } from '@/utils/static'
|
import { picBedsCanbeDeleted } from '@/utils/static'
|
||||||
import type { IGalleryItem, ImgInfo, IObj, IObjT } from '#/types/types'
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user