fix tools/device import/export
This commit is contained in:
parent
61d2e30e07
commit
de6747606a
4 changed files with 9 additions and 6 deletions
|
|
@ -331,7 +331,7 @@ function renderDevices(devices) {
|
||||||
};
|
};
|
||||||
ui.deviceExport.onclick = function(event) {
|
ui.deviceExport.onclick = function(event) {
|
||||||
const record = {
|
const record = {
|
||||||
version: kiri.version,
|
version: api.version,
|
||||||
device: selected,
|
device: selected,
|
||||||
process: api.process.code(),
|
process: api.process.code(),
|
||||||
profiles: event.altKey ? settings.prof() : undefined,
|
profiles: event.altKey ? settings.prof() : undefined,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
|
|
||||||
import './frame.js';
|
import './frame.js';
|
||||||
|
import '../../ext/base64.js';
|
||||||
|
|
||||||
import lang from './lang.js';
|
import lang from './lang.js';
|
||||||
import STACKS from './stacks.js';
|
import STACKS from './stacks.js';
|
||||||
|
|
|
||||||
|
|
@ -544,12 +544,14 @@ function settingsImport(data, ask) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api.const.LOCAL) console.log('import', data);
|
if (api.const.LOCAL) console.log('import', data);
|
||||||
let isSettings = (data.settings && data.version && data.time);
|
let isSettings = (data.settings && data.time);
|
||||||
let isProcess = (data.process && data.version && data.time && data.mode && data.name);
|
let isProcess = (data.process && data.time && data.mode && data.name);
|
||||||
let isDevice = (data.device && data.version && data.time);
|
let isDevice = (data.device && data.time);
|
||||||
let isTools = (data.tools && data.version && data.time)
|
let isTools = (data.tools && data.time)
|
||||||
let isWork = (data.work);
|
let isWork = (data.work);
|
||||||
|
|
||||||
if (!isSettings && !isDevice && !isProcess && !isTools) {
|
if (!isSettings && !isDevice && !isProcess && !isTools) {
|
||||||
uc.alert('invalid settings or device format');
|
uc.alert('invalid settings or device format');
|
||||||
console.log('data',data);
|
console.log('data',data);
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ function _showTools() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const record = {
|
const record = {
|
||||||
version: kiri.version,
|
version: api.version,
|
||||||
tools: api.conf.get().tools,
|
tools: api.conf.get().tools,
|
||||||
time: Date.now()
|
time: Date.now()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue