Feature : RTK compress
This commit is contained in:
parent
e1a219dba6
commit
8de9aae90c
26 changed files with 1612 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ const DEFAULT_SETTINGS = {
|
|||
outboundProxyUrl: "",
|
||||
outboundNoProxy: "",
|
||||
mitmRouterBaseUrl: DEFAULT_MITM_ROUTER_BASE,
|
||||
rtkEnabled: false,
|
||||
};
|
||||
|
||||
function cloneDefaultData() {
|
||||
|
|
|
|||
20
src/lib/rtk/initRtk.js
Normal file
20
src/lib/rtk/initRtk.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { getSettings } from "@/lib/localDb";
|
||||
import { setRtkEnabled } from "open-sse/rtk/flag.js";
|
||||
|
||||
let initialized = false;
|
||||
|
||||
export async function ensureRtkInitialized() {
|
||||
if (initialized) return true;
|
||||
try {
|
||||
const settings = await getSettings();
|
||||
setRtkEnabled(settings.rtkEnabled === true);
|
||||
initialized = true;
|
||||
} catch (error) {
|
||||
console.error("[ServerInit] Error initializing RTK flag:", error);
|
||||
}
|
||||
return initialized;
|
||||
}
|
||||
|
||||
ensureRtkInitialized().catch(console.log);
|
||||
|
||||
export default ensureRtkInitialized;
|
||||
Loading…
Add table
Add a link
Reference in a new issue