-
Notifications
You must be signed in to change notification settings - Fork 11
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
1a42504
commit 9aba492
Showing
5 changed files
with
115 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,54 @@ | ||
import "./app.css"; | ||
import "./ts/window"; | ||
import "./ts/roblox/path" | ||
import "./ts/debugging"; | ||
import App from "./App.svelte"; | ||
import { events, init, os } from "@neutralinojs/lib"; | ||
import { version } from "../../../../package.json"; | ||
import { DiscordRPC } from "./ts/rpc"; | ||
import { loadSettings } from "./ts/settings"; | ||
import { AbloxWatchdog } from "./ts/watchdog"; | ||
import './app.css'; | ||
import './ts/window'; | ||
import './ts/roblox/path'; | ||
import './ts/debugging'; | ||
import App from './App.svelte'; | ||
import { events, init, os } from '@neutralinojs/lib'; | ||
import { version } from '../../../../package.json'; | ||
import { RPCController } from './ts/rpc'; | ||
import { loadSettings } from './ts/settings'; | ||
import { AbloxWatchdog } from './ts/watchdog'; | ||
|
||
// Initialize NeutralinoJS | ||
init(); | ||
|
||
// Store the RPC instance | ||
let rpc: DiscordRPC | null = null; | ||
|
||
// When NeutralinoJS is ready: | ||
events.on("ready", async () => { | ||
events.on('ready', async () => { | ||
setTimeout(async () => { | ||
console.log("\n"); | ||
console.log("==========="); | ||
console.log('\n'); | ||
console.log('==========='); | ||
console.log(`AppleBlox v${version}`); | ||
console.log(`Current Time: ${new Date().toLocaleString()}`); | ||
console.log(`NeutralinoJS Version: ${window.NL_VERSION}`); | ||
console.log(`${(await os.execCommand("uname -a")).stdOut.trim()}`); | ||
console.log("==========="); | ||
console.log(`${(await os.execCommand('uname -a')).stdOut.trim()}`); | ||
console.log('==========='); | ||
|
||
/** Launch the process manager */ | ||
const watchdog = new AbloxWatchdog(); | ||
watchdog.start().catch(console.error); | ||
|
||
// DiscordRPC | ||
const settings = await loadSettings("integrations"); | ||
const settings = await loadSettings('integrations'); | ||
if (settings && settings.rpc.enable_rpc) { | ||
rpc = new DiscordRPC(); | ||
await rpc.start({ | ||
clientId: "1257650541677383721", | ||
details: "Currently in the launcher", | ||
largeImage: "appleblox", | ||
largeImageText: "AppleBlox Logo", | ||
enableTime: true | ||
await RPCController.set({ | ||
clientId: '1257650541677383721', | ||
details: 'Currently in the launcher', | ||
largeImage: 'appleblox', | ||
largeImageText: 'AppleBlox Logo', | ||
enableTime: true, | ||
}); | ||
} | ||
}, 500); | ||
}); | ||
|
||
// Cleanup when the application is closing | ||
events.on("windowClose", async () => { | ||
if (rpc) { | ||
await rpc.destroy(); | ||
} | ||
events.on('windowClose', async () => { | ||
await RPCController.stop(); | ||
}); | ||
|
||
const app = new App({ | ||
// @ts-expect-error | ||
target: document.getElementById("app"), | ||
target: document.getElementById('app'), | ||
}); | ||
|
||
export default app; |
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