gitscope
← marzneshin / Diff · 3c21dbd → 3c21dbd
Changes 3c21dbd..3c21dbd
Patch commit
diff --git a/dashboard/public/locales/en.json b/dashboard/public/locales/en.json
index b79369a..ed9884e 100644
--- a/dashboard/public/locales/en.json
+++ b/dashboard/public/locales/en.json
@@ -63,6 +63,9 @@
"deselect": "Deselect",
"view": "View",
"certificate": "Certificate",
+ "valid": "Valid",
+ "finished": "Finished",
+ "expired": "Expired",
"support-us": {
"title": "Support Us",
"desc": "Marzneshin is free and open-source software (FOSS), join us and show your support by donating.",
diff --git a/dashboard/public/locales/fa.json b/dashboard/public/locales/fa.json
index 52a8d0e..a353ca7 100644
--- a/dashboard/public/locales/fa.json
+++ b/dashboard/public/locales/fa.json
@@ -67,6 +67,9 @@
"subscription": "اشتراک",
"subscription_link": "لینک اشتراک",
"fingerprint": "فینگرپرینت",
+ "expired": "انقضا",
+ "finished": "اتمام",
+ "valid": "مانده",
"page": {
"settings": {
"subscription-settings": {
diff --git a/dashboard/public/locales/kur.json b/dashboard/public/locales/kur.json
index 250032e..dda87f9 100644
--- a/dashboard/public/locales/kur.json
+++ b/dashboard/public/locales/kur.json
@@ -62,6 +62,9 @@
"deselect": "Hellweşandinewey",
"view": "Şêwey",
"certificate": "certificate",
+ "valid": "Mawe",
+ "finished": "Tewawbowe",
+ "expired": "Katî beserçun",
"support-us": {
"title": "piştgîrîman biken",
"desc": "marznêşîn nermekallayekî serçawekirawe û azad, legellman bin û be bexşîn pişitgîrî xotan nîşan biden.",
diff --git a/dashboard/src/features/users/components/dialogs/settings/user-info/table.tsx b/dashboard/src/features/users/components/dialogs/settings/user-info/table.tsx
index ac66534..4e44bfc 100644
--- a/dashboard/src/features/users/components/dialogs/settings/user-info/table.tsx
+++ b/dashboard/src/features/users/components/dialogs/settings/user-info/table.tsx
@@ -15,6 +15,7 @@ import {
UserUsedTraffic,
UserActivatedPill,
UserDataLimitReachedPill,
+ UserExpiredPill,
} from "@marzneshin/features/users";
import { useTranslation } from "react-i18next";
@@ -33,13 +34,21 @@ export const UserInfoTable: FC<UserProp> = ({ user: entity }) => {
<Table>
<TableBody>
<TableRowWithCell label={t("username")} value={entity.username} />
+ <TableRowWithCell
+ label={t("activated")}
+ value={<UserActivatedPill user={entity} />}
+ />
<TableRowWithCell
label={t("enabled")}
value={<UserEnabledPill user={entity} />}
/>
<TableRowWithCell
- label={t("activated")}
- value={<UserActivatedPill user={entity} />}
+ label={t("page.users.data_limit_reached")}
+ value={<UserDataLimitReachedPill user={entity} />}
+ />
+ <TableRowWithCell
+ label={t("page.users.expired")}
+ value={<UserExpiredPill user={entity} />}
/>
{{
fixed_date: (
@@ -72,10 +81,6 @@ export const UserInfoTable: FC<UserProp> = ({ user: entity }) => {
label={t("page.users.used_traffic")}
value={<UserUsedTraffic user={entity} />}
/>
- <TableRowWithCell
- label={t("page.users.data_limit_reached")}
- value={<UserDataLimitReachedPill user={entity} />}
- />
<DateTableRow
label={t("page.users.online_at")}
date={entity.online_at}
diff --git a/dashboard/src/features/users/components/pills/index.ts b/dashboard/src/features/users/components/pills/index.ts
index 50a1834..28f303b 100644
--- a/dashboard/src/features/users/components/pills/index.ts
+++ b/dashboard/src/features/users/components/pills/index.ts
@@ -2,3 +2,4 @@ export * from "./user-enabled-pill";
export * from "./user-activated-pill";
export * from "./user-data-limit-reached-pill";
export * from "./user-expire-strategy-pill";
+export * from "./user-expired-pill";
diff --git a/dashboard/src/features/users/components/pills/user-expired-pill.tsx b/dashboard/src/features/users/components/pills/user-expired-pill.tsx
new file mode 100644
index 0000000..1ca5870
--- /dev/null
+++ b/dashboard/src/features/users/components/pills/user-expired-pill.tsx
@@ -0,0 +1,15 @@
+import { type FC } from "react";
+import { BooleanPill } from "@marzneshin/components";
+import { useTranslation } from "react-i18next";
+import { UserProp } from "@marzneshin/features/users";
+
+export const UserExpiredPill: FC<UserProp> = ({ user }) => {
+ const { t } = useTranslation();
+ return (
+ <BooleanPill
+ active={user.expired}
+ activeLabel={t('valid')}
+ inactiveLabel={t('finished')}
+ />
+ )
+}