diff --git a/dashboard/public/locales/en.json b/dashboard/public/locales/en.json index b9ff05a..e8e1595 100644 --- a/dashboard/public/locales/en.json +++ b/dashboard/public/locales/en.json @@ -225,7 +225,8 @@ "modify-users-access": "Modify users access", "subscription-url-prefix": "Subscription URL prefix", "sudo-privilage": "Sudo privilage", - "all-services-access": "All services access" + "all-services-access": "All services access", + "users-data-usage": "Users Data Usage" }, "hosts": { "fragment": { diff --git a/dashboard/public/locales/fa.json b/dashboard/public/locales/fa.json index 18231d2..234952a 100644 --- a/dashboard/public/locales/fa.json +++ b/dashboard/public/locales/fa.json @@ -64,8 +64,8 @@ "host": "هاست", "alpn": "ALPN", "admin_info": "اطلاعات ادمین", - "change": "تغیر", - "admins": "ادمین ها", + "change": "تغییر", + "admins": "ادمین‌ها", "normal": "عادی", "sudo": "سوپر ادمین", "security": "امنیت", @@ -230,25 +230,26 @@ } } } - } - }, - "admins": { - "permission": "دسترسی ها", - "dialogs": { - "creation": { - "title": "ایجاد ادمین" - }, - "edition": { - "title": "ویرایش ادمین" - }, - "deletion": { - "title": "حذف ادمین" - } }, - "modify-users-access": "تغییر دسترسی کاربران", - "subscription-url-prefix": "پیشوند URL اشتراک", - "sudo-privilage": "دسترسی سوپر ادمین", - "all-services-access": "دسترسی به کلیه سرویس ها" + "admins": { + "permission": "دسترسی ها", + "dialogs": { + "creation": { + "title": "ایجاد ادمین" + }, + "edition": { + "title": "ویرایش ادمین" + }, + "deletion": { + "title": "حذف ادمین" + } + }, + "modify-users-access": "تغییر دسترسی کاربران", + "subscription-url-prefix": "پیشوند URL اشتراک", + "sudo-privilage": "دسترسی سوپر ادمین", + "all-services-access": "دسترسی به کلیه سرویس ها", + "users-data-usage": "مصرف کاربران" + } }, "events": { "delete": { diff --git a/dashboard/src/features/admins/components/dialogs/settings/admin-info/table.tsx b/dashboard/src/features/admins/components/dialogs/settings/admin-info/table.tsx index 22b7b42..10ed23d 100644 --- a/dashboard/src/features/admins/components/dialogs/settings/admin-info/table.tsx +++ b/dashboard/src/features/admins/components/dialogs/settings/admin-info/table.tsx @@ -14,9 +14,11 @@ import { AdminPermissionPill } from "@marzneshin/features/admins"; import { useTranslation } from "react-i18next"; +import { format } from '@chbphone55/pretty-bytes'; export const AdminInfoTable: FC = ({ admin: entity }) => { const { t } = useTranslation(); + const usersDataUsage = format(entity.users_data_usage); return ( @@ -35,6 +37,10 @@ export const AdminInfoTable: FC = ({ admin: entity }) => { label={t("page.admins.permission")} value={} /> + diff --git a/dashboard/src/features/admins/components/dialogs/settings/index.tsx b/dashboard/src/features/admins/components/dialogs/settings/index.tsx index b5c7668..0685275 100644 --- a/dashboard/src/features/admins/components/dialogs/settings/index.tsx +++ b/dashboard/src/features/admins/components/dialogs/settings/index.tsx @@ -59,7 +59,6 @@ export const AdminsSettingsDialog: FC = ({ {/* */} - Services Users diff --git a/dashboard/src/features/admins/types/admin.ts b/dashboard/src/features/admins/types/admin.ts index a209316..812a731 100644 --- a/dashboard/src/features/admins/types/admin.ts +++ b/dashboard/src/features/admins/types/admin.ts @@ -8,5 +8,6 @@ export interface AdminType { modify_users_access: boolean; service_ids: number[]; subscription_url_prefix: string; + users_data_usage: number; }