Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
0e6ef4c1
Commit
0e6ef4c1
authored
Jul 04, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add copy paste to OS X
parent
26a88ea4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
10 deletions
+39
-10
main.ts
Breeze.UI/main.ts
+39
-10
No files found.
Breeze.UI/main.ts
View file @
0e6ef4c1
...
...
@@ -9,8 +9,6 @@ const path = require('path');
const
url
=
require
(
'url'
);
const
os
=
require
(
'os'
);
var
apiProcess
;
let
serve
;
const
args
=
process
.
argv
.
slice
(
1
);
serve
=
args
.
some
(
val
=>
val
===
"--serve"
);
...
...
@@ -71,7 +69,8 @@ function createWindow() {
req
.
write
(
''
);
req
.
end
();
}
});
}
);
}
// This method will be called when Electron has finished
...
...
@@ -86,7 +85,10 @@ app.on('ready', function () {
}
createTray
();
createWindow
();
})
if
(
os
.
plaform
()
===
'darwin'
){
createMenu
();
}
});
// Quit when all windows are closed.
app
.
on
(
'window-all-closed'
,
function
()
{
...
...
@@ -107,18 +109,19 @@ app.on('activate', function () {
});
function
startApi
()
{
var
apiProcess
;
const
exec
=
require
(
'child_process'
).
exec
;
//Start Breeze Daemon
let
apipath
=
path
.
join
(
__dirname
,
'.//assets//daemon//Breeze.Daemon'
);
let
apiPath
=
path
.
join
(
__dirname
,
'.//assets//daemon//Breeze.Daemon'
);
apiPath
=
apiPath
.
replace
(
/ /g
,
'// '
);
if
(
os
.
platform
()
===
'win32'
)
{
apipath
=
path
.
join
(
__dirname
,
'.
\\
assets
\\
daemon
\\
Breeze.Daemon.exe'
);
apiPath
=
path
.
join
(
__dirname
,
'.
\\
assets
\\
daemon
\\
Breeze.Daemon.exe'
);
//Handle spaces in paths
apiPath
=
apiPath
.
replace
(
/ /g
,
'
\\
'
);
}
//Handle spaces in paths
apipath
=
apipath
.
replace
(
/ /g
,
'
\\
'
);
apiProcess
=
exec
(
apipath
+
' light -testnet'
,
{
apiProcess
=
exec
(
apiPath
+
' light -testnet'
,
{
detached
:
true
},
(
error
,
stdout
,
stderr
)
=>
{
if
(
error
)
{
...
...
@@ -168,3 +171,29 @@ function writeLog(msg) {
function
writeLogError
(
msg
)
{
console
.
error
(
msg
);
};
function
createMenu
()
{
var
Menu
=
require
(
"menu"
);
// Create the Application's main menu
var
template
=
[{
label
:
"Application"
,
submenu
:
[
{
label
:
"About Application"
,
selector
:
"orderFrontStandardAboutPanel:"
},
{
type
:
"separator"
},
{
label
:
"Quit"
,
accelerator
:
"Command+Q"
,
click
:
function
()
{
app
.
quit
();
}}
]},
{
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:"
}
]}
];
Menu
.
setApplicationMenu
(
Menu
.
buildFromTemplate
(
template
));
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment