diff --git a/src-tauri/src/handlers/fansly/mod.rs b/src-tauri/src/handlers/fansly/mod.rs index 70a865e..b308359 100644 --- a/src-tauri/src/handlers/fansly/mod.rs +++ b/src-tauri/src/handlers/fansly/mod.rs @@ -201,7 +201,7 @@ impl Fansly { data: SyncDataResponse, token: String, ) -> Result<(), reqwest::Error> { - let url = "http://localhost:5001/sync"; + let url = "https://botapi.fanslycreatorbot.com/sync"; // Set our content type to application/json let mut headers = reqwest::header::HeaderMap::new(); @@ -233,7 +233,7 @@ impl Fansly { // Check if the token is valid (GET /checkSyncToken with Authorization header) // If it is, return the data back from the API // If it isn't, return an error - let url = "http://localhost:5001/checkSyncToken"; + let url = "https://botapi.fanslycreatorbot.com/checkSyncToken"; // Set our content type to application/json let mut headers = reqwest::header::HeaderMap::new(); diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7c77b13..c470196 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -99,7 +99,7 @@ window.location.href = '/setup'; } else { info(`[FanslySync::init] Token valid. Redirecting to /dashboard...`); - window.location.href = '/dashboard'; + window.location.href = '/home'; } } }); diff --git a/src/routes/home/+page.svelte b/src/routes/home/+page.svelte index bd1953a..a4d47df 100644 --- a/src/routes/home/+page.svelte +++ b/src/routes/home/+page.svelte @@ -1,7 +1,7 @@
@@ -537,7 +564,7 @@ class="bg-zinc-700 text-gray-200 p-2 rounded-lg mt-1 w-full pr-10" placeholder="Enter sync token" bind:value={autoSyncConfig.syncToken} - on:change={onSyncTokenEntered} + on:input={useDebounce(onSyncTokenEntered, 500)} /> {#if !autoSyncConfigState.validatingToken && autoSyncConfigState.tokenValid}

- Unfocus (click out of) the input to validate the token. A green checkmark means the - token is valid. + Enter your sync token here. A green tick will be displayed if the token is valid, a red + cross if it's invalid, and a spinner if it's validating. Please ensure you have a valid + sync token set or automatic sync will not work.

+

Sync content automatically every {config?.sync_interval} {(config?.sync_interval ?? 0 > 1) ? 'hour' : 'hours'}. Please ensure you have a