basic update manager

This commit is contained in:
Kenny 2022-03-07 09:36:23 -05:00
parent a0adb45035
commit bd21fd5493
6 changed files with 99 additions and 2 deletions

View File

@ -39,7 +39,7 @@ export default {
.navButton {
width: 25vw !important;
font-size: .66rem !important;
border-radius: 2rem !important;
/*border-radius: 2rem !important;*/
}
.tab {
padding: 0.1em 0.5em 0.1em 0.5em;

View File

@ -72,6 +72,7 @@ html, body {
dropdownMenu: [
{ title: "Settings", link: "/settings" },
{ title: "Updates", link: "/updates" },
{ title: "About", link: "/about" },
{ title: "Logs", link: "/logs" }
]

View File

@ -5,7 +5,8 @@ export default {
//--- Bettertube Stuff ---//
target: 'static',
plugins: [
{ src: "~/plugins/youtube", mode: "client" }
{ src: "~/plugins/youtube", mode: "client" },
{ src: "~/plugins/vuetube", mode: "client" }
],
generate: {
dir: '../dist'

60
NUXT/pages/updates.vue Normal file
View File

@ -0,0 +1,60 @@
<template>
<div>
<v-list-item v-for="(item, index) in commits" :key="index">
<v-card class="card">
<v-card-title style="padding-bottom: 0;">
{{ item.author.login }}
<span v-text="` ${item.sha.substring(0, 7)}`" class="subtitle" />
</v-card-title>
<v-card-content style="padding: 1em; padding-top: 0;">
{{ item.commit.message }}
</v-card-content>
<v-card-actions>
<v-spacer />
<v-btn @click="openExternal(item)"><v-icon>mdi-open-in-new</v-icon>Open</v-btn>
<v-btn disabled><v-icon>mdi-download</v-icon>Download</v-btn>
</v-card-actions>
</v-card>
</v-list-item>
</div>
</template>
<style scoped>
.card {
width: 100%;
margin: 1em 0 1em 0;
}
.subtitle {
margin: 0.4em;
font-size: 0.75em;
transform: translateY(5%);
color: #999;
}
</style>
<script>
import { Browser } from '@capacitor/browser';
export default {
data() {
return {
commits: new Array()
}
},
mounted() {
this.$vuetube.commits((commits) => {
this.commits = commits;
})
},
methods: {
async openEternal(item) {
await Browser.open({ url: item.url });
}
}
}
</script>

34
NUXT/plugins/vuetube.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,7 @@
"dependencies": {
"@capacitor-community/http": "^1.4.1",
"@capacitor/android": "^3.4.0",
"@capacitor/browser": "^1.0.7",
"@capacitor/cli": "^3.4.0",
"@capacitor/core": "^3.4.0"
}