Skip to content

Commit 4561946

Browse files
authored
Merge pull request #395 from CVEProject/tat-39-40
#40 fix accordion toggle
2 parents 19e26af + 225276e commit 4561946

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/components/cveRecordLookupModule.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export default ({
128128
this.$store.commit('updateState', { serverError: false });
129129
this.$store.commit('updateState', { showHelpText: false });
130130
this.$store.commit('updateState', { isSearching: false });
131+
this.$store.commit('updateState', { showJsonRecord: false });
131132
},
132133
lookupId() {
133134
const self = this;

src/store/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default new Vuex.Store({
1717
error: false,
1818
serverError: false,
1919
showHelpText: false,
20+
showJsonRecord: false
2021
},
2122
mutations: {
2223
hideNotificationBanner(state) {

src/views/CVERecord.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</div>
3434
<div v-else>
3535
<h2 class="title">{{this.$store.state.recordData.ID}} Detail</h2>
36-
<section class="cve-accordian">
36+
<section class="cve-accordian mb-1">
3737
<div class="message">
3838
<div class="message-header cve-base-light-gray-borders-bg">
3939
<p style="margin-top: auto !important; margin-bottom: auto !important">
@@ -43,16 +43,15 @@
4343
:aria-expanded="!this.$store.state.showJsonRecord ? 'true' : 'false'" aria-controls="cve-id">
4444
<span class="icon is-small">
4545
<p id="cve-id-alttext" class="is-hidden">
46-
{{true ? 'collapse' : 'expand'}}
46+
{{this.$store.state.showJsonRecord ? 'collapse' : 'expand'}}
4747
</p>
4848
<font-awesome-icon :icon="this.$store.state.showJsonRecord ? 'minus' : 'plus'"
4949
aria-hidden="false" focusable="true" aria-labelledby="cve-id-alttext"/>
5050
</span>
5151
</button>
5252
</div>
53-
<div class="message-body pb-0" :class="{'is-hidden': false}" id="cve-id">
54-
<pre :class="[{'is-hidden': !this.$store.state.showJsonRecord}]"
55-
v-html="$sanitize(JSON.stringify(this.$store.state.recordData, null, 2))"></pre>
53+
<div class="message-body pb-0" :class="[{'is-hidden': !this.$store.state.showJsonRecord}]" id="cve-json">
54+
<pre v-html="$sanitize(JSON.stringify(this.$store.state.recordData, null, 2))"></pre>
5655
</div>
5756
</div>
5857
</section>
@@ -101,7 +100,7 @@
101100
</li>
102101
<li v-if="ProductVersion.vendor_version.version_value && ProductVersion.vendor_version.version_value.length > 0
103102
&& ProductVersion.vendor_version.version_value[0] !== ''">
104-
<span class="has-text-weight-bold">Versions:</span>
103+
<span class="has-text-weight-bold">Versions: </span>
105104
<span v-html="$sanitize(ProductVersion.vendor_version.version_value.join(', '))"></span>
106105
</li>
107106
<li v-if="ProductVersion.vendor_version.version_affected && ProductVersion.vendor_version.version_affected.length > 0">

0 commit comments

Comments
 (0)