mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 01:27:47 +08:00
update files
This commit is contained in:
@@ -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">
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user