mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-29 06:33:05 +00:00
feat: ✨ Update Screen
This commit is contained in:
parent
9be42949fd
commit
619c4168be
3 changed files with 19 additions and 13 deletions
|
@ -76,8 +76,8 @@ import language from '~/components/Settings/language.vue';
|
||||||
this.stage++;
|
this.stage++;
|
||||||
|
|
||||||
if (!this.$refs["stage"+this.stage]) {
|
if (!this.$refs["stage"+this.stage]) {
|
||||||
localStorage.setItem("lastRunVersion", process.env.appVersion)
|
localStorage.setItem("lastRunVersion", process.env.appVersion);
|
||||||
localStorage.setItem("firstTimeSetupComplete", true)
|
localStorage.setItem("firstTimeSetupComplete", true);
|
||||||
this.$router.replace('/');
|
this.$router.replace('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
:class="$vuetify.theme.dark ? '' : 'invert'"
|
:class="$vuetify.theme.dark ? '' : 'invert'"
|
||||||
/>
|
/>
|
||||||
<h1>{{ lang.updated }}</h1>
|
<h1>{{ lang.updated }}</h1>
|
||||||
|
<p><span class="version">{{ oldVer }}</span> <v-icon>mdi-arrow-right</v-icon> <span class="version">{{ newVer }}</span></p>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<v-btn @click="okay()" class="rounded-xl primary nextButton">{{ lang.awesome }} <v-icon style="margin-left: 0.5em;">mdi-arrow-right</v-icon></v-btn>
|
<v-btn @click="okay()" class="rounded-xl primary nextButton">{{ lang.awesome }} <v-icon style="margin-left: 0.5em;">mdi-arrow-right</v-icon></v-btn>
|
||||||
|
@ -22,17 +23,15 @@
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullWidth {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
background: rgba(100,100,100,0.5);
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -45,13 +44,19 @@ import language from '~/components/Settings/language.vue';
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lang: {},
|
lang: {},
|
||||||
|
newVer: "...",
|
||||||
|
oldVer: "..."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.lang = this.$lang("events");
|
this.lang = this.$lang("events");
|
||||||
|
|
||||||
|
this.oldVer = localStorage.getItem("lastRunVersion").substring(0, 7);
|
||||||
|
this.newVer = process.env.appVersion.substring(0, 7);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
okay() {
|
okay() {
|
||||||
|
localStorage.setItem("lastRunVersion", process.env.appVersion);
|
||||||
this.$router.replace('/');
|
this.$router.replace('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,11 @@ export default {
|
||||||
progressMsg: "...",
|
progressMsg: "...",
|
||||||
}),
|
}),
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.progressMsg = this.$lang("index").connecting;
|
//--- Update Screen ---//
|
||||||
|
if (localStorage.getItem("lastRunVersion") != process.env.appVersion ) return this.$router.replace('/activities/update');
|
||||||
|
|
||||||
|
//--- Init Stuff ---//
|
||||||
|
this.progressMsg = this.$lang("index").connecting;
|
||||||
this.$store.commit("tweaks/initTweaks");
|
this.$store.commit("tweaks/initTweaks");
|
||||||
|
|
||||||
await this.theming();
|
await this.theming();
|
||||||
|
@ -30,8 +33,6 @@ export default {
|
||||||
await this.$vuetube.launchBackHandling();
|
await this.$vuetube.launchBackHandling();
|
||||||
this.progressMsg = this.$lang("index").launching;
|
this.progressMsg = this.$lang("index").launching;
|
||||||
|
|
||||||
localStorage.setItem("lastRunVersion", process.env.appVersion)
|
|
||||||
|
|
||||||
if (localStorage.getItem("firstTimeSetupComplete")) {
|
if (localStorage.getItem("firstTimeSetupComplete")) {
|
||||||
this.$router.replace('/'+ (localStorage.getItem("startPage") || "home") ); // Normal Load
|
this.$router.replace('/'+ (localStorage.getItem("startPage") || "home") ); // Normal Load
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue