From 8a62a5a8c7bc7e75b0bf68777610d149780a941b Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:30:54 -0700 Subject: [PATCH] Notify on encryption change --- src/ui/components/menu/Options.tsx | 2 ++ src/utils/rsa.ts | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ui/components/menu/Options.tsx b/src/ui/components/menu/Options.tsx index 212c66b..aa897ed 100644 --- a/src/ui/components/menu/Options.tsx +++ b/src/ui/components/menu/Options.tsx @@ -264,6 +264,8 @@ export default class Options extends React.Component { (await server.encryptionEnabled(folderPath + '/config.json')) ? 'options.enabled' : 'options.disabled' ), }) + + alert('Restart Grasscutter to apply encryption settings! If it is already closed, just start as normal.') } async removeRSA() { diff --git a/src/utils/rsa.ts b/src/utils/rsa.ts index 84c3d68..1c8ebd7 100644 --- a/src/utils/rsa.ts +++ b/src/utils/rsa.ts @@ -1,11 +1,7 @@ import { invoke } from '@tauri-apps/api' import { dataDir } from '@tauri-apps/api/path' -import { listen } from '@tauri-apps/api/event' -import DownloadHandler from './download' import { getGameFolder } from './game' -const downloadHandler = new DownloadHandler() - export async function patchGame() { // Do we have a patch already? const patchedExists = await invoke('dir_exists', {