send only the necessary keys
This commit is contained in:
parent
8b997ff237
commit
2e7f7d0f62
|
@ -157,7 +157,7 @@ const styleMan = (() => {
|
|||
},
|
||||
|
||||
/** @returns {Promise<Object<string,StyleObj[]>>}>} */
|
||||
async getAllOrdered() {
|
||||
async getAllOrdered(keys) {
|
||||
if (ready.then) await ready;
|
||||
const res = mapObj(orderWrap.value, group => group.map(uuid2style));
|
||||
if (res.main.length + res.prio.length < dataMap.size) {
|
||||
|
@ -167,7 +167,9 @@ const styleMan = (() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
return keys
|
||||
? mapObj(res, group => group.map(style => mapObj(style, null, keys)))
|
||||
: res;
|
||||
},
|
||||
|
||||
getOrder: () => orderWrap.value,
|
||||
|
|
|
@ -10,7 +10,7 @@ async function InjectionOrder(show = true) {
|
|||
return messageBoxProxy.close();
|
||||
}
|
||||
const SEL_ENTRY = '.injection-order-entry';
|
||||
const groups = await API.styles.getAllOrdered();
|
||||
const groups = await API.styles.getAllOrdered(['_id', 'id', 'name', 'enabled']);
|
||||
const ols = {};
|
||||
const parts = {};
|
||||
const entry = $create('li' + SEL_ENTRY, [
|
||||
|
|
Loading…
Reference in New Issue
Block a user