From 8255b9be17ac84cc805ac29c7d1a17dc271bb736 Mon Sep 17 00:00:00 2001 From: dogukanoksuz Date: Thu, 1 Aug 2024 08:19:49 +0000 Subject: [PATCH] feat: Licensing information expanded --- public/locales/en/settings.json | 1 + public/locales/tr/settings.json | 3 ++- src/pages/settings/extensions/index.tsx | 14 +++++++------- src/types/extension.ts | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/public/locales/en/settings.json b/public/locales/en/settings.json index 80e1bd8..eb860c7 100644 --- a/public/locales/en/settings.json +++ b/public/locales/en/settings.json @@ -166,6 +166,7 @@ "version": "Version", "licensed": "Licensed", "not_licensed": "Unlicensed", + "non_commercial": "No Need For License", "license": "Licence", "updated_at": "Updated Date", "upload": { diff --git a/public/locales/tr/settings.json b/public/locales/tr/settings.json index babaa55..86fce24 100644 --- a/public/locales/tr/settings.json +++ b/public/locales/tr/settings.json @@ -166,6 +166,7 @@ "version": "Versiyon", "licensed": "Lisanslanmış", "not_licensed": "Lisanslanmamış", + "non_commercial": "Lisans Gerektirmeyen", "license": "Lisans", "updated_at": "Güncellenme Tarihi", "upload": { @@ -841,4 +842,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/pages/settings/extensions/index.tsx b/src/pages/settings/extensions/index.tsx index 9e59af0..0460202 100644 --- a/src/pages/settings/extensions/index.tsx +++ b/src/pages/settings/extensions/index.tsx @@ -44,9 +44,7 @@ export default function ExtensionSettingsPage() { { accessorKey: "licensed", accessorFn: (row) => { - return row.licensed - ? 0 + t("extensions.licensed") - : t("extensions.not_licensed") + return row.licensed === "licensed" ? "1" : "0" }, header: ({ column }) => ( @@ -67,20 +65,22 @@ export default function ExtensionSettingsPage() { title: t("extensions.license"), cell: ({ row }) => ( <> - {row.original.licensed ? ( + {row.original.licensed === "licensed" ? (
{t("extensions.licensed")}
- ) : ( + ) : row.original.licensed === "not_licensed" ? (
{t("extensions.not_licensed")}
+ ) : ( + {t("extensions.non_commercial")} )} ), diff --git a/src/types/extension.ts b/src/types/extension.ts index 746169b..ffe5ddf 100644 --- a/src/types/extension.ts +++ b/src/types/extension.ts @@ -19,7 +19,7 @@ export interface IExtension { display_name: string menus: IMenu[] updated: number - licensed: boolean + licensed: "licensed" | "not_licensed" | "non_commercial" license_type: "golang_standard" | "php" }