0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-07 20:15:05 +00:00
VueTube/NUXT/pages/logs.vue

58 lines
1.1 KiB
Vue
Raw Normal View History

2022-02-28 15:24:06 +00:00
<template>
<div>
<v-list-item v-for="(item, index) in logs" :key="index">
<v-card class="card">
2022-03-02 13:14:52 +00:00
<v-card-title>
2022-03-04 14:01:19 +00:00
<v-chip outlined class="errorChip" color="error" v-if="item.error">Error</v-chip>
2022-03-02 13:14:52 +00:00
{{ item.name }}
2022-03-02 17:38:24 +00:00
<span v-text="`• ${new Date(item.time).toLocaleString()}`" class="date" />
2022-03-02 13:14:52 +00:00
</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>
2022-02-28 15:24:06 +00:00
</v-card>
</v-list-item>
</div>
</template>
<style scoped>
.card {
width: 100%;
2022-03-02 19:15:15 +00:00
margin: 1em 0 1em 0;
2022-02-28 15:24:06 +00:00
}
2022-03-02 13:14:52 +00:00
.date {
2022-03-02 17:38:24 +00:00
margin: 0.4em;
2022-03-02 13:14:52 +00:00
font-size: 0.75em;
transform: translateY(5%);
2022-03-02 17:38:24 +00:00
color: #999;
2022-03-02 13:14:52 +00:00
}
2022-03-04 14:01:19 +00:00
.errorChip {
margin-right: 0.5em;
}
.logContent {
padding: 1em;
word-break: break-all;
}
2022-02-28 15:24:06 +00:00
</style>
<script>
export default {
data() {
return {
logs: new Array()
}
},
mounted() {
const logs = this.$youtube.logs
this.logs = logs;
}
}
</script>