From 90771a1c8f4caab3b9c0570bdae94f1fd9fef63b Mon Sep 17 00:00:00 2001 From: Tee Date: Sun, 7 Apr 2024 12:42:50 +0200 Subject: [PATCH] logo --- src/client-src/components/ConfigItem.jsx | 5 ++--- src/rpc_client-src/index.js | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/client-src/components/ConfigItem.jsx b/src/client-src/components/ConfigItem.jsx index bfde611..ed12e03 100644 --- a/src/client-src/components/ConfigItem.jsx +++ b/src/client-src/components/ConfigItem.jsx @@ -6,7 +6,7 @@ * Github: https://github.com/teeteeteeteetee * Discord: Tee#0001 * - * Last Modified: Sunday, 7th April 2024 12:08:18 pm + * Last Modified: Sunday, 7th April 2024 12:25:20 pm * Modified By: Tee (tee@stainless.love) * * Copyright (c) 2023 Tee, Stainless Love @@ -40,10 +40,9 @@ export default function ConfigItem({ title, template, group, config, setConfig } const dropdown = (id) => { if(Object.keys(config).length > 0){ - const [value, setValue] = useState(config[group][id].value) return (
- config[group][id].value = e.target.value} id={id} className="bg-dropdown outline-none w-32 px-2 rounded-md" name="logo"> diff --git a/src/rpc_client-src/index.js b/src/rpc_client-src/index.js index fe7c6db..c9d1fc8 100644 --- a/src/rpc_client-src/index.js +++ b/src/rpc_client-src/index.js @@ -6,7 +6,7 @@ * Github: https://github.com/teeteeteeteetee * Discord: Tee#0001 * - * Last Modified: Sunday, 7th April 2024 12:08:04 pm + * Last Modified: Sunday, 7th April 2024 12:30:53 pm * Modified By: Tee (tee@stainless.love) * * Copyright (c) 2023 Tee, Demon Cat @@ -115,6 +115,9 @@ function main() { status = true } + + console.log(configurations.rpc) + callScript('state()') callScript('details()') callScript('smallImageKey()') @@ -123,8 +126,21 @@ function main() { callScript('largeImageText()') callScriptNumber('partySize()') callScriptNumber('partyMax()') - props.largeImageKey = configurations.largeImageKey.value - + // props.largeImageKey = configurations.extension[largeImageKey].value + if(configurations.rpc.largeImageKey.value){ + switch(configurations.rpc.largeImageKey.value){ + case "old": + props.largeImageKey = 'logo' + break; + case "new": + props.largeImageKey = 'logo2' + break; + default: + props.largeImageKey = configurations.rpc.largeImageKey.value + } + }else{ + props.largeImageKey = 'logo2' + } console.log(props)