Reworked log data format, overhauled snackbar
This commit is contained in:
51
app/imports/ui/log/LogContent.vue
Normal file
51
app/imports/ui/log/LogContent.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template lang="html">
|
||||
<div class="log-content">
|
||||
<div
|
||||
v-for="(content, index) in model"
|
||||
:key="index"
|
||||
class="content-line"
|
||||
>
|
||||
<h4 class="content-name">
|
||||
{{ content.name }}
|
||||
</h4>
|
||||
<markdown-text
|
||||
v-if="content.value"
|
||||
class="content-value"
|
||||
:markdown="content.value"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import MarkdownText from '/imports/ui/components/MarkdownText.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MarkdownText,
|
||||
},
|
||||
props: {
|
||||
model: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.content-line {
|
||||
min-height: 24px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.content-line .details {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="css">
|
||||
.log-content .content-value > p:last-of-type{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -6,42 +6,17 @@
|
||||
v-if="model.text || (model.content && model.content.length)"
|
||||
class="pa-2"
|
||||
>
|
||||
<div
|
||||
v-for="(content, index) in model.content"
|
||||
:key="index"
|
||||
class="content-line"
|
||||
>
|
||||
<h4>
|
||||
{{ content.name }}
|
||||
</h4>
|
||||
<span
|
||||
v-if="content.error"
|
||||
class="error"
|
||||
>{{ content.error }}</span>
|
||||
{{ content.resultPrefix }}
|
||||
<span
|
||||
v-if="content.result"
|
||||
class="subheading font-weight-bold mx-1"
|
||||
>{{ content.result }}</span>
|
||||
<span
|
||||
v-if="content.details"
|
||||
>{{ content.details }}</span>
|
||||
<markdown-text
|
||||
v-if="content.description"
|
||||
class="description"
|
||||
:markdown="content.description"
|
||||
/>
|
||||
</div>
|
||||
<log-content :model="model.content" />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import MarkdownText from '/imports/ui/components/MarkdownText.vue';
|
||||
import LogContent from '/imports/ui/log/LogContent.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MarkdownText,
|
||||
LogContent,
|
||||
},
|
||||
props: {
|
||||
model: {
|
||||
@@ -51,20 +26,3 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.content-line {
|
||||
min-height: 24px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.content-line .details {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="css">
|
||||
.log-entry .description > p:last-of-type{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user