diff --git a/static/js/index.js b/static/js/index.js index c777980..b66430b 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,18 +1,17 @@ window.app = Vue.createApp({ + el: '#dcaClient', mixins: [windowMixin], delimiters: ['${', '}'], - data() { + data: function () { return { dashboardData: null, transactions: [], - analytics: null, loading: true, error: null } }, methods: { - // Utility Methods formatCurrency(amount) { if (!amount) return 'Q 0.00'; // Convert centavos to quetzales @@ -27,12 +26,6 @@ window.app = Vue.createApp({ return new Date(dateString).toLocaleDateString() }, - formatDateTime(dateString) { - if (!dateString) return '' - const date = new Date(dateString) - return date.toLocaleDateString() + ' ' + date.toLocaleTimeString('en-US', { hour12: false }) - }, - formatSats(amount) { if (!amount) return '0 sats' return new Intl.NumberFormat('en-US').format(amount) + ' sats' @@ -87,5 +80,3 @@ window.app = Vue.createApp({ } } }) - -window.app.mount('#dcaClient') diff --git a/templates/satmachineclient/index.html b/templates/satmachineclient/index.html index 6a10114..7da2cd3 100644 --- a/templates/satmachineclient/index.html +++ b/templates/satmachineclient/index.html @@ -7,59 +7,63 @@ {% endblock %} {% block page %}
- -
- - -
Loading your DCA dashboard...
+
+ + + + + +
Loading your DCA dashboard...
+
-
- -
- - - ${error} - -
+ + + + + ${error} + + - -
- -
-
- -
${formatSats(dashboardData.total_sats_accumulated)}
-
Total Sats Accumulated
-
-
-
- -
${formatCurrency(dashboardData.total_fiat_invested)}
-
Total Invested
-
-
-
- -
${formatCurrency(dashboardData.current_fiat_balance)}
-
Available Balance
-
-
-
- -
${dashboardData.total_transactions}
-
Total Transactions
-
-
-
+ +
+ + + +
DCA Overview
+
+
+
+
${formatSats(dashboardData.total_sats_accumulated)}
+
Total Sats
+
+
+
+
+
${formatCurrency(dashboardData.total_fiat_invested)}
+
Total Invested
+
+
+
+
+
${formatCurrency(dashboardData.current_fiat_balance)}
+
Available Balance
+
+
+
+
+
${dashboardData.total_transactions}
+
Transactions
+
+
+
+
+
- -
-
- -
DCA Status
+ + + +
DCA Status
Mode: ${dashboardData.dca_mode}
@@ -79,15 +83,13 @@
Average Cost Basis: ${Math.round(dashboardData.average_cost_basis)} sats/GTQ
- -
-
+
+
- -
-
- -
Recent Transactions
+ + + +
Recent Transactions
No transactions yet
@@ -108,9 +110,49 @@ -
-
+ +
+ + +
+ + +
+ {{SITE_TITLE}} DCA Client +
+

+ Monitor your Dollar Cost Averaging progress and manage your DCA settings. +

+
+ + + + + +
+
DCA Mode:
+
${ dashboardData.dca_mode }
+
+
+
Status:
+
${ dashboardData.dca_status }
+
+
+
Avg Cost:
+
${ Math.round(dashboardData.average_cost_basis) } sats/GTQ
+
+
+
+
+
+
+
{% endblock %}