mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
- cleanup root directory
- improve window behaviour
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('../../Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('../../Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../../Lato-Regular.ttf') format('truetype');
|
||||
src: url('../../resources/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('../../resources/Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../../resources/Lato-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('../../Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('../../Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../../Lato-Regular.ttf') format('truetype');
|
||||
src: url('../../resources/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('../../resources/Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../../resources/Lato-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-rendering: optimizeLegibility;
|
||||
@@ -90,8 +90,8 @@
|
||||
var version = require('remote').require('app').getVersion()
|
||||
global.version = version
|
||||
document.title = 'Boost ' + ((version == null || version.length === 0) ? 'DEV version' : 'v' + version)
|
||||
require('../electron-stylus')(__dirname + '/../styles/main/index.styl', 'mainCss')
|
||||
// require('../electron-stylus')(__dirname + '/../styles/main/index.styl')
|
||||
// require('../electron-stylus')(__dirname + '/../styles/main/index.styl', 'mainCss')
|
||||
require('../electron-stylus')(__dirname + '/../styles/main/index.styl')
|
||||
require('node-jsx').install({ harmony: true, extension: '.jsx' })
|
||||
require('./index.jsx')
|
||||
</script>
|
||||
|
||||
@@ -6,6 +6,9 @@ global-reset()
|
||||
@import './components/*'
|
||||
@import './containers/*'
|
||||
|
||||
*
|
||||
-webkit-app-region no-drag
|
||||
|
||||
html, body
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
26
finder-window.js
Normal file
26
finder-window.js
Normal file
@@ -0,0 +1,26 @@
|
||||
var BrowserWindow = require('browser-window')
|
||||
|
||||
var finderWindow = new BrowserWindow({
|
||||
width: 600,
|
||||
height: 400,
|
||||
show: false,
|
||||
frame: false,
|
||||
resizable: false,
|
||||
'always-on-top': true,
|
||||
'web-preferences': {
|
||||
'zoom-factor': 1.0,
|
||||
'overlay-scrollbars': true,
|
||||
'skip-taskbar': true
|
||||
},
|
||||
'standard-window': false
|
||||
})
|
||||
|
||||
finderWindow.loadUrl('file://' + __dirname + '/browser/finder/index.electron.html')
|
||||
|
||||
finderWindow.on('blur', function () {
|
||||
finderWindow.hide()
|
||||
})
|
||||
|
||||
finderWindow.setVisibleOnAllWorkspaces(true)
|
||||
|
||||
module.exports = finderWindow
|
||||
22
main-window.js
Normal file
22
main-window.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var BrowserWindow = require('browser-window')
|
||||
|
||||
var mainWindow = new BrowserWindow({
|
||||
width: 1080,
|
||||
height: 720,
|
||||
// frame: false,
|
||||
'web-preferences': {
|
||||
'zoom-factor': 1.0,
|
||||
'overlay-scrollbars': true
|
||||
},
|
||||
'standard-window': false
|
||||
})
|
||||
|
||||
mainWindow.loadUrl('file://' + __dirname + '/browser/main/index.electron.html')
|
||||
|
||||
mainWindow.setVisibleOnAllWorkspaces(true)
|
||||
|
||||
mainWindow.webContents.on('new-window', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
module.exports = mainWindow
|
||||
135
main.js
135
main.js
@@ -1,5 +1,4 @@
|
||||
var app = require('app')
|
||||
var BrowserWindow = require('browser-window')
|
||||
var Menu = require('menu')
|
||||
var MenuItem = require('menu-item')
|
||||
var Tray = require('tray')
|
||||
@@ -11,7 +10,7 @@ require('crash-reporter').start()
|
||||
var mainWindow = null
|
||||
var appIcon = null
|
||||
var menu = null
|
||||
var popUpWindow = null
|
||||
var finderWindow = null
|
||||
|
||||
var update = null
|
||||
|
||||
@@ -22,35 +21,12 @@ var update = null
|
||||
var version = app.getVersion()
|
||||
var versionText = (version == null || version.length === 0) ? 'DEV version' : 'v' + version
|
||||
var nn = require('node-notifier')
|
||||
var autoUpdater = require('auto-updater')
|
||||
var updater = require('./updater')
|
||||
var path = require('path')
|
||||
|
||||
autoUpdater
|
||||
.on('error', function (err, message) {
|
||||
console.error(message)
|
||||
nn.notify({
|
||||
title: 'Error! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: message
|
||||
})
|
||||
})
|
||||
.on('checking-for-update', function () {
|
||||
// Connecting
|
||||
})
|
||||
.on('update-available', function () {
|
||||
nn.notify({
|
||||
title: 'Update is available!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: 'Download started.. wait for the update ready.'
|
||||
})
|
||||
})
|
||||
.on('update-not-available', function () {
|
||||
nn.notify({
|
||||
title: 'Latest Build!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: 'Hope you to enjoy our app :D'
|
||||
})
|
||||
})
|
||||
var appQuit = false
|
||||
|
||||
updater
|
||||
.on('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) {
|
||||
nn.notify({
|
||||
title: 'Ready to Update!! ' + versionText,
|
||||
@@ -65,9 +41,12 @@ autoUpdater
|
||||
})
|
||||
|
||||
app.on('ready', function () {
|
||||
app.on('before-quit', function () {
|
||||
appQuit = true
|
||||
})
|
||||
console.log('Version ' + version)
|
||||
autoUpdater.setFeedUrl('http://orbital.b00st.io/rokt33r/boost/latest?version=' + version)
|
||||
autoUpdater.checkForUpdates()
|
||||
updater.setFeedUrl('http://orbital.b00st.io/rokt33r/boost/latest?version=' + version)
|
||||
updater.checkForUpdates()
|
||||
// menu start
|
||||
var template = require('./modules/menu-template')
|
||||
|
||||
@@ -81,25 +60,14 @@ app.on('ready', function () {
|
||||
|
||||
Menu.setApplicationMenu(menu)
|
||||
// menu end
|
||||
appIcon = new Tray(__dirname + '/tray-icon.png')
|
||||
appIcon = new Tray(__dirname + '/resources/tray-icon.png')
|
||||
appIcon.setToolTip('Boost')
|
||||
|
||||
var trayMenu = new Menu()
|
||||
trayMenu.append(new MenuItem({
|
||||
label: 'Open main window',
|
||||
click: function () {
|
||||
if (mainWindow == null) {
|
||||
makeNewMainWindow()
|
||||
}
|
||||
mainWindow.show()
|
||||
}
|
||||
}))
|
||||
trayMenu.append(new MenuItem({
|
||||
label: 'Update App',
|
||||
click: function () {
|
||||
if (update != null) {
|
||||
update()
|
||||
}
|
||||
if (mainWindow != null) mainWindow.show()
|
||||
}
|
||||
}))
|
||||
trayMenu.append(new MenuItem({
|
||||
@@ -110,37 +78,24 @@ app.on('ready', function () {
|
||||
}))
|
||||
appIcon.setContextMenu(trayMenu)
|
||||
|
||||
makeNewMainWindow()
|
||||
mainWindow = require('./main-window')
|
||||
mainWindow.on('close', function (e) {
|
||||
if (appQuit) return true
|
||||
e.preventDefault()
|
||||
mainWindow.hide()
|
||||
})
|
||||
if (update != null) {
|
||||
mainWindow.webContents.on('did-finish-load', function () {
|
||||
mainWindow.webContents.send('update-available', 'whoooooooh!')
|
||||
})
|
||||
}
|
||||
|
||||
app.on('activate-with-no-open-windows', function () {
|
||||
if (mainWindow == null) {
|
||||
makeNewMainWindow()
|
||||
return
|
||||
}
|
||||
if (mainWindow == null) return null
|
||||
mainWindow.show()
|
||||
})
|
||||
|
||||
popUpWindow = new BrowserWindow({
|
||||
width: 600,
|
||||
height: 400,
|
||||
show: false,
|
||||
frame: false,
|
||||
'zoom-factor': 1.0,
|
||||
'always-on-top': true,
|
||||
'web-preferences': {
|
||||
'overlay-scrollbars': true,
|
||||
'skip-taskbar': true
|
||||
},
|
||||
'standard-window': false
|
||||
})
|
||||
|
||||
popUpWindow.loadUrl('file://' + __dirname + '/browser/finder/index.electron.html')
|
||||
|
||||
popUpWindow.on('blur', function () {
|
||||
popUpWindow.hide()
|
||||
})
|
||||
|
||||
popUpWindow.setVisibleOnAllWorkspaces(true)
|
||||
finderWindow = require('./finder-window')
|
||||
|
||||
var globalShortcut = require('global-shortcut')
|
||||
console.log('jetpack launch')
|
||||
@@ -162,7 +117,7 @@ app.on('ready', function () {
|
||||
if (mainWindow != null && !mainWindow.isFocused()) {
|
||||
mainWindow.hide()
|
||||
}
|
||||
popUpWindow.show()
|
||||
finderWindow.show()
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(err.name)
|
||||
@@ -181,7 +136,7 @@ app.on('ready', function () {
|
||||
if (mainWindow != null && !mainWindow.isFocused()) {
|
||||
mainWindow.hide()
|
||||
}
|
||||
popUpWindow.show()
|
||||
finderWindow.show()
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(err.name)
|
||||
@@ -189,40 +144,10 @@ app.on('ready', function () {
|
||||
})
|
||||
|
||||
global.hideFinder = function () {
|
||||
if (mainWindow == null || !mainWindow.isVisible()) {
|
||||
if (!mainWindow.isVisible()) {
|
||||
Menu.sendActionToFirstResponder('hide:')
|
||||
} else {
|
||||
mainWindow.focus()
|
||||
}
|
||||
popUpWindow.hide()
|
||||
}
|
||||
})
|
||||
|
||||
function makeNewMainWindow () {
|
||||
console.log('new Window!')
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1080,
|
||||
height: 720,
|
||||
'zoom-factor': 1.0,
|
||||
'web-preferences': {
|
||||
'overlay-scrollbars': true
|
||||
},
|
||||
'standard-window': false
|
||||
})
|
||||
if (update != null) {
|
||||
mainWindow.webContents.on('did-finish-load', function () {
|
||||
mainWindow.webContents.send('update-available', 'whoooooooh!')
|
||||
})
|
||||
}
|
||||
|
||||
mainWindow.loadUrl('file://' + __dirname + '/browser/main/index.electron.html')
|
||||
|
||||
mainWindow.webContents.on('new-window', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
mainWindow.on('closed', function () {
|
||||
console.log('main closed')
|
||||
mainWindow = null
|
||||
app.dock.hide()
|
||||
})
|
||||
app.dock.show()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "boost",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "Boost App",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -45,7 +45,8 @@
|
||||
"reflux": "^0.2.8",
|
||||
"stylus": "^0.52.0",
|
||||
"superagent": "^1.2.0",
|
||||
"superagent-promise": "^1.0.3"
|
||||
"superagent-promise": "^1.0.3",
|
||||
"titlebar": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"css-loader": "^0.15.1",
|
||||
|
||||
20
readme.md
20
readme.md
@@ -1,20 +0,0 @@
|
||||
# CodeXen app 0.2.0
|
||||

|
||||
|
||||
Short code(Snippet/Templatefile/Command) storage + boosting service
|
||||
> This repo is a workbench to build CodeXen app
|
||||
|
||||
## Status
|
||||
v0.1 is building now
|
||||
|
||||
## How To Use
|
||||
|
||||
``` sh
|
||||
git clone https://github.com/Rokt33r/codexen-app.git
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
You can check it -> [localhost:8080](http://localhost:8080)
|
||||
|
||||
> Electron build will be updated soon.
|
||||
|
Before Width: | Height: | Size: 959 B After Width: | Height: | Size: 959 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,18 +0,0 @@
|
||||
※ 最近の方が上に来るように書きためていく
|
||||
|
||||
# Update Log
|
||||
|
||||
## v0.1.2 (2015/7/3)
|
||||
|
||||
- 利用規約・プライベートポリシーの追加
|
||||
|
||||
## v0.1.1 (2015/6/25)
|
||||
|
||||
- バーグ改善
|
||||
- Recipe機能追加
|
||||
|
||||
## v0.1.0 (2015/6/17)
|
||||
|
||||
- Web/OS X app release
|
||||
|
||||
## v0.2.0 (2015/7/...)
|
||||
37
updater.js
Normal file
37
updater.js
Normal file
@@ -0,0 +1,37 @@
|
||||
var autoUpdater = require('auto-updater')
|
||||
var nn = require('node-notifier')
|
||||
var app = require('app')
|
||||
var path = require('path')
|
||||
|
||||
var version = app.getVersion()
|
||||
var versionText = (version == null || version.length === 0) ? 'DEV version' : 'v' + version
|
||||
|
||||
autoUpdater
|
||||
.on('error', function (err, message) {
|
||||
console.error(err)
|
||||
console.error(message)
|
||||
nn.notify({
|
||||
title: 'Error! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: message
|
||||
})
|
||||
})
|
||||
// .on('checking-for-update', function () {
|
||||
// // Connecting
|
||||
// })
|
||||
.on('update-available', function () {
|
||||
nn.notify({
|
||||
title: 'Update is available!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: 'Download started.. wait for the update ready.'
|
||||
})
|
||||
})
|
||||
.on('update-not-available', function () {
|
||||
nn.notify({
|
||||
title: 'Latest Build!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: 'Hope you to enjoy our app :D'
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = autoUpdater
|
||||
Reference in New Issue
Block a user