1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-31 19:19:41 +02:00
mealie/frontend/src/pages/SettingsPage.vue

75 lines
1.7 KiB
Vue
Raw Normal View History

2020-12-24 16:37:38 -09:00
<template>
<v-container>
2021-01-03 19:50:31 -09:00
<v-alert v-if="newVersion" color="green" type="success" outlined>
A New Version of Mealie is Avaiable,
<a href="https://github.com/hay-kot/mealie" class="green--text">
Visit the Repo
</a>
</v-alert>
2020-12-24 16:37:38 -09:00
<Theme />
<Backup />
<Webhooks />
2021-01-01 16:51:55 -09:00
<Migration />
2021-01-03 20:07:36 -09:00
<p class="text-center my-2">
Version: {{ version }} | Latest: {{ latestVersion }} ·
<a href="https://hay-kot.github.io/mealie/" target="_blank">
Explore the Docs
</a>
·
<a
href="https://hay-kot.github.io/mealie/2.1%20-%20Contributions/"
target="_blank"
>
Contribute
</a>
</p>
2020-12-24 16:37:38 -09:00
</v-container>
</template>
<script>
2021-01-08 17:09:03 -09:00
import Backup from "../components/Settings/Backup";
import Webhooks from "../components/Settings/Webhook";
import Theme from "../components/Settings/Theme";
import Migration from "../components/Settings/Migration";
2021-01-03 19:50:31 -09:00
import axios from "axios";
2020-12-24 16:37:38 -09:00
export default {
components: {
Backup,
Webhooks,
Theme,
2021-01-01 16:51:55 -09:00
Migration,
2020-12-24 16:37:38 -09:00
},
2021-01-03 19:50:31 -09:00
data() {
return {
latestVersion: null,
version: "v0.0.1",
};
},
mounted() {
this.getVersion();
},
computed: {
newVersion() {
if ((this.latestVersion != null) & (this.latestVersion != this.version)) {
console.log("New Version Avaiable");
return true;
} else {
return false;
}
},
},
methods: {
async getVersion() {
let response = await axios.get(
"https://api.github.com/repos/hay-kot/mealie/releases/latest"
);
console.log(response);
this.latestVersion = response.data.tag_name;
},
},
2020-12-24 16:37:38 -09:00
};
</script>
<style>
</style>