feat: rename TFC to MC currency across codebase, UI, and documentation
This commit is contained in:
@@ -107,7 +107,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
return `Revenue: ${context.raw} TFC`;
|
||||
return `Revenue: ${context.raw} MC`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Revenue (TFC)'
|
||||
text: 'Revenue (MC)'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
@@ -168,7 +168,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
|
||||
label: function(context) {
|
||||
const total = context.dataset.data.reduce((a, b) => a + b, 0);
|
||||
const percentage = ((context.raw / total) * 100).toFixed(1);
|
||||
return `${context.label}: ${context.raw} TFC (${percentage}%)`;
|
||||
return `${context.label}: ${context.raw} MC (${percentage}%)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
|
||||
<div>${stars}</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>${(app.monthly_revenue_usd || 0)} TFC</td>
|
||||
<td>${(app.monthly_revenue_usd || 0)} MC</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-sm btn-outline-primary" onclick="manageApp('${app.id}', '${app.name}')">Manage</button>
|
||||
@@ -417,7 +417,7 @@ window.AppProviderDashboard = window.AppProviderDashboard || (class AppProviderD
|
||||
<small>${healthScore.toFixed(1)}%</small>
|
||||
</td>
|
||||
<td>${resourceUsage}</td>
|
||||
<td><strong>${this.estimateDeploymentRevenue(deployment.app_name)} TFC</strong></td>
|
||||
<td><strong>${this.estimateDeploymentRevenue(deployment.app_name)} MC</strong></td>
|
||||
<td>
|
||||
${autoHealingDisplay}
|
||||
</td>
|
||||
|
@@ -100,7 +100,7 @@ class ServiceProviderDashboard {
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
return `Revenue: ${context.raw} TFP`;
|
||||
return `Revenue: ${context.raw} MC`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ class ServiceProviderDashboard {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Revenue (TFP)'
|
||||
text: 'Revenue (MC)'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
@@ -293,7 +293,7 @@ class ServiceProviderDashboard {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
const point = context.raw;
|
||||
return `${point.label}: Rating ${point.x}, ${point.y} TFP/hour`;
|
||||
return `${point.label}: Rating ${point.x}, ${point.y} MC/hour`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ class ServiceProviderDashboard {
|
||||
</td>
|
||||
<td>${service.category || 'General'}</td>
|
||||
<td><span class="badge bg-${statusClass}">${service.status || 'Active'}</span></td>
|
||||
<td>${service.hourly_rate || service.price_per_hour || service.price_per_hour_usd || service.price_amount || 0} TFC/hour</td>
|
||||
<td>${service.hourly_rate || service.price_per_hour || service.price_per_hour_usd || service.price_amount || 0} MC/hour</td>
|
||||
<td>${service.clients || 0}</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
@@ -1237,7 +1237,7 @@ function createServiceRevenueAnalyticsChart(revenueData) {
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
return `Revenue: ${context.raw} TFP`;
|
||||
return `Revenue: ${context.raw} MC`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1247,7 +1247,7 @@ function createServiceRevenueAnalyticsChart(revenueData) {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Revenue (TFP)'
|
||||
text: 'Revenue (MC)'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
|
@@ -206,12 +206,12 @@
|
||||
if (tfpAmountTFT) {
|
||||
tfpAmountTFT.addEventListener('input', () => {
|
||||
const amount = parseFloat(tfpAmountTFT.value) || 0;
|
||||
const tftCost = amount * 0.5; // 1 TFC = 0.5 TFT
|
||||
const tftCost = amount * 0.5; // 1 MC = 0.5 TFT
|
||||
const modal = document.getElementById('buyTFCWithTFTModal');
|
||||
if (modal) {
|
||||
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
|
||||
// rows[0] -> Amount, rows[1] -> Cost
|
||||
if (rows[0]) rows[0].textContent = `${amount} TFC`;
|
||||
if (rows[0]) rows[0].textContent = `${amount} MC`;
|
||||
if (rows[1]) rows[1].textContent = `${tftCost.toFixed(1)} TFT`;
|
||||
}
|
||||
});
|
||||
@@ -222,11 +222,11 @@
|
||||
if (sellTfpAmountTFT) {
|
||||
sellTfpAmountTFT.addEventListener('input', () => {
|
||||
const amount = parseFloat(sellTfpAmountTFT.value) || 0;
|
||||
const tftReceive = amount * 0.5; // 1 TFC = 0.5 TFT
|
||||
const tftReceive = amount * 0.5; // 1 MC = 0.5 TFT
|
||||
const modal = document.getElementById('sellTFCForTFTModal');
|
||||
if (modal) {
|
||||
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
|
||||
if (rows[0]) rows[0].textContent = `${amount} TFC`;
|
||||
if (rows[0]) rows[0].textContent = `${amount} MC`;
|
||||
if (rows[1]) rows[1].textContent = `${tftReceive.toFixed(1)} TFT`;
|
||||
}
|
||||
});
|
||||
@@ -237,11 +237,11 @@
|
||||
if (tfpAmountPEAQ) {
|
||||
tfpAmountPEAQ.addEventListener('input', () => {
|
||||
const amount = parseFloat(tfpAmountPEAQ.value) || 0;
|
||||
const peaqCost = amount * 2.0; // 1 TFC = 2 PEAQ
|
||||
const peaqCost = amount * 2.0; // 1 MC = 2 PEAQ
|
||||
const modal = document.getElementById('buyTFCWithPEAQModal');
|
||||
if (modal) {
|
||||
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
|
||||
if (rows[0]) rows[0].textContent = `${amount} TFC`;
|
||||
if (rows[0]) rows[0].textContent = `${amount} MC`;
|
||||
if (rows[1]) rows[1].textContent = `${peaqCost.toFixed(0)} PEAQ`;
|
||||
}
|
||||
});
|
||||
@@ -252,11 +252,11 @@
|
||||
if (sellTfpAmountPEAQ) {
|
||||
sellTfpAmountPEAQ.addEventListener('input', () => {
|
||||
const amount = parseFloat(sellTfpAmountPEAQ.value) || 0;
|
||||
const peaqReceive = amount * 2.0; // 1 TFC = 2 PEAQ
|
||||
const peaqReceive = amount * 2.0; // 1 MC = 2 PEAQ
|
||||
const modal = document.getElementById('sellTFCForPEAQModal');
|
||||
if (modal) {
|
||||
const rows = modal.querySelectorAll('.alert .d-flex.justify-content-between .text-end');
|
||||
if (rows[0]) rows[0].textContent = `${amount} TFC`;
|
||||
if (rows[0]) rows[0].textContent = `${amount} MC`;
|
||||
if (rows[1]) rows[1].textContent = `${peaqReceive.toFixed(0)} PEAQ`;
|
||||
}
|
||||
});
|
||||
@@ -375,7 +375,7 @@
|
||||
},
|
||||
body: JSON.stringify({ amount, payment_method: 'TFT' }),
|
||||
});
|
||||
showSuccessToast(`Purchased ${amount} TFC with TFT`);
|
||||
showSuccessToast(`Purchased ${amount} MC with TFT`);
|
||||
const modal = document.getElementById('buyTFCWithTFTModal');
|
||||
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
|
||||
} catch (e) {
|
||||
@@ -398,7 +398,7 @@
|
||||
},
|
||||
body: JSON.stringify({ amount, currency: 'TFT', payout_method: 'blockchain' }),
|
||||
});
|
||||
showSuccessToast(`Sold ${amount} TFC for TFT`);
|
||||
showSuccessToast(`Sold ${amount} MC for TFT`);
|
||||
const modal = document.getElementById('sellTFCForTFTModal');
|
||||
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
|
||||
} catch (e) {
|
||||
@@ -421,7 +421,7 @@
|
||||
},
|
||||
body: JSON.stringify({ amount, payment_method: 'PEAQ' }),
|
||||
});
|
||||
showSuccessToast(`Purchased ${amount} TFC with PEAQ`);
|
||||
showSuccessToast(`Purchased ${amount} MC with PEAQ`);
|
||||
const modal = document.getElementById('buyTFCWithPEAQModal');
|
||||
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
|
||||
} catch (e) {
|
||||
@@ -444,7 +444,7 @@
|
||||
},
|
||||
body: JSON.stringify({ amount, currency: 'PEAQ', payout_method: 'blockchain' }),
|
||||
});
|
||||
showSuccessToast(`Sold ${amount} TFC for PEAQ`);
|
||||
showSuccessToast(`Sold ${amount} MC for PEAQ`);
|
||||
const modal = document.getElementById('sellTFCForPEAQModal');
|
||||
if (modal && window.bootstrap) bootstrap.Modal.getOrCreateInstance(modal).hide();
|
||||
} catch (e) {
|
||||
|
Reference in New Issue
Block a user