Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownskl committed Sep 25, 2024
1 parent caa0876 commit 62bb56f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion app/main/main.ts → app/main/background.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path'
import { app, ipcMain } from 'electron'
import { app, ipcMain, dialog } from 'electron'
import serve from 'electron-serve'
import { createWindow } from './helpers'
import Platform from '@greenlight/platform'
Expand Down Expand Up @@ -33,9 +33,11 @@ export default class Application {

this._platform.loadWorker('./app/worker.js').then((authenticated:boolean) => {
this.logger.log('loadPlatform() Platform loaded and authenticated')
dialog.showErrorBox('Worker success', 'Platform worker loaded!')
resolve(authenticated)
}).catch((error:any) => {
this.logger.error('loadPlatform() Platform failed to load. Critical error: '+error)
dialog.showErrorBox('Worker error', 'Application was unable to load the background worker thread.\nDetails: '+error)
reject(error)
})
})
Expand Down
2 changes: 1 addition & 1 deletion app/nextron.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')

module.exports = {
webpack: (config, env) => {
config.entry.background = './main/main.ts'
config.entry.background = './main/background.ts'
config.entry.worker = './main/worker.ts'
config.entry.preload = './main/preload.ts'
config.module.rules.push({
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/controllers/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class App {
this._platform = platform
}

ping() {
ping():string {
return 'pong'
}

Expand Down
4 changes: 2 additions & 2 deletions packages/platform/src/controllers/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default class Authentication {
this._platform = platform
}

getGamertag() {
getGamertag():Promise<string> {
return this._platform.sendMessage({
controller: 'Authentication',
action: 'user.getGamertag'
})
}


getUserhash() {
getUserhash():Promise<string> {
return this._platform.sendMessage({
controller: 'Authentication',
action: 'user.getUserhash'
Expand Down

0 comments on commit 62bb56f

Please sign in to comment.