mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Lunchflow settings family (#363)
* Move provider config to family * remove global settings * Remove turbo auto submit * Fix flash location * Fix mssing syncer for lunchflow * Update schema.rb * FIX tests and encryption config * FIX make rabbit happy * FIX run migration in SQL * FIX turbo frame modal * Branding fixes * FIX rabbit * OCD with product names * More OCD * No other console.log|warn in codebase --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -52,13 +52,23 @@ export default class extends Controller {
|
||||
if (this.hasLinkTarget) {
|
||||
this.hideLoading();
|
||||
}
|
||||
} else if (!data.has_accounts) {
|
||||
// No accounts available, hide the link entirely
|
||||
} else if (data.error === "no_credentials") {
|
||||
// No credentials configured - keep link visible so user can see setup message
|
||||
if (this.hasLinkTarget) {
|
||||
this.hideLoading();
|
||||
}
|
||||
} else if (data.has_accounts === false) {
|
||||
// Credentials configured and API works, but no accounts available - hide the link
|
||||
if (this.hasLinkTarget) {
|
||||
this.linkTarget.style.display = "none";
|
||||
}
|
||||
} else if (data.has_accounts === null || data.error === "api_error" || data.error === "unexpected_error") {
|
||||
// API error (bad credentials, network issue, etc) - keep link visible, user will see error when clicked
|
||||
if (this.hasLinkTarget) {
|
||||
this.hideLoading();
|
||||
}
|
||||
} else {
|
||||
// Error occurred
|
||||
// Other error - keep link visible
|
||||
if (this.hasLinkTarget) {
|
||||
this.hideLoading();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user