0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-29 06:33:05 +00:00
VueTube/NUXT/pages/mods/logs.vue

60 lines
1.2 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-21 23:47:11 +00:00
<v-chip v-if="item.error" outlined class="errorChip" color="error"
>Error</v-chip
>
2022-03-02 13:14:52 +00:00
{{ item.name }}
2022-03-21 23:47:11 +00:00
<span
class="date"
v-text="`• ${new Date(item.time).toLocaleString()}`"
/>
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>
2022-03-21 23:47:11 +00:00
<v-expansion-panel-content class="logContent" v-text="item.data" />
</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 {
2022-03-21 23:47:11 +00:00
logs: new Array(),
};
2022-02-28 15:24:06 +00:00
},
mounted() {
2022-03-21 23:47:11 +00:00
const logs = this.$youtube.logs;
2022-02-28 15:24:06 +00:00
this.logs = logs;
2022-03-21 23:47:11 +00:00
},
};
2022-02-28 15:24:06 +00:00
</script>