fixes
Build And Push Image / docker (push) Successful in 2m54s
Details
Build And Push Image / docker (push) Successful in 2m54s
Details
This commit is contained in:
parent
4ec05e29dc
commit
97a0b5eea6
|
|
@ -161,6 +161,55 @@
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
<!-- Email Configuration -->
|
||||||
|
<v-row class="mb-6">
|
||||||
|
<v-col cols="12" md="6">
|
||||||
|
<v-card elevation="2">
|
||||||
|
<v-card-title>
|
||||||
|
<v-icon left>mdi-email-cog</v-icon>
|
||||||
|
Email Configuration
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<p class="mb-4">Configure SMTP settings for email notifications and verification.</p>
|
||||||
|
|
||||||
|
<v-btn
|
||||||
|
color="info"
|
||||||
|
variant="outlined"
|
||||||
|
block
|
||||||
|
size="large"
|
||||||
|
@click="openEmailConfig"
|
||||||
|
>
|
||||||
|
<v-icon start>mdi-email-settings</v-icon>
|
||||||
|
Configure Email
|
||||||
|
</v-btn>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="12" md="6">
|
||||||
|
<v-card elevation="2">
|
||||||
|
<v-card-title>
|
||||||
|
<v-icon left>mdi-cog-outline</v-icon>
|
||||||
|
All Settings
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<p class="mb-4">Access all portal configuration settings in one place.</p>
|
||||||
|
|
||||||
|
<v-btn
|
||||||
|
color="secondary"
|
||||||
|
variant="outlined"
|
||||||
|
block
|
||||||
|
size="large"
|
||||||
|
@click="showAdminConfig = true"
|
||||||
|
>
|
||||||
|
<v-icon start>mdi-cog</v-icon>
|
||||||
|
Portal Settings
|
||||||
|
</v-btn>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
<!-- NocoDB Configuration -->
|
<!-- NocoDB Configuration -->
|
||||||
<v-row class="mb-6">
|
<v-row class="mb-6">
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
|
|
@ -418,6 +467,7 @@ const showCreateUserDialog = ref(false);
|
||||||
const showAdminConfig = ref(false);
|
const showAdminConfig = ref(false);
|
||||||
const showRecaptchaConfig = ref(false);
|
const showRecaptchaConfig = ref(false);
|
||||||
const showMembershipConfig = ref(false);
|
const showMembershipConfig = ref(false);
|
||||||
|
const showEmailConfig = ref(false);
|
||||||
|
|
||||||
// Create user dialog data
|
// Create user dialog data
|
||||||
const createUserValid = ref(false);
|
const createUserValid = ref(false);
|
||||||
|
|
@ -531,6 +581,21 @@ const handleAdminConfigSaved = () => {
|
||||||
showAdminConfig.value = false;
|
showAdminConfig.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Handle opening email configuration directly
|
||||||
|
const openEmailConfig = () => {
|
||||||
|
// Set the activeTab to email when opening the admin config dialog
|
||||||
|
showEmailConfig.value = true;
|
||||||
|
showAdminConfig.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Watch for showEmailConfig to set the initial tab
|
||||||
|
watch(showEmailConfig, (newValue) => {
|
||||||
|
if (newValue) {
|
||||||
|
// This will be handled by the AdminConfigurationDialog to set initial tab
|
||||||
|
showEmailConfig.value = false; // Reset the flag
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const saveRecaptchaConfig = async () => {
|
const saveRecaptchaConfig = async () => {
|
||||||
if (!recaptchaValid.value) return;
|
if (!recaptchaValid.value) return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -422,59 +422,44 @@ function loadRecaptchaScript(siteKey: string) {
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add page initialization state
|
// Simplified initialization - prevent reload loops
|
||||||
const pageReady = ref(false);
|
|
||||||
|
|
||||||
// Load configurations on mount
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
console.log('🚀 Initializing signup page...');
|
// Prevent multiple initializations
|
||||||
|
if (typeof window === 'undefined') return;
|
||||||
|
|
||||||
// Set a timeout to ensure page shows even if API calls fail
|
|
||||||
const initTimeout = setTimeout(() => {
|
|
||||||
if (!pageReady.value) {
|
|
||||||
console.warn('⚠️ API calls taking too long, showing page with defaults');
|
|
||||||
pageReady.value = true;
|
|
||||||
}
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Load reCAPTCHA config with timeout
|
// Load configs without complex timeout logic
|
||||||
try {
|
Promise.all([
|
||||||
const recaptchaResponse = await Promise.race([
|
// Load reCAPTCHA config
|
||||||
$fetch('/api/recaptcha-config'),
|
$fetch('/api/recaptcha-config').then((response: any) => {
|
||||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 2000))
|
if (response?.success && response?.data?.siteKey) {
|
||||||
]) as any;
|
recaptchaConfig.value.siteKey = response.data.siteKey;
|
||||||
|
loadRecaptchaScript(response.data.siteKey);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// Silently fail for reCAPTCHA - not critical
|
||||||
|
}),
|
||||||
|
|
||||||
if (recaptchaResponse?.success && recaptchaResponse?.data?.siteKey) {
|
// Load registration config
|
||||||
recaptchaConfig.value.siteKey = recaptchaResponse.data.siteKey;
|
$fetch('/api/registration-config').then((response: any) => {
|
||||||
loadRecaptchaScript(recaptchaConfig.value.siteKey);
|
if (response?.success) {
|
||||||
console.log('✅ reCAPTCHA site key loaded successfully');
|
registrationConfig.value = response.data;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
}).catch(() => {
|
||||||
console.warn('❌ reCAPTCHA config failed to load:', error);
|
// Use defaults if config fails to load
|
||||||
}
|
registrationConfig.value = {
|
||||||
|
membershipFee: 150,
|
||||||
// Load registration config with timeout
|
iban: 'MC58 1756 9000 0104 0050 1001 860',
|
||||||
try {
|
accountHolder: 'ASSOCIATION MONACO USA'
|
||||||
const registrationResponse = await Promise.race([
|
};
|
||||||
$fetch('/api/registration-config'),
|
})
|
||||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 2000))
|
]).catch(() => {
|
||||||
]) as any;
|
// Global fallback - don't let errors cause page reload
|
||||||
|
});
|
||||||
if (registrationResponse?.success) {
|
|
||||||
registrationConfig.value = registrationResponse.data;
|
|
||||||
console.log('✅ Registration config loaded successfully');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.warn('❌ Registration config failed to load:', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to load configuration:', error);
|
// Prevent any errors from bubbling up and causing reload
|
||||||
} finally {
|
console.warn('Signup page initialization error:', error);
|
||||||
clearTimeout(initTimeout);
|
|
||||||
pageReady.value = true;
|
|
||||||
console.log('✅ Signup page ready');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue