2025-04-15 10:22:21 +00:00
|
|
|
{
|
|
|
|
"AppearanceSettings": {
|
|
|
|
"title": "选择一个主题",
|
|
|
|
"items": {
|
|
|
|
"System": "系统",
|
|
|
|
"Light": "浅色",
|
|
|
|
"Dark": "深色"
|
|
|
|
}
|
|
|
|
},
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"UserAvatar": {
|
2025-04-15 10:22:21 +00:00
|
|
|
"Settings": "设置",
|
|
|
|
"LogIn": "登录",
|
|
|
|
"LogOut": "登出"
|
|
|
|
},
|
|
|
|
"Banner": {
|
|
|
|
"Text": "如果喜欢该项目不妨收藏一下"
|
|
|
|
},
|
|
|
|
"BackButton": "返回",
|
|
|
|
"Bot": {
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"title": "询问 AI 助手",
|
|
|
|
"description": "由 Vercel Ai SDK 驱动",
|
|
|
|
"placeholder": "AI 助手将自动获取您当前的代码"
|
2025-04-15 10:22:21 +00:00
|
|
|
},
|
|
|
|
"BotVisibilityToggle": {
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"open": "打开 AI 助手",
|
|
|
|
"close": "关闭 AI 助手"
|
2025-04-15 10:22:21 +00:00
|
|
|
},
|
2025-04-15 16:40:36 +00:00
|
|
|
"CredentialsSignInForm": {
|
|
|
|
"email": "邮箱",
|
|
|
|
"password": "密码",
|
|
|
|
"signIn": "登录",
|
|
|
|
"signingIn": "正在登录...",
|
|
|
|
"signInSuccess": "登录成功",
|
|
|
|
"signInFailed": "登录失败",
|
|
|
|
"showPassword": "显示密码",
|
|
|
|
"hidePassword": "隐藏密码"
|
|
|
|
},
|
|
|
|
"CredentialsSignUpForm": {
|
|
|
|
"email": "邮箱",
|
|
|
|
"password": "密码",
|
|
|
|
"signUp": "注册",
|
|
|
|
"creatingAccount": "正在创建账户...",
|
|
|
|
"signUpSuccess": "账户创建成功",
|
|
|
|
"signUpSuccessDescription": "你现在可以使用凭据登录",
|
|
|
|
"signUpFailed": "注册失败",
|
|
|
|
"showPassword": "显示密码",
|
|
|
|
"hidePassword": "隐藏密码"
|
|
|
|
},
|
2025-04-15 10:22:21 +00:00
|
|
|
"DetailsPage": {
|
|
|
|
"BackButton": "所有提交记录",
|
|
|
|
"Time": "提交于",
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"Input": "最后执行的输入",
|
2025-04-15 10:22:21 +00:00
|
|
|
"ExpectedOutput": "期望输出",
|
|
|
|
"ActualOutput": "实际输出",
|
|
|
|
"Code": "代码"
|
|
|
|
},
|
|
|
|
"Difficulty": {
|
|
|
|
"EASY": "简单",
|
|
|
|
"MEDIUM": "中等",
|
|
|
|
"HARD": "困难"
|
|
|
|
},
|
2025-04-15 16:40:36 +00:00
|
|
|
"GithubSignInForm": "使用 GitHub 登录",
|
2025-04-15 10:22:21 +00:00
|
|
|
"LanguageSettings": {
|
|
|
|
"en": {
|
|
|
|
"flag": "🇺🇸",
|
|
|
|
"name": "英语"
|
|
|
|
},
|
|
|
|
"zh": {
|
|
|
|
"flag": "🇨🇳",
|
|
|
|
"name": "中文"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"PlaygroundHeader": {
|
|
|
|
"RunCodeButton": {
|
|
|
|
"TooltipTrigger": {
|
|
|
|
"loading": "运行中...",
|
|
|
|
"ready": "运行"
|
|
|
|
},
|
|
|
|
"TooltipContent": "运行代码"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"ProblemPage": {
|
|
|
|
"Description": "题目描述",
|
|
|
|
"Solutions": "题解",
|
|
|
|
"Submissions": "提交记录",
|
|
|
|
"Details": "详情",
|
|
|
|
"Code": "代码",
|
|
|
|
"Testcase": "测试用例",
|
|
|
|
"Bot": "AI助手"
|
|
|
|
},
|
|
|
|
"ProblemsetPage": {
|
|
|
|
"Status": "状态",
|
|
|
|
"Title": "题目",
|
|
|
|
"Difficulty": "难度"
|
|
|
|
},
|
|
|
|
"SettingsDialog": {
|
|
|
|
"title": "设置",
|
|
|
|
"description": "在此处自定义设置。",
|
|
|
|
"breadcrumb": "设置",
|
|
|
|
"nav": {
|
|
|
|
"Appearance": "外观",
|
|
|
|
"Language": "语言",
|
|
|
|
"CodeEditor": "代码编辑器",
|
|
|
|
"Advanced": "高级设置"
|
|
|
|
}
|
|
|
|
},
|
2025-04-15 16:40:36 +00:00
|
|
|
"SignInForm": {
|
|
|
|
"title": "登录到你的账户",
|
|
|
|
"description": "请输入你的邮箱以登录账户",
|
|
|
|
"or": "或者",
|
|
|
|
"noAccount": "还没有账户?",
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"signUp": "注册",
|
|
|
|
"oauth": "使用 {provider} 登录"
|
2025-04-15 16:40:36 +00:00
|
|
|
},
|
|
|
|
"signInWithCredentials": {
|
|
|
|
"userNotFound": "未找到用户。",
|
|
|
|
"invalidCredentials": "凭据无效。",
|
|
|
|
"incorrectPassword": "密码错误。",
|
|
|
|
"signInFailedFallback": "登录失败,请重试。"
|
|
|
|
},
|
|
|
|
"signUpWithCredentials": {
|
|
|
|
"userAlreadyExists": "用户已存在。",
|
|
|
|
"registrationFailedFallback": "注册失败,请重试。"
|
|
|
|
},
|
|
|
|
"SignUpForm": {
|
|
|
|
"title": "注册你的账户",
|
|
|
|
"description": "请输入你的邮箱以注册账户",
|
|
|
|
"or": "或者",
|
|
|
|
"haveAccount": "已经有账户了?",
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"signIn": "登录",
|
|
|
|
"oauth": "使用 {provider} 登录"
|
2025-04-15 16:40:36 +00:00
|
|
|
},
|
2025-04-15 10:22:21 +00:00
|
|
|
"StatusMessage": {
|
|
|
|
"PD": "待处理",
|
|
|
|
"QD": "排队中",
|
|
|
|
"CP": "编译中",
|
|
|
|
"CE": "编译错误",
|
|
|
|
"CS": "编译成功",
|
|
|
|
"RU": "运行中",
|
|
|
|
"TLE": "超出时间限制",
|
|
|
|
"MLE": "超出内存限制",
|
|
|
|
"RE": "运行时错误",
|
|
|
|
"AC": "通过",
|
|
|
|
"WA": "解答错误",
|
|
|
|
"SE": "系统错误"
|
|
|
|
},
|
|
|
|
"SubmissionsTable": {
|
|
|
|
"Index": "序号",
|
|
|
|
"Status": "状态",
|
|
|
|
"Language": "语言",
|
|
|
|
"Time": "执行用时",
|
|
|
|
"Memory": "消耗内存"
|
|
|
|
},
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"Testcase": {
|
|
|
|
"Table": {
|
|
|
|
"Case": "样例"
|
|
|
|
}
|
|
|
|
},
|
2025-04-15 10:22:21 +00:00
|
|
|
"WorkspaceEditorHeader": {
|
|
|
|
"LspStatusButton": {
|
|
|
|
"TooltipContent": "语言服务"
|
|
|
|
},
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"AnalyzeButton": {
|
|
|
|
"TooltipContent": "分析",
|
|
|
|
"ComplexityAnalysis": "复杂度分析",
|
|
|
|
"TimeComplexity": "时间复杂度:",
|
|
|
|
"SpaceComplexity": "空间复杂度:",
|
|
|
|
"Error": "解析复杂度时出错,请稍后重试。",
|
|
|
|
"Analyzing": "分析中..."
|
|
|
|
},
|
2025-04-15 10:22:21 +00:00
|
|
|
"ResetButton": {
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
"TooltipContent": "重置"
|
2025-04-15 10:22:21 +00:00
|
|
|
},
|
|
|
|
"UndoButton": {
|
|
|
|
"TooltipContent": "撤销"
|
|
|
|
},
|
|
|
|
"RedoButton": {
|
|
|
|
"TooltipContent": "恢复"
|
|
|
|
},
|
|
|
|
"FormatButton": {
|
|
|
|
"TooltipContent": "格式化"
|
|
|
|
},
|
|
|
|
"CopyButton": {
|
|
|
|
"TooltipContent": "复制"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"WorkspaceEditorFooter": {
|
|
|
|
"Row": "行",
|
|
|
|
"Column": "列"
|
2025-04-17 08:45:49 +00:00
|
|
|
},
|
|
|
|
"HomePage": {
|
|
|
|
"MainView": {
|
|
|
|
"title": "Judge4c",
|
|
|
|
"description": "一站式助力编程学习与教学:",
|
|
|
|
"features": {
|
|
|
|
"feature1": "语言服务集成,内置代码补全与诊断",
|
|
|
|
"feature2": "多语言支持 + 实时运行反馈,学习更高效",
|
|
|
|
"feature3": "全球首个 Next.js + Monaco LSP 开源解决方案"
|
|
|
|
},
|
|
|
|
"quickStart": "即刻启程",
|
|
|
|
"contactUs": "联系我们"
|
|
|
|
},
|
2025-04-17 13:42:58 +00:00
|
|
|
"PrimaryFeatures": {
|
|
|
|
"title": "特性",
|
|
|
|
"MobileFriendlyCard": {
|
|
|
|
"title": "移动端友好",
|
|
|
|
"description": "采用 TailwindCSS 实现响应式布局,界面可自动适配不同设备(答题界面适配功能仍在开发中)"
|
|
|
|
},
|
|
|
|
"DockerCard": {
|
|
|
|
"title": "开箱即用",
|
|
|
|
"description": "提供预构建的 Docker 镜像,支持快速部署,节省配置时间"
|
|
|
|
},
|
|
|
|
"LSPCard": {
|
|
|
|
"title": "告别原始编辑器",
|
|
|
|
"description": "集成实时检测、代码补全、类型提示"
|
|
|
|
}
|
|
|
|
},
|
2025-04-17 08:45:49 +00:00
|
|
|
"FAQs": {
|
|
|
|
"title": "常见问题",
|
|
|
|
"description": "未找到答案?欢迎联系我们!",
|
|
|
|
"questions": {
|
|
|
|
"question1": "使用什么代码编辑器?",
|
|
|
|
"answer1": "基于 @monaco-editor/react 开发",
|
|
|
|
"question2": "支持哪些编程语言?",
|
|
|
|
"answer2": "支持 C/C++ (集成LSP),其他语言支持语法高亮",
|
|
|
|
"question3": "如何设置主题和语言?",
|
|
|
|
"answer3": "主题支持自动切换(跟随系统)或手动设置;语言默认跟随浏览器,可手动修改",
|
|
|
|
"question4": "编辑器主题和文档样式方案?",
|
|
|
|
"answer4": "编辑器采用 @shikijs/monaco, 文档采用 github-markdown-css 样式"
|
|
|
|
}
|
|
|
|
}
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
},
|
|
|
|
"LoginPromptCard": {
|
|
|
|
"title": "加入 Judge4c 开始编程!",
|
|
|
|
"description": "在此查看您的提交记录",
|
|
|
|
"loginButton": "登录"
|
|
|
|
},
|
|
|
|
"Video": {
|
|
|
|
"unsupportedBrowser": "您的浏览器不支持 HTML5 视频。"
|
2025-04-15 10:22:21 +00:00
|
|
|
}
|
feat: update main branch (#45)
* chore(deps): add pino and pino-pretty packages
* feat(log): add pino logging support
* chore(tailwind): update config with features path and animate import
* chore(deps): add react-icons package
* refactor(auth)!: replace credentials with OAuth providers and add logging
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
* refactor(auth)!: remove components and rewrite sign-in page
* feat(user-avatar): refactor avatar component into user-avatar with improved structure
* style(dockview): reduce tabs container height and center align items
- Changed --dv-tabs-and-actions-container-height from 44px to 36px
- Added align-items: center to .dv-tabs-container
- Improved CSS formatting for better readability
* refactor(stores): split dockview store into problem-specific store
- Remove generic dockview store (`src/stores/dockview.tsx`)
- Add problem-specific dockview store (`src/stores/problem-dockview.tsx`)
- Remove submission-related state as it's no longer needed
* feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
- Extract layout persistence logic to custom hook
- Extract component conversion logic to custom hook
- Make storageKey optional
- Improve type safety with PanelParams interface
- Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
- Integrates with problem-dockview store
- Adds locale awareness
- Provides standardized storage key
- Update related type definitions and imports
* refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
- Create content and panel components for both features
- Implement skeleton loading states
- Use cached data fetching
- Update MDX rendering and scroll area implementations
* chore(problems): move problem-dockview to components directory
* refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
* feat(prisma): add server-only caching for problems queries
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
* refactor(mdx-renderer): simplify component implementation
- Remove Suspense and Skeleton loading state
- Convert to arrow function syntax
- Reorganize import statements
- Simplify export syntax
* feat(components): add TooltipButton component
- A reusable button with tooltip functionality
- Supports customizable delay, tooltip content, and className
- Uses shadcn/ui Tooltip and Button components
* refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
* refactor(structure): reorganize page and component exports
- Move root page from /(app) to / directory
- Convert default exports to named exports in components
- Rename MainView component to HeroSection for better semantics
* refactor(route): rename [id] to [problemId] in problems route
* chore(components): remove unused problem-related components
- Delete footer.tsx from problem/description
- Delete solution.tsx from problem/description
- Delete header.tsx from problem/workspace/editor/components
* fix(page): add missing return statement in RootPage component
* feat(prisma/schema): add multilingual support for problem descriptions and solutions
BREAKING CHANGE:
- Removed `description` and `solution` fields from Problem model
- Added new models `ProblemDescription` and `ProblemSolution` with language support (EN/ZH)
- Updated seed data structure to support multilingual content
- Requires database migration and data migration from old structure
* chore(prisma/migrations): add migration for multilingual problem support
* fix(styles): adjust tabs overflow container height in abyss theme
Changed height property from 'unset !important' to '100%' for .dv-tabs-overflow-container and .dv-tabs-overflow-dropdown-default in the abyss-spaced theme to fix layout issues.
* refactor(loading): change to named export and arrow function
- Switch from default export to named export
- Convert component to arrow function
- Remove unused props parameter
* chore(shiki): convert function to arrow function
* chore(scripts): remove --turbopack flag from dev script
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(prisma): simplify schema and remove zod-prisma-types
- Reorganized Prisma schema structure with simplified models and relations
- Removed zod-prisma-types generator as it's no longer needed
- Consolidated problem content types into a single ProblemLocalization model
- Simplified testcase and template structures
- Removed unused prisma types file
* refactor(i18n): migrate locale configuration to generated types
- Replace hardcoded locale strings with generated Locale enum from client
- Update cookie key name to be more specific (LOCALE_COOKIE_NAME -> JUDGE4C_LOCALE_KEY)
- Rename defaultLocale to DEFAULT_LOCALE for consistency
- Add 'server-only' imports to ensure server-side usage
- Simplify locale validation using Object.values(Locale)
- Clean up accept-language header parsing logic
* refactor(hooks): remove theme config and simplify theme hook
- Delete src/config/monaco-theme.ts and src/types/monaco-theme.ts
- Simplify useMonacoTheme hook to directly return theme strings
- Format use-mobile.ts with consistent semicolons and quotes
* refactor(i18n): replace language-settings with locale-switcher
- Replace react-world-flags with next/image for better optimization
- Simplify locale handling logic and remove unused getUserLocale
- Rename component to be more descriptive (language-settings -> locale-switcher)
- Update all references to use the new component
- Add proper SVG flag assets for supported locales
- Remove react-world-flags dependency from package.json
* refactor(shiki): migrate to shiki/core with lazy initialization
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
* refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
* feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
* refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
* refactor(prisma): simplify prisma client initialization and remove caching
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
* feat(config): add LANGUAGES constant for language enum values
* refactor(problemset): move components to separate files and improve structure
- Move ProblemsetHeader component from 'problemset-header' to 'header'
- Extract problemset table logic into dedicated ProblemsetTable component
- Add Suspense and skeleton loading for better UX
- Update layout and page structure
* feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
- Integrates with next-intl for locale handling
- Connects to problem-dockview store
- Wraps Dockview with problem-specific configuration
- Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
- Layout persistence
- Panel management
- API handling
* refactor(problems): update ProblemHeader import path to new location
* refactor(mdx-render): simplify theme configuration and change export style
- Remove custom Monaco theme imports
- Use github default themes for rehypePrettyCode
- Change component export from default to named export
* feat(store): add problem editor state management
- Create problem-editor store with Zustand
- Manage editor state including problem, language, value and path
- Implement localStorage persistence for editor content
- Provide utility functions for language and value retrieval
* chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
* feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
* refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
* feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
* refactor(config): migrate editor options to standalone editor config
- Rename `editor-language.ts` to `editor.ts`
- Update interface from `IEditorConstructionOptions` to `IStandaloneEditorConstructionOptions`
- Keep all existing editor options unchanged
* refactor(components): simplify BackButton by using TooltipButton
* refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
* refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
* refactor(api): extract OpenAI client to shared module
* fix(prisma): make TestcaseResult.output field optional
* chore(prisma): make TestcaseResult.output nullable in migration
* feat: replace dockview with flexlayout-react
2025-06-21 06:09:57 +00:00
|
|
|
}
|