mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 03:14:07 +08:00
update files
This commit is contained in:
parent
f33ddb479b
commit
9771e79e10
@ -85,7 +85,7 @@ function verifyConfigure(configure){
|
||||
&& command.value && typeof command.value === 'string';
|
||||
});
|
||||
|
||||
if (commandValid) {
|
||||
if (!commandValid) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -185,6 +185,7 @@ a:hover {
|
||||
background-color: #f57527;
|
||||
}
|
||||
header {
|
||||
height: 24px;
|
||||
padding: 3px 6px;
|
||||
position: relative;
|
||||
-webkit-app-region: drag;
|
||||
|
@ -46,6 +46,8 @@ module.exports = Vue.component('app-configure', {
|
||||
this.showPopup = !this.showPopup;
|
||||
|
||||
if (!this.showPopup) {
|
||||
this.name = '';
|
||||
this.path = '';
|
||||
this.submitError = '';
|
||||
|
||||
// clean error
|
||||
@ -62,6 +64,8 @@ module.exports = Vue.component('app-configure', {
|
||||
this.showPopup = false;
|
||||
this.configure.projects.push({ name: this.name, path: this.path, env: [], command: [] });
|
||||
|
||||
this.name = '';
|
||||
this.path = '';
|
||||
this.submitError = '';
|
||||
|
||||
// clean error
|
||||
|
@ -3,7 +3,7 @@
|
||||
:project="project"
|
||||
:unique-projects.sync="uniqueProjects">
|
||||
</project-configure>
|
||||
<div class="ui-project-stage">
|
||||
<div v-show="project.name && project.path" class="ui-project-stage">
|
||||
<div class="ui-control-bar fn-clear">
|
||||
<div class="ui-control-operate fn-left">
|
||||
<a title="删除项目" href="javascript:;" @click="remove"><i class="icon-trash"></i></a>
|
||||
|
@ -37,7 +37,12 @@ module.exports = Vue.component('app-main', {
|
||||
},
|
||||
computed: {
|
||||
project: function (){
|
||||
return util.clone(this.projects[this.activeIndex]);
|
||||
return util.clone(this.projects[this.activeIndex]) || {
|
||||
name: '',
|
||||
path: '',
|
||||
env: [],
|
||||
command: []
|
||||
};
|
||||
},
|
||||
command: function (){
|
||||
return this.project.command.slice(0, 3);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<ul>
|
||||
<ul v-show="configure.projects.length">
|
||||
<li v-for="(index, project) in configure.projects">
|
||||
<a href="javascript:;" :class="{ active: activeIndex === index }" :title="project.name" @click="select(index)">
|
||||
<i class="icon-folder"></i>{{ project.name }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user