mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-21 00:05:13 +02:00
fix: And refactor onboarding integration components
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import Container from '../../../Container.svelte';
|
||||
import { tmdbApi } from '../../apis/tmdb/tmdb-api';
|
||||
import Button from '../Button.svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { ExternalLink } from 'radix-icons-svelte';
|
||||
import { user } from '../../stores/user.store';
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
let tmdbConnectQrCode: string | undefined = undefined;
|
||||
let tmdbError: string = '';
|
||||
|
||||
handleGenerateTMDBLink();
|
||||
|
||||
async function handleGenerateTMDBLink() {
|
||||
return tmdbApi.getConnectAccountLink().then((res) => {
|
||||
if (res?.status_code !== 1) return; // TODO add notification
|
||||
@@ -66,9 +68,9 @@
|
||||
{/if}
|
||||
|
||||
<Container direction="horizontal" class="flex space-x-4 *:flex-1">
|
||||
{#if !tmdbConnectRequestToken}
|
||||
<Button type="primary-dark" action={handleGenerateTMDBLink}>Generate Link</Button>
|
||||
{:else if tmdbConnectLink}
|
||||
<!--{#if !tmdbConnectRequestToken}-->
|
||||
<!-- <Button type="primary-dark" action={handleGenerateTMDBLink}>Generate Link</Button>-->
|
||||
{#if tmdbConnectLink}
|
||||
<Button type="primary-dark" action={completeTMDBConnect}>Complete Connection</Button>
|
||||
<Button type="primary-dark" on:clickOrSelect={() => window.open(tmdbConnectLink)}>
|
||||
Open Link
|
||||
|
||||
Reference in New Issue
Block a user