upd
This commit is contained in:
@@ -414,7 +414,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- JS -->
|
<!-- JS -->
|
||||||
<script src="js/app.js?v=3"></script>
|
<script src="js/app.js?v=4"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -76,7 +76,12 @@ const translations = {
|
|||||||
adm_send: "Send",
|
adm_send: "Send",
|
||||||
adm_broadcast_msg: "Send message to all users",
|
adm_broadcast_msg: "Send message to all users",
|
||||||
ph_message: "Message...",
|
ph_message: "Message...",
|
||||||
ph_search: "Search..."
|
ph_search: "Search...",
|
||||||
|
status_active: "Active",
|
||||||
|
status_inactive: "Inactive",
|
||||||
|
status_expired: "Expired",
|
||||||
|
status_no_sub: "No active subscription",
|
||||||
|
unit_gb: "GB"
|
||||||
},
|
},
|
||||||
ru: {
|
ru: {
|
||||||
nav_home: "Главная",
|
nav_home: "Главная",
|
||||||
@@ -143,7 +148,12 @@ const translations = {
|
|||||||
adm_send: "Отправить",
|
adm_send: "Отправить",
|
||||||
adm_broadcast_msg: "Сообщение всем юзерам",
|
adm_broadcast_msg: "Сообщение всем юзерам",
|
||||||
ph_message: "Сообщение...",
|
ph_message: "Сообщение...",
|
||||||
ph_search: "Поиск..."
|
ph_search: "Поиск...",
|
||||||
|
status_active: "Активна",
|
||||||
|
status_inactive: "Неактивна",
|
||||||
|
status_expired: "Истекла",
|
||||||
|
status_no_sub: "Нет активной подписки",
|
||||||
|
unit_gb: "ГБ"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -395,13 +405,28 @@ async function loadDashboard() {
|
|||||||
|
|
||||||
// Update Text
|
// Update Text
|
||||||
const statusEl = document.getElementById('dash-status');
|
const statusEl = document.getElementById('dash-status');
|
||||||
if (statusEl) statusEl.textContent = data.status;
|
if (statusEl) {
|
||||||
|
// Translate status from server or map common values
|
||||||
|
const statusMap = {
|
||||||
|
'Active': t('status_active'),
|
||||||
|
'Inactive': t('status_inactive'),
|
||||||
|
'Expired': t('status_expired')
|
||||||
|
};
|
||||||
|
statusEl.textContent = statusMap[data.status] || data.status;
|
||||||
|
}
|
||||||
|
|
||||||
const limitEl = document.getElementById('dash-limit');
|
const limitEl = document.getElementById('dash-limit');
|
||||||
if (limitEl) limitEl.textContent = `${data.data_limit_gb} GB`;
|
if (limitEl) limitEl.textContent = `${data.data_limit_gb} ${t('unit_gb')}`;
|
||||||
|
|
||||||
const expireEl = document.getElementById('dash-expire');
|
const expireEl = document.getElementById('dash-expire');
|
||||||
if (expireEl) expireEl.textContent = data.expire_date;
|
if (expireEl) {
|
||||||
|
// Handle "No active subscription" specifically or date
|
||||||
|
if (data.expire_date === "No active subscription") {
|
||||||
|
expireEl.textContent = t('status_no_sub');
|
||||||
|
} else {
|
||||||
|
expireEl.textContent = data.expire_date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const leftEl = document.getElementById('dash-data-left');
|
const leftEl = document.getElementById('dash-data-left');
|
||||||
if (leftEl) leftEl.textContent = data.used_traffic_gb;
|
if (leftEl) leftEl.textContent = data.used_traffic_gb;
|
||||||
|
|||||||
Reference in New Issue
Block a user