mirror of https://github.com/FreeTubeApp/FreeTube
theme loading (#1747)
* Don't blind dark theme users
It is better to start the temporary background dark so it doesnt flashbang dark theme users late at night.
Just happened to me 😢
This makes the loading background color the normal dark theme background color.
* Grab theme before await
Co-authored-by: Preston <freetubeapp@protonmail.com>
This commit is contained in:
parent
eb97333145
commit
b5ba27b0a0
|
@ -180,8 +180,9 @@ function runApp() {
|
||||||
/**
|
/**
|
||||||
* Initial window options
|
* Initial window options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const newWindow = new BrowserWindow({
|
const newWindow = new BrowserWindow({
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#212121',
|
||||||
icon: isDev
|
icon: isDev
|
||||||
? path.join(__dirname, '../../_icons/iconColor.png')
|
? path.join(__dirname, '../../_icons/iconColor.png')
|
||||||
/* eslint-disable-next-line */
|
/* eslint-disable-next-line */
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
background-color: #212121;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
|
|
@ -103,6 +103,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.setWindowTitle()
|
this.setWindowTitle()
|
||||||
|
this.checkThemeSettings()
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.grabUserSettings().then(async () => {
|
this.grabUserSettings().then(async () => {
|
||||||
|
@ -110,11 +111,9 @@ export default Vue.extend({
|
||||||
if (this.defaultInvidiousInstance === '') {
|
if (this.defaultInvidiousInstance === '') {
|
||||||
await this.setRandomCurrentInvidiousInstance()
|
await this.setRandomCurrentInvidiousInstance()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.grabAllProfiles(this.$t('Profile.All Channels')).then(async () => {
|
this.grabAllProfiles(this.$t('Profile.All Channels')).then(async () => {
|
||||||
this.grabHistory()
|
this.grabHistory()
|
||||||
this.grabAllPlaylists()
|
this.grabAllPlaylists()
|
||||||
this.checkThemeSettings()
|
|
||||||
|
|
||||||
if (this.usingElectron) {
|
if (this.usingElectron) {
|
||||||
console.log('User is using Electron')
|
console.log('User is using Electron')
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
--logo-text: url("~../../_icons/textColorSmall.png");
|
--logo-text: url("~../../_icons/textColorSmall.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--primary-text-color: #EEEEEE;
|
--primary-text-color: #EEEEEE;
|
||||||
--secondary-text-color: #ddd;
|
--secondary-text-color: #ddd;
|
||||||
|
|
Loading…
Reference in New Issue