2022-01-24 22:56:57 +00:00
|
|
|
<template>
|
2022-03-31 04:22:24 +00:00
|
|
|
<center v-show="themeFetched" class="container">
|
|
|
|
<v-img
|
2022-03-23 13:17:02 +00:00
|
|
|
src="/icon.svg"
|
2022-03-31 04:22:24 +00:00
|
|
|
width="10rem"
|
|
|
|
height="10rem"
|
|
|
|
class="youspinmerightround"
|
2022-03-23 13:30:24 +00:00
|
|
|
:class="$vuetify.theme.dark ? '' : 'invert'"
|
2022-03-23 13:17:02 +00:00
|
|
|
/>
|
2022-03-31 04:22:24 +00:00
|
|
|
<div style="height: 5rem" />
|
|
|
|
<v-progress-linear rounded height="8" indeterminate color="primary" />
|
2022-03-20 07:24:38 +00:00
|
|
|
</center>
|
2022-01-24 22:56:57 +00:00
|
|
|
</template>
|
2022-03-16 00:31:03 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2022-03-25 18:50:18 +00:00
|
|
|
layout: "empty",
|
2022-03-24 22:10:05 +00:00
|
|
|
|
2022-03-28 19:59:08 +00:00
|
|
|
data: () => ({
|
2022-03-31 04:22:24 +00:00
|
|
|
themeFetched: false,
|
2022-03-28 19:59:08 +00:00
|
|
|
}),
|
|
|
|
|
2022-03-31 04:22:24 +00:00
|
|
|
beforeCreate() {
|
2022-03-28 19:59:08 +00:00
|
|
|
this.$store.commit("tweaks/initTweaks");
|
2022-03-31 04:22:24 +00:00
|
|
|
// This has to be imported here,otherwise NUXT won't import the package because its so early in the lifecycle -Front
|
|
|
|
// const { SplashScreen } = await require("@capacitor/splash-screen");
|
2022-03-28 19:59:08 +00:00
|
|
|
// await SplashScreen.hide();
|
2022-03-24 22:10:05 +00:00
|
|
|
},
|
|
|
|
|
2022-03-20 07:24:38 +00:00
|
|
|
async mounted() {
|
2022-03-31 04:22:24 +00:00
|
|
|
// Set timeout is required for $vuetify.theme... dont ask me why -Front
|
|
|
|
const theming = new Promise((resolve) =>
|
|
|
|
setTimeout(() => {
|
|
|
|
const dark = localStorage.getItem("darkTheme");
|
|
|
|
let bg = null;
|
|
|
|
let pr = null;
|
|
|
|
if (dark !== null) {
|
|
|
|
bg = dark
|
|
|
|
? localStorage.getItem("backgroundDark")
|
|
|
|
: localStorage.getItem("backgroundLight");
|
|
|
|
pr = dark
|
|
|
|
? localStorage.getItem("primaryDark")
|
|
|
|
: localStorage.getItem("primaryLight");
|
|
|
|
this.$vuetify.theme.dark = dark === "true";
|
|
|
|
if (pr !== null) this.$vuetify.theme.currentTheme.primary = pr;
|
|
|
|
if (bg !== null) this.$vuetify.theme.currentTheme.background = bg;
|
2022-03-19 23:17:26 +00:00
|
|
|
}
|
2022-03-31 04:22:24 +00:00
|
|
|
this.themeFetched = true;
|
|
|
|
this.$vuetube.navigationBar.setTheme(
|
|
|
|
this.$vuetify.theme.currentTheme.background,
|
|
|
|
!dark
|
2022-03-20 07:24:38 +00:00
|
|
|
);
|
2022-03-31 04:22:24 +00:00
|
|
|
this.$vuetube.statusBar.setTheme(
|
|
|
|
this.$vuetify.theme.currentTheme.background,
|
|
|
|
dark
|
|
|
|
);
|
|
|
|
resolve();
|
|
|
|
}, 0)
|
|
|
|
);
|
2022-03-19 23:17:26 +00:00
|
|
|
|
2022-03-31 04:22:24 +00:00
|
|
|
await theming;
|
2022-03-20 07:24:38 +00:00
|
|
|
await this.$youtube.getAPI();
|
|
|
|
this.$router.push(`/${localStorage.getItem("startPage") || "home"}`);
|
|
|
|
},
|
|
|
|
};
|
2022-03-17 18:10:54 +00:00
|
|
|
</script>
|
2022-03-23 13:17:02 +00:00
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.container {
|
|
|
|
padding-top: 3em;
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -80%);
|
|
|
|
}
|
2022-03-31 04:22:24 +00:00
|
|
|
.youspinmerightround {
|
|
|
|
opacity: 0;
|
|
|
|
transform: scale(0.5);
|
|
|
|
transition-property: opacity, transform;
|
|
|
|
animation: likearecord 0.66s ease infinite alternate;
|
|
|
|
}
|
|
|
|
/* triangles aren't very good at spinning :c */
|
|
|
|
@keyframes likearecord {
|
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
transform: scale(0.5);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 13:17:02 +00:00
|
|
|
</style>
|