diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index 3ddc72f110..8ad32c9c30 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -144,10 +144,10 @@ "SystemSetting": "Application Settings", "UserSetting": "User Info", "UpdateConfirm": "Update env will restart application, are you sure?", - "BaseInfo": "Basic Information", + "BaseInfo": "Basic Info", "DB": "Database", "Delete": "Delete", - "Detail": "Rules details (experimental version)", + "Detail": "Spec Detail", "Disk": "Hard Disk", "Memory": "Memory", "Restart": "Restart", @@ -167,7 +167,8 @@ "UserInfo": "User Information", "noAuth": "Not Authenticated", "showAuth": "Go to Auth", - "ShutDown": "ShutDown" + "ShutDown": "ShutDown", + "Subscription": "Subscription Info" }, "StoragePanel": { "All": "Total Capacity", @@ -333,4 +334,4 @@ "Generating": "Generating", "Start": "Start", "TryLafAI": "Try 🎉 Laf AI !" -} \ No newline at end of file +} diff --git a/web/public/locales/zh-CN/translation.json b/web/public/locales/zh-CN/translation.json index 90227b2e1a..9d777633b9 100644 --- a/web/public/locales/zh-CN/translation.json +++ b/web/public/locales/zh-CN/translation.json @@ -167,7 +167,8 @@ "CodeTip": "请输入四位数字验证码", "TelTip": "请输入有效的手机号码", "Registered": "注册时间", - "ShutDown": "关闭应用" + "ShutDown": "关闭应用", + "Subscription": "订阅信息" }, "StoragePanel": { "All": "总容量", diff --git a/web/public/locales/zh/translation.json b/web/public/locales/zh/translation.json index b6f425f280..fa1b3afbb1 100644 --- a/web/public/locales/zh/translation.json +++ b/web/public/locales/zh/translation.json @@ -167,7 +167,8 @@ "CodeTip": "请输入四位数字验证码", "TelTip": "请输入有效的手机号码", "Registered": "注册时间", - "ShutDown": "关闭应用" + "ShutDown": "关闭应用", + "Subscription": "订阅信息" }, "StoragePanel": { "All": "总容量", diff --git a/web/src/apis/typing.d.ts b/web/src/apis/typing.d.ts index be247dc609..313526d87a 100644 --- a/web/src/apis/typing.d.ts +++ b/web/src/apis/typing.d.ts @@ -22,6 +22,7 @@ export type TApplicationDetail = { function_debug_token: string; host?: string; origin?: string; + subscription: TSubscription; }; export type TBundle = { diff --git a/web/src/pages/app/mods/SideBar/index.tsx b/web/src/pages/app/mods/SideBar/index.tsx index d4ff75b3ea..ce56ffdfb6 100644 --- a/web/src/pages/app/mods/SideBar/index.tsx +++ b/web/src/pages/app/mods/SideBar/index.tsx @@ -25,12 +25,17 @@ type TIcon = { export default function SideBar() { const { pageId } = useParams(); const navigate = useNavigate(); - const { currentApp, setCurrentPage, userInfo } = useGlobalStore(); - + const { currentApp, setCurrentPage, userInfo, regions = [] } = useGlobalStore(); + const currentRegion = regions.find((item: any) => item.id === currentApp?.regionId) || regions[0]; const ICONS: TIcon[] = [ { pageId: "nav", - component: logo, + component: ( +
+ logo + {currentRegion.displayName} +
+ ), }, { pageId: Pages.function, @@ -79,7 +84,7 @@ export default function SideBar() { return (
{[ICONS, BOTTOM_ICONS].map((icons, index) => { return ( @@ -90,7 +95,9 @@ export default function SideBar() {
{ diff --git a/web/src/pages/app/setting/AppInfoList/index.tsx b/web/src/pages/app/setting/AppInfoList/index.tsx index 2c8012f8db..5e03442df3 100644 --- a/web/src/pages/app/setting/AppInfoList/index.tsx +++ b/web/src/pages/app/setting/AppInfoList/index.tsx @@ -6,6 +6,7 @@ import { Box, Button, HStack, useColorMode } from "@chakra-ui/react"; import clsx from "clsx"; import { APP_PHASE_STATUS } from "@/constants/index"; +import { formatDate } from "@/utils/format"; import InfoDetail from "./InfoDetail"; @@ -128,6 +129,23 @@ const AppEnvList = () => { }, ]} /> + +
diff --git a/web/src/pages/home/mods/List/index.tsx b/web/src/pages/home/mods/List/index.tsx index 3944d38d79..0e943fea79 100644 --- a/web/src/pages/home/mods/List/index.tsx +++ b/web/src/pages/home/mods/List/index.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; +import { useTranslation } from "react-i18next"; import { BsThreeDotsVertical } from "react-icons/bs"; import { RiCodeBoxFill } from "react-icons/ri"; import { useNavigate } from "react-router-dom"; @@ -16,7 +17,8 @@ import { useColorModeValue, } from "@chakra-ui/react"; import { useMutation } from "@tanstack/react-query"; -import { t } from "i18next"; +import clsx from "clsx"; +import dayjs from "dayjs"; import CopyText from "@/components/CopyText"; import FileTypeIcon from "@/components/FileTypeIcon"; @@ -37,6 +39,7 @@ import useGlobalStore from "@/pages/globalStore"; function List(props: { appListQuery: any; setShouldRefetch: any }) { const navigate = useNavigate(); + const { t } = useTranslation(); const { setCurrentApp, regions } = useGlobalStore(); @@ -95,7 +98,7 @@ function List(props: { appListQuery: any; setShouldRefetch: any }) {
@@ -119,7 +122,14 @@ function List(props: { appListQuery: any; setShouldRefetch: any }) {

{t("CreateTime")}: {formatDate(item.createdAt)}{" "}

-

+

{t("EndTime")}: {formatDate(item.subscription.expiredAt)}