mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-20 16:03:21 +00:00
fix: offer Reconnect next to an existing trigger's account and point the refresh hints at it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
35cd919051
commit
4f43a38b3f
@@ -334,7 +334,7 @@ impl External for GitHub {
|
||||
fn error_hint(&self, status: StatusCode) -> Option<&'static str> {
|
||||
match status {
|
||||
StatusCode::UNAUTHORIZED => {
|
||||
Some("reconnect the GitHub account this uses from the account picker.")
|
||||
Some("reconnect the GitHub account this uses with Reconnect next to it, or ask its owner or an admin to.")
|
||||
}
|
||||
StatusCode::FORBIDDEN => Some(
|
||||
"check that the OAuth app is authorized for the organization and that the \
|
||||
|
||||
@@ -227,7 +227,7 @@ impl External for Google {
|
||||
fn error_hint(&self, status: http::StatusCode) -> Option<&'static str> {
|
||||
match status {
|
||||
http::StatusCode::UNAUTHORIZED => {
|
||||
Some("reconnect the Google account this uses from the account picker.")
|
||||
Some("reconnect the Google account this uses with Reconnect next to it, or ask its owner or an admin to.")
|
||||
}
|
||||
http::StatusCode::FORBIDDEN => Some(
|
||||
"the connected Google account is missing access to this resource or the scope the \
|
||||
|
||||
@@ -351,7 +351,7 @@ impl External for NextCloud {
|
||||
fn error_hint(&self, status: StatusCode) -> Option<&'static str> {
|
||||
match status {
|
||||
StatusCode::UNAUTHORIZED => {
|
||||
Some("reconnect the Nextcloud account this uses from the account picker.")
|
||||
Some("reconnect the Nextcloud account this uses with Reconnect next to it, or ask its owner or an admin to.")
|
||||
}
|
||||
StatusCode::FORBIDDEN => Some(
|
||||
"Nextcloud grants webhook management to administrators only, and a Windmill \
|
||||
|
||||
@@ -207,9 +207,23 @@
|
||||
{/snippet}
|
||||
</Select>
|
||||
{#if locked}
|
||||
<p class="text-2xs text-secondary">
|
||||
The webhook is registered under this account. To use another one, create a new trigger.
|
||||
</p>
|
||||
{@const current = connections?.find((c) => c.path === value)}
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<p class="text-2xs text-secondary">
|
||||
The webhook is registered under this account. To use another one, create a new trigger.
|
||||
</p>
|
||||
{#if current && canReconnect(current)}
|
||||
<Button
|
||||
unifiedSize="xs"
|
||||
variant="subtle"
|
||||
startIcon={{ icon: RefreshCw }}
|
||||
disabled={connecting}
|
||||
onclick={() => reconnect(current)}
|
||||
>
|
||||
Reconnect
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{#if unusable}
|
||||
<Alert type="warning" title="You cannot use this connection" size="xs">
|
||||
|
||||
Reference in New Issue
Block a user