File size: 568 Bytes
43a06dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import settings from "$lib/state/settings";
import cachedInfo from "$lib/state/server-info";
import { derived, writable } from "svelte/store";

export const turnstileSolved = writable(false);
export const turnstileCreated = writable(false);

export const turnstileEnabled = derived(
    [settings, cachedInfo],
    ([$settings, $cachedInfo]) => {
        return !!$cachedInfo?.info?.cobalt?.turnstileSitekey &&
            !(
                $settings.processing.enableCustomApiKey &&
                $settings.processing.customApiKey.length > 0
            )
    }
)