diff --git a/.cursorrules b/.cursorrules index 1feaef5..a24bc99 100644 --- a/.cursorrules +++ b/.cursorrules @@ -9,6 +9,7 @@ You are the joint apprentice of Evan You and Kent C. Dodds. Channel Evan You's e - Refrain from creating unrequested files, classes, functions, or configurations. - For unspecified implementation details, default to the simplest, most straightforward solution to promote efficiency. - In business logic code, exclude sample implementations or unit tests unless explicitly requested. +- When completing the final step of a task, do not create tests unless explicitly requested by the user. # CSS Style Rules - Exclusively use Tailwind CSS 3.x syntax for all styling. diff --git a/.env.development b/.env.development index bf2ed3a..3f8d61f 100644 --- a/.env.development +++ b/.env.development @@ -3,6 +3,9 @@ NEXT_PUBLIC_JAVA_URL = https://auth.test.movieflow.ai NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com NEXT_PUBLIC_CUT_URL = https://77.smartcut.py.qikongjian.com NEXT_PUBLIC_CUT_URL_TO = https://smartcut.huiying.video +# google analysis +NEXT_PUBLIC_GA_MEASUREMENT_ID = G-BHBXC1B1JL +NEXT_PUBLIC_GA_ENABLED = true # 失败率 NEXT_PUBLIC_ERROR_CONFIG = 0.5 # Google OAuth配置 diff --git a/Dockerfile b/Dockerfile index f561afc..434b572 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,9 @@ COPY package.json package-lock.json* ./ COPY public ./public ENV NODE_ENV=production +# Google Analytics 环境变量 +ENV NEXT_PUBLIC_GA_MEASUREMENT_ID=G-4BDXV6TWF4 +ENV NEXT_PUBLIC_GA_ENABLED=true EXPOSE 3000 diff --git a/app/globals.css b/app/globals.css index 29fa569..0e918bf 100644 --- a/app/globals.css +++ b/app/globals.css @@ -305,4 +305,8 @@ body { height: 100dvh; height: calc(var(--vh, 1vh) * 100); } +} + +textarea, input { + font-size: 16px !important; } \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index 118ff61..da2fb2f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,7 @@ import { createContext, useContext, useEffect, useState } from 'react'; import { Providers } from '@/components/providers'; import { ConfigProvider, theme } from 'antd'; import CallbackModal from '@/components/common/CallbackModal'; +import { useAppStartupAnalytics } from '@/hooks/useAppStartupAnalytics'; // 创建上下文来传递弹窗控制方法 const CallbackModalContext = createContext<{ @@ -26,6 +27,10 @@ export default function RootLayout({ }) { const [showCallbackModal, setShowCallbackModal] = useState(false) const [paymentType, setPaymentType] = useState<'subscription' | 'token'>('subscription') + + // 应用启动时设置用户GA属性 + useAppStartupAnalytics(); + const openCallback = async function (ev: MessageEvent) { if (ev.data.type === 'waiting-payment') { setPaymentType(ev.data.paymentType || 'subscription') @@ -48,17 +53,25 @@ export default function RootLayout({ - - +