Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
fixed streams loading and projects upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandruradovici committed Jul 21, 2017
1 parent 32059ec commit f33c8f5
Show file tree
Hide file tree
Showing 8 changed files with 783 additions and 926 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Wyliodrin STUDIO 12.1

* fixed loading streams projects

## Wyliodrin STUDIO 12

* **Added** notebook
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"description":"__MSG_appDesc__",
"version": "12.0",
"version": "12.1",
"manifest_version": 2,
"default_locale":"en",
"author":"Wyliodrin SRL",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wyliodrin-studio",
"version": "11.0.0",
"version": "12.1.0",
"description": "Wyliodrin STUDIO is a Chrome based IDE for software and hardware development in IoT and Embedded Linux",
"author": "Wyliodrin SRL",
"license": "GPL-3.0",
Expand Down
16 changes: 15 additions & 1 deletion source/public/controllers/ProjectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ var app = angular.module ('wyliodrinApp');
$scope.showStreams = true;
red.contentWindow.postMessage ({projectid:$scope.project.id,content:$scope.tree.selectednode.content}, '*');

red.reload();
// red.reload();
}
else{
$scope.showStreams = false;
Expand Down Expand Up @@ -385,6 +385,10 @@ var app = angular.module ('wyliodrinApp');
softwareEditor.getSession().setUseSoftTabs (true);
}
}
setTimeout (function ()
{
$(window).trigger ('resize');
});
}
};

Expand Down Expand Up @@ -1039,7 +1043,17 @@ var app = angular.module ('wyliodrinApp');
{
if (project.tree === undefined){
//older style projects
$mdDialog.show(
$mdDialog.alert()
.clickOutsideToClose(true)
.title($filter('translate')('TOOLBAR_UPDATE'))
.textContent($filter('translate')('UPDATE_SD_CARD_IMAGE'))
.ariaLabel($filter('translate')('UPDATE_SD_CARD_IMAGE'))
.ok($filter('translate')('Ok'))
);
project = library.convertToTree(project);
console.log ('Project');
console.log (project);
library.storeTree (project.id, project.tree);

}
Expand Down
13 changes: 10 additions & 3 deletions source/public/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ var _ = require ('lodash');

var db = new dexie ("WyliodrinApp");

db.version(7).stores ({
applications:"++id,name,date,main,dashboard,firmware,notebook,visualproject,language,schematics,tree",
settings:"key,value"
});

db.version(6).stores ({
applications:"++id,name,date,main,dashboard,firmware,notebook,visualproject,language,schematics",
settings:"key,value"
Expand Down Expand Up @@ -48,7 +53,7 @@ function add (value, language, done, devicecategory)
var title = value;
debug ('Adding project with title '+title+' in '+language);

var startproject = generateProject(title,language);
var startproject = generateProject(undefined, title,language);

db.applications.add (startproject).then (function (id)
{
Expand All @@ -74,7 +79,7 @@ function add (value, language, done, devicecategory)
}
}

function generateProject(title, language, date, mainContent, visualContent)
function generateProject(id, title, language, date, mainContent, visualContent)
{
if (!date){
date = new Date().getTime();
Expand All @@ -86,6 +91,8 @@ function generateProject(title, language, date, mainContent, visualContent)

var ext = _.filter(settings.LANGUAGES, { 'title' : language } )[0].ext;
var startproject = {
id: id,
title: title,
tree:
[{name:title, id:1,isdir:true,isroot:true,children:
[{name:language,id:2,isdir:true,issoftware:true,children:
Expand Down Expand Up @@ -144,7 +151,7 @@ function storeTree (id, tree)

function convertToTree(project)
{
var temp = generateProject(project.title, project.language, project.date, project.main, project.visualproject);
var temp = generateProject(project.id, project.title, project.language, project.date, project.main, project.visualproject);
return temp;
}

Expand Down
Loading

0 comments on commit f33c8f5

Please sign in to comment.