Skip to content

Commit

Permalink
couldnt receive config
Browse files Browse the repository at this point in the history
  • Loading branch information
teeteeteeteetee committed Nov 25, 2023
1 parent 340d5e1 commit a9b878c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/client-src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Saturday, 25th November 2023 5:12:42 pm
* Last Modified: Saturday, 25th November 2023 6:12:27 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Stainless Love
*/

import { setConfiguration } from "../rpc_client-src/localstorage";
import { setConfiguration, rpcConfigurationTemplate, extensionConfigurationTemplate } from "../rpc_client-src/localstorage";

const csInterface = new CSInterface();

Expand All @@ -39,6 +39,12 @@ class Controller {
})
this.logz(e.data)
})

if(Object.keys(window.localStorage).length <= 0){
this.logz("Couldn't receive config, generating new ones.")
setConfiguration("rpc", rpcConfigurationTemplate);
setConfiguration("extension", extensionConfigurationTemplate);
}
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/client-src/page/Config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Saturday, 25th November 2023 5:12:00 pm
* Last Modified: Saturday, 25th November 2023 6:09:15 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Stainless Love
Expand Down
5 changes: 3 additions & 2 deletions src/rpc_client-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Github: https://github.com/teeteeteeteetee
* Discord: Tee#0001
*
* Last Modified: Saturday, 25th November 2023 3:36:16 pm
* Last Modified: Saturday, 25th November 2023 6:06:47 pm
* Modified By: Tee ([email protected])
*
* Copyright (c) 2023 Tee, Demon Cat
Expand Down Expand Up @@ -88,7 +88,8 @@ if (!configurations.extension) {
}

csInterface.dispatchEvent(configurations)

console.log("dispatching configuration")
console.log(configurations)

rpc.login()
.then(() => {
Expand Down

0 comments on commit a9b878c

Please sign in to comment.