From 25da6600576005bde5cbe15e7e4a8c4443a086d1 Mon Sep 17 00:00:00 2001 From: Nilsen84 <56961087+Nilsen84@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:05:41 +0200 Subject: [PATCH] new gui --- gui/inject/main-inject.cjs | 8 +- gui/src/App.svelte | 121 ++++++++++++------------------- gui/src/app.css | 12 --- gui/src/assets/circle-left.png | Bin 0 -> 8992 bytes gui/src/components/Module.svelte | 64 ---------------- gui/src/components/Switch.svelte | 23 ++---- gui/src/config.ts | 16 ++++ gui/src/pages/Modules.svelte | 107 +++++++++++++++++++++++++++ gui/src/pages/Settings.svelte | 40 ++++++++++ 9 files changed, 220 insertions(+), 171 deletions(-) create mode 100644 gui/src/assets/circle-left.png delete mode 100644 gui/src/components/Module.svelte create mode 100644 gui/src/config.ts create mode 100644 gui/src/pages/Modules.svelte create mode 100644 gui/src/pages/Settings.svelte diff --git a/gui/inject/main-inject.cjs b/gui/inject/main-inject.cjs index 30f063a..68a7208 100644 --- a/gui/inject/main-inject.cjs +++ b/gui/inject/main-inject.cjs @@ -67,8 +67,8 @@ module.exports = function() { parent: mainWin, modal: true, center: true, - width: 650, - height: 500, + width: 900, + height: 600, resizable: true, webPreferences: { nodeIntegration: true, @@ -88,10 +88,10 @@ module.exports = function() { let config = readConfigSync() event.returnValue = { - customJvm: config.jvmEnabled && config.customJvm && config.customJvmPath, + customJvm: config.customJvmEnabled && config.customJvm, jvmArgs: [ `-javaagent:${path.join(installDir, 'agent.jar')}=${configPath}`, - ...config.jvmEnabled ? parse(config.jvmArgs) : [] + ...config.jvmArgsEnabled ? parse(config.jvmArgs) : [] ], minecraftArgs: config.crackedEnabled && config.crackedUsername ? [ '--username', config.crackedUsername diff --git a/gui/src/App.svelte b/gui/src/App.svelte index 92100da..554d5ac 100644 --- a/gui/src/App.svelte +++ b/gui/src/App.svelte @@ -1,25 +1,24 @@ - Lunar Client Qt {__APP_VERSION__} + Lunar Client Qt v2.0.0 - - - - Lunar Client Qt {__APP_VERSION__.slice(1)} - openUrl('https://github.com/Nilsen84/lcqt2')}> - - - openUrl('https://discord.gg/mjvm8PzB2u')}> - - - - - - - - - Username: - - - - - - - - - - - - Custom JVM - + + + + LCQT + openUrl('https://github.com/Nilsen84/lcqt2')}> + + + openUrl('https://discord.gg/mjvm8PzB2u')}> + + - - JVM Args - - - - + + {#each pages as page} + + + + {page.name} + + + {/each} + + + + + \ No newline at end of file diff --git a/gui/src/app.css b/gui/src/app.css index 5112ca8..3e2623f 100644 --- a/gui/src/app.css +++ b/gui/src/app.css @@ -5,16 +5,4 @@ body * { font-family: Inter, sans-serif; user-select: none; -} - -input[type=text], textarea, .button { - box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.15); -} - -*:disabled { - background-color: #f1f1f1; -} - -*::-webkit-scrollbar { - display: none; } \ No newline at end of file diff --git a/gui/src/assets/circle-left.png b/gui/src/assets/circle-left.png new file mode 100644 index 0000000000000000000000000000000000000000..ebac81f734736c35fb19f78f2b069ffd2d7cb50f GIT binary patch literal 8992 zcmX|HWmuF!*M4^CP6_GmHs}T^K^g=BW$BKkW098bkdjV;B~-dQr9m2`QzRGo*7yCc z_s3qlvvZzvpSkCmnG+NFM*S5Y_ET&C0PvKRBPQv}E*{rQ*8GC#)j7W__Qk);X}%Ki)u_(cTc~R**OgdCyBbleUR_+Cs@~4= z*)Ky=_cV0;v7Pe;g0fHyZ-7+b&vVwDcMq)-Ow!VPr>$Suz8Z2&S!Q{>sn9AZ@B(%* ziErIf=+74#YwZ;bsSuhT&CzBx$%ECjdi#)A4A@BgL~ha66F3dz^PtL?YK{ZqtHB|d zbJU^j0`bjKZi;Be8Ys`=14#haf?WYm@}zvO;;xD@%UwV{)mGq2s5KD*z(YUj^tF%_ z!3&?U@ZVxs*oHIG50E<*PuSoS0C@DB)ddg&%8!9D(Q(i*_^Hd8ASG!1!_99AQqjNb zpgdOQ+mw_;7BPdyio*;+E58RuBW@$+yD-Fs05*-0I6%QT$yXA>Dv`fxq=#Q8V#9y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ow{(GNTaY*R2GDcat+TozsprLB3B!>I3w|>_4`AMoqc->On|X5E0dWh%-ku{ z%~xL;c=-OPGywCMLV633ArSCZu@km8Z-l%`(Lwxnc3gw$V%uRjql#`!JM z084iI8poXX3i#p+YI?kNM~gPS+xzl|WD9YSxuMle;lV*lBt0}TK|v1nLuUNeRKt47 z4WRz_cuTo!dN;Z|V}l1ww1BAkp{zYU6UC{Ei!+VXyU0#NjVt>VrWp?W+-JfvEv^07 kb1<+4Yt@j9`#KQbxcEiMNii9Ds|8S2P?!HIYxeQ~0AoJ_-2eap literal 0 HcmV?d00001 diff --git a/gui/src/components/Module.svelte b/gui/src/components/Module.svelte deleted file mode 100644 index 87f7b94..0000000 --- a/gui/src/components/Module.svelte +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - {name} - {#if $$slots.default} - - {/if} - - - - - - {#if $$slots.default} - - - - - - {/if} - - - \ No newline at end of file diff --git a/gui/src/components/Switch.svelte b/gui/src/components/Switch.svelte index 6db1df7..1627785 100644 --- a/gui/src/components/Switch.svelte +++ b/gui/src/components/Switch.svelte @@ -1,24 +1,15 @@ - - - - + + \ No newline at end of file diff --git a/gui/src/config.ts b/gui/src/config.ts new file mode 100644 index 0000000..c91cc24 --- /dev/null +++ b/gui/src/config.ts @@ -0,0 +1,16 @@ +export type Config = { + cosmeticsEnabled: boolean, + + crackedEnabled: boolean, + crackedUsername: string, + + freelookEnabled: boolean, + + noHitDelayEnabled: boolean, + + customJvmEnabled: boolean, + customJvm: string, + + jvmArgsEnabled: boolean, + jvmArgs: string +} \ No newline at end of file diff --git a/gui/src/pages/Modules.svelte b/gui/src/pages/Modules.svelte new file mode 100644 index 0000000..0c738ba --- /dev/null +++ b/gui/src/pages/Modules.svelte @@ -0,0 +1,107 @@ + + +{#if selectedModule} + + + selectedModule = null}> + + + + {selectedModule.name} + + + + {#each selectedModule.settings as setting} + {#if setting.type === 'text'} + + {setting.name}: + + + {/if} + {/each} + +{:else} + + {#each modules as module} + + + {module.name} + + {#if module.settings} + selectedModule = module}> + SETTINGS + + {/if} + + + + + + {/each} + + + +{/if} diff --git a/gui/src/pages/Settings.svelte b/gui/src/pages/Settings.svelte new file mode 100644 index 0000000..60d77d2 --- /dev/null +++ b/gui/src/pages/Settings.svelte @@ -0,0 +1,40 @@ + + + + + + Custom JVM + + + + + Choose... + + + + + + + JVM Args + + + + \ No newline at end of file