Don't blind dark theme users (Dark loading screen) (#1502)

* 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

* make it consistent when built

* final fixes

* removed accidental file

Co-authored-by: Preston <freetubeapp@protonmail.com>
This commit is contained in:
peepopoggers 2021-10-01 13:12:35 +01:00 committed by GitHub
parent 87e1093c4d
commit 25189e2aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,7 @@
<% } %>
</head>
<body class="light mainRed secBlue">
<body class="dark mainRed secBlue">
<div id="app"></div>
<!-- Set `__static` path to static files in production -->
<script>

View File

@ -181,7 +181,7 @@ 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

@ -125,6 +125,7 @@ export default Vue.extend({
}
},
created () {
this.checkThemeSettings()
this.setWindowTitle()
},
mounted: function () {
@ -137,7 +138,6 @@ export default Vue.extend({
this.grabAllProfiles(this.$t('Profile.All Channels')).then(async () => {
this.grabHistory()
this.grabAllPlaylists()
this.checkThemeSettings()
if (this.usingElectron) {
console.log('User is using Electron')
@ -169,7 +169,7 @@ export default Vue.extend({
let secColor = localStorage.getItem('secColor')
if (baseTheme === null) {
baseTheme = 'light'
baseTheme = 'dark'
}
if (mainColor === null) {

View File

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