diff --git a/data_analyzer/templates/data_analyzer/detail.html b/data_analyzer/templates/data_analyzer/detail.html index 3cafeea..573d3ef 100644 --- a/data_analyzer/templates/data_analyzer/detail.html +++ b/data_analyzer/templates/data_analyzer/detail.html @@ -13,7 +13,7 @@ document.addEventListener('DOMContentLoaded', function() { // Set data for JavaScript access document.body.setAttribute('data-user-authenticated', '{{ user.is_authenticated|yesno:"true,false" }}'); - document.body.setAttribute('data-agent-price', '5.00'); + document.body.setAttribute('data-agent-price', '{{ agent.price }}'); // Initialize form submission const form = document.getElementById('agentForm'); @@ -277,7 +277,7 @@ function copyResults() { if (content) { const text = content.textContent || ''; navigator.clipboard.writeText(text).then(() => { - DataAnalyzerUtils.showToast('📋 Analysis results copied to clipboard!', 'success'); + DataAnalyzerUtils.showToast('📋 Copied to clipboard!', 'success'); }).catch(() => { DataAnalyzerUtils.showToast('❌ Failed to copy to clipboard', 'error'); }); @@ -296,7 +296,7 @@ function downloadResults() { a.download = 'data-analysis-results.txt'; a.click(); URL.revokeObjectURL(url); - DataAnalyzerUtils.showToast('💾 Analysis results downloaded!', 'success'); + // No toast for download - file download is confirmation enough } } @@ -336,7 +336,7 @@ function resetForm() { if (input) input.checked = true; } - DataAnalyzerUtils.showToast('🔄 Form reset - ready for new analysis', 'success'); + // No toast for reset - visual feedback is enough } // Quick Agent Access Functions @@ -402,7 +402,7 @@ function handleFormSubmission(e) { } const walletBalance = parseFloat(document.getElementById('walletBalance')?.textContent) || 0; - if (walletBalance < 5.00) { + if (walletBalance < {{ agent.price }}) { DataAnalyzerUtils.showToast('Insufficient wallet balance', 'error'); setTimeout(() => { window.location.href = "{% url 'wallet:wallet' %}"; @@ -547,13 +547,13 @@ document.addEventListener('keydown', function(e) {