Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Commit

Permalink
theme bugfixes & startup cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PickleNik committed Mar 31, 2022
1 parent 0a370a8 commit e5fb705
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 219 deletions.
22 changes: 5 additions & 17 deletions NUXT/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<center v-show="themeFetched" class="container">
<center class="container">
<v-img
src="/icon.svg"
width="10rem"
Expand All @@ -18,20 +18,12 @@ export default {
layout: "empty",
data: () => ({
progressMsg: "Theming",
themeFetched: false,
progressMsg: "Fetching the API",
}),
beforeCreate() {
this.$store.commit("tweaks/initTweaks");
// 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");
// await SplashScreen.hide();
},
async mounted() {
// Set timeout is required for $vuetify.theme... dont ask me why -Front
this.$store.commit("tweaks/initTweaks");
const theming = new Promise((resolve) =>
// Set timeout is required for $vuetify.theme... dont ask me why -Front
setTimeout(() => {
this.$vuetify.theme.dark = JSON.parse(localStorage.getItem("darkTheme")) === true;
if (localStorage.getItem("primaryDark") != null)
Expand All @@ -42,7 +34,6 @@ export default {
this.$vuetify.theme.themes.dark.background = localStorage.getItem("backgroundDark");
if (localStorage.getItem("backgroundLight") != null)
this.$vuetify.theme.themes.light.background = localStorage.getItem("backgroundLight");
this.themeFetched = true;
this.$vuetube.navigationBar.setTheme(
this.$vuetify.theme.currentTheme.background,
!this.$vuetify.theme.dark
Expand All @@ -56,7 +47,6 @@ export default {
);
await theming;
this.progressMsg = "Fetching the API";
await this.$youtube.getAPI();
this.progressMsg = "Navigating Home";
this.$router.push(`/${localStorage.getItem("startPage") || "home"}`);
Expand All @@ -66,13 +56,11 @@ export default {

<style scoped>
.container {
padding-top: 3em;
display: block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -80%);
transform: translate(-50%, -50%);
}
.intro {
opacity: 0;
Expand Down
8 changes: 4 additions & 4 deletions NUXT/pages/library.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<center>
<center class="px-4">
<v-img
contain
style="margin-top: 5em; max-width: 80%; max-height: 15em"
src="/dev.svg"
/>
<h1
class="background--text"
<h2
class="background--text mt-4"
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
>
Page Under Construction
</h1>
</h2>
<p
class="background--text"
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
Expand Down
Loading

0 comments on commit e5fb705

Please sign in to comment.