Skip to content

Commit

Permalink
Merge pull request #395 from CVEProject/tat-39-40
Browse files Browse the repository at this point in the history
#40 fix accordion toggle
  • Loading branch information
Nick-P-Orr authored Sep 2, 2021
2 parents 19e26af + 225276e commit 4561946
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/components/cveRecordLookupModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default ({
this.$store.commit('updateState', { serverError: false });
this.$store.commit('updateState', { showHelpText: false });
this.$store.commit('updateState', { isSearching: false });
this.$store.commit('updateState', { showJsonRecord: false });
},
lookupId() {
const self = this;
Expand Down
1 change: 1 addition & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default new Vuex.Store({
error: false,
serverError: false,
showHelpText: false,
showJsonRecord: false
},
mutations: {
hideNotificationBanner(state) {
Expand Down
11 changes: 5 additions & 6 deletions src/views/CVERecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<div v-else>
<h2 class="title">{{this.$store.state.recordData.ID}} Detail</h2>
<section class="cve-accordian">
<section class="cve-accordian mb-1">
<div class="message">
<div class="message-header cve-base-light-gray-borders-bg">
<p style="margin-top: auto !important; margin-bottom: auto !important">
Expand All @@ -43,16 +43,15 @@
:aria-expanded="!this.$store.state.showJsonRecord ? 'true' : 'false'" aria-controls="cve-id">
<span class="icon is-small">
<p id="cve-id-alttext" class="is-hidden">
{{true ? 'collapse' : 'expand'}}
{{this.$store.state.showJsonRecord ? 'collapse' : 'expand'}}
</p>
<font-awesome-icon :icon="this.$store.state.showJsonRecord ? 'minus' : 'plus'"
aria-hidden="false" focusable="true" aria-labelledby="cve-id-alttext"/>
</span>
</button>
</div>
<div class="message-body pb-0" :class="{'is-hidden': false}" id="cve-id">
<pre :class="[{'is-hidden': !this.$store.state.showJsonRecord}]"
v-html="$sanitize(JSON.stringify(this.$store.state.recordData, null, 2))"></pre>
<div class="message-body pb-0" :class="[{'is-hidden': !this.$store.state.showJsonRecord}]" id="cve-json">
<pre v-html="$sanitize(JSON.stringify(this.$store.state.recordData, null, 2))"></pre>
</div>
</div>
</section>
Expand Down Expand Up @@ -101,7 +100,7 @@
</li>
<li v-if="ProductVersion.vendor_version.version_value && ProductVersion.vendor_version.version_value.length > 0
&& ProductVersion.vendor_version.version_value[0] !== ''">
<span class="has-text-weight-bold">Versions:</span>
<span class="has-text-weight-bold">Versions: </span>
<span v-html="$sanitize(ProductVersion.vendor_version.version_value.join(', '))"></span>
</li>
<li v-if="ProductVersion.vendor_version.version_affected && ProductVersion.vendor_version.version_affected.length > 0">
Expand Down

0 comments on commit 4561946

Please sign in to comment.