mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-06 10:54:07 +08:00
update files
This commit is contained in:
parent
75c28d020d
commit
0b8eb53557
@ -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 {
|
||||
|
@ -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
37
static/js/util/index.js
Normal 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;
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user