mirror of
https://github.com/Molunerfinn/PicGo.git
synced 2024-04-21 10:31:33 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
458087a94e | ||
|
|
4e8dfef6cb | ||
|
|
e1c151e310 | ||
|
|
25068a8949 | ||
|
|
4010a09fe4 | ||
|
|
f6536b1dc2 | ||
|
|
df39511cdf | ||
|
|
504690b729 | ||
|
|
937979ae3d | ||
|
|
1f373fb325 | ||
|
|
92b9fbcee8 | ||
|
|
37a784225e | ||
|
|
16fe016c70 |
@@ -133,7 +133,8 @@ let rendererConfig = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.join(__dirname, '../src/renderer'),
|
'@': path.join(__dirname, '../src/renderer'),
|
||||||
'vue$': 'vue/dist/vue.esm.js'
|
'vue$': 'vue/dist/vue.esm.js',
|
||||||
|
'utils': path.join(__dirname, '../src/renderer/utils')
|
||||||
},
|
},
|
||||||
extensions: ['.js', '.vue', '.json', '.css', '.node']
|
extensions: ['.js', '.vue', '.json', '.css', '.node']
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
|
|
||||||
## 应用说明
|
## 应用说明
|
||||||
|
|
||||||
PicGo目前支持了`微博图床`,`七牛图床`,`腾讯云COS`,`又拍云`。未来将支持更多图床。
|
PicGo目前支持了`微博图床`,`七牛图床`,`腾讯云COS v4版本`,`又拍云`。未来将支持更多图床。
|
||||||
|
|
||||||
支持macOS、windows 64位(v1.3.0以上)系统,未来将支持linux。
|
支持macOS、windows 64位(v1.3.0以上)系统,未来将支持linux。
|
||||||
|
|
||||||
支持快捷键`command+shift+p`(macOS)或者`control+shift+p`(windows)用以支持快捷上传剪贴板里的图片(第一张)。
|
支持快捷键`command+shift+p`(macOS)或者`control+shift+p`(windows)用以支持快捷上传剪贴板里的图片(第一张)。PicGo v1.4.0版本及以上支持自定义快捷键啦,使用方法见[配置手册](https://github.com/Molunerfinn/PicGo/wiki/%E8%AF%A6%E7%BB%86%E7%AA%97%E5%8F%A3%E7%9A%84%E4%BD%BF%E7%94%A8#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%BF%AB%E6%8D%B7%E9%94%AE)。
|
||||||
|
|
||||||
点击此处下载[应用](https://github.com/Molunerfinn/PicGo/releases),macOS用户请下载最新版本的`dmg`文件,windows用户请下载最新版本的`exe`文件。**如果是国内用户下载github release文件速度很慢的话,推荐使用[Free Download Manager](http://www.freedownloadmanager.org/download.htm)来下载,速度会快。**
|
点击此处下载[应用](https://github.com/Molunerfinn/PicGo/releases),macOS用户请下载最新版本的`dmg`文件,windows用户请下载最新版本的`exe`文件。**如果是国内用户下载github release文件速度很慢的话,推荐使用[Free Download Manager](http://www.freedownloadmanager.org/download.htm)来下载,速度会快。**
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "picgo",
|
"name": "picgo",
|
||||||
"version": "1.3.2",
|
"version": "1.4.2",
|
||||||
"author": "Molunerfinn <marksz@teamsz.xyz>",
|
"author": "Molunerfinn <marksz@teamsz.xyz>",
|
||||||
"description": "Easy to upload your pic & copy to write",
|
"description": "Easy to upload your pic & copy to write",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -73,8 +73,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.16.1",
|
"axios": "^0.16.1",
|
||||||
"element-ui": "^2.0.5",
|
"element-ui": "^2.0.5",
|
||||||
|
"fecha": "^2.3.3",
|
||||||
"fs-extra": "^4.0.2",
|
"fs-extra": "^4.0.2",
|
||||||
"image-size": "^0.6.1",
|
"image-size": "^0.6.1",
|
||||||
|
"keycode": "^2.1.9",
|
||||||
"lodash-id": "^0.14.0",
|
"lodash-id": "^0.14.0",
|
||||||
"lowdb": "^1.0.0",
|
"lowdb": "^1.0.0",
|
||||||
"md5": "^2.2.1",
|
"md5": "^2.2.1",
|
||||||
|
|||||||
@@ -29,4 +29,10 @@ if (!db.has('picBed').value()) {
|
|||||||
}).write()
|
}).write()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!db.has('shortKey').value()) {
|
||||||
|
db.set('shortKey', {
|
||||||
|
upload: 'CommandOrControl+Shift+P'
|
||||||
|
}).write()
|
||||||
|
}
|
||||||
|
|
||||||
export default db
|
export default db
|
||||||
|
|||||||
+64
-13
@@ -21,6 +21,7 @@ let window
|
|||||||
let settingWindow
|
let settingWindow
|
||||||
let tray
|
let tray
|
||||||
let menu
|
let menu
|
||||||
|
let contextMenu
|
||||||
const winURL = process.env.NODE_ENV === 'development'
|
const winURL = process.env.NODE_ENV === 'development'
|
||||||
? `http://localhost:9080`
|
? `http://localhost:9080`
|
||||||
: `file://${__dirname}/index.html`
|
: `file://${__dirname}/index.html`
|
||||||
@@ -39,7 +40,7 @@ const uploadFailed = () => {
|
|||||||
function createTray () {
|
function createTray () {
|
||||||
const menubarPic = process.platform === 'darwin' ? `${__static}/menubar.png` : `${__static}/menubar-nodarwin.png`
|
const menubarPic = process.platform === 'darwin' ? `${__static}/menubar.png` : `${__static}/menubar-nodarwin.png`
|
||||||
tray = new Tray(menubarPic)
|
tray = new Tray(menubarPic)
|
||||||
const contextMenu = Menu.buildFromTemplate([
|
contextMenu = Menu.buildFromTemplate([
|
||||||
{
|
{
|
||||||
label: '关于',
|
label: '关于',
|
||||||
click () {
|
click () {
|
||||||
@@ -308,18 +309,27 @@ const uploadClipboardFiles = async () => {
|
|||||||
imgUrl
|
imgUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
img = await uploader(uploadImg, 'imgFromClipboard', window.webContents)
|
const win = settingWindow || window
|
||||||
|
img = await uploader(uploadImg, 'imgFromClipboard', win.webContents)
|
||||||
if (img !== false) {
|
if (img !== false) {
|
||||||
const pasteStyle = db.read().get('picBed.pasteStyle').value() || 'markdown'
|
if (img.length > 0) {
|
||||||
clipboard.writeText(pasteTemplate(pasteStyle, img[0].imgUrl))
|
const pasteStyle = db.read().get('picBed.pasteStyle').value() || 'markdown'
|
||||||
const notification = new Notification({
|
clipboard.writeText(pasteTemplate(pasteStyle, img[0].imgUrl))
|
||||||
title: '上传成功',
|
const notification = new Notification({
|
||||||
body: img[0].imgUrl,
|
title: '上传成功',
|
||||||
icon: img[0].imgUrl
|
body: img[0].imgUrl,
|
||||||
})
|
icon: img[0].imgUrl
|
||||||
notification.show()
|
})
|
||||||
window.webContents.send('clipboardFiles', [])
|
notification.show()
|
||||||
window.webContents.send('uploadFiles', img)
|
window.webContents.send('clipboardFiles', [])
|
||||||
|
window.webContents.send('uploadFiles', img)
|
||||||
|
} else {
|
||||||
|
const notification = new Notification({
|
||||||
|
title: '上传不成功',
|
||||||
|
body: '你剪贴板最新的一条记录不是图片哦'
|
||||||
|
})
|
||||||
|
notification.show()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uploadFailed()
|
uploadFailed()
|
||||||
}
|
}
|
||||||
@@ -344,6 +354,10 @@ ipcMain.on('uploadClipboardFiles', async (evt, file) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ipcMain.on('uploadClipboardFilesFromUploadPage', () => {
|
||||||
|
uploadClipboardFiles()
|
||||||
|
})
|
||||||
|
|
||||||
ipcMain.on('uploadChoosedFiles', async (evt, files) => {
|
ipcMain.on('uploadChoosedFiles', async (evt, files) => {
|
||||||
const imgs = await uploader(files, 'imgFromUploader', settingWindow.webContents)
|
const imgs = await uploader(files, 'imgFromUploader', settingWindow.webContents)
|
||||||
if (imgs !== false) {
|
if (imgs !== false) {
|
||||||
@@ -367,6 +381,43 @@ ipcMain.on('uploadChoosedFiles', async (evt, files) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ipcMain.on('updateShortKey', (evt, oldKey) => {
|
||||||
|
globalShortcut.unregisterAll()
|
||||||
|
for (let key in oldKey) {
|
||||||
|
globalShortcut.register(db.read().get('shortKey').value()[key], () => {
|
||||||
|
return shortKeyHash[key]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const notification = new Notification({
|
||||||
|
title: '操作成功',
|
||||||
|
body: '你的快捷键已经修改成功'
|
||||||
|
})
|
||||||
|
notification.show()
|
||||||
|
})
|
||||||
|
|
||||||
|
ipcMain.on('updateCustomLink', (evt, oldLink) => {
|
||||||
|
const notification = new Notification({
|
||||||
|
title: '操作成功',
|
||||||
|
body: '你的自定义链接格式已经修改成功'
|
||||||
|
})
|
||||||
|
notification.show()
|
||||||
|
})
|
||||||
|
|
||||||
|
ipcMain.on('updteDefaultPicBed', (evt) => {
|
||||||
|
const types = ['weibo', 'qiniu', 'tcyun', 'upyun']
|
||||||
|
let submenuItem = contextMenu.items[2].submenu.items
|
||||||
|
submenuItem.forEach((item, index) => {
|
||||||
|
const result = db.read().get('picBed.current').value() === types[index]
|
||||||
|
if (result) {
|
||||||
|
item.click() // It's a bug which can not set checked status
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const shortKeyHash = {
|
||||||
|
upload: uploadClipboardFiles
|
||||||
|
}
|
||||||
|
|
||||||
const isSecondInstance = app.makeSingleInstance(() => {
|
const isSecondInstance = app.makeSingleInstance(() => {
|
||||||
if (settingWindow) {
|
if (settingWindow) {
|
||||||
if (settingWindow.isMinimized()) {
|
if (settingWindow.isMinimized()) {
|
||||||
@@ -389,7 +440,7 @@ app.on('ready', () => {
|
|||||||
createTray()
|
createTray()
|
||||||
updateChecker()
|
updateChecker()
|
||||||
|
|
||||||
globalShortcut.register('CommandOrControl+Shift+P', () => {
|
globalShortcut.register(db.read().get('shortKey.upload').value(), () => {
|
||||||
uploadClipboardFiles()
|
uploadClipboardFiles()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import sizeOf from 'image-size'
|
import sizeOf from 'image-size'
|
||||||
|
import fecha from 'fecha'
|
||||||
|
|
||||||
const imgFromPath = async (imgPath) => {
|
const imgFromPath = async (imgPath) => {
|
||||||
let results = []
|
let results = []
|
||||||
@@ -13,7 +14,8 @@ const imgFromPath = async (imgPath) => {
|
|||||||
base64Image,
|
base64Image,
|
||||||
fileName,
|
fileName,
|
||||||
width: imgSize.width,
|
width: imgSize.width,
|
||||||
height: imgSize.height
|
height: imgSize.height,
|
||||||
|
extname: path.extname(item.name)
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
return results
|
return results
|
||||||
@@ -22,12 +24,13 @@ const imgFromPath = async (imgPath) => {
|
|||||||
const imgFromClipboard = (file) => {
|
const imgFromClipboard = (file) => {
|
||||||
let result = []
|
let result = []
|
||||||
if (file !== null) {
|
if (file !== null) {
|
||||||
const today = new Date().toLocaleString().replace(/[ ]+/g, '-').replace(/\/+/g, '-')
|
const today = fecha.format(new Date(), 'YYYYMMDDHHmmss')
|
||||||
result.push({
|
result.push({
|
||||||
base64Image: file.imgUrl.replace(/^data\S+,/, ''),
|
base64Image: file.imgUrl.replace(/^data\S+,/, ''),
|
||||||
fileName: `${today}.png`,
|
fileName: `${today}.png`,
|
||||||
width: file.width,
|
width: file.width,
|
||||||
height: file.height
|
height: file.height,
|
||||||
|
extname: '.png'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
@@ -44,7 +47,8 @@ const imgFromUploader = async (files) => {
|
|||||||
base64Image,
|
base64Image,
|
||||||
fileName,
|
fileName,
|
||||||
width: imgSize.width,
|
width: imgSize.width,
|
||||||
height: imgSize.height
|
height: imgSize.height,
|
||||||
|
extname: path.extname(item.name)
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
return results
|
return results
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
import db from '../../datastore'
|
||||||
|
|
||||||
export default (style, url) => {
|
export default (style, url) => {
|
||||||
|
const customLink = db.read().get('customLink').value() || '$url'
|
||||||
const tpl = {
|
const tpl = {
|
||||||
'markdown': ``,
|
'markdown': ``,
|
||||||
'HTML': `<img src="${url}"/>`,
|
'HTML': `<img src="${url}"/>`,
|
||||||
'URL': url,
|
'URL': url,
|
||||||
'UBB': `[IMG]${url}[/IMG]`
|
'UBB': `[IMG]${url}[/IMG]`,
|
||||||
|
'Custom': customLink.replace(/\$url/, url)
|
||||||
}
|
}
|
||||||
return tpl[style]
|
return tpl[style]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import { Notification } from 'electron'
|
|||||||
|
|
||||||
function postOptions (fileName, token, imgBase64) {
|
function postOptions (fileName, token, imgBase64) {
|
||||||
const area = selectArea(db.read().get('picBed.qiniu.area').value() || 'z0')
|
const area = selectArea(db.read().get('picBed.qiniu.area').value() || 'z0')
|
||||||
const base64FileName = Buffer.from(fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_')
|
const path = db.read().get('picBed.qiniu.path') || ''
|
||||||
|
const base64FileName = Buffer.from(path + fileName, 'utf-8').toString('base64').replace(/\+/g, '-').replace(/\//g, '_')
|
||||||
return {
|
return {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: `http://upload${area}.qiniu.com/putb64/-1/key/${base64FileName}`,
|
url: `http://upload${area}.qiniu.com/putb64/-1/key/${base64FileName}`,
|
||||||
|
|||||||
@@ -52,13 +52,20 @@ const tcYunUpload = async (img, type, webContents) => {
|
|||||||
webContents.send('uploadProgress', 30)
|
webContents.send('uploadProgress', 30)
|
||||||
const singature = generateSignature()
|
const singature = generateSignature()
|
||||||
const length = imgList.length
|
const length = imgList.length
|
||||||
|
const tcYunOptions = db.read().get('picBed.tcyun').value()
|
||||||
|
const customUrl = tcYunOptions.customUrl
|
||||||
|
const path = tcYunOptions.path
|
||||||
for (let i in imgList) {
|
for (let i in imgList) {
|
||||||
const options = postOptions(imgList[i].fileName, singature, imgList[i].base64Image)
|
const options = postOptions(imgList[i].fileName, singature, imgList[i].base64Image)
|
||||||
const res = await request(options)
|
const res = await request(options)
|
||||||
const body = JSON.parse(res)
|
const body = JSON.parse(res)
|
||||||
if (body.message === 'SUCCESS') {
|
if (body.message === 'SUCCESS') {
|
||||||
delete imgList[i].base64Image
|
delete imgList[i].base64Image
|
||||||
imgList[i]['imgUrl'] = body.data.source_url
|
if (customUrl) {
|
||||||
|
imgList[i]['imgUrl'] = `${customUrl}/${path}${imgList[i].fileName}`
|
||||||
|
} else {
|
||||||
|
imgList[i]['imgUrl'] = body.data.source_url
|
||||||
|
}
|
||||||
imgList[i]['type'] = 'tcyun'
|
imgList[i]['type'] = 'tcyun'
|
||||||
if (i - length === -1) {
|
if (i - length === -1) {
|
||||||
webContents.send('uploadProgress', 60)
|
webContents.send('uploadProgress', 60)
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import MD5 from 'md5'
|
|||||||
// generate COS signature string
|
// generate COS signature string
|
||||||
const generateSignature = (fileName) => {
|
const generateSignature = (fileName) => {
|
||||||
const options = db.read().get('picBed.upyun').value()
|
const options = db.read().get('picBed.upyun').value()
|
||||||
// const apiKey = options.apiKey
|
const path = options.path || ''
|
||||||
const operator = options.operator
|
const operator = options.operator
|
||||||
const password = options.password
|
const password = options.password
|
||||||
const md5Password = MD5(password)
|
const md5Password = MD5(password)
|
||||||
const date = new Date().toGMTString()
|
const date = new Date().toGMTString()
|
||||||
const uri = `/${options.bucket}/${encodeURI(fileName)}`
|
const uri = `/${options.bucket}/${path}${encodeURI(fileName)}`
|
||||||
const value = `PUT&${uri}&${date}`
|
const value = `PUT&${uri}&${date}`
|
||||||
const sign = crypto.createHmac('sha1', md5Password).update(value).digest('base64')
|
const sign = crypto.createHmac('sha1', md5Password).update(value).digest('base64')
|
||||||
return `UPYUN ${operator}:${sign}`
|
return `UPYUN ${operator}:${sign}`
|
||||||
@@ -22,9 +22,10 @@ const generateSignature = (fileName) => {
|
|||||||
const postOptions = (fileName, signature, imgBase64) => {
|
const postOptions = (fileName, signature, imgBase64) => {
|
||||||
const options = db.read().get('picBed.upyun').value()
|
const options = db.read().get('picBed.upyun').value()
|
||||||
const bucket = options.bucket
|
const bucket = options.bucket
|
||||||
|
const path = options.path || ''
|
||||||
return {
|
return {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
url: `https://v0.api.upyun.com/${bucket}/${encodeURI(fileName)}`,
|
url: `https://v0.api.upyun.com/${bucket}/${path}${encodeURI(fileName)}`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: signature,
|
Authorization: signature,
|
||||||
Date: new Date().toGMTString()
|
Date: new Date().toGMTString()
|
||||||
@@ -41,24 +42,21 @@ const upYunUpload = async (img, type, webContents) => {
|
|||||||
webContents.send('uploadProgress', 30)
|
webContents.send('uploadProgress', 30)
|
||||||
const length = imgList.length
|
const length = imgList.length
|
||||||
const upyunOptions = db.read().get('picBed.upyun').value()
|
const upyunOptions = db.read().get('picBed.upyun').value()
|
||||||
|
const path = upyunOptions.path || ''
|
||||||
for (let i in imgList) {
|
for (let i in imgList) {
|
||||||
const singature = generateSignature(imgList[i].fileName)
|
const singature = generateSignature(imgList[i].fileName)
|
||||||
const options = postOptions(imgList[i].fileName, singature, imgList[i].base64Image)
|
const options = postOptions(imgList[i].fileName, singature, imgList[i].base64Image)
|
||||||
const body = await request(options)
|
const body = await request(options)
|
||||||
if (body.statusCode === 200) {
|
if (body.statusCode === 200) {
|
||||||
delete imgList[i].base64Image
|
delete imgList[i].base64Image
|
||||||
imgList[i]['imgUrl'] = `${upyunOptions.url}/${imgList[i].fileName}${upyunOptions.options}`
|
imgList[i]['imgUrl'] = `${upyunOptions.url}/${path}${imgList[i].fileName}${upyunOptions.options}`
|
||||||
imgList[i]['type'] = 'upyun'
|
imgList[i]['type'] = 'upyun'
|
||||||
if (i - length === -1) {
|
if (i - length === -1) {
|
||||||
webContents.send('uploadProgress', 60)
|
webContents.send('uploadProgress', 60)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
webContents.send('uploadProgress', -1)
|
webContents.send('uploadProgress', -1)
|
||||||
const notification = new Notification({
|
return new Error()
|
||||||
title: '上传失败!',
|
|
||||||
body: '服务端出错,请稍后再试'
|
|
||||||
})
|
|
||||||
notification.show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
webContents.send('uploadProgress', 100)
|
webContents.send('uploadProgress', 100)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const checkVersion = async () => {
|
|||||||
type: 'info',
|
type: 'info',
|
||||||
title: '发现新版本',
|
title: '发现新版本',
|
||||||
buttons: ['Yes', 'No'],
|
buttons: ['Yes', 'No'],
|
||||||
message: '发现新版本,是否去下载最新的版本?',
|
message: '发现新版本,更新了很多功能,是否去下载最新的版本?',
|
||||||
checkboxLabel: '以后不再提醒',
|
checkboxLabel: '以后不再提醒',
|
||||||
checkboxChecked: false
|
checkboxChecked: false
|
||||||
}, (res, checkboxChecked) => {
|
}, (res, checkboxChecked) => {
|
||||||
|
|||||||
@@ -66,10 +66,13 @@ const weiboUpload = async function (img, type, webContents) {
|
|||||||
body: '微博Cookie失效,请在网页版重新登录一遍'
|
body: '微博Cookie失效,请在网页版重新登录一遍'
|
||||||
})
|
})
|
||||||
notification.show()
|
notification.show()
|
||||||
|
return new Error()
|
||||||
} else {
|
} else {
|
||||||
imgList[i]['imgUrl'] = `https://ws1.sinaimg.cn/${quality}/${resTextJson.data.pics.pic_1.pid}`
|
const extname = imgList[i].extname === '.gif' ? '.gif' : '.jpg'
|
||||||
|
imgList[i]['imgUrl'] = `https://ws1.sinaimg.cn/${quality}/${resTextJson.data.pics.pic_1.pid}${extname}`
|
||||||
imgList[i]['type'] = 'weibo'
|
imgList[i]['type'] = 'weibo'
|
||||||
}
|
}
|
||||||
|
delete imgList[i].extname
|
||||||
}
|
}
|
||||||
webContents.send('uploadProgress', 100)
|
webContents.send('uploadProgress', 100)
|
||||||
return imgList
|
return imgList
|
||||||
@@ -80,6 +83,7 @@ const weiboUpload = async function (img, type, webContents) {
|
|||||||
body: res.body.msg
|
body: res.body.msg
|
||||||
})
|
})
|
||||||
notification.show()
|
notification.show()
|
||||||
|
return new Error()
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
webContents.send('uploadProgress', -1)
|
webContents.send('uploadProgress', -1)
|
||||||
|
|||||||
@@ -20,4 +20,16 @@
|
|||||||
#app
|
#app
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
user-select none
|
user-select none
|
||||||
|
.el-button-group
|
||||||
|
width 100%
|
||||||
|
.el-button
|
||||||
|
width 50%
|
||||||
|
*::-webkit-scrollbar
|
||||||
|
width 8px
|
||||||
|
height 8px
|
||||||
|
*::-webkit-scrollbar-thumb
|
||||||
|
border-radius 4px
|
||||||
|
background #6f6f6f
|
||||||
|
*::-webkit-scrollbar-track
|
||||||
|
background-color transparent
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -63,21 +63,118 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="修改快捷键"
|
||||||
|
:visible.sync="keyBindingVisible"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="快捷上传"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
class="align-center"
|
||||||
|
@keydown.native.prevent="keyDetect('upload', $event)"
|
||||||
|
v-model="shortKey.upload"
|
||||||
|
:autofocus="true"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="cancelKeyBinding">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmKeyBinding">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="修改快捷键"
|
||||||
|
:visible.sync="keyBindingVisible"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="快捷上传"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
class="align-center"
|
||||||
|
@keydown.native.prevent="keyDetect('upload', $event)"
|
||||||
|
v-model="shortKey.upload"
|
||||||
|
:autofocus="true"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="cancelKeyBinding">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmKeyBinding">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="自定义链接格式"
|
||||||
|
:visible.sync="customLinkVisible"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-position="top"
|
||||||
|
:model="customLink"
|
||||||
|
ref="customLink"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="用占位符$url来表示url的位置"
|
||||||
|
prop="value"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
class="align-center"
|
||||||
|
v-model="customLink.value"
|
||||||
|
:autofocus="true"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div>
|
||||||
|
如[]($url)
|
||||||
|
</div>
|
||||||
|
<span slot="footer">
|
||||||
|
<el-button @click="cancelCustomLink">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmCustomLink">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import pkg from '../../../package.json'
|
import pkg from '../../../package.json'
|
||||||
|
import keyDetect from 'utils/key-binding'
|
||||||
import { remote } from 'electron'
|
import { remote } from 'electron'
|
||||||
|
import db from '../../datastore'
|
||||||
const { Menu, dialog, BrowserWindow } = remote
|
const { Menu, dialog, BrowserWindow } = remote
|
||||||
export default {
|
export default {
|
||||||
name: 'setting-page',
|
name: 'setting-page',
|
||||||
data () {
|
data () {
|
||||||
|
const customLinkRule = (rule, value, callback) => {
|
||||||
|
if (!/\$url/.test(value)) {
|
||||||
|
return callback(new Error('必须含有$url'))
|
||||||
|
} else {
|
||||||
|
return callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
version: pkg.version,
|
version: process.env.NODE_ENV === 'production' ? pkg.version : 'Dev',
|
||||||
defaultActive: 'upload',
|
defaultActive: 'upload',
|
||||||
menu: null,
|
menu: null,
|
||||||
visible: false,
|
visible: false,
|
||||||
os: ''
|
keyBindingVisible: false,
|
||||||
|
customLinkVisible: false,
|
||||||
|
customLink: {
|
||||||
|
value: db.read().get('customLink').value() || '$url'
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
value: [
|
||||||
|
{ validator: customLinkRule, trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
os: '',
|
||||||
|
shortKey: {
|
||||||
|
upload: db.read().get('shortKey.upload').value()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -117,6 +214,18 @@ export default {
|
|||||||
_this.visible = true
|
_this.visible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '修改快捷键',
|
||||||
|
click () {
|
||||||
|
_this.keyBindingVisible = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自定义链接格式',
|
||||||
|
click () {
|
||||||
|
_this.customLinkVisible = true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '打开更新助手',
|
label: '打开更新助手',
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
@@ -131,6 +240,34 @@ export default {
|
|||||||
},
|
},
|
||||||
openDialog () {
|
openDialog () {
|
||||||
this.menu.popup(remote.getCurrentWindow)
|
this.menu.popup(remote.getCurrentWindow)
|
||||||
|
},
|
||||||
|
keyDetect (type, event) {
|
||||||
|
this.shortKey[type] = keyDetect(event).join('+')
|
||||||
|
},
|
||||||
|
cancelKeyBinding () {
|
||||||
|
this.keyBindingVisible = false
|
||||||
|
this.shortKey = db.read().get('shortKey').value()
|
||||||
|
},
|
||||||
|
confirmKeyBinding () {
|
||||||
|
const oldKey = db.read().get('shortKey').value()
|
||||||
|
db.read().set('shortKey', this.shortKey).write()
|
||||||
|
this.keyBindingVisible = false
|
||||||
|
this.$electron.ipcRenderer.send('updateShortKey', oldKey)
|
||||||
|
},
|
||||||
|
cancelCustomLink () {
|
||||||
|
this.customLinkVisible = false
|
||||||
|
this.customLink.value = db.read().get('customLink').value() || '$url'
|
||||||
|
},
|
||||||
|
confirmCustomLink () {
|
||||||
|
this.$refs.customLink.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
db.read().set('customLink', this.customLink.value).write()
|
||||||
|
this.customLinkVisible = false
|
||||||
|
this.$electron.ipcRenderer.send('updateCustomLink')
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteEnter: (to, from, next) => {
|
beforeRouteEnter: (to, from, next) => {
|
||||||
@@ -211,4 +348,7 @@ export default {
|
|||||||
&-title
|
&-title
|
||||||
text-align center
|
text-align center
|
||||||
color #878d99
|
color #878d99
|
||||||
|
.align-center
|
||||||
|
input
|
||||||
|
text-align center
|
||||||
</style>
|
</style>
|
||||||
@@ -58,8 +58,16 @@
|
|||||||
>
|
>
|
||||||
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如?imageslim"></el-input>
|
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如?imageslim"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="指定存储路径"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="confirm">确定</el-button>
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||||
|
<el-button type="success" @click="setDefaultPicBed('qiniu')" round :disabled="defaultPicBed === 'qiniu'">设为默认图床</el-button>
|
||||||
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -79,7 +87,8 @@ export default {
|
|||||||
bucket: '',
|
bucket: '',
|
||||||
url: '',
|
url: '',
|
||||||
area: 'z0',
|
area: 'z0',
|
||||||
options: ''
|
options: '',
|
||||||
|
path: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -122,11 +131,10 @@ export default {
|
|||||||
line-height 22px
|
line-height 22px
|
||||||
padding-bottom 0
|
padding-bottom 0
|
||||||
color #eee
|
color #eee
|
||||||
.el-button
|
|
||||||
width 100%
|
|
||||||
border-radius 19px
|
|
||||||
.el-input__inner
|
.el-input__inner
|
||||||
border-radius 19px
|
border-radius 19px
|
||||||
|
&-item
|
||||||
|
margin-bottom 10.5px
|
||||||
.el-radio-group
|
.el-radio-group
|
||||||
width 100%
|
width 100%
|
||||||
label
|
label
|
||||||
|
|||||||
@@ -56,8 +56,16 @@
|
|||||||
>
|
>
|
||||||
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="设定自定义域名"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.customUrl" @keyup.native.enter="confirm" placeholder="例如https://xxxx.com"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="confirm">确定</el-button>
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||||
|
<el-button type="success" @click="setDefaultPicBed('tcyun')" round :disabled="defaultPicBed === 'tcyun'">设为默认图床</el-button>
|
||||||
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -77,7 +85,8 @@ export default {
|
|||||||
bucket: '',
|
bucket: '',
|
||||||
appId: '',
|
appId: '',
|
||||||
area: '',
|
area: '',
|
||||||
path: ''
|
path: '',
|
||||||
|
customUrl: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -120,11 +129,10 @@ export default {
|
|||||||
line-height 22px
|
line-height 22px
|
||||||
padding-bottom 0
|
padding-bottom 0
|
||||||
color #eee
|
color #eee
|
||||||
.el-button
|
|
||||||
width 100%
|
|
||||||
border-radius 19px
|
|
||||||
.el-input__inner
|
.el-input__inner
|
||||||
border-radius 19px
|
border-radius 19px
|
||||||
|
&-item
|
||||||
|
margin-bottom 10.5px
|
||||||
.el-radio-group
|
.el-radio-group
|
||||||
width 100%
|
width 100%
|
||||||
label
|
label
|
||||||
|
|||||||
@@ -48,8 +48,16 @@
|
|||||||
>
|
>
|
||||||
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如!imgslim"></el-input>
|
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如!imgslim"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="指定存储路径"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="confirm">确定</el-button>
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||||
|
<el-button type="success" @click="setDefaultPicBed('upyun')" round :disabled="defaultPicBed === 'upyun'">设为默认图床</el-button>
|
||||||
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -67,7 +75,8 @@ export default {
|
|||||||
bucket: '',
|
bucket: '',
|
||||||
operator: '',
|
operator: '',
|
||||||
password: '',
|
password: '',
|
||||||
options: ''
|
options: '',
|
||||||
|
path: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -110,9 +119,6 @@ export default {
|
|||||||
line-height 22px
|
line-height 22px
|
||||||
padding-bottom 0
|
padding-bottom 0
|
||||||
color #eee
|
color #eee
|
||||||
.el-button
|
|
||||||
width 100%
|
|
||||||
border-radius 19px
|
|
||||||
.el-input__inner
|
.el-input__inner
|
||||||
border-radius 19px
|
border-radius 19px
|
||||||
.el-radio-group
|
.el-radio-group
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="upload-view">
|
<div id="upload-view">
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="16" :offset="4">
|
<el-col :span="20" :offset="2">
|
||||||
<div class="view-title">
|
<div class="view-title">
|
||||||
图片上传
|
图片上传
|
||||||
</div>
|
</div>
|
||||||
@@ -25,19 +25,28 @@
|
|||||||
:status="showError ? 'exception' : ''"
|
:status="showError ? 'exception' : ''"
|
||||||
></el-progress>
|
></el-progress>
|
||||||
<div class="paste-style">
|
<div class="paste-style">
|
||||||
<div class="paste-style__text">
|
<div class="el-col-16">
|
||||||
链接格式
|
<div class="paste-style__text">
|
||||||
|
链接格式
|
||||||
|
</div>
|
||||||
|
<el-radio-group v-model="pasteStyle" size="mini"
|
||||||
|
@change="handlePasteStyleChange"
|
||||||
|
>
|
||||||
|
<el-radio-button label="markdown">
|
||||||
|
Markdown
|
||||||
|
</el-radio-button>
|
||||||
|
<el-radio-button label="HTML"></el-radio-button>
|
||||||
|
<el-radio-button label="URL"></el-radio-button>
|
||||||
|
<el-radio-button label="UBB"></el-radio-button>
|
||||||
|
<el-radio-button label="Custom" title="自定义"></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div class="el-col-8">
|
||||||
|
<div class="paste-style__text">
|
||||||
|
快捷上传
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" round size="mini" @click="uploadClipboardFiles">剪贴板图片上传</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-radio-group v-model="pasteStyle" size="mini"
|
|
||||||
@change="handlePasteStyleChange"
|
|
||||||
>
|
|
||||||
<el-radio-button label="markdown">
|
|
||||||
Markdown
|
|
||||||
</el-radio-button>
|
|
||||||
<el-radio-button label="HTML"> </el-radio-button>
|
|
||||||
<el-radio-button label="URL"> </el-radio-button>
|
|
||||||
<el-radio-button label="UBB"> </el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -114,6 +123,9 @@ export default {
|
|||||||
handlePasteStyleChange (val) {
|
handlePasteStyleChange (val) {
|
||||||
this.$db.read().set('picBed.pasteStyle', val)
|
this.$db.read().set('picBed.pasteStyle', val)
|
||||||
.write()
|
.write()
|
||||||
|
},
|
||||||
|
uploadClipboardFiles () {
|
||||||
|
this.$electron.ipcRenderer.send('uploadClipboardFilesFromUploadPage')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,6 +142,8 @@ export default {
|
|||||||
border 2px dashed #dddddd
|
border 2px dashed #dddddd
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
text-align center
|
text-align center
|
||||||
|
width 450px
|
||||||
|
margin-left 25px
|
||||||
color #dddddd
|
color #dddddd
|
||||||
cursor pointer
|
cursor pointer
|
||||||
transition all .2s ease-in-out
|
transition all .2s ease-in-out
|
||||||
@@ -152,6 +166,8 @@ export default {
|
|||||||
margin-top 20px
|
margin-top 20px
|
||||||
opacity 0
|
opacity 0
|
||||||
transition all .2s ease-in-out
|
transition all .2s ease-in-out
|
||||||
|
width 450px
|
||||||
|
margin-left 25px
|
||||||
&.show
|
&.show
|
||||||
opacity 1
|
opacity 1
|
||||||
.el-progress-bar__inner
|
.el-progress-bar__inner
|
||||||
|
|||||||
@@ -51,7 +51,10 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="confirm('weiboForm')" round>确定</el-button>
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="confirm('weiboForm')" round>确定</el-button>
|
||||||
|
<el-button type="success" @click="setDefaultPicBed('weibo')" round :disabled="defaultPicBed === 'weibo'">设为默认图床</el-button>
|
||||||
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -129,8 +132,10 @@ export default {
|
|||||||
line-height 22px
|
line-height 22px
|
||||||
padding-bottom 0
|
padding-bottom 0
|
||||||
color #eee
|
color #eee
|
||||||
.el-button
|
.el-button-group
|
||||||
width 100%
|
width 100%
|
||||||
|
.el-button
|
||||||
|
width 50%
|
||||||
.el-input__inner
|
.el-input__inner
|
||||||
border-radius 19px
|
border-radius 19px
|
||||||
.el-radio-group
|
.el-radio-group
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
|
import db from '../../datastore'
|
||||||
export default {
|
export default {
|
||||||
mounted () {
|
mounted () {
|
||||||
this.disableDragEvent()
|
this.disableDragEvent()
|
||||||
},
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
defaultPicBed: db.read().get('picBed.current').value()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
disableDragEvent () {
|
disableDragEvent () {
|
||||||
window.addEventListener('dragenter', this.disableDrag, false)
|
window.addEventListener('dragenter', this.disableDrag, false)
|
||||||
@@ -15,6 +21,17 @@ export default {
|
|||||||
e.dataTransfer.effectAllowed = 'none'
|
e.dataTransfer.effectAllowed = 'none'
|
||||||
e.dataTransfer.dropEffect = 'none'
|
e.dataTransfer.dropEffect = 'none'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
setDefaultPicBed (type) {
|
||||||
|
db.read().set('picBed.current', type).write()
|
||||||
|
this.defaultPicBed = type
|
||||||
|
this.$electron.ipcRenderer.send('updateDefaultPicBed')
|
||||||
|
const successNotification = new window.Notification('设置默认图床', {
|
||||||
|
body: '设置成功'
|
||||||
|
})
|
||||||
|
successNotification.onclick = () => {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import keycode from 'keycode'
|
||||||
|
|
||||||
|
const isSpecialKey = (keyCode) => {
|
||||||
|
const keyArr = [
|
||||||
|
16, // Shift
|
||||||
|
17, // Ctrl
|
||||||
|
18, // Alt
|
||||||
|
91, // Left Meta
|
||||||
|
93 // Right Meta
|
||||||
|
]
|
||||||
|
|
||||||
|
return keyArr.includes(keyCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
const keyDetect = (event) => {
|
||||||
|
const meta = process.platform === 'darwin' ? 'Cmd' : 'Super'
|
||||||
|
let specialKey = {
|
||||||
|
Ctrl: event.ctrlKey,
|
||||||
|
Shift: event.shiftKey,
|
||||||
|
Alt: event.altKey
|
||||||
|
}
|
||||||
|
specialKey[meta] = event.metaKey
|
||||||
|
|
||||||
|
let pressKey = []
|
||||||
|
|
||||||
|
for (let i in specialKey) {
|
||||||
|
if (specialKey[i]) {
|
||||||
|
pressKey.push(i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isSpecialKey(event.keyCode)) {
|
||||||
|
pressKey.push(keycode(event.keyCode).toUpperCase())
|
||||||
|
}
|
||||||
|
return pressKey
|
||||||
|
}
|
||||||
|
|
||||||
|
export default keyDetect
|
||||||
@@ -3556,6 +3556,10 @@ fd-slicer@~1.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
pend "~1.2.0"
|
pend "~1.2.0"
|
||||||
|
|
||||||
|
fecha@^2.3.3:
|
||||||
|
version "2.3.3"
|
||||||
|
resolved "http://registry.npm.taobao.org/fecha/download/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd"
|
||||||
|
|
||||||
figures@^1.4.0:
|
figures@^1.4.0:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
|
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
|
||||||
@@ -4884,6 +4888,10 @@ keyboardevents-areequal@^0.2.1:
|
|||||||
version "0.2.2"
|
version "0.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz#88191ec738ce9f7591c25e9056de928b40277194"
|
resolved "https://registry.yarnpkg.com/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz#88191ec738ce9f7591c25e9056de928b40277194"
|
||||||
|
|
||||||
|
keycode@^2.1.9:
|
||||||
|
version "2.1.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa"
|
||||||
|
|
||||||
keypress@0.1.x:
|
keypress@0.1.x:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a"
|
resolved "https://registry.yarnpkg.com/keypress/-/keypress-0.1.0.tgz#4a3188d4291b66b4f65edb99f806aa9ae293592a"
|
||||||
|
|||||||
Reference in New Issue
Block a user