From f477cc95f887cccbab42e3b201f96bce064fae07 Mon Sep 17 00:00:00 2001 From: liuyonghe0111 <1763195287@qq.com> Date: Wed, 24 Dec 2025 16:28:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.ts | 1 + .../crushcoin/components/CheckInCard.tsx | 58 ++++++----- .../crushcoin/components/CheckInGrid.tsx | 98 +++++-------------- .../components/CrushcoinBackground.tsx | 10 +- src/app/(main)/crushcoin/crushcoin-page.tsx | 53 +++++----- src/app/(main)/home/components/Header.tsx | 93 +++++++++--------- src/app/(main)/home/service.ts | 0 src/app/(main)/home/type.d.ts | 0 src/components/ui/gradient-divider.tsx | 35 +------ src/css/tailwindcss.css | 7 ++ src/hooks/services/signin.ts | 33 +++++++ src/i18n/en-US.ts | 12 +++ src/i18n/zh-CN.ts | 11 +++ src/layout/BasicLayout/Topbar.tsx | 9 +- src/layout/BasicLayout/config.ts | 1 + src/services/editor/index.ts | 11 ++- src/services/editor/type.ts | 11 +++ 17 files changed, 240 insertions(+), 203 deletions(-) delete mode 100644 src/app/(main)/home/service.ts delete mode 100644 src/app/(main)/home/type.d.ts create mode 100644 src/hooks/services/signin.ts diff --git a/next.config.ts b/next.config.ts index 24f61e8..c20e489 100644 --- a/next.config.ts +++ b/next.config.ts @@ -4,6 +4,7 @@ import createNextIntlPlugin from 'next-intl/plugin'; const withNextIntl = createNextIntlPlugin('./src/lib/i18n.ts'); const nextConfig: NextConfig = { + reactStrictMode: false, /* config options here */ images: { remotePatterns: [ diff --git a/src/app/(main)/crushcoin/components/CheckInCard.tsx b/src/app/(main)/crushcoin/components/CheckInCard.tsx index 4ce34b1..c1a7700 100644 --- a/src/app/(main)/crushcoin/components/CheckInCard.tsx +++ b/src/app/(main)/crushcoin/components/CheckInCard.tsx @@ -1,15 +1,16 @@ -'use client' -import { Checkbox } from '@/components/ui/checkbox' -import { cn } from '@/lib/utils' -import Image from 'next/image' +'use client'; +import { Checkbox } from '@/components/ui/checkbox'; +import { cn } from '@/lib/utils'; +import Image from 'next/image'; +import { useTranslations } from 'next-intl'; interface CheckInCardProps { - day: number - coinNum: number - signIn: boolean - isToday: boolean - loading?: boolean - className?: string + day: number; + coinNum: number; + signIn: boolean; + isToday: boolean; + loading?: boolean; + className?: string; } export function CheckInCard({ @@ -20,27 +21,28 @@ export function CheckInCard({ loading, className, }: CheckInCardProps) { - const isChecked = signIn - const canCheckIn = isToday && !signIn + const t = useTranslations('crushcoin'); + const isChecked = signIn; + const isSignInLoading = isToday && loading; // 根据状态决定样式 const getCardStyles = () => { if (isChecked) { // 已签到 - 灰色背景 - return 'bg-[#282233] border-outline-normal' + return 'bg-[#282233] border-outline-normal'; } else { // 未来日期 - 渐变背景 - return 'bg-gradient-to-bl from-[#f157ff] to-[#3337ff] border-[#ffd7b8]' + return 'bg-gradient-to-bl from-[#f157ff] to-[#3337ff] border-[#ffd7b8]'; } - } + }; const getDayLabelStyles = () => { if (isChecked) { - return 'bg-surface-nest-disabled' + return 'bg-surface-nest-disabled'; } else { - return 'bg-gradient-to-b from-[#ff9156] to-[#bf00ff]' + return 'bg-gradient-to-b from-[#ff9156] to-[#bf00ff]'; } - } + }; return (
Diamonds can be used to pay for chat services and unlock other items.
-- If you miss a check-in, the check-in count will reset and start again from day one. -
+{t('description1')}
+{t('description2')}