0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-19 01:35:14 +00:00

style: 🎨 Lint

This commit is contained in:
Front 2022-04-03 20:39:48 -04:00
parent 0ec73029d0
commit 10339598e8

View file

@ -1,49 +1,29 @@
<template> <template>
<div class="py-2"> <div class="py-2">
<v-list-item v-for="(item, index) in commits" :key="index" class="my-1"> <v-list-item v-for="(item, index) in commits" :key="index" class="my-1">
<v-card <v-card flat class="card my-2 background" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'">
flat
class="card my-2 background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
>
<v-card-title style="padding: 0 0.25em 0 0.75em"> <v-card-title style="padding: 0 0.25em 0 0.75em">
{{ item.author ? item.author.login : item.commit.author.name }} {{ item.author ? item.author.login : item.commit.author.name }}
<span <span class="subtitle background--text" :class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
class="subtitle background--text" v-text="`• ${item.sha.substring(0, 7)}`" />
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
v-text="`• ${item.sha.substring(0, 7)}`"
/>
<v-spacer /> <v-spacer />
<v-chip <v-chip v-if="index == 0" class="tags" color="orange" style="
v-if="index == 0"
class="tags"
color="orange"
style="
border-radius: 0.5rem; border-radius: 0.5rem;
border: 2px var(--v-orange-base); border: 2px var(--v-orange-base);
" ">
>
Latest Latest
</v-chip> </v-chip>
<v-chip <v-chip v-if="item.sha == installedVersion" class="tags" color="green" style="
v-if="item.sha == installedVersion"
class="tags"
color="green"
style="
border-radius: 0.5rem; border-radius: 0.5rem;
border: 2px var(--v-green-base); border: 2px var(--v-green-base);
" ">
> Installed
>Installed</v-chip </v-chip>
>
</v-card-title> </v-card-title>
<div style="margin-left: 1em"> <div style="margin-left: 1em">
<div <div class="date background--text" :class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
class="date background--text" v-text="new Date(item.commit.committer.date).toLocaleString()" />
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
v-text="new Date(item.commit.committer.date).toLocaleString()"
/>
{{ item.commit.message }} {{ item.commit.message }}
</div> </div>
@ -62,29 +42,36 @@
</template> </template>
<style scoped> <style scoped>
.card { .card {
width: 100%; width: 100%;
} }
.subtitle {
.subtitle {
margin: 0.4em; margin: 0.4em;
font-size: 0.75em; font-size: 0.75em;
transform: translateY(5%); transform: translateY(5%);
} }
.date {
.date {
transform: translateY(-40%); transform: translateY(-40%);
} }
.btn-icon {
.btn-icon {
margin-right: 0.25em; margin-right: 0.25em;
} }
.tags {
.tags {
margin-left: 0.5em; margin-left: 0.5em;
} }
</style> </style>
<script> <script>
import { Browser } from "@capacitor/browser"; import {
Browser
} from "@capacitor/browser";
export default { export default {
data() { data() {
return { return {
commits: new Array(), commits: new Array(),
@ -102,7 +89,9 @@ export default {
}, },
methods: { methods: {
async openExternal(item) { async openExternal(item) {
await Browser.open({ url: item.html_url }); await Browser.open({
url: item.html_url
});
}, },
install(item) { install(item) {
@ -111,5 +100,6 @@ export default {
}); });
}, },
}, },
}; };
</script> </script>