mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-21 16:20:46 +08:00
🔨 Refactor: change vue-js -> vue-ts && add typos
This commit is contained in:
@@ -12,13 +12,13 @@ const getPicBeds = (app: App) => {
|
||||
const picBedTypes = picgo.helper.uploader.getIdList()
|
||||
const picBedFromDB = db.get('picBed.list') || []
|
||||
const picBeds = picBedTypes.map((item: string) => {
|
||||
const visible = picBedFromDB.find((i: PicBedType) => i.type === item) // object or undefined
|
||||
const visible = picBedFromDB.find((i: IPicBedType) => i.type === item) // object or undefined
|
||||
return {
|
||||
type: item,
|
||||
name: picgo.helper.uploader.get(item).name || item,
|
||||
visible: visible ? visible.visible : true
|
||||
}
|
||||
}) as PicBedType[]
|
||||
}) as IPicBedType[]
|
||||
picgo.cmd.program.removeAllListeners()
|
||||
return picBeds
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const shortKeyHandler = (name: string) => {
|
||||
/**
|
||||
* 用于更新快捷键绑定
|
||||
*/
|
||||
const shortKeyUpdater = (globalShortcut: GlobalShortcut, item: ShortKeyConfig, oldKey: string) => {
|
||||
const shortKeyUpdater = (globalShortcut: GlobalShortcut, item: IShortKeyConfig, oldKey: string) => {
|
||||
// 如果提供了旧key,则解绑
|
||||
if (oldKey) {
|
||||
globalShortcut.unregister(oldKey)
|
||||
@@ -39,7 +39,7 @@ const shortKeyUpdater = (globalShortcut: GlobalShortcut, item: ShortKeyConfig, o
|
||||
}
|
||||
|
||||
// 初始化阶段的注册
|
||||
const initShortKeyRegister = (globalShortcut: GlobalShortcut, shortKeys: ShortKeyConfig[]) => {
|
||||
const initShortKeyRegister = (globalShortcut: GlobalShortcut, shortKeys: IShortKeyConfig[]) => {
|
||||
let errorList = []
|
||||
for (let i in shortKeys) {
|
||||
try {
|
||||
|
||||
@@ -36,7 +36,7 @@ const renameURL = process.env.NODE_ENV === 'development'
|
||||
// }
|
||||
|
||||
const createRenameWindow = (win: BrowserWindow) => {
|
||||
let options: BrowserWindowOptions = {
|
||||
let options: IBrowserWindowOptions = {
|
||||
height: 175,
|
||||
width: 300,
|
||||
show: true,
|
||||
|
||||
Reference in New Issue
Block a user