Previously, in frontend code, we have centralized all tauri commands into a single dir at src/commands. Now we continue to improve this to centralize all tauri commands into a single file at src/adapters/tauri.ts
We also introduce the RUN_ENV enum, and getRunEnv helper to determine the running env, e.g. desktop, browser, mobile
This helps cleaning the code with these things
preparing for new running env
use generic type from invoke function instead of manual type casting
Summary
src/commands
. Now we continue to improve this to centralize all tauri commands into a single file atsrc/adapters/tauri.ts
RUN_ENV
enum, andgetRunEnv
helper to determine the running env, e.g. desktop, browser, mobileinvoke
function instead of manual type casting