0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-23 03:35:15 +00:00
VueTube/NUXT/pages/mods/about.vue

136 lines
3.5 KiB
Vue
Raw Normal View History

2022-03-02 19:11:16 +00:00
<template>
2022-05-05 04:28:51 +00:00
<div style="padding: 1rem">
<center>
<div class="d-flex flex-column justify-center pa-4">
2022-05-05 04:28:51 +00:00
<div>
<v-img
width="69px"
2022-05-05 04:28:51 +00:00
src="/icon.svg"
:class="$vuetify.theme.dark ? '' : 'invert'"
/>
</div>
<h1 style="font-size: 2rem">VueTube</h1>
</div>
</center>
<!-- App Information -->
2022-05-05 04:28:51 +00:00
<v-card
2022-05-14 00:25:48 +00:00
flat
2022-05-05 04:28:51 +00:00
class="obj"
:class="
$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'
"
:style="{ borderRadius: `${roundTweak / 2}rem` }"
>
<v-card-title>{{ languagePack.mods.about.appinformation }}</v-card-title>
<v-card-text>
<h3>{{ languagePack.mods.about.appversion }}</h3>
{{ version.substring(0, 7) || "Unknown" }}
</v-card-text>
</v-card>
<!-- End App Information -->
2022-03-13 21:18:45 +00:00
<!-- Device Information -->
2022-05-05 04:28:51 +00:00
<v-card
2022-05-14 00:25:48 +00:00
flat
2022-05-05 04:28:51 +00:00
class="obj"
:class="
$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'
"
:style="{ borderRadius: `${roundTweak / 2}rem` }"
>
<v-card-title>{{
languagePack.mods.about.deviceinformation
}}</v-card-title>
<v-card-text>
<h3>{{ languagePack.mods.about.platform }}</h3>
2022-05-05 04:28:51 +00:00
{{ deviceInfo.platform || "Unknown" }}<br />
<h3>{{ languagePack.mods.about.os }}</h3>
2022-05-05 04:28:51 +00:00
{{ deviceInfo.operatingSystem || "Unknown" }} ({{
deviceInfo.osVersion || "Unknown"
}})<br />
<h3>{{ languagePack.mods.about.model }}</h3>
2022-05-05 04:28:51 +00:00
{{ deviceInfo.model || "Unknown" }}<br />
<h3>{{ languagePack.mods.about.manufacturer }}</h3>
2022-05-05 04:28:51 +00:00
{{ deviceInfo.manufacturer || "Unknown" }}<br />
<h3>{{ languagePack.mods.about.emulator }}</h3>
{{ deviceInfo.isVirtual ? "yes" : "no" }}
</v-card-text>
</v-card>
<!-- End Device Information -->
2022-03-13 21:18:45 +00:00
<!-- App Links --->
<div class="obj d-flex flex-row gap-1 full-width">
2022-05-05 04:28:51 +00:00
<v-btn
depressed
class="action flex-grow-1"
2022-05-05 04:28:51 +00:00
:class="
$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'
"
:style="{ borderRadius: `${roundTweak / 2}rem` }"
@click="openExternal('https://github.com/Frontesque/VueTube')"
>
<v-icon x-large class="actionIcon">mdi-github</v-icon>
{{ languagePack.mods.about.github }}
</v-btn>
2022-05-05 04:28:51 +00:00
<v-btn
depressed
class="action flex-grow-1 ml-4"
2022-05-05 04:28:51 +00:00
:class="
$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'
"
:style="{ borderRadius: `${roundTweak / 2}rem` }"
@click="openExternal('https://discord.gg/7P8KJrdd5W')"
>
<v-icon x-large class="actionIcon">mdi-discord</v-icon>
{{ languagePack.mods.about.discord }}
</v-btn>
</div>
</div>
2022-03-02 19:11:16 +00:00
</template>
<script>
2022-03-21 23:47:11 +00:00
import { Browser } from "@capacitor/browser";
import { Device } from "@capacitor/device";
export default {
data() {
return {
2022-03-13 21:18:45 +00:00
version: process.env.appVersion,
deviceInfo: "",
languagePack: { mods: { about: {} } },
2022-03-21 23:47:11 +00:00
};
},
2022-05-05 04:28:51 +00:00
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
},
},
2022-03-21 23:47:11 +00:00
async mounted() {
const info = await Device.getInfo();
this.deviceInfo = info;
this.languagePack = this.$lang();
},
methods: {
async openExternal(url) {
await Browser.open({ url: url });
2022-03-21 23:47:11 +00:00
},
2022-03-13 21:18:45 +00:00
},
2022-03-21 23:47:11 +00:00
};
</script>
<style scoped>
.obj {
margin-top: 1em;
}
.action {
min-height: 5em;
2022-05-05 04:28:51 +00:00
padding: 1rem;
}
.actionIcon {
margin-right: 0.5em;
}
</style>