From db11cf7907546e0b30c7bf419c30bb709bbd36d5 Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Thu, 6 Apr 2023 23:29:31 -0600 Subject: [PATCH] Change encryption to checkbox --- src/ui/components/menu/Options.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ui/components/menu/Options.tsx b/src/ui/components/menu/Options.tsx index f78fa68..d2b7948 100644 --- a/src/ui/components/menu/Options.tsx +++ b/src/ui/components/menu/Options.tsx @@ -111,7 +111,7 @@ export default class Options extends React.Component { bg_url_or_path: config.customBackground || '', themes: (await getThemeList()).map((t) => t.name), theme: config.theme || 'default', - encryption: await translate(encEnabled ? 'options.enabled' : 'options.disabled'), + encryption: encEnabled || false, patch_rsa: config.patch_rsa || false, use_internal_proxy: config.use_internal_proxy || false, wipe_login: config.wipe_login || false, @@ -162,7 +162,7 @@ export default class Options extends React.Component { // Update encryption button when setting new jar this.setState({ - encryption: await translate(encEnabled ? 'options.enabled' : 'options.disabled'), + encryption: encEnabled, }) window.location.reload() @@ -264,8 +264,8 @@ export default class Options extends React.Component { await server.toggleEncryption(folderPath + '/config.json') this.setState({ - encryption: await translate( - (await server.encryptionEnabled(folderPath + '/config.json')) ? 'options.enabled' : 'options.disabled' + encryption: ( + (await server.encryptionEnabled(folderPath + '/config.json')) ), }) @@ -399,9 +399,11 @@ export default class Options extends React.Component {