2022-01-24 22:56:57 +00:00
< template >
2022-03-20 07:24:38 +00:00
< center class = "container" >
2022-03-23 13:17:02 +00:00
< v -img
src = "/icon.svg"
width = "10em"
style = "margin-bottom: 1em"
2022-03-23 13:30:24 +00:00
: class = "$vuetify.theme.dark ? '' : 'invert'"
2022-03-23 13:17:02 +00:00
/ >
2022-03-20 07:24:38 +00:00
< v -progress -circular size = "50" indeterminate color = "primary" / >
< / 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
//--- Hide Splash Screen ---//
async beforeCreate ( ) {
const { SplashScreen } = await require ( "@capacitor/splash-screen" ) ; // This has to be imported here, otherwise NUXT won't import the package because its so early in the lifecycle -Front
await SplashScreen . hide ( ) ;
} ,
//--- End Hide Splash Screen ---//
2022-03-20 07:24:38 +00:00
async mounted ( ) {
//--- Theme Loader Moved From '~/layouts/default.vue' (because this only needs to be run once) -Front ---//
setTimeout ( ( ) => {
//Set timeout is required to make it load properly... dont ask me why -Front
const darkTheme = localStorage . getItem ( "darkTheme" ) ;
if ( darkTheme == "true" ) {
this . $vuetify . theme . dark = darkTheme ;
//this.$vuetube.statusBar.setDark(); //Not needed unless setLight() is used below -Front
this . $vuetube . statusBar . setBackground (
2022-03-25 19:21:00 +00:00
this . $vuetify . theme . themes . dark . background
2022-03-20 07:24:38 +00:00
) ;
2022-03-19 23:17:26 +00:00
2022-03-20 07:24:38 +00:00
const isOled = localStorage . getItem ( "isOled" ) ;
2022-03-19 23:17:26 +00:00
2022-03-20 07:24:38 +00:00
if ( isOled == "true" ) {
2022-03-25 19:21:00 +00:00
( this . $vuetify . theme . themes . dark . background = "#000" ) ,
( this . $vuetify . theme . themes . dark . background = "#000" ) ,
2022-03-20 07:24:38 +00:00
( this . $vuetify . theme . themes . dark . background = "#000" ) ;
2022-03-19 23:17:26 +00:00
} else {
2022-03-25 19:21:00 +00:00
( this . $vuetify . theme . themes . dark . background = "#222" ) ,
( this . $vuetify . theme . themes . dark . background = "#222" ) ,
2022-03-20 07:24:38 +00:00
( this . $vuetify . theme . themes . dark . background = "#333" ) ;
2022-03-19 23:17:26 +00:00
}
2022-03-20 07:24:38 +00:00
} else {
//this.$vuetube.statusBar.setLight() //Looks weird -Front
this . $vuetube . statusBar . setBackground (
2022-03-25 19:21:00 +00:00
this . $vuetify . theme . themes . light . background
2022-03-20 07:24:38 +00:00
) ;
}
} , 0 ) ;
//-----------------------------------------------------------------------------------------------------------//
2022-03-19 23:17:26 +00:00
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 : 3 em ;
display : block ;
position : absolute ;
top : 50 % ;
left : 50 % ;
transform : translate ( - 50 % , - 80 % ) ;
}
< / style >