From 82ecd6b578ccd582f5049ec91713eb7a9cc06e76 Mon Sep 17 00:00:00 2001 From: Matthew White Date: Fri, 13 Dec 2024 12:53:38 -0500 Subject: [PATCH] Add devTools flag to config and use it to gate EntityBranchData --- src/components/entity/feed-entry.vue | 3 ++- src/components/entity/show.vue | 12 +++++++----- src/config.js | 4 +++- src/util/load-async.js | 4 ++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/components/entity/feed-entry.vue b/src/components/entity/feed-entry.vue index 26f9ce0ae..beea7176e 100644 --- a/src/components/entity/feed-entry.vue +++ b/src/components/entity/feed-entry.vue @@ -183,8 +183,9 @@ const deletedSubmission = (key) => t(key, { id: props.submission.instanceId }); // entity.create, entity.update.version const versionAnchor = (v) => `#v${v}`; +const config = inject('config'); const showBranchData = () => { - emit('branch-data', props.entityVersion.version); + if (config.devTools) emit('branch-data', props.entityVersion.version); }; diff --git a/src/components/entity/show.vue b/src/components/entity/show.vue index 30d51e214..81ad2ae4a 100644 --- a/src/components/entity/show.vue +++ b/src/components/entity/show.vue @@ -37,19 +37,19 @@ except according to the terms contained in the LICENSE file. :label="entity.dataExists ? entity.currentVersion.label : ''" :awaiting-response="awaitingResponse" @hide="deleteModal.hide()" @delete="requestDelete"/> - +