-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
cf23c18
commit 8669504
Showing
4 changed files
with
21 additions
and
8 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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Github: https://github.com/lolitee | ||
* Discord: Tee#0001 | ||
* | ||
* Last Modified: Monday, 18th September 2023 11:36:54 pm | ||
* Last Modified: Saturday, 25th November 2023 12:58:36 pm | ||
* Modified By: Tee ([email protected]) | ||
* | ||
* Copyright (c) 2023 Tee, Stainless Love | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Github: https://github.com/lolitee | ||
* Discord: Tee#0001 | ||
* | ||
* Last Modified: Wednesday, 20th September 2023 2:58:43 pm | ||
* Last Modified: Saturday, 25th November 2023 1:02:43 pm | ||
* Modified By: Tee ([email protected]) | ||
* | ||
* Copyright (c) 2023 Tee, Stainless Love | ||
|
@@ -18,9 +18,12 @@ import { dispatchEvent } from '..'; | |
import { extensionConfigurationTemplate, getConfigurations, resetConfiguration, rpcConfigurationTemplate } from "../../rpc_client-src/localstorage" | ||
function ResetConfig(){ | ||
dispatchEvent("com.tee.rpc.reset", {}) | ||
window.location.reload() | ||
// resetConfiguration() | ||
} | ||
function SaveConfig(config){ | ||
function SaveConfig(config){ | ||
dispatchEvent("com.tee.rpc.config", config) | ||
// window.location.reload() | ||
console.log(config) | ||
} | ||
export default function Config() { | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Github: https://github.com/teeteeteeteetee | ||
* Discord: Tee#0001 | ||
* | ||
* Last Modified: Wednesday, 20th September 2023 3:59:32 pm | ||
* Last Modified: Saturday, 25th November 2023 1:02:21 pm | ||
* Modified By: Tee ([email protected]) | ||
* | ||
* Copyright (c) 2023 Tee, Demon Cat | ||
|
@@ -61,15 +61,20 @@ if (csInterface.getApplicationID() === "AEFT") { | |
|
||
csInterface.addEventListener('com.tee.rpc.reset', () => { | ||
console.log("reset") | ||
rpc.destroy() | ||
resetConfiguration() | ||
window.location.reload() | ||
}) | ||
|
||
csInterface.addEventListener('com.tee.rpc.config', (e) => { | ||
console.log(e.data) | ||
if (e.data.property) { | ||
setConfiguration(e.data.property, e.data.config) | ||
configurations = getConfigurations() | ||
|
||
for (const [key, value] of Object.entries(e.data)){ | ||
console.log(key) | ||
setConfiguration(key, value) | ||
} | ||
configurations = getConfigurations() | ||
presence = {} | ||
}) | ||
|
||
if (!configurations.rpc) { | ||
|
@@ -146,6 +151,8 @@ function main() { | |
csInterface.evalScript(func, (e) => { | ||
props[func.replace('()', '')] = e | ||
}) | ||
} else { | ||
props[func.replace('()', '')] = "(hidden)" | ||
} | ||
|
||
} | ||
|
@@ -154,6 +161,8 @@ function main() { | |
csInterface.evalScript(func, (e) => { | ||
props[func.replace('()', '')] = parseInt(e) | ||
}) | ||
}else{ | ||
props[func.replace('()', '')] = 0 | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Github: https://github.com/lolitee | ||
* Discord: Tee#0001 | ||
* | ||
* Last Modified: Wednesday, 20th September 2023 2:40:55 pm | ||
* Last Modified: Saturday, 25th November 2023 12:23:38 pm | ||
* Modified By: Tee ([email protected]) | ||
* | ||
* Copyright (c) 2023 Tee, Stainless Love | ||
|
@@ -108,6 +108,7 @@ export function setConfiguration(name, configuration){ | |
window.localStorage.setItem(name, JSON.stringify(configuration)); | ||
csInterface.dispatchEvent('com.tee.panel.settings') | ||
} | ||
|
||
export function getConfiguration(name){ | ||
return JSON.parse(window.localStorage.getItem(name)) | ||
} | ||
|