0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-09 04:55:07 +00:00
VueTube/NUXT/pages/mods/logs.vue
2022-03-14 13:13:24 -04:00

57 lines
1.1 KiB
Vue

<template>
<div>
<v-list-item v-for="(item, index) in logs" :key="index">
<v-card class="card">
<v-card-title>
<v-chip outlined class="errorChip" color="error" v-if="item.error">Error</v-chip>
{{ item.name }}
<span v-text="`• ${new Date(item.time).toLocaleString()}`" class="date" />
</v-card-title>
<v-expansion-panels>
<v-expansion-panel>
<v-expansion-panel-header>More</v-expansion-panel-header>
<v-expansion-panel-content v-text="item.data" class="logContent" />
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-list-item>
</div>
</template>
<style scoped>
.card {
width: 100%;
margin: 1em 0 1em 0;
}
.date {
margin: 0.4em;
font-size: 0.75em;
transform: translateY(5%);
color: #999;
}
.errorChip {
margin-right: 0.5em;
}
.logContent {
padding: 1em;
word-break: break-all;
}
</style>
<script>
export default {
data() {
return {
logs: new Array()
}
},
mounted() {
const logs = this.$youtube.logs
this.logs = logs;
}
}
</script>