-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e50c57
commit 6239d8c
Showing
5 changed files
with
1,031 additions
and
842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
import App from './components/App' | ||
import Language from './languages/Language' | ||
import config from './utils/config' | ||
import winston from 'winston' | ||
|
||
const userData = require('electron').remote.app.getPath('userData') | ||
|
||
window.vm = new Vue({ | ||
el: 'app', | ||
components: { | ||
'app': App | ||
}, | ||
beforeCreate() { | ||
// Set configs | ||
config() | ||
// Check Language | ||
let appLanguage = localStorage.getItem('appLanguage') || 'en' | ||
let appLanguage = localStorage.appLanguage || 'en' | ||
let language = new Language(appLanguage) | ||
window.lang = (key) => language.get(key) | ||
// Check Theme | ||
let appTheme = localStorage.getItem('appTheme') || 'dark' | ||
let appTheme = localStorage.appTheme || 'dark' | ||
document.body.classList = [appTheme] | ||
|
||
// Logger settings | ||
window.logger = new(winston.Logger)({ | ||
transports: [ | ||
new(winston.transports.File)({ | ||
filename: userData + '/stacer.log' | ||
}) | ||
] | ||
}) | ||
}, | ||
mounted() { | ||
setTimeout(() => document.getElementById('loading').remove(), 3000) | ||
setTimeout(() => document.getElementById('loading').remove(), 2500) | ||
} | ||
}) |
Oops, something went wrong.