mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-24 20:25:17 +00:00
theme fetch fix, startup progress messages, hot rebuild timer, disabled multiline linting rule because annoying
This commit is contained in:
parent
0a7eb3e6cb
commit
38d552a7ac
5 changed files with 21 additions and 20 deletions
|
@ -15,7 +15,10 @@ module.exports = {
|
||||||
],
|
],
|
||||||
plugins: ["vue"],
|
plugins: ["vue"],
|
||||||
rules: {
|
rules: {
|
||||||
|
// "max-len": "off",
|
||||||
|
// "vue/max-attributes-per-line": "off",
|
||||||
"vue/multi-word-component-names": 0,
|
"vue/multi-word-component-names": 0,
|
||||||
|
"prettier/prettier": "off",
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
// 'prettier/prettier': ['error', { semi: false }],
|
// 'prettier/prettier': ['error', { semi: false }],
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
/>
|
/>
|
||||||
<div style="height: 5rem" />
|
<div style="height: 5rem" />
|
||||||
<v-progress-linear rounded height="8" indeterminate color="primary" />
|
<v-progress-linear rounded height="8" indeterminate color="primary" />
|
||||||
|
<div class="pt-2">{{ progressMsg }}...</div>
|
||||||
</center>
|
</center>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ export default {
|
||||||
layout: "empty",
|
layout: "empty",
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
|
progressMsg: "Theming",
|
||||||
themeFetched: false,
|
themeFetched: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
@ -31,35 +33,32 @@ export default {
|
||||||
// Set timeout is required for $vuetify.theme... dont ask me why -Front
|
// Set timeout is required for $vuetify.theme... dont ask me why -Front
|
||||||
const theming = new Promise((resolve) =>
|
const theming = new Promise((resolve) =>
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const dark = localStorage.getItem("darkTheme");
|
this.$vuetify.theme.dark = JSON.parse(localStorage.getItem("darkTheme")) === true;
|
||||||
let bg = null;
|
if (localStorage.getItem("primaryDark") != null)
|
||||||
let pr = null;
|
this.$vuetify.theme.themes.dark.primary = localStorage.getItem("primaryDark");
|
||||||
if (dark !== null) {
|
if (localStorage.getItem("primaryLight") != null)
|
||||||
bg = dark
|
this.$vuetify.theme.themes.light.primary = localStorage.getItem("primaryLight");
|
||||||
? localStorage.getItem("backgroundDark")
|
if (localStorage.getItem("backgroundDark") != null)
|
||||||
: localStorage.getItem("backgroundLight");
|
this.$vuetify.theme.themes.dark.background = localStorage.getItem("backgroundDark");
|
||||||
pr = dark
|
if (localStorage.getItem("backgroundLight") != null)
|
||||||
? localStorage.getItem("primaryDark")
|
this.$vuetify.theme.themes.light.background = localStorage.getItem("backgroundLight");
|
||||||
: 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;
|
|
||||||
}
|
|
||||||
this.themeFetched = true;
|
this.themeFetched = true;
|
||||||
this.$vuetube.navigationBar.setTheme(
|
this.$vuetube.navigationBar.setTheme(
|
||||||
this.$vuetify.theme.currentTheme.background,
|
this.$vuetify.theme.currentTheme.background,
|
||||||
!dark
|
!this.$vuetify.theme.dark
|
||||||
);
|
);
|
||||||
this.$vuetube.statusBar.setTheme(
|
this.$vuetube.statusBar.setTheme(
|
||||||
this.$vuetify.theme.currentTheme.background,
|
this.$vuetify.theme.currentTheme.background,
|
||||||
dark
|
this.$vuetify.theme.dark
|
||||||
);
|
);
|
||||||
resolve();
|
resolve();
|
||||||
}, 0)
|
}, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
await theming;
|
await theming;
|
||||||
|
this.progressMsg = "Fetching the API";
|
||||||
await this.$youtube.getAPI();
|
await this.$youtube.getAPI();
|
||||||
|
this.progressMsg = "Navigating Home";
|
||||||
this.$router.push(`/${localStorage.getItem("startPage") || "home"}`);
|
this.$router.push(`/${localStorage.getItem("startPage") || "home"}`);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -177,7 +177,6 @@ export default {
|
||||||
this.$vuetify.theme.dark
|
this.$vuetify.theme.dark
|
||||||
? localStorage.setItem("primaryDark", value)
|
? localStorage.setItem("primaryDark", value)
|
||||||
: localStorage.setItem("primaryLight", value);
|
: localStorage.setItem("primaryLight", value);
|
||||||
console.log(value);
|
|
||||||
let tempD = this.experimentalDark;
|
let tempD = this.experimentalDark;
|
||||||
let tempL = this.experimentalLight;
|
let tempL = this.experimentalLight;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -56,11 +56,11 @@ const module = {
|
||||||
async setBackground(color) {
|
async setBackground(color) {
|
||||||
return await StatusBar.setBackgroundColor({ color });
|
return await StatusBar.setBackgroundColor({ color });
|
||||||
},
|
},
|
||||||
setTheme(color, dark) {
|
async setTheme(color, dark) {
|
||||||
StatusBar.setBackgroundColor({ color });
|
|
||||||
dark
|
dark
|
||||||
? StatusBar.setStyle({ style: Style.Dark })
|
? StatusBar.setStyle({ style: Style.Dark })
|
||||||
: StatusBar.setStyle({ style: Style.Light });
|
: StatusBar.setStyle({ style: Style.Light });
|
||||||
|
StatusBar.setBackgroundColor({ color });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ function hot {
|
||||||
while true; do
|
while true; do
|
||||||
b=`ls -lahR $* | grep -v 'node_modules'`
|
b=`ls -lahR $* | grep -v 'node_modules'`
|
||||||
# to avoid confusing myself with nested-if - it is a "short form" of doing a=$b; eval $script if $a != $b.
|
# to avoid confusing myself with nested-if - it is a "short form" of doing a=$b; eval $script if $a != $b.
|
||||||
[[ $a != $b ]] && a=$b && eval $script;
|
[[ $a != $b ]] && a=$b && eval time $script;
|
||||||
sleep .5;
|
sleep .5;
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue