Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
Show disconnect alongside reconnect on lost social connections (#332)
Paulo Castellano82da3fd64b78
diff --git a/resources/js/components/accounts/NetworkConnectGrid.vue b/resources/js/components/accounts/NetworkConnectGrid.vueindex 0f5f1c5df..23fc3c6d2 100644--- a/resources/js/components/accounts/NetworkConnectGrid.vue+++ b/resources/js/components/accounts/NetworkConnectGrid.vue@@ -234,19 +234,34 @@ const cards = computed<ConnectCard[]>(() => {</p></div>- <Button+ <divv-if="card.state === 'reconnect' && card.account"- size="sm"- class="mt-auto w-full"- @click="startConnect(card.account.platform, card.account.id)"+ class="mt-auto flex w-full flex-col gap-2">- {{ $t('accounts.reconnect') }}- </Button>+ <Button+ size="sm"+ class="w-full"+ :data-testid="`reconnect-${card.account.id}`"+ @click="startConnect(card.account.platform, card.account.id)"+ >+ {{ $t('accounts.reconnect') }}+ </Button>+ <Button+ variant="destructive"+ size="sm"+ class="w-full"+ :data-testid="`disconnect-${card.account.id}`"+ @click="disconnectAccount(card.account)"+ >+ {{ $t('accounts.disconnect') }}+ </Button>+ </div><Buttonv-else-if="card.state === 'connected' && card.account"variant="destructive"size="sm"class="mt-auto w-full"+ :data-testid="`disconnect-${card.account.id}`"@click="disconnectAccount(card.account)">{{ $t('accounts.disconnect') }}diff --git a/tests/Browser/NetworkConnectGridTest.php b/tests/Browser/NetworkConnectGridTest.phpindex e70d8d92d..69778880e 100644--- a/tests/Browser/NetworkConnectGridTest.php+++ b/tests/Browser/NetworkConnectGridTest.php@@ -71,3 +71,22 @@ test('a taken network offers another card when multiples are allowed', function->assertVisible('@connect-x')->assertNoJavaScriptErrors();});++test('a lost connection offers both reconnect and disconnect', function () {+ $user = gridOwnerWithLinkedIn();++ $account = SocialAccount::factory()->x()->tokenExpired()->create([+ 'workspace_id' => $user->current_workspace_id,+ 'platform_user_id' => 'x-expired',+ ]);++ $this->actingAs($user);++ $page = visit(route('app.accounts'));++ waitForGridTestId($page, "disconnect-{$account->id}");++ $page->assertVisible("@reconnect-{$account->id}")+ ->assertVisible("@disconnect-{$account->id}")+ ->assertNoJavaScriptErrors();+});