Compare commits

..
3 Commits
Author SHA1 Message Date
Molunerfinn 5fb11f5d89 1.0.3 2017-12-15 17:38:09 +08:00
Molunerfinn f78bfda258 Fixed: input paste bug 2017-12-15 17:37:38 +08:00
Molunerfinn 21ceafe649 Fixed: docs page width 2017-12-13 10:28:36 +08:00
4 changed files with 31 additions and 3 deletions
+1
View File
@@ -1,3 +1,4 @@
test/unit/coverage/**
test/unit/*.js
test/e2e/*.js
dist/
+2 -2
View File
@@ -74,7 +74,7 @@ h1
position relative
.mask
position absolute
width 100vw
width 100%
height 100vh
top 0
left 0
@@ -82,7 +82,7 @@ h1
z-index -1
#header
height 100vh
width 100vw
width 100%
background-image url("https://ws1.sinaimg.cn/large/8700af19ly1fm9ru6fqvjj22p81stdta")
background-attachment fixed
background-size cover
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "picgo",
"version": "1.0.2",
"version": "1.0.3",
"author": "Molunerfinn <marksz@teamsz.xyz>",
"description": "Easy to upload your pic & copy to write",
"license": "MIT",
+27
View File
@@ -15,6 +15,7 @@ if (process.env.NODE_ENV !== 'development') {
let window
let settingWindow
let tray
let menu
const winURL = process.env.NODE_ENV === 'development'
? `http://localhost:9080`
: `file://${__dirname}/index.html`
@@ -168,6 +169,30 @@ const createSettingWindow = () => {
})
}
const createMenu = () => {
const template = [{
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:' },
{ label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:' },
{ type: 'separator' },
{ label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' },
{ label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' },
{ label: 'Select All', accelerator: 'CmdOrCtrl+A', selector: 'selectAll:' },
{
label: 'Quit',
accelerator: 'CmdOrCtrl+Q',
click () {
app.quit()
}
}
]
}]
menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
}
const getWindowPosition = () => {
const windowBounds = window.getBounds()
const trayBounds = tray.getBounds()
@@ -232,6 +257,7 @@ ipcMain.on('uploadChoosedFiles', async (evt, files) => {
app.on('ready', () => {
createWindow()
createTray()
createMenu()
})
app.on('window-all-closed', () => {
@@ -244,6 +270,7 @@ app.on('activate', () => {
if (window === null || settingWindow === null) {
createWindow()
createTray()
createMenu()
}
})