From 761c085486e9b6fd855d7dc3672e641da6e64c77 Mon Sep 17 00:00:00 2001 From: Mehrad malayeri <31411797+Mehradml@users.noreply.github.com> Date: Sat, 4 Jun 2022 17:09:32 +0300 Subject: [PATCH] Resolving issues (#535) * https://github.com/project-chip/zap/issues/316 * https://github.com/project-chip/zap/issues/423 --- package.json | 2 +- src-electron/rest/user-data.js | 9 -------- src/pages/PreferenceGeneration.vue | 34 ------------------------------ src/store/zap/state.js | 8 +++++++ 4 files changed, 9 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index c3b437bc..2322cf6c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "commonjs", "name": "zap", - "version": "2022.5.25", + "version": "2022.6.2", "description": "Configuration tool for the Zigbee Cluster Library", "productName": "zap", "cordovaId": "", diff --git a/src-electron/rest/user-data.js b/src-electron/rest/user-data.js index 497feecb..7b108dee 100644 --- a/src-electron/rest/user-data.js +++ b/src-electron/rest/user-data.js @@ -396,15 +396,6 @@ function httpGetPackages(db) { function httpGetAllPackages(db) { return async (request, response) => { let packages = await queryPackage.getAllPackages(db) - await Promise.all( - packages.map(async (singlePackage) => { - singlePackage.content = await fsPromise.readFile( - singlePackage.PATH, - 'utf8' - ) - return singlePackage - }) - ) response.status(StatusCodes.OK).json({ packages }) } } diff --git a/src/pages/PreferenceGeneration.vue b/src/pages/PreferenceGeneration.vue index f55e28df..a6c90531 100644 --- a/src/pages/PreferenceGeneration.vue +++ b/src/pages/PreferenceGeneration.vue @@ -31,29 +31,8 @@ limitations under the License. style="height: calc(100vh - 210px); overflow: hidden" :rows="1000" > - <template v-slot:body-cell-content="props"> - <q-td :props="props"> - <q-btn - flat - color="secondary" - dense - icon="visibility" - @click="showContent(props.row)" - /> - </q-td> - </template> <template v-slot:pagination> </template> </q-table> - <q-dialog v-model="showContentDialog"> - <q-card style="width: 800px; max-width: 80vw"> - <q-card-section> - <div>{{ activePackage.VERSION }} content:</div> - <pre> - {{ activePackage.content }} - </pre> - </q-card-section> - </q-card> - </q-dialog> </div> </template> <script> @@ -61,7 +40,6 @@ export default { name: 'PreferenceGeneration', data() { return { - showContentDialog: false, activePackage: {}, columns: [ { @@ -82,11 +60,6 @@ export default { label: 'Path', field: 'PATH', }, - { - name: 'content', - align: 'left', - label: 'Content', - }, ], } }, @@ -109,12 +82,5 @@ export default { }, }, }, - methods: { - showContent(data) { - console.log(data) - this.activePackage = data - this.showContentDialog = true - }, - }, } </script> diff --git a/src/store/zap/state.js b/src/store/zap/state.js index eeccb2ff..08358aa3 100644 --- a/src/store/zap/state.js +++ b/src/store/zap/state.js @@ -63,6 +63,14 @@ export default function () { context.enabledClusters.find((a) => cluster.id == a.id) != undefined, }, + { + label: 'Legal Clusters', + domainFilterFn: (domain, currentOpenDomains, context) => + context.enabledClusters.map((a) => a.domainName).includes(domain), + clusterFilterFn: (cluster, context) => + context.enabledClusters.find((a) => cluster.id == a.id) != + undefined, + }, ], actionOptions: [ { -- GitLab