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-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 -->
|
||||
<v-row class="mb-6">
|
||||
<v-col cols="12">
|
||||
|
|
@ -418,6 +467,7 @@ const showCreateUserDialog = ref(false);
|
|||
const showAdminConfig = ref(false);
|
||||
const showRecaptchaConfig = ref(false);
|
||||
const showMembershipConfig = ref(false);
|
||||
const showEmailConfig = ref(false);
|
||||
|
||||
// Create user dialog data
|
||||
const createUserValid = ref(false);
|
||||
|
|
@ -531,6 +581,21 @@ const handleAdminConfigSaved = () => {
|
|||
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 () => {
|
||||
if (!recaptchaValid.value) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -422,59 +422,44 @@ function loadRecaptchaScript(siteKey: string) {
|
|||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
// Add page initialization state
|
||||
const pageReady = ref(false);
|
||||
|
||||
// Load configurations on mount
|
||||
// Simplified initialization - prevent reload loops
|
||||
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 {
|
||||
// Load reCAPTCHA config with timeout
|
||||
try {
|
||||
const recaptchaResponse = await Promise.race([
|
||||
$fetch('/api/recaptcha-config'),
|
||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 2000))
|
||||
]) as any;
|
||||
// Load configs without complex timeout logic
|
||||
Promise.all([
|
||||
// Load reCAPTCHA config
|
||||
$fetch('/api/recaptcha-config').then((response: any) => {
|
||||
if (response?.success && response?.data?.siteKey) {
|
||||
recaptchaConfig.value.siteKey = response.data.siteKey;
|
||||
loadRecaptchaScript(response.data.siteKey);
|
||||
}
|
||||
}).catch(() => {
|
||||
// Silently fail for reCAPTCHA - not critical
|
||||
}),
|
||||
|
||||
if (recaptchaResponse?.success && recaptchaResponse?.data?.siteKey) {
|
||||
recaptchaConfig.value.siteKey = recaptchaResponse.data.siteKey;
|
||||
loadRecaptchaScript(recaptchaConfig.value.siteKey);
|
||||
console.log('✅ reCAPTCHA site key loaded successfully');
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('❌ reCAPTCHA config failed to load:', error);
|
||||
}
|
||||
|
||||
// Load registration config with timeout
|
||||
try {
|
||||
const registrationResponse = await Promise.race([
|
||||
$fetch('/api/registration-config'),
|
||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 2000))
|
||||
]) as any;
|
||||
|
||||
if (registrationResponse?.success) {
|
||||
registrationConfig.value = registrationResponse.data;
|
||||
console.log('✅ Registration config loaded successfully');
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('❌ Registration config failed to load:', error);
|
||||
}
|
||||
// Load registration config
|
||||
$fetch('/api/registration-config').then((response: any) => {
|
||||
if (response?.success) {
|
||||
registrationConfig.value = response.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
// Use defaults if config fails to load
|
||||
registrationConfig.value = {
|
||||
membershipFee: 150,
|
||||
iban: 'MC58 1756 9000 0104 0050 1001 860',
|
||||
accountHolder: 'ASSOCIATION MONACO USA'
|
||||
};
|
||||
})
|
||||
]).catch(() => {
|
||||
// Global fallback - don't let errors cause page reload
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Failed to load configuration:', error);
|
||||
} finally {
|
||||
clearTimeout(initTimeout);
|
||||
pageReady.value = true;
|
||||
console.log('✅ Signup page ready');
|
||||
// Prevent any errors from bubbling up and causing reload
|
||||
console.warn('Signup page initialization error:', error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue