feat: mobile staging and dev icons (#3375)

* feat: display mode in about

* feat(mobile): staging and dev icons

* update
This commit is contained in:
DIYgod
2025-03-31 21:42:40 +08:00
committed by GitHub
parent b95237f22e
commit 5dfd70ff20
7 changed files with 30 additions and 9 deletions
@@ -5,7 +5,7 @@ import {
TooltipPortal,
TooltipTrigger,
} from "@follow/components/ui/tooltip/index.jsx"
import { DEV } from "@follow/shared/constants"
import { DEV, MODE } from "@follow/shared/constants"
import { env } from "@follow/shared/env.desktop"
import { useUserRole } from "~/atoms/user"
@@ -52,7 +52,7 @@ export const EnvironmentIndicator = () => {
>
<div className="center bg-accent fixed bottom-0 right-0 z-[99999] flex rounded-tl px-1 py-0.5 text-xs text-white">
{role}:{DEV && <i className="i-mgc-bug-cute-re size-3" />}
{import.meta.env.MODE}
{MODE}
</div>
</button>
</TooltipTrigger>
@@ -2,7 +2,7 @@ import { Logo } from "@follow/components/icons/logo.jsx"
import { Button } from "@follow/components/ui/button/index.js"
import { styledButtonVariant } from "@follow/components/ui/button/variants.js"
import { Divider } from "@follow/components/ui/divider/index.js"
import { PROD } from "@follow/shared/constants"
import { MODE, ModeEnum } from "@follow/shared/constants"
import { getCurrentEnvironment } from "@follow/utils/environment"
import PKG, { repository } from "@pkg"
import { useQuery } from "@tanstack/react-query"
@@ -31,7 +31,7 @@ export const SettingAbout = () => {
<div className="flex grow flex-col">
<div className="text-lg font-bold">
{APP_NAME} {!PROD ? `(${import.meta.env.MODE})` : ""}
{APP_NAME} {MODE !== ModeEnum.production ? `(${MODE})` : ""}
</div>
<div className="flex flex-wrap items-center gap-2">
{appVersion && (