Skip to content

Commit

Permalink
added assets example, cleaned up icons and taskbar grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas KOlba committed Apr 24, 2017
1 parent 62ee640 commit 7f9198e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 9 deletions.
20 changes: 16 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ app.use(cookieParser());
app.get('/doLogin',function(req,res){
var r = '';
var conf = [[
{entity:"asset",
props:{
alias:"hyperblotter-chart"}
},
{
entity:"app",
props:{
"name": "appA",
"url": "http://localhost:5090/ws-1/appA.html",
"uuid": "ws-1-appA",
"autoShow": true,
"icon": "http://localhost:8080/openfin.ico"
icon:"http://localhost:5090/openfin.ico",
taskbarIconGroup:"app-bootstrap-id"
},
"position":{
left:.5,
Expand All @@ -32,7 +37,8 @@ app.get('/doLogin',function(req,res){
"url": "http://localhost:5090/ws-1/appB.html",
"uuid": "ws-1-appB",
"autoShow": true,
"icon": "http://localhost:8080/openfin.ico"
icon:"http://localhost:5090/openfin.ico",
taskbarIconGroup:"app-bootstrap-id"
},
"position":{
left:.5,
Expand All @@ -42,14 +48,19 @@ app.get('/doLogin',function(req,res){
}
}],
[
{entity:"asset",
props:{
alias:"hyperblotter-chart2"}
},
{
entity:"app",
props:{
"name": "appA",
"url": "http://localhost:5090/ws-2/appA.html",
"uuid": "ws-2-appA",
"autoShow": true,
"icon": "http://localhost:8080/openfin.ico"
icon:"http://localhost:5090/openfin.ico",
taskbarIconGroup:"app-bootstrap-id"
},
"position":{
left:.5,
Expand All @@ -65,7 +76,8 @@ app.get('/doLogin',function(req,res){
"url": "http://localhost:5090/ws-2/appB.html",
"uuid": "ws-2-appB",
"autoShow": true,
"icon": "http://localhost:8080/openfin.ico"
icon:"http://localhost:5090/openfin.ico",
taskbarIconGroup:"app-bootstrap-id"
},
"position":{
left:.5,
Expand Down
18 changes: 15 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@
"url": "http://localhost:5090/index.html",
"icon": "http://localhost:5090/openfin.ico",
"uuid": "app-bootstrap-id",
"autoShow": false,
"alwaysOnTop": false
"autoShow": false
},
"runtime": {
"arguments": "",
"version": "stable"
},
"appAssets": [],
"appAssets": [
{
"src": "http://localhost:5090/assets/Basic.zip",
"alias": "hyperblotter-chart",
"target": "HyperblotterChart.exe",
"version": "1.0.0"
},
{
"src": "http://localhost:5090/assets/Advanced.zip",
"alias": "hyperblotter-chart2",
"target": "HyperblotterChart.exe",
"version": "1.0.0"
}
],
"shortcut": {
"company": "OpenFin",
"description": "Demonstration of the OpenFin App Bootstrap Pattern",
Expand Down
Binary file added assets/Advanced.zip
Binary file not shown.
Binary file added assets/Basic.zip
Binary file not shown.
15 changes: 13 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
frame: false,
resize: false,
autoShow: true,
saveWindowState:false
saveWindowState:false,
icon:"http://cdn.openfin.co/hyperblotter/favicon.ico",
taskbarIconGroup:"app-bootstrap-id"
}, () => {
console.log("The window has successfully been created");
}, () => {
Expand Down Expand Up @@ -144,7 +146,16 @@
ws.forEach(i => {
//enclose the item
var item = i;
if (item.entity === "app" && item.props.url){
if (item.entity === "asset"){
if (item.props.alias){
//launch the asset
fin.desktop.System.launchExternalProcess({
alias: item.props.alias
// arguments: args
},function(){},er => {console.log(er);});
}
}
else if (item.entity === "app" && item.props.url){

var app = new fin.desktop.Application(item.props, function(){
app.run(function(){
Expand Down

0 comments on commit 7f9198e

Please sign in to comment.