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> </head>
<body class="light mainRed secBlue"> <body class="dark mainRed secBlue">
<div id="app"></div> <div id="app"></div>
<!-- Set `__static` path to static files in production --> <!-- Set `__static` path to static files in production -->
<script> <script>

View File

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

View File

@ -125,6 +125,7 @@ export default Vue.extend({
} }
}, },
created () { created () {
this.checkThemeSettings()
this.setWindowTitle() this.setWindowTitle()
}, },
mounted: function () { mounted: function () {
@ -137,7 +138,6 @@ export default Vue.extend({
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')
@ -169,7 +169,7 @@ export default Vue.extend({
let secColor = localStorage.getItem('secColor') let secColor = localStorage.getItem('secColor')
if (baseTheme === null) { if (baseTheme === null) {
baseTheme = 'light' baseTheme = 'dark'
} }
if (mainColor === null) { if (mainColor === null) {

View File

@ -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;