From 9771e79e1051ed6cd01bebb6de0aac243402e6f7 Mon Sep 17 00:00:00 2001 From: nuintun Date: Mon, 23 Nov 2015 23:23:40 +0800 Subject: [PATCH] update files --- bin/app-configure.js | 2 +- static/css/index.css | 1 + static/js/components/app-configure/index.js | 4 ++++ static/js/components/app-main/app-main.html | 2 +- static/js/components/app-main/index.js | 7 ++++++- static/js/components/app-nav/app-nav.html | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/bin/app-configure.js b/bin/app-configure.js index e3f73bb..cfa82cd 100644 --- a/bin/app-configure.js +++ b/bin/app-configure.js @@ -85,7 +85,7 @@ function verifyConfigure(configure){ && command.value && typeof command.value === 'string'; }); - if (commandValid) { + if (!commandValid) { return false; } } else { diff --git a/static/css/index.css b/static/css/index.css index 01111fc..e64447b 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -185,6 +185,7 @@ a:hover { background-color: #f57527; } header { + height: 24px; padding: 3px 6px; position: relative; -webkit-app-region: drag; diff --git a/static/js/components/app-configure/index.js b/static/js/components/app-configure/index.js index eff3f94..76e85c4 100644 --- a/static/js/components/app-configure/index.js +++ b/static/js/components/app-configure/index.js @@ -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 diff --git a/static/js/components/app-main/app-main.html b/static/js/components/app-main/app-main.html index 176d586..28e10fa 100644 --- a/static/js/components/app-main/app-main.html +++ b/static/js/components/app-main/app-main.html @@ -3,7 +3,7 @@ :project="project" :unique-projects.sync="uniqueProjects"> -
+
diff --git a/static/js/components/app-main/index.js b/static/js/components/app-main/index.js index f74f010..e94b3ed 100644 --- a/static/js/components/app-main/index.js +++ b/static/js/components/app-main/index.js @@ -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); diff --git a/static/js/components/app-nav/app-nav.html b/static/js/components/app-nav/app-nav.html index 051fd40..1ea5c33 100644 --- a/static/js/components/app-nav/app-nav.html +++ b/static/js/components/app-nav/app-nav.html @@ -1,4 +1,4 @@ -