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:
peepopoggers 2021-09-23 23:08:50 +01:00 committed by GitHub
parent eb97333145
commit b5ba27b0a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -180,8 +180,9 @@ function runApp() {
/**
* Initial window options
*/
const newWindow = new BrowserWindow({
backgroundColor: '#fff',
backgroundColor: '#212121',
icon: isDev
? path.join(__dirname, '../../_icons/iconColor.png')
/* eslint-disable-next-line */

View File

@ -5,6 +5,7 @@
body {
min-height: 100vh;
background-color: #212121;
}
#app {

View File

@ -103,6 +103,7 @@ export default Vue.extend({
},
created () {
this.setWindowTitle()
this.checkThemeSettings()
},
mounted: function () {
this.grabUserSettings().then(async () => {
@ -110,11 +111,9 @@ export default Vue.extend({
if (this.defaultInvidiousInstance === '') {
await this.setRandomCurrentInvidiousInstance()
}
this.grabAllProfiles(this.$t('Profile.All Channels')).then(async () => {
this.grabHistory()
this.grabAllPlaylists()
this.checkThemeSettings()
if (this.usingElectron) {
console.log('User is using Electron')

View File

@ -22,7 +22,6 @@
--logo-text: url("~../../_icons/textColorSmall.png");
}
.dark {
--primary-text-color: #EEEEEE;
--secondary-text-color: #ddd;