Client: clear the game cache on Play, remember the friend's server login

- clear_game_cache removes Cache/WDB/<locale>/*.wdb before every Play (own server and
  friend's), on by default, switch in the client card; nothing else in Cache or Data.
- The connection profile keeps the listed realm it was joined through; Play fills that
  realm's saved account into GlueConfig.json every time. A host typed by hand drops it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-15 20:51:40 +05:00
1 parent 260d10b729
commit d64fdb51be
16 files changed
+149

No files matched your search

+2
View File
@@ -29,6 +29,8 @@ export {};
(window as any).__TAURI_INTERNALS__ = {
transformCallback: (cb: unknown)=>cb, unregisterCallback(){}, convertFileSrc:(x: unknown)=>x,
invoke: async (cmd: string, args?: any)=>{
if(cmd==="clear_game_cache_on_play") return localStorage.getItem("demo-clear-cache")!=="0";
if(cmd==="set_clear_game_cache_on_play"){localStorage.setItem("demo-clear-cache",args.enabled?"1":"0");return;}
if(cmd==="close_to_tray") return localStorage.getItem("demo-close-tray")==="1";
if(cmd==="set_close_to_tray"){localStorage.setItem("demo-close-tray",args.enabled?"1":"0");return;}
if(cmd==="client_graphics") return JSON.parse(localStorage.getItem("demo-graphics")??'{"dxvk_disabled":false,"enhancements_disabled":false}');