update files

This commit is contained in:
nuintun 2015-11-23 21:47:32 +08:00
parent 75c28d020d
commit 0b8eb53557
3 changed files with 52 additions and 4 deletions

View File

@ -294,7 +294,8 @@ header [class*=" icon-"] {
height: calc(100% - 31px);
overflow: auto;
}
.ui-project-tree li:nth-child(odd) {
.ui-project-tree li:nth-child(odd),
.ui-command-popup li:nth-child(odd) {
background-color: #eee;
}
.ui-project-tree li {
@ -355,6 +356,8 @@ header [class*=" icon-"] {
float: left;
font-size: 14px;
color: #333;
height: 39px;
line-height: 39px;
}
.ui-command a {
padding: 0 10px;
@ -372,17 +375,24 @@ header [class*=" icon-"] {
position: absolute;
top: 39px;
right: 0;
line-height: 30px;
background-color: #eee;
background-color: #fff;
border: 1px dashed #ccc;
border-top: none;
border-right: none;
background-clip: content-box;
}
.ui-command-popup li {
float: none;
min-width: 67px;
}
.ui-project-tree a,
.ui-command li a,
.ui-command-popup li a {
color: inherit;
}
.ui-command-popup li a {
width: 100%;
}
.ui-project-tree a:hover,
.ui-project-tree .active,
.ui-command a:hover {

View File

@ -5,6 +5,7 @@
'use strict';
var ipc = require('ipc-renderer');
var util = require('../util');
var Vue = require('../vue/vue');
require('../components/app-configure');
@ -38,7 +39,7 @@ window.addEventListener('DOMContentLoaded', function (){
this.activeIndex = index;
},
'save-configure': function (){
ipc.send('app-configure', 'save', JSON.parse(JSON.stringify(this.configure)));
ipc.send('app-configure', 'save', util.normalize(this.configure));
}
}
});

37
static/js/util/index.js Normal file
View File

@ -0,0 +1,37 @@
/**
* Created by nuintun on 2015/11/23.
*/
'use strict';
module.exports = {
normalize: function (vue){
return JSON.parse(JSON.stringify(vue));
},
clone: function (object){
var result;
switch (typeof object) {
case 'object':
if (object === null) {
result = null;
} else {
if (Array.isArray(object)) {
result = object.slice(0);
} else {
result = {};
Object.keys(object).forEach(function (key){
result[key] = module.exports.clone(object[key]);
});
}
}
break;
default:
result = object;
break;
}
return result;
}
};