update files

This commit is contained in:
nuintun
2015-11-23 12:20:53 +08:00
parent 2727398d3a
commit 469ebd9744
8 changed files with 60 additions and 46 deletions

View File

@@ -1,4 +1,4 @@
<project-configure></project-configure>
<project-configure :project.sync="project"></project-configure>
<div class="ui-project-stage fn-hide">
<div class="ui-control-bar fn-clear">
<div class="ui-control-operate fn-left">

View File

@@ -1,3 +1,51 @@
/**
* Created by nuintun on 2015/11/20.
*/
var fs = require('fs');
var path = require('path');
var ipc = require('ipc-renderer');
var Vue = require('../../vue/vue');
require('../project-configure');
module.exports = Vue.component('app-main', {
template: fs.readFileSync(path.join(__dirname, 'app-main.html')).toString(),
props: {
activeIndex: {
type: Number,
required: true
},
projects: {
type: Array,
twoWay: true,
required: true
},
uniqueProjects: {
type: Object,
twoWay: true,
required: true
}
},
computed: {
project: function (){
var project = this.projects[this.activeIndex] || {
name: '',
path: '',
env: [],
command: []
};
if (!project.env) {
project.env = [];
}
if (!project.command) {
project.command = [];
}
return project;
}
}
});