configstore.js 644 B

12345678910111213141516171819202122232425
  1. import { api } from 'electron-util'
  2. import Store from 'electron-store'
  3. import { join } from 'path'
  4. import { hostname } from 'os'
  5. api.app.setName('schild.report')
  6. console.log('Config laden …')
  7. const configFile = new Store({
  8. encryptionKey: hostname(),
  9. defaults: {
  10. windowBounds: {
  11. main: { width: 1800, height: 800 }
  12. },
  13. reports: join(api.app.getPath('documents'), api.app.getName(), 'reports'),
  14. pdf: join(api.app.getPath('documents'), api.app.getName(), 'pdf'),
  15. userData: join(api.app.getPath('userData')),
  16. privateDaten: {},
  17. folderStates: {},
  18. debug: false,
  19. db: {}
  20. }
  21. })
  22. export default configFile