mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 19:44:35 +08:00
update files
This commit is contained in:
parent
2727398d3a
commit
469ebd9744
26
index.html
26
index.html
@ -16,31 +16,7 @@
|
|||||||
<app-nav :configure.sync="configure" :active-index.sync="activeIndex"></app-nav>
|
<app-nav :configure.sync="configure" :active-index.sync="activeIndex"></app-nav>
|
||||||
</nav>
|
</nav>
|
||||||
<main class="ui-project-main fn-right">
|
<main class="ui-project-main fn-right">
|
||||||
<div class="ui-project-stage fn-hide">
|
<app-main :active-index="activeIndex" :projects.sync="configure.projects" :unique-projects.sync="uniqueProjects"></app-main>
|
||||||
<div class="ui-control-bar fn-clear">
|
|
||||||
<div class="ui-control-operate fn-left">
|
|
||||||
<a title="删除项目" href="javascript:;"><i class="icon-trash"></i></a>
|
|
||||||
<a title="设置项目" href="javascript:;"><i class="icon-gear"></i></a>
|
|
||||||
</div>
|
|
||||||
<div class="fn-right">
|
|
||||||
<ul class="ui-command fn-clear">
|
|
||||||
<li><a href="javascript:;"><i class="icon-play"></i>命令1</a></li>
|
|
||||||
<li><a href="javascript:;"><i class="icon-stop"></i>命令2</a></li>
|
|
||||||
<li><a href="javascript:;"><i class="icon-play"></i>命令3</a></li>
|
|
||||||
<li class="ui-command-more">
|
|
||||||
<a href="javascript:;">更多 <i class="icon-expand"></i></a>
|
|
||||||
<ul class="ui-command-popup fn-hide">
|
|
||||||
<li><a href="javascript:;"><i class="icon-play"></i>命令4</a></li>
|
|
||||||
<li><a href="javascript:;"><i class="icon-stop"></i>命令5</a></li>
|
|
||||||
<li><a href="javascript:;"><i class="icon-play"></i>命令6</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui-project-terminal"></div>
|
|
||||||
</div>
|
|
||||||
<project-configure :active-index.once="activeIndex" :projects.sync="configure.projects" :unique-projects.sync="{}"></project-configure>
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -10,10 +10,7 @@ var Vue = require('../vue/vue');
|
|||||||
require('../components/app-configure');
|
require('../components/app-configure');
|
||||||
require('../components/window-control');
|
require('../components/window-control');
|
||||||
require('../components/app-nav');
|
require('../components/app-nav');
|
||||||
require('../components/directory');
|
require('../components/app-main');
|
||||||
require('../components/project-base');
|
|
||||||
require('../components/dynamic-item');
|
|
||||||
require('../components/project-configure');
|
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', function (){
|
window.addEventListener('DOMContentLoaded', function (){
|
||||||
function normalize(configure){
|
function normalize(configure){
|
||||||
|
@ -9,6 +9,8 @@ var path = require('path');
|
|||||||
var ipc = require('ipc-renderer');
|
var ipc = require('ipc-renderer');
|
||||||
var Vue = require('../../vue/vue');
|
var Vue = require('../../vue/vue');
|
||||||
|
|
||||||
|
require('../project-base');
|
||||||
|
|
||||||
module.exports = Vue.component('app-configure', {
|
module.exports = Vue.component('app-configure', {
|
||||||
template: fs.readFileSync(path.join(__dirname, 'app-configure.html')).toString(),
|
template: fs.readFileSync(path.join(__dirname, 'app-configure.html')).toString(),
|
||||||
props: {
|
props: {
|
||||||
|
@ -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-project-stage fn-hide">
|
||||||
<div class="ui-control-bar fn-clear">
|
<div class="ui-control-bar fn-clear">
|
||||||
<div class="ui-control-operate fn-left">
|
<div class="ui-control-operate fn-left">
|
||||||
|
@ -1,3 +1,51 @@
|
|||||||
/**
|
/**
|
||||||
* Created by nuintun on 2015/11/20.
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@ -8,6 +8,8 @@ var fs = require('fs');
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var Vue = require('../../vue/vue');
|
var Vue = require('../../vue/vue');
|
||||||
|
|
||||||
|
require('../directory');
|
||||||
|
|
||||||
module.exports = Vue.component('project-base', {
|
module.exports = Vue.component('project-base', {
|
||||||
template: fs.readFileSync(path.join(__dirname, 'project-base.html')).toString(),
|
template: fs.readFileSync(path.join(__dirname, 'project-base.html')).toString(),
|
||||||
props: {
|
props: {
|
||||||
|
@ -9,27 +9,16 @@ var path = require('path');
|
|||||||
var ipc = require('ipc-renderer');
|
var ipc = require('ipc-renderer');
|
||||||
var Vue = require('../../vue/vue');
|
var Vue = require('../../vue/vue');
|
||||||
|
|
||||||
|
require('../project-base');
|
||||||
|
require('../dynamic-item');
|
||||||
|
|
||||||
module.exports = Vue.component('project-configure', {
|
module.exports = Vue.component('project-configure', {
|
||||||
template: fs.readFileSync(path.join(__dirname, 'project-configure.html')).toString(),
|
template: fs.readFileSync(path.join(__dirname, 'project-configure.html')).toString(),
|
||||||
props: {
|
props: {
|
||||||
activeIndex: {
|
project: {
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
projects: {
|
|
||||||
type: Object,
|
type: Object,
|
||||||
twoWay: true,
|
twoWay: true,
|
||||||
required: true
|
required: true
|
||||||
},
|
|
||||||
uniqueProjects: {
|
|
||||||
type: Object,
|
|
||||||
twoWay: true,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
project: function (){
|
|
||||||
return this.projects[this.activeIndex] || { name: '', path: '', env: [], command: [] };
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="ui-project-setting">
|
<div class="ui-project-setting">
|
||||||
<form @sumbit.prevent="edit">
|
<form @submit.prevent="edit">
|
||||||
<div class="ui-control-bar fn-clear">
|
<div class="ui-control-bar fn-clear">
|
||||||
<div class="fn-right">
|
<div class="fn-right">
|
||||||
<input type="submit" class="ui-button" value="确认"/>
|
<input type="submit" class="ui-button" value="确认"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user