Compare commits
No commits in common. "develop" and "main" have entirely different histories.
|
|
@ -1,120 +0,0 @@
|
||||||
{
|
|
||||||
"permissions": {
|
|
||||||
"allow": [
|
|
||||||
"Bash(python3:*)",
|
|
||||||
"Read(//Users/jettcheng1018/Downloads/**)",
|
|
||||||
"Read(//tmp/**)",
|
|
||||||
"Bash(comm:*)",
|
|
||||||
"Bash(git commit:*)",
|
|
||||||
"Bash(./check_consistency.sh:*)",
|
|
||||||
"Bash(chmod:*)",
|
|
||||||
"Bash(./scripts/maintenance/create_issue.sh:*)",
|
|
||||||
"Bash(./scripts/maintenance/check_issues.sh:*)",
|
|
||||||
"Bash(./check_issues.sh)",
|
|
||||||
"Bash(cat:*)",
|
|
||||||
"Bash(./drama issue)",
|
|
||||||
"Bash(./drama report \"UI設計缺漏嚴重性評估\")",
|
|
||||||
"Bash(./drama compliance)",
|
|
||||||
"Bash(./drama report analysis \"文檔分類組織結構優化\")",
|
|
||||||
"Bash(git push:*)",
|
|
||||||
"Bash(flutter:*)",
|
|
||||||
"Bash(mkdir:*)",
|
|
||||||
"Bash(echo $PATH)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/flutter_3.24.5/bin/flutter --version)",
|
|
||||||
"Read(//Users/jettcheng1018/flutter/**)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter --version)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter pub get)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter doctor)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d chrome --web-port=8080)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter clean)",
|
|
||||||
"Read(//Users/jettcheng1018/**)",
|
|
||||||
"Bash(./drama:*)",
|
|
||||||
"Bash(./dl)",
|
|
||||||
"Bash(./dl project list)",
|
|
||||||
"Bash(./dl status)",
|
|
||||||
"Bash(./dl project types)",
|
|
||||||
"Bash(./dl phase status)",
|
|
||||||
"Bash(./dl project help)",
|
|
||||||
"Bash(./dl phase help)",
|
|
||||||
"Bash(./dl phase list)",
|
|
||||||
"Bash(rm:*)",
|
|
||||||
"Bash(git add:*)",
|
|
||||||
"Bash(git rm:*)",
|
|
||||||
"Bash(java:*)",
|
|
||||||
"Bash(brew install:*)",
|
|
||||||
"Bash(sudo ln:*)",
|
|
||||||
"Bash(export:*)",
|
|
||||||
"Bash(./dl issue)",
|
|
||||||
"Bash(xcode-select:*)",
|
|
||||||
"Read(//Applications/**)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter doctor -v)",
|
|
||||||
"Bash(mas account:*)",
|
|
||||||
"Bash(killall:*)",
|
|
||||||
"Bash(open:*)",
|
|
||||||
"Bash($ANDROID_HOME/emulator/emulator:*)",
|
|
||||||
"Bash(curl:*)",
|
|
||||||
"Bash(unzip:*)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter create --platforms android,ios .)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter devices)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter build apk --debug)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter analyze --no-fatal-infos)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter build apk --debug --target-platform android-arm64)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter build apk --debug --target-platform android-arm64 --dry-run)",
|
|
||||||
"Bash(./gradlew:*)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter emulators)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d emulator-5554)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d apple_ios_simulator)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d AF3D76B9-F005-4880-BE7D-25EA8ECD1E4D)",
|
|
||||||
"Bash(./dl report analysis \"詞彙學習關卡系統設計分析\")",
|
|
||||||
"Bash(brew cleanup:*)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter emulators --launch apple_ios_simulator)",
|
|
||||||
"Bash(for ui in \"UI_Cost_Confirm_Popup\" \"UI_Insufficient_Resources\" \"UI_LevelResult_SuccessResult\" \"UI_LifePoints_Display\" \"UI_Shop_Item_Confirm\" \"UI_Subscription_Success\" \"UI_TimeWarp_Cards\")",
|
|
||||||
"Bash(do echo -n \"$ui: \")",
|
|
||||||
"Bash(if grep -q \"$ui\" /tmp/system_ui_list.txt)",
|
|
||||||
"Bash(fi)",
|
|
||||||
"Bash(done)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d 148D878C-62EB-4B60-9C04-2173EC0248BF)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter run -d Medium_Phone_API_36.0)",
|
|
||||||
"Bash(/Users/jettcheng1018/flutter/bin/flutter emulators --launch Medium_Phone_API_36.0)",
|
|
||||||
"Bash(dotnet run:*)",
|
|
||||||
"Bash(dotnet --version)",
|
|
||||||
"Bash(npm install)",
|
|
||||||
"Bash(npm install:*)",
|
|
||||||
"Bash(npm run dev:*)",
|
|
||||||
"Bash(find:*)",
|
|
||||||
"Bash(/bashes)",
|
|
||||||
"Bash(pkill:*)",
|
|
||||||
"Bash(say:*)",
|
|
||||||
"Bash(./dl list)",
|
|
||||||
"Bash(./dl task)",
|
|
||||||
"Bash(./scripts/file_version_manager.sh:*)",
|
|
||||||
"Bash(./scripts/archive_file.sh:*)",
|
|
||||||
"Bash(./scripts/view_archives.sh:*)",
|
|
||||||
"Bash(tree:*)",
|
|
||||||
"Bash(./sop/scripts/archive_file.sh:*)",
|
|
||||||
"Bash(mv:*)",
|
|
||||||
"Bash(./dl report analysis \"CLAUDE.md文件品質改善分析\")",
|
|
||||||
"Bash(./dl report analysis \"文檔結構模板規格設計\")",
|
|
||||||
"Bash(./dl:*)",
|
|
||||||
"Bash(npm run type-check:*)",
|
|
||||||
"Bash(timeout 10 curl -s http://localhost:3000/)",
|
|
||||||
"Bash(./sop/scripts/sop_consistency_check.sh:*)",
|
|
||||||
"Bash(timeout 30 npm run type-check:*)",
|
|
||||||
"Bash(timeout 10 curl -s -I http://localhost:3000/)",
|
|
||||||
"Bash(npm init:*)",
|
|
||||||
"Bash(timeout 5 curl -s -I http://localhost:3000/)",
|
|
||||||
"Bash(lsof:*)",
|
|
||||||
"Bash(npm run build:*)",
|
|
||||||
"Bash(npm run preview:*)",
|
|
||||||
"Bash(sort:*)",
|
|
||||||
"Bash(for:*)",
|
|
||||||
"Bash(grep:*)",
|
|
||||||
"Bash(sed:*)",
|
|
||||||
"Bash(do sed -i '' 's/u2190 u8fd4u56deu5c0eu822a/← 返回導航/g' \"$file\")",
|
|
||||||
"Bash(do)",
|
|
||||||
"Bash(tar:*)"
|
|
||||||
],
|
|
||||||
"deny": [],
|
|
||||||
"ask": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
---
|
|
||||||
name: 🐛 Bug Report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: '[BUG] '
|
|
||||||
labels: ['bug', 'needs-triage']
|
|
||||||
assignees: ''
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 Bug Description
|
|
||||||
<!-- A clear and concise description of what the bug is -->
|
|
||||||
|
|
||||||
## 🔄 Steps to Reproduce
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
## ✅ Expected Behavior
|
|
||||||
<!-- A clear and concise description of what you expected to happen -->
|
|
||||||
|
|
||||||
## ❌ Actual Behavior
|
|
||||||
<!-- A clear and concise description of what actually happened -->
|
|
||||||
|
|
||||||
## 📱 Environment
|
|
||||||
### Mobile App (Flutter)
|
|
||||||
- **Platform**: iOS / Android
|
|
||||||
- **Device**: [e.g. iPhone 12, Samsung Galaxy S21]
|
|
||||||
- **OS Version**: [e.g. iOS 15.0, Android 12]
|
|
||||||
- **App Version**: [e.g. 1.2.0]
|
|
||||||
|
|
||||||
### Backend (.NET Core)
|
|
||||||
- **Environment**: Development / Staging / Production
|
|
||||||
- **Server OS**: [if known]
|
|
||||||
- **Database**: [PostgreSQL version]
|
|
||||||
|
|
||||||
## 📸 Screenshots
|
|
||||||
<!-- If applicable, add screenshots to help explain your problem -->
|
|
||||||
|
|
||||||
## 📋 Additional Context
|
|
||||||
<!-- Add any other context about the problem here -->
|
|
||||||
|
|
||||||
## 🔍 Error Logs
|
|
||||||
<!-- If available, add any relevant error logs or stack traces -->
|
|
||||||
|
|
||||||
```
|
|
||||||
Paste error logs here
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🎯 Priority
|
|
||||||
<!-- Mark the priority level -->
|
|
||||||
- [ ] 🔴 Critical (System down, data loss)
|
|
||||||
- [ ] 🟠 High (Major feature broken)
|
|
||||||
- [ ] 🟡 Medium (Minor feature issue)
|
|
||||||
- [ ] 🟢 Low (Cosmetic issue)
|
|
||||||
|
|
||||||
## 🏷️ Labels
|
|
||||||
<!-- The following labels will be automatically applied -->
|
|
||||||
<!-- bug, needs-triage -->
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
---
|
|
||||||
name: ✨ Feature Request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: '[FEATURE] '
|
|
||||||
labels: ['enhancement', 'needs-triage']
|
|
||||||
assignees: ''
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 Feature Description
|
|
||||||
<!-- A clear and concise description of the feature you want to see -->
|
|
||||||
|
|
||||||
## 🎯 Problem Statement
|
|
||||||
<!-- What problem does this feature solve? -->
|
|
||||||
**Is your feature request related to a problem?**
|
|
||||||
A clear description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
## 🛠 Proposed Solution
|
|
||||||
<!-- Describe the solution you'd like to see -->
|
|
||||||
|
|
||||||
## 🔄 User Stories
|
|
||||||
<!-- Describe how users would interact with this feature -->
|
|
||||||
- As a [user type], I want [goal] so that [benefit]
|
|
||||||
- As a [user type], I want [goal] so that [benefit]
|
|
||||||
|
|
||||||
## 📱 Platform
|
|
||||||
<!-- Which parts of the system would be affected? -->
|
|
||||||
- [ ] 📱 Mobile App (Flutter)
|
|
||||||
- [ ] 🔧 Backend API (.NET Core)
|
|
||||||
- [ ] 🗄️ Database Schema
|
|
||||||
- [ ] 🎮 Gamification System
|
|
||||||
- [ ] 🤖 AI Analysis Engine
|
|
||||||
- [ ] 📊 Analytics/Reporting
|
|
||||||
- [ ] 🔐 Authentication/Security
|
|
||||||
|
|
||||||
## 🎨 UI/UX Considerations
|
|
||||||
<!-- If this affects the UI, describe the expected user experience -->
|
|
||||||
|
|
||||||
## 🔧 Technical Considerations
|
|
||||||
<!-- Any technical implementation details or constraints -->
|
|
||||||
|
|
||||||
## 📈 Success Metrics
|
|
||||||
<!-- How would we measure the success of this feature? -->
|
|
||||||
|
|
||||||
## 🚧 Alternative Solutions
|
|
||||||
<!-- Describe alternatives you've considered -->
|
|
||||||
|
|
||||||
## 📋 Additional Context
|
|
||||||
<!-- Add any other context, mockups, or examples -->
|
|
||||||
|
|
||||||
## 🎯 Priority
|
|
||||||
<!-- Mark the priority level -->
|
|
||||||
- [ ] 🔴 Critical (Essential for launch)
|
|
||||||
- [ ] 🟠 High (Important for user experience)
|
|
||||||
- [ ] 🟡 Medium (Nice to have)
|
|
||||||
- [ ] 🟢 Low (Future consideration)
|
|
||||||
|
|
||||||
## 📅 Timeline
|
|
||||||
<!-- When would you like to see this feature? -->
|
|
||||||
- [ ] Next release
|
|
||||||
- [ ] Within 3 months
|
|
||||||
- [ ] Within 6 months
|
|
||||||
- [ ] Future roadmap
|
|
||||||
|
|
||||||
## 🏷️ Labels
|
|
||||||
<!-- The following labels will be automatically applied -->
|
|
||||||
<!-- enhancement, needs-triage -->
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
# Pull Request
|
|
||||||
|
|
||||||
## 📋 Summary
|
|
||||||
<!-- Provide a brief description of the changes in this PR -->
|
|
||||||
|
|
||||||
## 🎯 Type of Change
|
|
||||||
<!-- Mark the relevant option with an 'x' -->
|
|
||||||
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
|
|
||||||
- [ ] ✨ New feature (non-breaking change which adds functionality)
|
|
||||||
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
||||||
- [ ] 📚 Documentation update
|
|
||||||
- [ ] 🏗️ Infrastructure/build changes
|
|
||||||
- [ ] 🧹 Code cleanup/refactoring
|
|
||||||
- [ ] 🧪 Tests only
|
|
||||||
|
|
||||||
## 🔗 Related Issues
|
|
||||||
<!-- Link any related issues using "Fixes #123" or "Related to #123" -->
|
|
||||||
|
|
||||||
## 🛠 Changes Made
|
|
||||||
<!-- Describe the changes made in detail -->
|
|
||||||
|
|
||||||
### Frontend (Flutter)
|
|
||||||
- [ ] UI components updated
|
|
||||||
- [ ] State management changes
|
|
||||||
- [ ] Navigation changes
|
|
||||||
- [ ] New screens/widgets added
|
|
||||||
|
|
||||||
### Backend (.NET Core)
|
|
||||||
- [ ] API endpoints added/modified
|
|
||||||
- [ ] Database schema changes
|
|
||||||
- [ ] Business logic updates
|
|
||||||
- [ ] Authentication/authorization changes
|
|
||||||
|
|
||||||
## 🧪 Testing
|
|
||||||
<!-- Describe the testing done for this change -->
|
|
||||||
|
|
||||||
### Flutter Testing
|
|
||||||
- [ ] Unit tests added/updated
|
|
||||||
- [ ] Widget tests added/updated
|
|
||||||
- [ ] Integration tests added/updated
|
|
||||||
- [ ] Manual testing completed on iOS
|
|
||||||
- [ ] Manual testing completed on Android
|
|
||||||
|
|
||||||
### .NET Testing
|
|
||||||
- [ ] Unit tests added/updated
|
|
||||||
- [ ] Integration tests added/updated
|
|
||||||
- [ ] API testing completed
|
|
||||||
- [ ] Database migration tested
|
|
||||||
|
|
||||||
## 📱 Screenshots/Videos
|
|
||||||
<!-- Add screenshots or videos if applicable -->
|
|
||||||
|
|
||||||
## 📝 Additional Notes
|
|
||||||
<!-- Any additional context, warnings, or notes for reviewers -->
|
|
||||||
|
|
||||||
## ✅ Checklist
|
|
||||||
<!-- Mark completed items with an 'x' -->
|
|
||||||
|
|
||||||
### Code Quality
|
|
||||||
- [ ] Code follows the established coding standards
|
|
||||||
- [ ] Self-review of the code completed
|
|
||||||
- [ ] Code is properly commented (especially complex logic)
|
|
||||||
- [ ] No debugging code or console logs left in
|
|
||||||
- [ ] Error handling is appropriate
|
|
||||||
|
|
||||||
### Documentation
|
|
||||||
- [ ] Documentation updated (if needed)
|
|
||||||
- [ ] API documentation updated (if applicable)
|
|
||||||
- [ ] README updated (if needed)
|
|
||||||
|
|
||||||
### Security & Performance
|
|
||||||
- [ ] No sensitive data exposed in code
|
|
||||||
- [ ] Performance impact considered
|
|
||||||
- [ ] Security implications reviewed
|
|
||||||
- [ ] Accessibility guidelines followed (for UI changes)
|
|
||||||
|
|
||||||
### Testing & Deployment
|
|
||||||
- [ ] All tests pass locally
|
|
||||||
- [ ] CI/CD pipeline passes
|
|
||||||
- [ ] Database migrations work (if applicable)
|
|
||||||
- [ ] Feature works in staging environment
|
|
||||||
|
|
||||||
## 👥 Reviewers
|
|
||||||
<!-- Tag specific people if needed -->
|
|
||||||
@team-leads @senior-developers
|
|
||||||
|
|
||||||
---
|
|
||||||
**Note**: Please ensure all checkboxes are marked before requesting review.
|
|
||||||
|
|
@ -1,137 +0,0 @@
|
||||||
name: CI/CD Pipeline
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, develop ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main, develop ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Flutter Mobile App CI
|
|
||||||
flutter-test:
|
|
||||||
name: Flutter Tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ./mobile
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.16.0'
|
|
||||||
channel: 'stable'
|
|
||||||
|
|
||||||
- name: Get dependencies
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Analyze code
|
|
||||||
run: flutter analyze
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: flutter test
|
|
||||||
|
|
||||||
- name: Generate coverage
|
|
||||||
run: flutter test --coverage
|
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
file: ./mobile/coverage/lcov.info
|
|
||||||
|
|
||||||
# .NET Backend API CI
|
|
||||||
dotnet-test:
|
|
||||||
name: .NET Tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ./backend
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
|
|
||||||
- name: Restore dependencies
|
|
||||||
run: dotnet restore
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: dotnet build --no-restore --configuration Release
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage"
|
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
file: ./backend/TestResults/*/coverage.cobertura.xml
|
|
||||||
|
|
||||||
# Security and Quality Checks
|
|
||||||
security-scan:
|
|
||||||
name: Security Scan
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
|
||||||
uses: aquasecurity/trivy-action@master
|
|
||||||
with:
|
|
||||||
scan-type: 'fs'
|
|
||||||
scan-ref: '.'
|
|
||||||
format: 'sarif'
|
|
||||||
output: 'trivy-results.sarif'
|
|
||||||
|
|
||||||
- name: Upload Trivy scan results to GitHub Security tab
|
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
|
||||||
with:
|
|
||||||
sarif_file: 'trivy-results.sarif'
|
|
||||||
|
|
||||||
# Build and Deploy to Staging (develop branch only)
|
|
||||||
deploy-staging:
|
|
||||||
name: Deploy to Staging
|
|
||||||
needs: [flutter-test, dotnet-test]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: us-west-2
|
|
||||||
|
|
||||||
- name: Deploy to staging
|
|
||||||
run: |
|
|
||||||
echo "Deploying to staging environment"
|
|
||||||
# Add actual deployment commands here
|
|
||||||
|
|
||||||
# Build and Deploy to Production (main branch only)
|
|
||||||
deploy-production:
|
|
||||||
name: Deploy to Production
|
|
||||||
needs: [flutter-test, dotnet-test, security-scan]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
||||||
environment: production
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v2
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: us-west-2
|
|
||||||
|
|
||||||
- name: Deploy to production
|
|
||||||
run: |
|
|
||||||
echo "Deploying to production environment"
|
|
||||||
# Add actual deployment commands here
|
|
||||||
|
|
@ -483,4 +483,4 @@ secrets/
|
||||||
*.pem
|
*.pem
|
||||||
*.p12
|
*.p12
|
||||||
*.p8
|
*.p8
|
||||||
*.mobileprovisiondocs/05_views/
|
*.mobileprovision
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
# 🎯 Drama Ling 前端架構重構執行摘要
|
|
||||||
|
|
||||||
**建立日期**: 2025-09-10
|
|
||||||
**專案負責**: Claude Code
|
|
||||||
**執行狀態**: ⏳ 準備執行
|
|
||||||
**預估工期**: 3-4週
|
|
||||||
|
|
||||||
## 📊 重構決策總覽
|
|
||||||
|
|
||||||
### 🔄 **架構轉換**
|
|
||||||
```
|
|
||||||
Vue 3 + Quasar Framework → 原生 HTML + CSS + JavaScript
|
|
||||||
```
|
|
||||||
|
|
||||||
### 🎯 **核心目標**
|
|
||||||
1. **設計精確度**: 85% → 100%
|
|
||||||
2. **Claude Code相容性**: 80% → 95%
|
|
||||||
3. **載入性能**: 2s → 0.8s
|
|
||||||
4. **Bundle大小**: 800KB → 150KB
|
|
||||||
|
|
||||||
## 🚀 四階段執行計劃
|
|
||||||
|
|
||||||
### **第一階段 (週1) - 基礎架構**
|
|
||||||
```bash
|
|
||||||
apps/web-native/
|
|
||||||
├── assets/css/main.css # 設計系統
|
|
||||||
├── assets/js/app.js # 核心JavaScript
|
|
||||||
└── docs/ARCHITECTURE.md # 架構文檔
|
|
||||||
```
|
|
||||||
|
|
||||||
### **第二階段 (週1) - 核心頁面**
|
|
||||||
```bash
|
|
||||||
pages/
|
|
||||||
├── index.html # 首頁
|
|
||||||
├── auth/login.html # 認證
|
|
||||||
├── vocabulary/index.html # 詞彙學習
|
|
||||||
└── profile/index.html # 個人檔案
|
|
||||||
```
|
|
||||||
|
|
||||||
### **第三階段 (週1) - 功能頁面**
|
|
||||||
```bash
|
|
||||||
pages/vocabulary/
|
|
||||||
├── practice.html # 練習頁面
|
|
||||||
├── review.html # 複習頁面
|
|
||||||
└── analytics.html # 分析儀表板
|
|
||||||
```
|
|
||||||
|
|
||||||
### **第四階段 (週1) - 整合優化**
|
|
||||||
- API整合 + 測試 + 部署
|
|
||||||
|
|
||||||
## 📋 已完成的準備工作
|
|
||||||
|
|
||||||
### ✅ **SOP標準流程執行**
|
|
||||||
- [x] 歸檔舊版技術文檔 (`sop/archive/20250910142112_README.md`)
|
|
||||||
- [x] 創建重構專案文檔 (`projects/native-html-migration.md`)
|
|
||||||
- [x] 更新任務管理系統 (`TASKS.md`)
|
|
||||||
- [x] 更新技術文檔 (`docs/04_technical/README.md`)
|
|
||||||
- [x] 更新功能規格說明 (`docs/02_design/function-specs/web/README.md`)
|
|
||||||
- [x] 產生正式分析報告 (`sop/tools/reports/analysis/2025-09-10_analysis-analysis.md`)
|
|
||||||
|
|
||||||
### 📄 **關鍵文檔建立**
|
|
||||||
| 文檔類型 | 檔案路徑 | 狀態 |
|
|
||||||
|---------|----------|------|
|
|
||||||
| **專案規劃** | `projects/native-html-migration.md` | ✅ 已完成 |
|
|
||||||
| **技術架構** | `docs/04_technical/README.md` | ✅ 已更新 |
|
|
||||||
| **任務管理** | `TASKS.md` | ✅ 已更新 |
|
|
||||||
| **功能規格** | `docs/02_design/function-specs/web/README.md` | ✅ 已更新 |
|
|
||||||
| **分析報告** | `sop/tools/reports/analysis/2025-09-10_analysis-analysis.md` | ✅ 已完成 |
|
|
||||||
|
|
||||||
## 🎯 下一步立即行動
|
|
||||||
|
|
||||||
### 🔥 **緊急任務 (本週開始)**
|
|
||||||
1. **備份現有代碼**
|
|
||||||
```bash
|
|
||||||
# 備份現有Vue版本
|
|
||||||
cp -r apps/web apps/web-vue-backup
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **建立原生HTML專案結構**
|
|
||||||
```bash
|
|
||||||
# 創建新專案目錄
|
|
||||||
mkdir -p apps/web-native/{pages,assets,data,docs}
|
|
||||||
mkdir -p apps/web-native/assets/{css,js,media}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **建立設計系統基礎**
|
|
||||||
- 創建 `assets/css/main.css` (CSS變數、色彩、字體系統)
|
|
||||||
- 創建 `assets/js/app.js` (核心JavaScript模組)
|
|
||||||
|
|
||||||
### ⚠️ **重要準備工作**
|
|
||||||
- 分析現有Vue組件,列出需要轉換的功能清單
|
|
||||||
- 建立HTML頁面模板和組件系統
|
|
||||||
- 設計JavaScript模組化架構
|
|
||||||
|
|
||||||
### 📝 **一般支援工作**
|
|
||||||
- 準備開發環境配置
|
|
||||||
- 建立測試策略和品質檢查流程
|
|
||||||
|
|
||||||
## 🎪 成功關鍵因素
|
|
||||||
|
|
||||||
### 💡 **技術方案**
|
|
||||||
- **漸進式遷移**: 保留Vue版本作為後備
|
|
||||||
- **功能完整性**: 100%保持現有功能規格
|
|
||||||
- **性能優化**: 原生HTML的性能優勢
|
|
||||||
- **Claude Code友好**: AI開發最佳化
|
|
||||||
|
|
||||||
### 🚀 **執行策略**
|
|
||||||
- **週檢查點**: 每週進度評估和調整
|
|
||||||
- **質量保證**: 像素級設計還原檢查
|
|
||||||
- **用戶驗證**: A/B測試確保體驗不降級
|
|
||||||
|
|
||||||
## ⚠️ 風險控制
|
|
||||||
|
|
||||||
### 🛡️ **風險緩解措施**
|
|
||||||
- **功能回滾**: 保留完整Vue備份
|
|
||||||
- **數據兼容**: API接口保持不變
|
|
||||||
- **分階段部署**: 逐頁面替換降低風險
|
|
||||||
- **性能監控**: 建立性能基準線對比
|
|
||||||
|
|
||||||
## 📞 後續支援
|
|
||||||
|
|
||||||
### 🔄 **定期檢查**
|
|
||||||
- **每週檢查**: 進度和品質評估
|
|
||||||
- **里程碑評估**: 每階段完成度檢查
|
|
||||||
- **最終驗收**: 功能完整性和性能指標驗證
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 **準備開始執行?**
|
|
||||||
|
|
||||||
所有準備工作已按照CLAUDE.md SOP標準完成,包括:
|
|
||||||
- ✅ 文件歸檔和版本管理
|
|
||||||
- ✅ 詳細專案規劃和技術文檔
|
|
||||||
- ✅ 任務管理系統更新
|
|
||||||
- ✅ 正式分析報告產生
|
|
||||||
- ✅ 風險評估和緩解策略
|
|
||||||
|
|
||||||
**現在可以開始執行第一階段:基礎架構建立** 🎯
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**文檔更新**: 2025-09-10
|
|
||||||
**相關連結**: [TASKS.md](TASKS.md) | [重構專案](projects/native-html-migration.md) | [分析報告](sop/tools/reports/analysis/2025-09-10_analysis-analysis.md)
|
|
||||||
|
|
@ -1,389 +0,0 @@
|
||||||
# 🚀 Drama Ling 企業級UI設計總體計劃
|
|
||||||
|
|
||||||
**建立日期**: 2025-01-15
|
|
||||||
**計劃版本**: v4.0 - 企業級重構
|
|
||||||
**架構基礎**: 共用模組架構 v3.0
|
|
||||||
**設計標準**: 企業級UI/UX規範
|
|
||||||
**執行目標**: 95+ UI畫面完整重設計
|
|
||||||
|
|
||||||
## 📋 計劃概述
|
|
||||||
|
|
||||||
### 🎯 核心目標
|
|
||||||
基於 Drama Ling v3.0 共用模組架構,創建企業級標準的完整UI設計系統,確保:
|
|
||||||
- **100%符合功能規格**: 嚴格按照 `/docs/02_design/function-specs/` 規格執行
|
|
||||||
- **統一設計語言**: 完全遵循 `/docs/02_design/ui-ux/ui-ux-guidelines.md` 規範
|
|
||||||
- **企業級品質**: 達到Fortune 500企業內部系統標準
|
|
||||||
- **零設計債務**: 徹底重構,消除所有設計不一致問題
|
|
||||||
|
|
||||||
### 🏗️ 設計架構原則
|
|
||||||
1. **規格優先**: 所有設計必須100%符合功能規格文件
|
|
||||||
2. **模組化設計**: 基於v3.0共用模組架構的設計組件系統
|
|
||||||
3. **一致性保證**: 跨平台設計語言統一
|
|
||||||
4. **可擴展性**: 支援未來功能快速擴展的設計框架
|
|
||||||
5. **無障礙標準**: 符合WCAG 2.1 AA級無障礙要求
|
|
||||||
|
|
||||||
## 🔍 階段一:設計規範完善與標準化 (第1-2週)
|
|
||||||
|
|
||||||
### 1.1 UI/UX規範補全與更新 ⭐ **CRITICAL**
|
|
||||||
|
|
||||||
**目標**: 建立企業級完整設計規範系統
|
|
||||||
|
|
||||||
**工作內容**:
|
|
||||||
- [ ] **色彩系統完善**
|
|
||||||
- 引用文件: `/docs/02_design/ui-ux/ui-ux-guidelines.md` (第35-103行)
|
|
||||||
- 補全遺失的色彩定義:狀態色彩、反饋色彩、學習進度色彩
|
|
||||||
- 建立暗色/亮色主題完整色彩對照表
|
|
||||||
- 定義色彩使用場景和層次規範
|
|
||||||
|
|
||||||
- [ ] **字體系統標準化**
|
|
||||||
- 引用文件: `/docs/02_design/ui-ux/ui-ux-guidelines.md` (第105-136行)
|
|
||||||
- 補全遺失字體規格:多語言字體、特殊用途字體
|
|
||||||
- 建立響應式字體大小系統 (mobile/tablet/desktop)
|
|
||||||
- 定義字體層次和使用場景指南
|
|
||||||
|
|
||||||
- [ ] **間距與佈局系統**
|
|
||||||
- 引用文件: `/docs/02_design/ui-ux/ui-ux-guidelines.md` (第139-163行)
|
|
||||||
- 建立8px grid系統標準
|
|
||||||
- 定義響應式佈局斷點和規則
|
|
||||||
- 創建元件間距和頁面佈局標準模板
|
|
||||||
|
|
||||||
- [ ] **組件設計規範**
|
|
||||||
- 引用文件: `/docs/02_design/ui-ux/ui-ux-guidelines.md` (第188-200行)
|
|
||||||
- 補全缺失的組件規範:表單元件、遊戲化元件、學習專用元件
|
|
||||||
- 建立組件狀態系統 (default/hover/active/disabled/loading)
|
|
||||||
- 定義組件變體和使用場景
|
|
||||||
|
|
||||||
**輸出物**:
|
|
||||||
- `ui-ux-guidelines.md` 完整更新版本 (企業級標準)
|
|
||||||
- `design-system-components.md` 完整組件庫文檔
|
|
||||||
- `responsive-design-standards.md` 響應式設計標準
|
|
||||||
- `accessibility-guidelines.md` 無障礙設計指南
|
|
||||||
|
|
||||||
### 1.2 企業級設計系統建立
|
|
||||||
|
|
||||||
**目標**: 創建可重用的設計系統和組件庫
|
|
||||||
|
|
||||||
**工作內容**:
|
|
||||||
- [ ] **原子設計系統**: Atoms → Molecules → Organisms → Templates → Pages
|
|
||||||
- [ ] **Design Tokens**: 設計變數化管理系統
|
|
||||||
- [ ] **組件庫標準化**: 可重用UI組件集合
|
|
||||||
- [ ] **圖標系統**: 學習情境專用圖標設計
|
|
||||||
- [ ] **動畫設計語言**: 統一的動畫效果和互動反饋
|
|
||||||
|
|
||||||
**輸出物**:
|
|
||||||
- `design-system-tokens.css` - 完整設計變數系統
|
|
||||||
- `component-library.html` - 互動式組件展示
|
|
||||||
- `animation-guidelines.md` - 動畫設計標準
|
|
||||||
- `icon-system.svg` - 完整圖標庫
|
|
||||||
|
|
||||||
## 📱 階段二:Mobile端企業級重設計 (第3-6週)
|
|
||||||
|
|
||||||
### 2.1 核心學習功能頁面群組 (第3-4週)
|
|
||||||
|
|
||||||
#### 2.1.1 情境對話系統 🎯 (優先級: P0)
|
|
||||||
|
|
||||||
**規格參考**:
|
|
||||||
- 主規格: `/docs/02_design/function-specs/mobile/01_situational-dialogue-mobile.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/ai-algorithm-specs.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/speaking-evaluation-specs.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/pragmatic-analysis-specs.md`
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Dialogue_Practice_Main** - 情境對話練習主界面
|
|
||||||
- 設計要求: 語音輸入界面 (參考: ai-algorithm-specs.md 語音處理)
|
|
||||||
- 設計要求: 即時AI反饋顯示 (參考: ai-algorithm-specs.md AI評估系統)
|
|
||||||
- 設計要求: 劇情任務和詞彙任務雙重可視化
|
|
||||||
- 設計要求: 300秒限時挑戰計時器
|
|
||||||
- UI規範: 語音優先設計、即時語法反饋 (ui-ux-guidelines.md 第27-28行)
|
|
||||||
|
|
||||||
- [ ] **UI_Dialogue_Character_Selection** - 角色選擇頁面
|
|
||||||
- 設計要求: 角色卡片設計,突出角色特色和學習情境
|
|
||||||
- 設計要求: 角色能力和適合程度顯示
|
|
||||||
|
|
||||||
- [ ] **UI_Dialogue_Scene_Setting** - 場景設定頁面
|
|
||||||
- 設計要求: 沉浸式場景展示
|
|
||||||
- UI規範: 沉浸式學習環境設計 (ui-ux-guidelines.md 第9行)
|
|
||||||
|
|
||||||
- [ ] **UI_AI_Assistance_Panel** - AI輔助功能面板
|
|
||||||
- 設計要求: 回覆提示道具使用界面
|
|
||||||
- 設計要求: 語法即時檢測顯示
|
|
||||||
- UI規範: 智慧輔助、漸進引導 (ui-ux-guidelines.md 第21-22行)
|
|
||||||
|
|
||||||
- [ ] **UI_Dialogue_Results** - 對話練習結果頁面
|
|
||||||
- 設計要求: 口說評分五維雷達圖 (參考: speaking-evaluation-specs.md)
|
|
||||||
- 設計要求: 語用分析六維評估 (參考: pragmatic-analysis-specs.md)
|
|
||||||
- UI規範: 即時成就反饋 (ui-ux-guidelines.md 第25行)
|
|
||||||
|
|
||||||
#### 2.1.2 詞彙學習系統 📝 (優先級: P0)
|
|
||||||
|
|
||||||
**規格參考**:
|
|
||||||
- 主規格: `/docs/02_design/function-specs/mobile/02_vocabulary-learning-mobile.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/progressive-stage-system.md`
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Vocab_Learning_Enhanced** - 多媒體詞彙學習主界面
|
|
||||||
- 設計要求: 詞彙展示 (音標、定義、例句)
|
|
||||||
- 設計要求: 雙語音頻系統 (標準速度/慢速)
|
|
||||||
- 設計要求: 智慧詞彙標註 (Source + Example)
|
|
||||||
- 設計要求: 視覺輔助學習 (例句配圖)
|
|
||||||
- UI規範: 詞彙學習流程 (ui-ux-guidelines.md 第29行)
|
|
||||||
|
|
||||||
- [ ] **UI_Vocab_Choice_Practice** - 詞彙選擇練習頁面
|
|
||||||
- 設計要求: 選擇題界面,支援多選和單選模式
|
|
||||||
- 設計要求: 即時正確性反饋
|
|
||||||
|
|
||||||
- [ ] **UI_Vocab_Fluency_Results** - 流暢度練習綜合結果
|
|
||||||
- 設計要求: 學習成效可視化展示
|
|
||||||
- 設計要求: 進度追蹤和建議系統
|
|
||||||
|
|
||||||
- [ ] **UI_Vocab_Review_System** - 間隔複習系統界面
|
|
||||||
- 設計要求: 複習提醒和排程界面
|
|
||||||
- UI規範: 間隔複習提醒 (ui-ux-guidelines.md 第31行)
|
|
||||||
|
|
||||||
#### 2.1.3 學習地圖系統 🗺️ (優先級: P0)
|
|
||||||
|
|
||||||
**規格參考**:
|
|
||||||
- 主規格: `/docs/02_design/function-specs/mobile/03_learning-map-mobile.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/progressive-stage-system.md`
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Level_Map** - 學習地圖主畫面 (線性闖關版)
|
|
||||||
- 設計要求: 13階段×20劇本的地圖視覺化
|
|
||||||
- 設計要求: 四關進度指示器 (詞彙學習→詞彙熟悉→口說練習→情境對話)
|
|
||||||
- 設計要求: 關卡狀態管理 (🔒鎖定/⏳可進行/🔄進行中/✅已完成)
|
|
||||||
- 引用規格: progressive-stage-system.md 完整關卡系統
|
|
||||||
|
|
||||||
- [ ] **UI_Current_Level_Info** - 當前可進行關卡資訊面板
|
|
||||||
- 設計要求: 關卡詳細資訊展示
|
|
||||||
- 設計要求: 開始學習入口和準備指南
|
|
||||||
|
|
||||||
- [ ] **UI_Level_Progress_Detail** - 關卡進度詳情頁面
|
|
||||||
- 設計要求: 詳細進度追蹤和統計
|
|
||||||
- 設計要求: 個人表現分析
|
|
||||||
|
|
||||||
- [ ] **UI_Stage_Overview** - 階段總覽和劇本選擇
|
|
||||||
- 設計要求: 階段性學習目標展示
|
|
||||||
- 設計要求: 劇本選擇和預覽功能
|
|
||||||
|
|
||||||
- [ ] **UI_Level_Locked_Modal** - 關卡鎖定提示彈窗
|
|
||||||
- 設計要求: 解鎖條件清晰提示
|
|
||||||
- 設計要求: 引導用戶完成前置任務
|
|
||||||
|
|
||||||
### 2.2 商業功能頁面群組 (第4-5週)
|
|
||||||
|
|
||||||
#### 2.2.1 道具商店系統 🛒 (優先級: P1)
|
|
||||||
|
|
||||||
**規格參考**:
|
|
||||||
- 主規格: `/docs/02_design/function-specs/mobile/04_item-shop-mobile.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/business-rules.md`
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Shop_Categories** - 道具商店分類主頁面
|
|
||||||
- 設計要求: 鑽石購買區 (5個價格套餐)
|
|
||||||
- 設計要求: 學習輔助道具區 (回覆提示、補命、加時)
|
|
||||||
- 設計要求: 限時挑戰道具區 (時間暫停、時間加成)
|
|
||||||
- 引用規格: business-rules.md 命條系統和經濟系統
|
|
||||||
|
|
||||||
- [ ] **UI_Diamond_Purchase** - 鑽石購買頁面
|
|
||||||
- 設計要求: 價格套餐展示和優惠信息
|
|
||||||
- 設計要求: 支付流程整合
|
|
||||||
|
|
||||||
- [ ] **UI_Item_Details** - 單一道具詳情頁面
|
|
||||||
- 設計要求: 道具功能詳細說明
|
|
||||||
- 設計要求: 使用場景和效果展示
|
|
||||||
|
|
||||||
- [ ] **UI_Shop_Item_Confirm** - 道具購買確認彈窗
|
|
||||||
- 設計要求: 購買資訊確認和風險提示
|
|
||||||
- UI規範: 高風險按鈕文字標注 (ui-ux-guidelines.md 第194行)
|
|
||||||
|
|
||||||
- [ ] **UI_Cost_Confirm_Popup** - 成本確認彈窗 (口說練習特別關卡)
|
|
||||||
- 設計要求: 特殊關卡成本說明
|
|
||||||
- 設計要求: 用戶決策支援資訊
|
|
||||||
|
|
||||||
#### 2.2.2 用戶認證系統 🔐 (優先級: P1)
|
|
||||||
|
|
||||||
**規格參考**:
|
|
||||||
- 主規格: `/docs/02_design/function-specs/mobile/05_user-authentication-mobile.md`
|
|
||||||
- 共用模組: `/docs/02_design/function-specs/common/business-rules.md`
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Login_Main** - 主要登入頁面
|
|
||||||
- 設計要求: 多平台登入選項 (Google, Facebook, Apple)
|
|
||||||
- 設計要求: 記住登入和安全驗證
|
|
||||||
- 設計要求: 錯誤處理和安全提示
|
|
||||||
|
|
||||||
- [ ] **UI_SignUp_Main** - 用戶註冊頁面
|
|
||||||
- 設計要求: 分步驟註冊流程
|
|
||||||
- 設計要求: 即時驗證和錯誤提示
|
|
||||||
- 設計要求: 學習目標和程度設定
|
|
||||||
|
|
||||||
- [ ] **UI_PasswordReset_Form** - 密碼重置表單
|
|
||||||
- 設計要求: 多步驟驗證流程
|
|
||||||
- 設計要求: 安全性說明和引導
|
|
||||||
|
|
||||||
- [ ] **UI_PasswordReset_Popup** - 密碼重置確認彈窗
|
|
||||||
- 設計要求: 重置成功確認和後續指引
|
|
||||||
|
|
||||||
- [ ] **UI_Account_List** - 帳戶列表管理頁面
|
|
||||||
- 設計要求: 多帳戶管理和切換
|
|
||||||
- 設計要求: 帳戶安全狀態顯示
|
|
||||||
|
|
||||||
- [ ] **UI_Account_Option** - 帳戶選項設定頁面
|
|
||||||
- 設計要求: 帳戶設定和隱私控制
|
|
||||||
- 設計要求: 帳戶關聯和解綁功能
|
|
||||||
|
|
||||||
### 2.3 支援功能頁面群組 (第5-6週)
|
|
||||||
|
|
||||||
#### 2.3.1 系統介面和狀態頁面 📊 (優先級: P2)
|
|
||||||
|
|
||||||
**需設計的頁面**:
|
|
||||||
- [ ] **UI_Insufficient_Resources** - 資源不足提示頁面
|
|
||||||
- 設計要求: 清晰的資源不足說明
|
|
||||||
- 設計要求: 獲取資源的引導路徑
|
|
||||||
|
|
||||||
- [ ] **UI_LifePoints_Display** - 生命點數顯示組件
|
|
||||||
- 設計要求: 直觀的生命值視覺化
|
|
||||||
- UI規範: 命條生命系統 (ui-ux-guidelines.md 第30行)
|
|
||||||
|
|
||||||
- [ ] **UI_Subscription_Success** - 訂閱成功頁面
|
|
||||||
- 設計要求: 訂閱確認和權益說明
|
|
||||||
- 設計要求: 後續使用指引
|
|
||||||
|
|
||||||
- [ ] **UI_TimeWarp_Cards** - 時光卷使用介面
|
|
||||||
- 設計要求: 時光卷功能說明和使用確認
|
|
||||||
- 設計要求: 使用後效果展示
|
|
||||||
|
|
||||||
- [ ] **UI_LevelResult_SuccessResult** - 關卡成功結果頁面
|
|
||||||
- 設計要求: 成就慶祝動畫和統計展示
|
|
||||||
- UI規範: 即時成就反饋 (ui-ux-guidelines.md 第25行)
|
|
||||||
|
|
||||||
## 💻 階段三:Web端企業級重設計 (第7-9週)
|
|
||||||
|
|
||||||
### 3.1 Web端專屬功能設計 (第7-8週)
|
|
||||||
|
|
||||||
**規格參考**: `/docs/02_design/function-specs/web/` 全部Web端規格
|
|
||||||
|
|
||||||
**設計重點**:
|
|
||||||
- [ ] **桌面優化界面**: 大螢幕佈局和多視窗支援
|
|
||||||
- [ ] **鍵盤導航**: 完整的鍵盤操作支援
|
|
||||||
- [ ] **批量操作**: 企業級批量管理功能
|
|
||||||
- [ ] **高級分析**: 詳細的學習分析和報告功能
|
|
||||||
|
|
||||||
**需設計的主要頁面**:
|
|
||||||
- [ ] **詞彙學習Web版**: 桌面優化的詞彙學習界面
|
|
||||||
- [ ] **情境對話Web版**: 大螢幕對話練習界面
|
|
||||||
- [ ] **學習地圖Web版**: 多層級地圖導航界面
|
|
||||||
- [ ] **道具商店Web版**: 企業級商店管理界面
|
|
||||||
- [ ] **用戶認證Web版**: SSO和企業登入支援
|
|
||||||
|
|
||||||
### 3.2 響應式設計和跨平台整合 (第8-9週)
|
|
||||||
|
|
||||||
**工作內容**:
|
|
||||||
- [ ] **響應式佈局**: Mobile → Tablet → Desktop 完整適配
|
|
||||||
- [ ] **跨瀏覽器相容性**: Chrome, Firefox, Safari, Edge 完整支援
|
|
||||||
- [ ] **效能優化**: 載入時間和互動回應最佳化
|
|
||||||
- [ ] **PWA功能**: 漸進式Web應用功能整合
|
|
||||||
|
|
||||||
## 🔧 階段四:設計系統完善和品質保證 (第10-12週)
|
|
||||||
|
|
||||||
### 4.1 設計系統文檔化和工具化 (第10-11週)
|
|
||||||
|
|
||||||
**工作內容**:
|
|
||||||
- [ ] **設計規範手冊**: 完整的設計規範使用指南
|
|
||||||
- [ ] **組件使用指南**: 每個組件的使用場景和最佳實踐
|
|
||||||
- [ ] **設計審查清單**: 品質控制清單和審查標準
|
|
||||||
- [ ] **維護指南**: 設計系統維護和更新流程
|
|
||||||
|
|
||||||
### 4.2 品質保證和使用性測試 (第11-12週)
|
|
||||||
|
|
||||||
**工作內容**:
|
|
||||||
- [ ] **設計一致性審查**: 跨平台設計一致性檢查
|
|
||||||
- [ ] **無障礙性測試**: WCAG 2.1 AA級合規驗證
|
|
||||||
- [ ] **使用性測試**: 用戶測試和回饋收集
|
|
||||||
- [ ] **效能評估**: 設計對系統效能的影響評估
|
|
||||||
|
|
||||||
## 📊 成功標準和驗收條件
|
|
||||||
|
|
||||||
### 🎯 品質標準
|
|
||||||
1. **功能規格符合度**: 100%符合所有功能規格要求
|
|
||||||
2. **設計一致性**: 跨平台設計語言100%統一
|
|
||||||
3. **無障礙標準**: WCAG 2.1 AA級100%合規
|
|
||||||
4. **效能標準**: 頁面載入時間<3秒,互動回應時間<200ms
|
|
||||||
5. **瀏覽器支援**: 主流瀏覽器100%相容
|
|
||||||
|
|
||||||
### 📋 驗收清單
|
|
||||||
- [ ] 所有UI畫面符合對應功能規格文件要求
|
|
||||||
- [ ] 所有設計符合UI/UX規範標準
|
|
||||||
- [ ] 跨平台視覺一致性通過審查
|
|
||||||
- [ ] 無障礙功能測試全部通過
|
|
||||||
- [ ] 使用性測試滿意度≥90%
|
|
||||||
|
|
||||||
## 📁 交付物清單
|
|
||||||
|
|
||||||
### 🎨 設計文檔
|
|
||||||
- [ ] `ui-ux-guidelines.md` - 完善的UI/UX設計規範
|
|
||||||
- [ ] `design-system-documentation.md` - 設計系統完整文檔
|
|
||||||
- [ ] `component-library-guide.md` - 組件庫使用指南
|
|
||||||
- [ ] `responsive-design-standards.md` - 響應式設計標準
|
|
||||||
|
|
||||||
### 💻 設計資產
|
|
||||||
- [ ] `design-system.css` - 完整CSS設計系統
|
|
||||||
- [ ] 95+ HTML原型頁面 (Mobile + Web)
|
|
||||||
- [ ] 完整SVG圖標庫
|
|
||||||
- [ ] 設計系統展示網站
|
|
||||||
|
|
||||||
### 📋 支援文檔
|
|
||||||
- [ ] `design-review-checklist.md` - 設計審查清單
|
|
||||||
- [ ] `accessibility-compliance-report.md` - 無障礙合規報告
|
|
||||||
- [ ] `usability-test-results.md` - 使用性測試報告
|
|
||||||
- [ ] `maintenance-guidelines.md` - 維護指南
|
|
||||||
|
|
||||||
## 🚨 風險管控和品質保證
|
|
||||||
|
|
||||||
### ⚠️ 關鍵風險點
|
|
||||||
1. **規格理解偏差**: 設計不符合功能規格要求
|
|
||||||
- **控制措施**: 每個設計階段都進行規格文件交叉檢查
|
|
||||||
- **責任人**: 設計師必須深度閱讀相關規格文件
|
|
||||||
|
|
||||||
2. **設計一致性風險**: 跨頁面設計語言不統一
|
|
||||||
- **控制措施**: 建立設計審查機制,每週進行一致性檢查
|
|
||||||
- **工具支援**: 建立設計系統檢查清單
|
|
||||||
|
|
||||||
3. **無障礙合規風險**: 無障礙功能不完整
|
|
||||||
- **控制措施**: 每個組件設計完成都進行無障礙測試
|
|
||||||
- **標準遵循**: 嚴格遵循WCAG 2.1 AA級標準
|
|
||||||
|
|
||||||
### 🔍 品質控制機制
|
|
||||||
1. **階段性審查**: 每個階段結束進行全面審查
|
|
||||||
2. **同行評議**: 設計師之間相互審查和回饋
|
|
||||||
3. **用戶測試**: 關鍵頁面進行真實用戶測試
|
|
||||||
4. **技術可行性評估**: 設計與開發團隊聯合評估
|
|
||||||
|
|
||||||
## 📞 執行支援和溝通機制
|
|
||||||
|
|
||||||
### 🤝 團隊協作
|
|
||||||
- **設計團隊**: 負責設計執行和品質控制
|
|
||||||
- **產品團隊**: 提供功能需求解釋和使用者回饋
|
|
||||||
- **開發團隊**: 提供技術可行性建議和實現支援
|
|
||||||
- **測試團隊**: 提供品質測試和驗收支援
|
|
||||||
|
|
||||||
### 📋 進度追蹤
|
|
||||||
- **每週進度會議**: 檢討進度和解決阻礙
|
|
||||||
- **里程碑審查**: 階段性成果展示和評估
|
|
||||||
- **問題升級機制**: 重大問題快速上報和解決
|
|
||||||
- **文檔同步更新**: 確保所有團隊資訊同步
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**📝 重要聲明**:
|
|
||||||
本計劃基於Drama Ling v3.0共用模組架構制定,確保所有設計完全符合功能規格要求,達到企業級應用標準。所有設計師在執行前必須深入理解相關功能規格文件和UI/UX規範,確保設計品質和一致性。
|
|
||||||
|
|
||||||
**🎯 最終目標**:
|
|
||||||
創建Drama Ling史上最高品質的UI設計系統,為用戶提供世界級的沉浸式英語學習體驗。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**最後更新**: 2025-01-15
|
|
||||||
**計劃版本**: v4.0 - 企業級重構
|
|
||||||
**執行週期**: 12週
|
|
||||||
**預期成果**: 95+ 企業級UI畫面
|
|
||||||
199
TASKS.md
|
|
@ -1,199 +0,0 @@
|
||||||
# 🎯 Drama Ling 任務清單
|
|
||||||
|
|
||||||
## 📋 當前任務
|
|
||||||
|
|
||||||
### 🔥 緊急任務
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠️ 重要任務
|
|
||||||
- [x] 🎮 **練習系統核心開發** - 選擇題、圖片匹配、句子重組三種模式 (56小時) ✅
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: Page_Vocab_Choice_Practice_W等頁面,反應時間測量
|
|
||||||
- 📋 合規基礎: function-specs定義的練習模式
|
|
||||||
- ✅ **完成項目**:
|
|
||||||
- 選擇題練習頁面 (VocabularyChoicePracticeView.vue)
|
|
||||||
- 圖片匹配練習頁面 (VocabularyMatchingPracticeView.vue) - HTML5 拖放API
|
|
||||||
- 句子重組練習頁面 (VocabularyReorganizePracticeView.vue) - 拖放重組
|
|
||||||
- 毫秒級反應時間測量系統
|
|
||||||
- 命條系統整合
|
|
||||||
- 鍵盤快捷鍵支援 (Enter, Space, Escape)
|
|
||||||
- 響應式設計和觸摸支援
|
|
||||||
- TypeScript類型安全和Pinia狀態管理
|
|
||||||
|
|
||||||
- [x] 📊 **Web專用分析儀表板** - Page_Vocab_Analytics_Dashboard_W數據視覺化 (40小時) ✅
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: 統計卡片、圖表庫整合、報告匯出
|
|
||||||
- 📋 合規基礎: Web端特色功能規格
|
|
||||||
- ✅ **完成項目**:
|
|
||||||
- 完整的分析儀表板頁面 (VocabularyAnalyticsDashboard.vue)
|
|
||||||
- 統計卡片組件 (StatCard.vue) - 趨勢顯示和互動效果
|
|
||||||
- 錯誤分析熱力圖組件 (ErrorHeatmap.vue) - 可視化錯誤模式
|
|
||||||
- Chart.js 圖表整合 - 圓餅圖、折線圖、雷達圖
|
|
||||||
- 多格式報告匯出功能 (PDF, Excel, CSV)
|
|
||||||
- 時間範圍篩選和自訂日期選擇器
|
|
||||||
- 響應式設計和列印友善格式
|
|
||||||
- 快捷鍵支援 (T, F, Ctrl+E, Ctrl+P, F11)
|
|
||||||
- 學習建議和薄弱點識別系統
|
|
||||||
|
|
||||||
- [x] 🔄 **複習系統智能化** - 間隔複習演算法,Page_Vocab_Review_Main_W (32小時) ✅
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: 學習計劃生成、薄弱點識別
|
|
||||||
- ✅ **完成項目**:
|
|
||||||
- 智能間隔複習演算法 (spacedRepetition.ts) - 基於Ebbinghaus遺忘曲線和SM-2演算法
|
|
||||||
- 複習系統Pinia Store (review.ts) - 狀態管理和數據分析
|
|
||||||
- 智能複習主頁面 (VocabularyReviewMain.vue) - Page_Vocab_Review_Main_W實現
|
|
||||||
- 個人化學習計劃生成 - 7天智能排程系統
|
|
||||||
- 薄弱點自動識別 - 基於錯誤模式分析
|
|
||||||
- 自適應難度調整 - 根據表現動態調整間隔
|
|
||||||
- 學習效率分析 - 趨勢追蹤和改善建議
|
|
||||||
- 學習連勝和動機系統 - 遊戲化元素
|
|
||||||
- 複習提醒和設定系統 - 個人化配置
|
|
||||||
|
|
||||||
- [ ] 🔧 **Web端特色功能整合** - 多標籤學習、書籤整合、PWA支援 (32小時)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: function-specs定義的Web端獨有功能
|
|
||||||
|
|
||||||
### 📝 一般任務
|
|
||||||
- [ ] 🧪 **測試框架建立和測試撰寫** - Vitest + Vue Test Utils,覆蓋率>80% (24小時)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: 單元測試、集成測試、HTML原型視覺回歸測試
|
|
||||||
- 📋 合規基礎: vue-development-standards.md測試規範
|
|
||||||
|
|
||||||
- [ ] 🔗 **後端API設計和開發** - 詞彙服務、練習記錄、進度追蹤API (48小時)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: RESTful API、資料模型實現、音頻服務整合
|
|
||||||
|
|
||||||
- [ ] 📦 **PWA功能實現和部署優化** - Service Worker、離線支援、Vite打包優化 (24小時)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: Quasar PWA plugin、離線模式、效能優化
|
|
||||||
|
|
||||||
- [ ] 📋 **規格合規驗收和品質保證** - 所有specification文檔對照檢查 (16小時)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- 🎯 關鍵: HTML原型像素級檢查、function-specs功能完整性
|
|
||||||
- 📋 驗收標準: 視覺還原度100%、功能實現率100%
|
|
||||||
|
|
||||||
### 💡 未來想法
|
|
||||||
- [ ] 📱 **移動端適配** - 響應式設計優化和觸控操作支援
|
|
||||||
- [ ] 🤖 **AI學習建議** - 個人化學習路徑推薦和薄弱點分析
|
|
||||||
- [ ] 🌐 **多語言支援** - 界面國際化和多語言詞彙庫
|
|
||||||
- [ ] 📈 **進階分析** - 學習模式識別和效率優化建議
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 快速統計
|
|
||||||
|
|
||||||
**當前狀態**:
|
|
||||||
- 🔥 緊急: 2個任務 (基礎架構 + 詞彙介紹頁面)
|
|
||||||
- ⚠️ 重要: 4個任務 (練習系統 + 分析儀表板 + 複習系統)
|
|
||||||
- 📝 一般: 4個任務 (測試 + 後端API + PWA + 品質保證)
|
|
||||||
- 💡 想法: 4個任務 (未來擴展功能)
|
|
||||||
|
|
||||||
**預估工作量**: 320小時 (約6-8週,3-4人團隊)
|
|
||||||
**規格基礎**: 嚴格基於HTML原型 + function-specs + vue-architecture
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📚 已完成任務
|
|
||||||
|
|
||||||
### 2025-09-10 完成
|
|
||||||
- [x] 📋 **詞彙學習開發計劃重新生成** - 嚴格基於specification文檔,避免AI偏離 ✅ (2025-09-10)
|
|
||||||
- ✨ 完成功能: 基於4個docs文檔重新生成開發計劃
|
|
||||||
- 📋 合規基礎: vocabulary.html + vocabulary-learning-web.md + vue-frontend-architecture.md + vue-development-standards.md
|
|
||||||
- 🎯 關鍵改進: 像素級HTML原型對照、規格合規檢查機制、技術選型100%遵循架構文檔
|
|
||||||
- 📄 成果: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- [x] 🔧 **修正dl工具路徑設定** - 工具腳本路徑過時,./dl issue指令失敗 🔄
|
|
||||||
- 📄 問題: TOOLS_DIR設為 "$SCRIPT_DIR/tools" 但實際在 "sop/tools/"
|
|
||||||
- 🎯 目標: 修正路徑設定,確保所有dl指令正常運作
|
|
||||||
- ⚠️ 發現: issue.sh腳本仍使用舊的ISSUES.md系統,需要更新到TASKS.md
|
|
||||||
|
|
||||||
- [x] 🔧 **系統性SOP一致性檢查和修正** - 全面檢查所有工具與SOP的一致性,建立防護機制 ✅ (2025-09-10)
|
|
||||||
- ✨ 完成功能:
|
|
||||||
- 修正dl工具TOOLS_DIR路徑問題
|
|
||||||
- 修正create_report.sh的sed語法錯誤
|
|
||||||
- 建立正確報告工具目錄結構
|
|
||||||
- 建立SOP一致性檢查腳本 (sop/scripts/sop_consistency_check.sh)
|
|
||||||
- 修正報告模板中的ISSUES.md引用
|
|
||||||
- 📊 發現問題: 15個工具腳本仍使用過時的ISSUES.md/PROJECTS.md系統
|
|
||||||
- 🎯 建立防護: 自動化檢查機制可偵測工具與SOP不一致
|
|
||||||
|
|
||||||
|
|
||||||
- [x] ✅ **清空過時任務列表** - 重置任務管理系統,準備新的任務規劃 ✅ (2025-09-10)
|
|
||||||
|
|
||||||
- [x] 🔧 **SOP改善 - AI開發計劃生成規範標準化** - 建立強制性docs約束機制,避免AI偏離既有規格 ✅ (2025-09-10)
|
|
||||||
- ✨ 完成功能: 更新CLAUDE.md v4.1,新增開發計劃生成標準流程、三階段驗證機制、檢查清單
|
|
||||||
- 📄 分析報告: [AI開發計劃SOP改善分析](sop/reports/analysis/2025-09-10_ai-development-plan-sop-improvement.md)
|
|
||||||
- 🎯 解決問題: vocabulary-learning-web-development-plan.md 偏離docs規範,建立系統性防護機制
|
|
||||||
|
|
||||||
- [x] 🔧 **系統性SOP一致性檢查和修正** - 全面檢查所有工具與SOP的一致性,建立防護機制 ✅ (2025-09-10)
|
|
||||||
- ✨ 完成功能:
|
|
||||||
- 修正dl工具TOOLS_DIR路徑問題
|
|
||||||
- 修正create_report.sh的sed語法錯誤
|
|
||||||
- 建立正確報告工具目錄結構
|
|
||||||
- 建立SOP一致性檢查腳本 (sop/scripts/sop_consistency_check.sh)
|
|
||||||
- 修正報告模板中的ISSUES.md引用
|
|
||||||
- **新增**: 檢查腳本自動生成詳細log到 sop/reports/logs/ (區分檢查log與分析報告)
|
|
||||||
- 📊 發現問題: 15個工具腳本仍使用過時的ISSUES.md/PROJECTS.md系統
|
|
||||||
- 🎯 建立防護: 自動化檢查機制可偵測工具與SOP不一致,並生成正式檢查log
|
|
||||||
- 📄 詳細分析: [SOP工具系統全面重構分析](sop/reports/analysis/2025-09-10_sop-tools-system-overhaul.md)
|
|
||||||
- 📄 檢查log範例: [SOP一致性檢查log](sop/reports/logs/2025-09-10_sop-consistency-check-120656.md)
|
|
||||||
|
|
||||||
- [x] 🏗️ **FE Vue專案基礎架構建立** - Vue 3 + Quasar詞彙學習Web版專案初始化 ✅ (2025-09-10)
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
- [x] 🎨 **FE Vue詞彙介紹頁面開發** - 基於Quasar的核心學習頁面,Web Audio API和快捷鍵支援 ✅ (2025-09-09)
|
|
||||||
- ✨ 完成功能: 完整詞彙介紹界面、Web Audio API整合、快捷鍵系統、Composable架構
|
|
||||||
- 📄 參考: [詞彙學習Web開發規劃](projects/vocabulary-learning-web-development-plan.md)
|
|
||||||
|
|
||||||
- [x] 🔑 **修復登入系統** - 解決登入流程問題,確保用戶能順利進入詞彙學習頁面 ✅ (2025-09-09)
|
|
||||||
- ✨ 完成功能: 開發模式測試登入、路由守護、認證狀態管理、UI提示系統
|
|
||||||
- 🧪 測試帳戶: test@dramaling.com / test123
|
|
||||||
- 🎯 快速入口: 首頁「測試登入」按鈕或登入頁「快速填入」功能
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🛠️ 系統使用指南
|
|
||||||
|
|
||||||
### 查看任務
|
|
||||||
```bash
|
|
||||||
./dl task # 打開此任務管理文件
|
|
||||||
./dl status # 查看任務統計
|
|
||||||
./dl list # 快速查看待辦清單
|
|
||||||
```
|
|
||||||
|
|
||||||
### 工作模式
|
|
||||||
1. **討論階段**: 與Claude自由討論需求和想法
|
|
||||||
2. **記錄階段**: Claude自動記錄任務到此系統,並創建對應專案詳細文檔
|
|
||||||
3. **執行階段**: 查看此文件選擇任務批量執行
|
|
||||||
4. **完成階段**: 標記任務完成 [x],任務自動移至已完成區域
|
|
||||||
|
|
||||||
### 任務格式說明
|
|
||||||
```markdown
|
|
||||||
- [ ] 🎯 **任務名稱** - 簡短描述 (預估時間)
|
|
||||||
- 📄 參考: [專案詳細文檔](projects/project-name.md)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**建立日期**: 2025-09-09
|
|
||||||
**最後更新**: 2025-09-10 (重新生成規格合規的詞彙學習開發任務)
|
|
||||||
**維護者**: Claude Code & Drama Ling Team
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 專案任務說明
|
|
||||||
|
|
||||||
### 詞彙學習功能 (Web版) 開發專案
|
|
||||||
|
|
||||||
本專案基於完整的開發規劃,按照8週開發週期分階段執行:
|
|
||||||
|
|
||||||
**第一階段 (緊急)**: 專案基礎架構 + 核心學習頁面
|
|
||||||
**第二階段 (重要)**: 練習系統 + 數據分析功能
|
|
||||||
**第三階段 (一般)**: 整合優化 + 後端API開發
|
|
||||||
**第四階段 (想法)**: 未來擴展功能規劃
|
|
||||||
|
|
||||||
**技術棧**: Vue 3 + Quasar Framework + Pinia + Web Audio API + PWA
|
|
||||||
**團隊配置**: 前端2人 + 後端1-2人 + 可選DevOps
|
|
||||||
**關鍵特色**: 快捷鍵操作、多標籤學習、Markdown筆記、Vue-ECharts分析
|
|
||||||
|
|
||||||
詳細技術規格和開發時程請參考專案規劃文檔。
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
# Drama Ling Applications
|
|
||||||
|
|
||||||
本目錄包含 Drama Ling 專案的所有應用程式。
|
|
||||||
|
|
||||||
## 應用程式架構
|
|
||||||
|
|
||||||
```
|
|
||||||
apps/
|
|
||||||
├── web/ # Vue.js Web 前端應用
|
|
||||||
├── mobile/ # Flutter 移動端應用
|
|
||||||
└── backend/ # .NET Core 後端 API
|
|
||||||
```
|
|
||||||
|
|
||||||
## 開發狀態
|
|
||||||
|
|
||||||
| 應用程式 | 狀態 | 技術棧 | 說明 |
|
|
||||||
|---------|------|--------|------|
|
|
||||||
| Web | ✅ 開發中 | Vue.js + Quasar | Web 前端界面 |
|
|
||||||
| Mobile | ✅ 開發中 | Flutter + Riverpod | 跨平台移動應用 |
|
|
||||||
| Backend | ✅ 開發中 | .NET Core + EF Core | REST API 服務 |
|
|
||||||
|
|
||||||
## 開發指南
|
|
||||||
|
|
||||||
各應用程式的詳細開發文檔請參考:
|
|
||||||
- 技術文檔:`../docs/04_technical/`
|
|
||||||
- 專案規格:`../projects/`
|
|
||||||
- 任務管理:`../TASKS.md`
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace DramaLing.API.Controllers;
|
|
||||||
|
|
||||||
[ApiController]
|
|
||||||
[Route("api/[controller]")]
|
|
||||||
public class HealthController : ControllerBase
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 健康檢查端點
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>服務健康狀態</returns>
|
|
||||||
[HttpGet]
|
|
||||||
public IActionResult GetHealth()
|
|
||||||
{
|
|
||||||
var response = new
|
|
||||||
{
|
|
||||||
Status = "Healthy",
|
|
||||||
Timestamp = DateTime.UtcNow,
|
|
||||||
Version = "1.0.0",
|
|
||||||
Service = "Drama Ling API"
|
|
||||||
};
|
|
||||||
|
|
||||||
return Ok(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 詳細健康檢查
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>詳細的系統狀態</returns>
|
|
||||||
[HttpGet("detailed")]
|
|
||||||
public IActionResult GetDetailedHealth()
|
|
||||||
{
|
|
||||||
var response = new
|
|
||||||
{
|
|
||||||
Status = "Healthy",
|
|
||||||
Timestamp = DateTime.UtcNow,
|
|
||||||
Version = "1.0.0",
|
|
||||||
Service = "Drama Ling API",
|
|
||||||
Environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production",
|
|
||||||
Uptime = Environment.TickCount64,
|
|
||||||
Database = "Connected", // TODO: 實際檢查資料庫連線
|
|
||||||
Cache = "Connected", // TODO: 實際檢查Redis連線
|
|
||||||
Memory = new
|
|
||||||
{
|
|
||||||
WorkingSet = GC.GetTotalMemory(false),
|
|
||||||
GcCollections = new
|
|
||||||
{
|
|
||||||
Gen0 = GC.CollectionCount(0),
|
|
||||||
Gen1 = GC.CollectionCount(1),
|
|
||||||
Gen2 = GC.CollectionCount(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return Ok(response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
# Development Dockerfile for .NET API
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
# Copy project files
|
|
||||||
COPY ["DramaLing.API/DramaLing.API.csproj", "DramaLing.API/"]
|
|
||||||
COPY ["DramaLing.Application/DramaLing.Application.csproj", "DramaLing.Application/"]
|
|
||||||
COPY ["DramaLing.Core/DramaLing.Core.csproj", "DramaLing.Core/"]
|
|
||||||
COPY ["DramaLing.Infrastructure/DramaLing.Infrastructure.csproj", "DramaLing.Infrastructure/"]
|
|
||||||
|
|
||||||
# Restore dependencies
|
|
||||||
RUN dotnet restore "DramaLing.API/DramaLing.API.csproj"
|
|
||||||
|
|
||||||
# Copy source code
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build the application
|
|
||||||
WORKDIR "/src/DramaLing.API"
|
|
||||||
RUN dotnet build "DramaLing.API.csproj" -c Release -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
|
||||||
RUN dotnet publish "DramaLing.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
||||||
|
|
||||||
FROM base AS final
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
|
|
||||||
# Create logs directory
|
|
||||||
RUN mkdir -p /app/logs
|
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "DramaLing.API.dll"]
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<DocumentationFile>bin\Debug\net8.0\DramaLing.API.xml</DocumentationFile>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
|
||||||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\DramaLing.Application\DramaLing.Application.csproj" />
|
|
||||||
<ProjectReference Include="..\DramaLing.Infrastructure\DramaLing.Infrastructure.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
||||||
using DramaLing.Application;
|
|
||||||
using DramaLing.Infrastructure;
|
|
||||||
using Microsoft.OpenApi.Models;
|
|
||||||
using Serilog;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
|
||||||
|
|
||||||
// Configure Serilog
|
|
||||||
Log.Logger = new LoggerConfiguration()
|
|
||||||
.ReadFrom.Configuration(builder.Configuration)
|
|
||||||
.CreateLogger();
|
|
||||||
|
|
||||||
builder.Host.UseSerilog();
|
|
||||||
|
|
||||||
// Add services to the container.
|
|
||||||
builder.Services.AddApplication();
|
|
||||||
builder.Services.AddInfrastructure(builder.Configuration);
|
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
|
||||||
|
|
||||||
// Configure Swagger/OpenAPI
|
|
||||||
builder.Services.AddSwaggerGen(c =>
|
|
||||||
{
|
|
||||||
c.SwaggerDoc("v1", new OpenApiInfo
|
|
||||||
{
|
|
||||||
Title = "Drama Ling API",
|
|
||||||
Version = "v1",
|
|
||||||
Description = "API for Drama Ling language learning application",
|
|
||||||
Contact = new OpenApiContact
|
|
||||||
{
|
|
||||||
Name = "Drama Ling Team",
|
|
||||||
Email = "dev@dramaling.com"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Configure JWT authentication in Swagger
|
|
||||||
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
|
|
||||||
{
|
|
||||||
Description = "JWT Authorization header using the Bearer scheme. Example: \"Bearer {token}\"",
|
|
||||||
Name = "Authorization",
|
|
||||||
In = ParameterLocation.Header,
|
|
||||||
Type = SecuritySchemeType.ApiKey,
|
|
||||||
Scheme = "Bearer"
|
|
||||||
});
|
|
||||||
|
|
||||||
c.AddSecurityRequirement(new OpenApiSecurityRequirement
|
|
||||||
{
|
|
||||||
{
|
|
||||||
new OpenApiSecurityScheme
|
|
||||||
{
|
|
||||||
Reference = new OpenApiReference
|
|
||||||
{
|
|
||||||
Type = ReferenceType.SecurityScheme,
|
|
||||||
Id = "Bearer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Array.Empty<string>()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Include XML comments
|
|
||||||
var xmlFile = Path.Combine(AppContext.BaseDirectory, "DramaLing.API.xml");
|
|
||||||
if (File.Exists(xmlFile))
|
|
||||||
{
|
|
||||||
c.IncludeXmlComments(xmlFile);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Configure CORS
|
|
||||||
builder.Services.AddCors(options =>
|
|
||||||
{
|
|
||||||
options.AddPolicy("DramaLingPolicy", policy =>
|
|
||||||
{
|
|
||||||
policy.AllowAnyOrigin()
|
|
||||||
.AllowAnyMethod()
|
|
||||||
.AllowAnyHeader();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var app = builder.Build();
|
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
|
||||||
if (app.Environment.IsDevelopment())
|
|
||||||
{
|
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI(c =>
|
|
||||||
{
|
|
||||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Drama Ling API v1");
|
|
||||||
c.RoutePrefix = string.Empty; // Serve Swagger UI at the app's root
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
|
||||||
app.UseCors("DramaLingPolicy");
|
|
||||||
|
|
||||||
app.UseAuthentication();
|
|
||||||
app.UseAuthorization();
|
|
||||||
|
|
||||||
app.MapControllers();
|
|
||||||
|
|
||||||
app.MapGet("/health", () => new { Status = "Healthy", Timestamp = DateTime.UtcNow });
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Log.Information("Starting Drama Ling API");
|
|
||||||
app.Run();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Log.Fatal(ex, "Application terminated unexpectedly");
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
Log.CloseAndFlush();
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning",
|
|
||||||
"Microsoft.EntityFrameworkCore.Database.Command": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"DefaultConnection": "Host=localhost;Port=5432;Database=dramaling_dev;Username=postgres;Password=password"
|
|
||||||
},
|
|
||||||
"JwtSettings": {
|
|
||||||
"Key": "development-key-256-bits-long-for-jwt-signing-purpose-only",
|
|
||||||
"Issuer": "DramaLingAPI-Dev",
|
|
||||||
"Audience": "DramaLingUsers-Dev",
|
|
||||||
"DurationInMinutes": 1440
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Serilog": {
|
|
||||||
"Using": ["Serilog.Sinks.Console", "Serilog.Sinks.File"],
|
|
||||||
"MinimumLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Override": {
|
|
||||||
"Microsoft": "Warning",
|
|
||||||
"System": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "Console",
|
|
||||||
"Args": {
|
|
||||||
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "logs/dramaling-.txt",
|
|
||||||
"rollingInterval": "Day",
|
|
||||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"DefaultConnection": "Host=localhost;Port=5432;Database=dramaling_dev;Username=postgres;Password=password"
|
|
||||||
},
|
|
||||||
"JwtSettings": {
|
|
||||||
"Key": "your-256-bit-secret-key-here-must-be-at-least-32-characters",
|
|
||||||
"Issuer": "DramaLingAPI",
|
|
||||||
"Audience": "DramaLingUsers",
|
|
||||||
"DurationInMinutes": 60
|
|
||||||
},
|
|
||||||
"OpenAI": {
|
|
||||||
"ApiKey": "your-openai-api-key-here",
|
|
||||||
"Model": "gpt-4o-mini",
|
|
||||||
"MaxTokens": 1000,
|
|
||||||
"Temperature": 0.7
|
|
||||||
},
|
|
||||||
"Redis": {
|
|
||||||
"ConnectionString": "localhost:6379"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace DramaLing.Application;
|
|
||||||
|
|
||||||
public static class DependencyInjection
|
|
||||||
{
|
|
||||||
public static IServiceCollection AddApplication(this IServiceCollection services)
|
|
||||||
{
|
|
||||||
services.AddMediatR(cfg =>
|
|
||||||
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()));
|
|
||||||
|
|
||||||
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
|
||||||
|
|
||||||
return services;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
|
||||||
<PackageReference Include="FluentValidation" Version="11.8.0" />
|
|
||||||
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\DramaLing.Core\DramaLing.Core.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
namespace DramaLing.Core.Entities;
|
|
||||||
|
|
||||||
public abstract class BaseEntity
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; } = Guid.NewGuid();
|
|
||||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public bool IsDeleted { get; set; } = false;
|
|
||||||
}
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
using DramaLing.Core.Enums;
|
|
||||||
|
|
||||||
namespace DramaLing.Core.Entities;
|
|
||||||
|
|
||||||
public class Achievement : BaseEntity
|
|
||||||
{
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public string IconUrl { get; set; } = string.Empty;
|
|
||||||
public AchievementType Type { get; set; }
|
|
||||||
public int DiamondReward { get; set; } = 0;
|
|
||||||
public int ExperienceReward { get; set; } = 0;
|
|
||||||
public string? BadgeUrl { get; set; }
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual ICollection<UserAchievement> UserAchievements { get; set; } = new List<UserAchievement>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class UserAchievement : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public Guid AchievementId { get; set; }
|
|
||||||
public DateTime AchievedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public bool IsRewardClaimed { get; set; } = false;
|
|
||||||
public DateTime? RewardClaimedAt { get; set; }
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
public virtual Achievement Achievement { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DailyMission : BaseEntity
|
|
||||||
{
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public string IconUrl { get; set; } = string.Empty;
|
|
||||||
public string Type { get; set; } = string.Empty; // vocabulary_recognition, dialogue_training, etc.
|
|
||||||
public int TargetValue { get; set; } = 1;
|
|
||||||
public string Unit { get; set; } = "次";
|
|
||||||
public int ExperienceReward { get; set; } = 50;
|
|
||||||
public int DiamondReward { get; set; } = 0;
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual ICollection<UserDailyMission> UserDailyMissions { get; set; } = new List<UserDailyMission>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class UserDailyMission : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public Guid DailyMissionId { get; set; }
|
|
||||||
public DateTime MissionDate { get; set; }
|
|
||||||
public int CurrentValue { get; set; } = 0;
|
|
||||||
public int TargetValue { get; set; } = 1;
|
|
||||||
public bool IsCompleted { get; set; } = false;
|
|
||||||
public DateTime? CompletedAt { get; set; }
|
|
||||||
public bool IsRewardClaimed { get; set; } = false;
|
|
||||||
public DateTime? RewardClaimedAt { get; set; }
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
public virtual DailyMission DailyMission { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TimeWarpChallenge : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public Guid ScenarioId { get; set; }
|
|
||||||
public DateTime StartedAt { get; set; }
|
|
||||||
public DateTime? CompletedAt { get; set; }
|
|
||||||
public int TimeLimit { get; set; } = 300; // seconds
|
|
||||||
public int TimeUsed { get; set; } = 0; // seconds
|
|
||||||
public bool IsCompleted { get; set; } = false;
|
|
||||||
public int Score { get; set; } = 0;
|
|
||||||
public int ExperienceGained { get; set; } = 0;
|
|
||||||
public int DiamondGained { get; set; } = 0;
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
public virtual Scenario Scenario { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class UserLifePoint : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public int CurrentLifePoints { get; set; } = 5;
|
|
||||||
public int MaxLifePoints { get; set; } = 5;
|
|
||||||
public DateTime? NextRecoveryAt { get; set; }
|
|
||||||
public DateTime? LastUsedAt { get; set; }
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
namespace DramaLing.Core.Entities;
|
|
||||||
|
|
||||||
public class LearningStage : BaseEntity
|
|
||||||
{
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public int Order { get; set; }
|
|
||||||
public string Level { get; set; } = string.Empty; // A1, A2, B1, etc.
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual ICollection<Scenario> Scenarios { get; set; } = new List<Scenario>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Scenario : BaseEntity
|
|
||||||
{
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public string Context { get; set; } = string.Empty;
|
|
||||||
public string Objective { get; set; } = string.Empty;
|
|
||||||
public string Level { get; set; } = string.Empty;
|
|
||||||
public int EstimatedMinutes { get; set; }
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
|
|
||||||
// Foreign Key
|
|
||||||
public Guid LearningStageId { get; set; }
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual LearningStage LearningStage { get; set; } = null!;
|
|
||||||
public virtual ICollection<Vocabulary> TargetVocabularies { get; set; } = new List<Vocabulary>();
|
|
||||||
public virtual ICollection<UserProgress> UserProgresses { get; set; } = new List<UserProgress>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Vocabulary : BaseEntity
|
|
||||||
{
|
|
||||||
public string Word { get; set; } = string.Empty;
|
|
||||||
public string Translation { get; set; } = string.Empty;
|
|
||||||
public string Pronunciation { get; set; } = string.Empty;
|
|
||||||
public string Definition { get; set; } = string.Empty;
|
|
||||||
public string ExampleSentence { get; set; } = string.Empty;
|
|
||||||
public string Level { get; set; } = string.Empty;
|
|
||||||
public string Category { get; set; } = string.Empty;
|
|
||||||
public int Frequency { get; set; } = 0; // Word frequency ranking
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual ICollection<Scenario> Scenarios { get; set; } = new List<Scenario>();
|
|
||||||
public virtual ICollection<VocabularyProgress> VocabularyProgresses { get; set; } = new List<VocabularyProgress>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class UserProgress : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public Guid ScenarioId { get; set; }
|
|
||||||
public int Score { get; set; }
|
|
||||||
public int Stars { get; set; } // 0-3 stars
|
|
||||||
public bool IsCompleted { get; set; }
|
|
||||||
public DateTime? CompletedAt { get; set; }
|
|
||||||
public int AttemptCount { get; set; } = 0;
|
|
||||||
public string? FeedbackData { get; set; } // JSON data
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
public virtual Scenario Scenario { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class VocabularyProgress : BaseEntity
|
|
||||||
{
|
|
||||||
public Guid UserId { get; set; }
|
|
||||||
public Guid VocabularyId { get; set; }
|
|
||||||
public int LearningStage { get; set; } = 1; // 1=Recognition, 2=Familiarity, 3=DialogueApplication
|
|
||||||
public int MasteryLevel { get; set; } = 0; // 0-100
|
|
||||||
public DateTime? NextReviewAt { get; set; }
|
|
||||||
public int ReviewCount { get; set; } = 0;
|
|
||||||
public int CorrectCount { get; set; } = 0;
|
|
||||||
public int IncorrectCount { get; set; } = 0;
|
|
||||||
public DateTime? LastReviewedAt { get; set; }
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual User User { get; set; } = null!;
|
|
||||||
public virtual Vocabulary Vocabulary { get; set; } = null!;
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
using Microsoft.AspNetCore.Identity;
|
|
||||||
|
|
||||||
namespace DramaLing.Core.Entities;
|
|
||||||
|
|
||||||
public class User : IdentityUser<Guid>
|
|
||||||
{
|
|
||||||
public string DisplayName { get; set; } = string.Empty;
|
|
||||||
public string? AvatarUrl { get; set; }
|
|
||||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
||||||
public DateTime? LastLoginAt { get; set; }
|
|
||||||
public bool IsDeleted { get; set; } = false;
|
|
||||||
|
|
||||||
// Language Learning Properties
|
|
||||||
public string CurrentLanguage { get; set; } = "en"; // ISO 639-1 code
|
|
||||||
public string NativeLanguage { get; set; } = "zh"; // ISO 639-1 code
|
|
||||||
public string CurrentLevel { get; set; } = "A1"; // CEFR level
|
|
||||||
public int TotalExperience { get; set; } = 0;
|
|
||||||
public int Diamonds { get; set; } = 0;
|
|
||||||
public int LightningEnergy { get; set; } = 0;
|
|
||||||
public int LifePoints { get; set; } = 5;
|
|
||||||
public int MaxLifePoints { get; set; } = 5;
|
|
||||||
public DateTime? NextLifePointRecovery { get; set; }
|
|
||||||
|
|
||||||
// Subscription
|
|
||||||
public bool IsVipUser { get; set; } = false;
|
|
||||||
public DateTime? VipExpiresAt { get; set; }
|
|
||||||
|
|
||||||
// Learning Statistics
|
|
||||||
public int ConsecutiveDays { get; set; } = 0;
|
|
||||||
public DateTime? LastLearningDate { get; set; }
|
|
||||||
public int TotalDialoguesCompleted { get; set; } = 0;
|
|
||||||
public int TotalVocabularyMastered { get; set; } = 0;
|
|
||||||
|
|
||||||
// Navigation Properties
|
|
||||||
public virtual ICollection<UserProgress> UserProgresses { get; set; } = new List<UserProgress>();
|
|
||||||
public virtual ICollection<UserAchievement> UserAchievements { get; set; } = new List<UserAchievement>();
|
|
||||||
public virtual ICollection<VocabularyProgress> VocabularyProgresses { get; set; } = new List<VocabularyProgress>();
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
namespace DramaLing.Core.Enums;
|
|
||||||
|
|
||||||
public enum LearningStage
|
|
||||||
{
|
|
||||||
Recognition = 1, // 詞彙認識
|
|
||||||
Familiarity = 2, // 詞彙熟悉
|
|
||||||
DialogueApplication = 3 // 對話應用
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum DifficultyLevel
|
|
||||||
{
|
|
||||||
A1 = 1,
|
|
||||||
A2 = 2,
|
|
||||||
B1 = 3,
|
|
||||||
B2 = 4,
|
|
||||||
C1 = 5,
|
|
||||||
C2 = 6
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum AchievementType
|
|
||||||
{
|
|
||||||
PassReward = 1, // 過關獎勵
|
|
||||||
PerfectGrammar = 2, // 完美語法
|
|
||||||
FluentExpression = 3, // 表達流利
|
|
||||||
StoryMaster = 4, // 劇情大師
|
|
||||||
VocabularyExpert = 5, // 詞彙專家
|
|
||||||
PerfectDialogue = 6, // 完美對話
|
|
||||||
SmartLearner = 7, // 智慧學習者
|
|
||||||
IndependentProgress = 8, // 獨立進步
|
|
||||||
TranslationMaster = 9 // 翻譯達人
|
|
||||||
}
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
using DramaLing.Core.Entities;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
|
||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
namespace DramaLing.Infrastructure.Data;
|
|
||||||
|
|
||||||
public class ApplicationDbContext : IdentityDbContext<User, IdentityRole<Guid>, Guid>
|
|
||||||
{
|
|
||||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Learning Content
|
|
||||||
public DbSet<LearningStage> LearningStages { get; set; }
|
|
||||||
public DbSet<Scenario> Scenarios { get; set; }
|
|
||||||
public DbSet<Vocabulary> Vocabularies { get; set; }
|
|
||||||
|
|
||||||
// User Progress
|
|
||||||
public DbSet<UserProgress> UserProgresses { get; set; }
|
|
||||||
public DbSet<VocabularyProgress> VocabularyProgresses { get; set; }
|
|
||||||
|
|
||||||
// Gamification
|
|
||||||
public DbSet<Achievement> Achievements { get; set; }
|
|
||||||
public DbSet<UserAchievement> UserAchievements { get; set; }
|
|
||||||
public DbSet<DailyMission> DailyMissions { get; set; }
|
|
||||||
public DbSet<UserDailyMission> UserDailyMissions { get; set; }
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder builder)
|
|
||||||
{
|
|
||||||
base.OnModelCreating(builder);
|
|
||||||
|
|
||||||
// Configure Identity tables to use Guid
|
|
||||||
builder.Entity<User>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("Users");
|
|
||||||
entity.HasKey(e => e.Id);
|
|
||||||
|
|
||||||
// Configure indexes
|
|
||||||
entity.HasIndex(e => e.Email).IsUnique();
|
|
||||||
entity.HasIndex(e => e.UserName).IsUnique();
|
|
||||||
|
|
||||||
// Configure properties
|
|
||||||
entity.Property(e => e.DisplayName).HasMaxLength(100).IsRequired();
|
|
||||||
entity.Property(e => e.CurrentLanguage).HasMaxLength(5).IsRequired();
|
|
||||||
entity.Property(e => e.NativeLanguage).HasMaxLength(5).IsRequired();
|
|
||||||
entity.Property(e => e.CurrentLevel).HasMaxLength(5).IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityRole<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("Roles");
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityUserRole<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("UserRoles");
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityUserClaim<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("UserClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityUserLogin<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("UserLogins");
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityRoleClaim<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("RoleClaims");
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Entity<IdentityUserToken<Guid>>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("UserTokens");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Configure soft delete
|
|
||||||
builder.Entity<User>()
|
|
||||||
.HasQueryFilter(e => !e.IsDeleted);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
|
|
||||||
{
|
|
||||||
foreach (var entry in ChangeTracker.Entries<BaseEntity>())
|
|
||||||
{
|
|
||||||
switch (entry.State)
|
|
||||||
{
|
|
||||||
case EntityState.Modified:
|
|
||||||
entry.Entity.UpdatedAt = DateTime.UtcNow;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return await base.SaveChangesAsync(cancellationToken);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
using DramaLing.Core.Entities;
|
|
||||||
using DramaLing.Infrastructure.Data;
|
|
||||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.IdentityModel.Tokens;
|
|
||||||
using StackExchange.Redis;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace DramaLing.Infrastructure;
|
|
||||||
|
|
||||||
public static class DependencyInjection
|
|
||||||
{
|
|
||||||
public static IServiceCollection AddInfrastructure(
|
|
||||||
this IServiceCollection services,
|
|
||||||
IConfiguration configuration)
|
|
||||||
{
|
|
||||||
// Database
|
|
||||||
services.AddDbContext<ApplicationDbContext>(options =>
|
|
||||||
options.UseNpgsql(configuration.GetConnectionString("DefaultConnection")));
|
|
||||||
|
|
||||||
// Identity
|
|
||||||
services.AddIdentity<User, IdentityRole<Guid>>(options =>
|
|
||||||
{
|
|
||||||
// Password settings
|
|
||||||
options.Password.RequireDigit = true;
|
|
||||||
options.Password.RequireUppercase = true;
|
|
||||||
options.Password.RequiredLength = 8;
|
|
||||||
options.Password.RequireNonAlphanumeric = false;
|
|
||||||
|
|
||||||
// Lockout settings
|
|
||||||
options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
|
|
||||||
options.Lockout.MaxFailedAccessAttempts = 5;
|
|
||||||
options.Lockout.AllowedForNewUsers = true;
|
|
||||||
|
|
||||||
// User settings
|
|
||||||
options.User.RequireUniqueEmail = true;
|
|
||||||
options.SignIn.RequireConfirmedEmail = false;
|
|
||||||
})
|
|
||||||
.AddEntityFrameworkStores<ApplicationDbContext>()
|
|
||||||
.AddDefaultTokenProviders();
|
|
||||||
|
|
||||||
// JWT Authentication
|
|
||||||
var jwtSettings = configuration.GetSection("JwtSettings");
|
|
||||||
var key = Encoding.ASCII.GetBytes(jwtSettings["Key"] ?? throw new InvalidOperationException("JWT Key not found"));
|
|
||||||
|
|
||||||
services.AddAuthentication(options =>
|
|
||||||
{
|
|
||||||
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
|
||||||
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
|
||||||
})
|
|
||||||
.AddJwtBearer(options =>
|
|
||||||
{
|
|
||||||
options.RequireHttpsMetadata = false;
|
|
||||||
options.SaveToken = true;
|
|
||||||
options.TokenValidationParameters = new TokenValidationParameters
|
|
||||||
{
|
|
||||||
ValidateIssuerSigningKey = true,
|
|
||||||
IssuerSigningKey = new SymmetricSecurityKey(key),
|
|
||||||
ValidateIssuer = true,
|
|
||||||
ValidIssuer = jwtSettings["Issuer"],
|
|
||||||
ValidateAudience = true,
|
|
||||||
ValidAudience = jwtSettings["Audience"],
|
|
||||||
ValidateLifetime = true,
|
|
||||||
ClockSkew = TimeSpan.Zero
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// Redis
|
|
||||||
var redisConnection = configuration.GetConnectionString("Redis");
|
|
||||||
if (!string.IsNullOrEmpty(redisConnection))
|
|
||||||
{
|
|
||||||
services.AddSingleton<IConnectionMultiplexer>(sp =>
|
|
||||||
ConnectionMultiplexer.Connect(redisConnection));
|
|
||||||
}
|
|
||||||
|
|
||||||
return services;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\DramaLing.Core\DramaLing.Core.csproj" />
|
|
||||||
<ProjectReference Include="..\DramaLing.Application\DramaLing.Application.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 17
|
|
||||||
VisualStudioVersion = 17.0.31903.59
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DramaLing.API", "DramaLing.API\DramaLing.API.csproj", "{8A7E8B45-1234-4567-8901-234567890123}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DramaLing.Core", "DramaLing.Core\DramaLing.Core.csproj", "{8A7E8B45-1234-4567-8901-234567890124}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DramaLing.Infrastructure", "DramaLing.Infrastructure\DramaLing.Infrastructure.csproj", "{8A7E8B45-1234-4567-8901-234567890125}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DramaLing.Application", "DramaLing.Application\DramaLing.Application.csproj", "{8A7E8B45-1234-4567-8901-234567890126}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DramaLing.Tests", "DramaLing.Tests\DramaLing.Tests.csproj", "{8A7E8B45-1234-4567-8901-234567890127}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890123}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890123}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890123}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890124}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890124}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890124}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890125}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890125}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890125}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890126}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890126}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890126}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890126}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890127}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890127}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8A7E8B45-1234-4567-8901-234567890127}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {12345678-1234-5678-9012-123456789012}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
# Drama Ling Backend API
|
|
||||||
|
|
||||||
.NET Core 後端 API 服務
|
|
||||||
|
|
||||||
## 技術棧
|
|
||||||
- **.NET 8**: 跨平台框架
|
|
||||||
- **ASP.NET Core Web API**: RESTful API
|
|
||||||
- **Entity Framework Core**: ORM 資料庫存取
|
|
||||||
- **PostgreSQL**: 主要資料庫
|
|
||||||
- **Redis**: 快取和會話管理
|
|
||||||
- **JWT**: 身份驗證
|
|
||||||
|
|
||||||
## 專案結構
|
|
||||||
```
|
|
||||||
backend/
|
|
||||||
├── DramaLing.API/ # Web API 專案
|
|
||||||
├── DramaLing.Application/ # 應用服務層
|
|
||||||
├── DramaLing.Core/ # 領域模型層
|
|
||||||
├── DramaLing.Infrastructure/ # 基礎設施層
|
|
||||||
├── DramaLing.Tests/ # 測試專案
|
|
||||||
└── DramaLing.sln # 解決方案檔
|
|
||||||
```
|
|
||||||
|
|
||||||
## 快速開始
|
|
||||||
|
|
||||||
### 1. 安裝相依套件
|
|
||||||
```bash
|
|
||||||
dotnet restore
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. 設定資料庫
|
|
||||||
```bash
|
|
||||||
# 建立資料庫
|
|
||||||
dotnet ef database update --project DramaLing.Infrastructure --startup-project DramaLing.API
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 啟動開發服務器
|
|
||||||
```bash
|
|
||||||
dotnet run --project DramaLing.API
|
|
||||||
# API: http://localhost:5000
|
|
||||||
# Swagger: http://localhost:5000
|
|
||||||
```
|
|
||||||
|
|
||||||
## 開發指南
|
|
||||||
詳細開發文檔請參考:`../../docs/04_technical/`
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
# Miscellaneous
|
|
||||||
*.class
|
|
||||||
*.log
|
|
||||||
*.pyc
|
|
||||||
*.swp
|
|
||||||
.DS_Store
|
|
||||||
.atom/
|
|
||||||
.build/
|
|
||||||
.buildlog/
|
|
||||||
.history
|
|
||||||
.svn/
|
|
||||||
.swiftpm/
|
|
||||||
migrate_working_dir/
|
|
||||||
|
|
||||||
# IntelliJ related
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
*.iws
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
# The .vscode folder contains launch configuration and tasks you configure in
|
|
||||||
# VS Code which you may wish to be included in version control, so this line
|
|
||||||
# is commented out by default.
|
|
||||||
#.vscode/
|
|
||||||
|
|
||||||
# Flutter/Dart/Pub related
|
|
||||||
**/doc/api/
|
|
||||||
**/ios/Flutter/.last_build_id
|
|
||||||
.dart_tool/
|
|
||||||
.flutter-plugins-dependencies
|
|
||||||
.pub-cache/
|
|
||||||
.pub/
|
|
||||||
/build/
|
|
||||||
/coverage/
|
|
||||||
|
|
||||||
# Symbolication related
|
|
||||||
app.*.symbols
|
|
||||||
|
|
||||||
# Obfuscation related
|
|
||||||
app.*.map.json
|
|
||||||
|
|
||||||
# Android Studio will place build artifacts here
|
|
||||||
/android/app/debug
|
|
||||||
/android/app/profile
|
|
||||||
/android/app/release
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
# This file tracks properties of this Flutter project.
|
|
||||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
|
||||||
#
|
|
||||||
# This file should be version controlled and should not be manually edited.
|
|
||||||
|
|
||||||
version:
|
|
||||||
revision: "a402d9a4376add5bc2d6b1e33e53edaae58c07f8"
|
|
||||||
channel: "stable"
|
|
||||||
|
|
||||||
project_type: app
|
|
||||||
|
|
||||||
# Tracks metadata for the flutter migrate command
|
|
||||||
migration:
|
|
||||||
platforms:
|
|
||||||
- platform: root
|
|
||||||
create_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
base_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
- platform: android
|
|
||||||
create_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
base_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
- platform: ios
|
|
||||||
create_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
base_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
|
|
||||||
|
|
||||||
# User provided section
|
|
||||||
|
|
||||||
# List of Local paths (relative to this file) that should be
|
|
||||||
# ignored by the migrate tool.
|
|
||||||
#
|
|
||||||
# Files that are not part of the templates will be ignored by default.
|
|
||||||
unmanaged_files:
|
|
||||||
- 'lib/main.dart'
|
|
||||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
# Drama Ling Mobile App
|
|
||||||
|
|
||||||
Flutter 移動端應用程式
|
|
||||||
|
|
||||||
## 技術棧
|
|
||||||
- **Flutter 3.16+**: 跨平台框架
|
|
||||||
- **Dart 3.0+**: 程式語言
|
|
||||||
- **Riverpod**: 狀態管理
|
|
||||||
- **Go Router**: 導航路由
|
|
||||||
- **Dio + Retrofit**: HTTP 客戶端
|
|
||||||
- **Hive**: 本地資料存儲
|
|
||||||
- **Material 3**: UI 設計系統
|
|
||||||
|
|
||||||
## 專案結構
|
|
||||||
```
|
|
||||||
mobile/
|
|
||||||
├── lib/
|
|
||||||
│ ├── core/ # 核心功能 (常數、工具、服務)
|
|
||||||
│ ├── features/ # 功能模組 (認證、學習、對話等)
|
|
||||||
│ └── shared/ # 共用組件 (Widget、模型、Provider)
|
|
||||||
└── pubspec.yaml # Flutter 專案配置
|
|
||||||
```
|
|
||||||
|
|
||||||
## 快速開始
|
|
||||||
|
|
||||||
### 1. 安裝相依套件
|
|
||||||
```bash
|
|
||||||
flutter pub get
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. 程式碼生成
|
|
||||||
```bash
|
|
||||||
dart run build_runner build
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 啟動應用
|
|
||||||
```bash
|
|
||||||
flutter run
|
|
||||||
# 需要模擬器或實體裝置
|
|
||||||
```
|
|
||||||
|
|
||||||
## 開發指南
|
|
||||||
詳細開發文檔請參考:`../../docs/04_technical/`
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
# This file configures the analyzer, which statically analyzes Dart code to
|
|
||||||
# check for errors, warnings, and lints.
|
|
||||||
#
|
|
||||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
||||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
||||||
# invoked from the command line by running `flutter analyze`.
|
|
||||||
|
|
||||||
# The following line activates a set of recommended lints for Flutter apps,
|
|
||||||
# packages, and plugins designed to encourage good coding practices.
|
|
||||||
include: package:flutter_lints/flutter.yaml
|
|
||||||
|
|
||||||
linter:
|
|
||||||
# The lint rules applied to this project can be customized in the
|
|
||||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
||||||
# included above or to enable additional rules. A list of all available lints
|
|
||||||
# and their documentation is published at https://dart.dev/lints.
|
|
||||||
#
|
|
||||||
# Instead of disabling a lint rule for the entire project in the
|
|
||||||
# section below, it can also be suppressed for a single line of code
|
|
||||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
||||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
||||||
# producing the lint.
|
|
||||||
rules:
|
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
|
||||||
|
|
||||||
# Additional information about this file can be found at
|
|
||||||
# https://dart.dev/guides/language/analysis-options
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
gradle-wrapper.jar
|
|
||||||
/.gradle
|
|
||||||
/captures/
|
|
||||||
/gradlew
|
|
||||||
/gradlew.bat
|
|
||||||
/local.properties
|
|
||||||
GeneratedPluginRegistrant.java
|
|
||||||
.cxx/
|
|
||||||
|
|
||||||
# Remember to never publicly share your keystore.
|
|
||||||
# See https://flutter.dev/to/reference-keystore
|
|
||||||
key.properties
|
|
||||||
**/*.keystore
|
|
||||||
**/*.jks
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
plugins {
|
|
||||||
id("com.android.application")
|
|
||||||
id("kotlin-android")
|
|
||||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
||||||
id("dev.flutter.flutter-gradle-plugin")
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace = "com.dramaling.app"
|
|
||||||
compileSdk = flutter.compileSdkVersion
|
|
||||||
ndkVersion = flutter.ndkVersion
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId = "com.dramaling.app"
|
|
||||||
// You can update the following values to match your application needs.
|
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
||||||
minSdk = flutter.minSdkVersion
|
|
||||||
targetSdk = flutter.targetSdkVersion
|
|
||||||
versionCode = flutter.versionCode
|
|
||||||
versionName = flutter.versionName
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
// Signing with debug keys for development
|
|
||||||
// In production, replace with proper signing configuration
|
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
|
||||||
|
|
||||||
// Enable code shrinking, obfuscation, and optimization
|
|
||||||
isMinifyEnabled = true
|
|
||||||
isShrinkResources = true
|
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
||||||
}
|
|
||||||
debug {
|
|
||||||
applicationIdSuffix = ".debug"
|
|
||||||
isDebuggable = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
flutter {
|
|
||||||
source = "../.."
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
# Flutter specific rules
|
|
||||||
-keep class io.flutter.app.** { *; }
|
|
||||||
-keep class io.flutter.plugin.** { *; }
|
|
||||||
-keep class io.flutter.util.** { *; }
|
|
||||||
-keep class io.flutter.view.** { *; }
|
|
||||||
-keep class io.flutter.** { *; }
|
|
||||||
-keep class io.flutter.plugins.** { *; }
|
|
||||||
-dontwarn io.flutter.embedding.**
|
|
||||||
|
|
||||||
# Keep Flutter engine native methods
|
|
||||||
-keep class io.flutter.embedding.engine.FlutterJNI { *; }
|
|
||||||
|
|
||||||
# Audio players plugin
|
|
||||||
-keep class com.ryanheise.just_audio.** { *; }
|
|
||||||
-keep class xyz.luan.audioplayers.** { *; }
|
|
||||||
|
|
||||||
# Network (Dio/Retrofit)
|
|
||||||
-keepattributes Signature
|
|
||||||
-keepattributes *Annotation*
|
|
||||||
-keep class retrofit2.** { *; }
|
|
||||||
-keep class com.google.gson.** { *; }
|
|
||||||
-keepclassmembers,allowobfuscation class * {
|
|
||||||
@com.google.gson.annotations.SerializedName <fields>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Riverpod
|
|
||||||
-keep class * extends com.riverpod.** { *; }
|
|
||||||
|
|
||||||
# Flutter secure storage
|
|
||||||
-keep class com.it_nomads.fluttersecurestorage.** { *; }
|
|
||||||
|
|
||||||
# General Android rules
|
|
||||||
-keepclassmembers class * implements android.os.Parcelable {
|
|
||||||
public static final android.os.Parcelable$Creator CREATOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove logging in release
|
|
||||||
-assumenosideeffects class android.util.Log {
|
|
||||||
public static *** d(...);
|
|
||||||
public static *** v(...);
|
|
||||||
public static *** i(...);
|
|
||||||
}
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- Network permissions -->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
|
|
||||||
<!-- Audio permissions -->
|
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
||||||
|
|
||||||
<!-- Storage permissions -->
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
|
|
||||||
<!-- Optional: Vibrate for user feedback -->
|
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:label="Drama Ling"
|
|
||||||
android:name="${applicationName}"
|
|
||||||
android:icon="@mipmap/ic_launcher">
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:taskAffinity=""
|
|
||||||
android:theme="@style/LaunchTheme"
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
|
||||||
android:hardwareAccelerated="true"
|
|
||||||
android:windowSoftInputMode="adjustResize">
|
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
|
||||||
the Android process has started. This theme is visible to the user
|
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
|
||||||
to determine the Window background behind the Flutter UI. -->
|
|
||||||
<meta-data
|
|
||||||
android:name="io.flutter.embedding.android.NormalTheme"
|
|
||||||
android:resource="@style/NormalTheme"
|
|
||||||
/>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<!-- Don't delete the meta-data below.
|
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
|
||||||
<meta-data
|
|
||||||
android:name="flutterEmbedding"
|
|
||||||
android:value="2" />
|
|
||||||
</application>
|
|
||||||
<!-- Required to query activities that can process text, see:
|
|
||||||
https://developer.android.com/training/package-visibility and
|
|
||||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
|
||||||
|
|
||||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
|
||||||
<queries>
|
|
||||||
<intent>
|
|
||||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
|
||||||
<data android:mimeType="text/plain"/>
|
|
||||||
</intent>
|
|
||||||
</queries>
|
|
||||||
</manifest>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
package com.dramaling.app
|
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
|
||||||
|
|
||||||
class MainActivity : FlutterActivity()
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Modify this file to customize your launch splash screen -->
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:drawable="?android:colorBackground" />
|
|
||||||
|
|
||||||
<!-- You can insert your own image assets here -->
|
|
||||||
<!-- <item>
|
|
||||||
<bitmap
|
|
||||||
android:gravity="center"
|
|
||||||
android:src="@mipmap/launch_image" />
|
|
||||||
</item> -->
|
|
||||||
</layer-list>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Modify this file to customize your launch splash screen -->
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:drawable="@android:color/white" />
|
|
||||||
|
|
||||||
<!-- You can insert your own image assets here -->
|
|
||||||
<!-- <item>
|
|
||||||
<bitmap
|
|
||||||
android:gravity="center"
|
|
||||||
android:src="@mipmap/launch_image" />
|
|
||||||
</item> -->
|
|
||||||
</layer-list>
|
|
||||||
|
Before Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
|
||||||
<!-- Show a splash screen on the activity. Automatically removed when
|
|
||||||
the Flutter engine draws its first frame -->
|
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
||||||
</style>
|
|
||||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
|
||||||
This theme determines the color of the Android Window while your
|
|
||||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
|
||||||
running.
|
|
||||||
|
|
||||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
|
||||||
<item name="android:windowBackground">?android:colorBackground</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
|
||||||
<!-- Show a splash screen on the activity. Automatically removed when
|
|
||||||
the Flutter engine draws its first frame -->
|
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
||||||
</style>
|
|
||||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
|
||||||
This theme determines the color of the Android Window while your
|
|
||||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
|
||||||
running.
|
|
||||||
|
|
||||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
|
||||||
<item name="android:windowBackground">?android:colorBackground</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val newBuildDir: Directory =
|
|
||||||
rootProject.layout.buildDirectory
|
|
||||||
.dir("../../build")
|
|
||||||
.get()
|
|
||||||
rootProject.layout.buildDirectory.value(newBuildDir)
|
|
||||||
|
|
||||||
subprojects {
|
|
||||||
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
|
||||||
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
|
||||||
}
|
|
||||||
subprojects {
|
|
||||||
project.evaluationDependsOn(":app")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register<Delete>("clean") {
|
|
||||||
delete(rootProject.layout.buildDirectory)
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
|
||||||
android.useAndroidX=true
|
|
||||||
android.enableJetifier=true
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
pluginManagement {
|
|
||||||
val flutterSdkPath =
|
|
||||||
run {
|
|
||||||
val properties = java.util.Properties()
|
|
||||||
file("local.properties").inputStream().use { properties.load(it) }
|
|
||||||
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
|
||||||
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
|
||||||
flutterSdkPath
|
|
||||||
}
|
|
||||||
|
|
||||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
|
||||||
id("com.android.application") version "8.9.1" apply false
|
|
||||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
include(":app")
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
**/dgph
|
|
||||||
*.mode1v3
|
|
||||||
*.mode2v3
|
|
||||||
*.moved-aside
|
|
||||||
*.pbxuser
|
|
||||||
*.perspectivev3
|
|
||||||
**/*sync/
|
|
||||||
.sconsign.dblite
|
|
||||||
.tags*
|
|
||||||
**/.vagrant/
|
|
||||||
**/DerivedData/
|
|
||||||
Icon?
|
|
||||||
**/Pods/
|
|
||||||
**/.symlinks/
|
|
||||||
profile
|
|
||||||
xcuserdata
|
|
||||||
**/.generated/
|
|
||||||
Flutter/App.framework
|
|
||||||
Flutter/Flutter.framework
|
|
||||||
Flutter/Flutter.podspec
|
|
||||||
Flutter/Generated.xcconfig
|
|
||||||
Flutter/ephemeral/
|
|
||||||
Flutter/app.flx
|
|
||||||
Flutter/app.zip
|
|
||||||
Flutter/flutter_assets/
|
|
||||||
Flutter/flutter_export_environment.sh
|
|
||||||
ServiceDefinitions.json
|
|
||||||
Runner/GeneratedPluginRegistrant.*
|
|
||||||
|
|
||||||
# Exceptions to above rules.
|
|
||||||
!default.mode1v3
|
|
||||||
!default.mode2v3
|
|
||||||
!default.pbxuser
|
|
||||||
!default.perspectivev3
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>io.flutter.flutter.app</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>FMWK</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>MinimumOSVersion</key>
|
|
||||||
<string>13.0</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
# Uncomment this line to define a global platform for your project
|
|
||||||
# platform :ios, '13.0'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
project 'Runner', {
|
|
||||||
'Debug' => :debug,
|
|
||||||
'Profile' => :release,
|
|
||||||
'Release' => :release,
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutter_root
|
|
||||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
|
||||||
unless File.exist?(generated_xcode_build_settings_path)
|
|
||||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
|
||||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
|
||||||
return matches[1].strip if matches
|
|
||||||
end
|
|
||||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
|
||||||
end
|
|
||||||
|
|
||||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
|
||||||
|
|
||||||
flutter_ios_podfile_setup
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
use_frameworks!
|
|
||||||
|
|
||||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
||||||
target 'RunnerTests' do
|
|
||||||
inherit! :search_paths
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
flutter_additional_ios_build_settings(target)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
PODS:
|
|
||||||
- audio_session (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- audioplayers_darwin (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- Flutter (1.0.0)
|
|
||||||
- flutter_secure_storage (6.0.0):
|
|
||||||
- Flutter
|
|
||||||
- just_audio (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- path_provider_foundation (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- permission_handler_apple (9.3.0):
|
|
||||||
- Flutter
|
|
||||||
- shared_preferences_foundation (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- speech_to_text (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- Try
|
|
||||||
- sqflite_darwin (0.0.4):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- Try (2.1.1)
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
|
||||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
|
||||||
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
|
|
||||||
- Flutter (from `Flutter`)
|
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
|
||||||
- just_audio (from `.symlinks/plugins/just_audio/darwin`)
|
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
|
||||||
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)
|
|
||||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
|
||||||
|
|
||||||
SPEC REPOS:
|
|
||||||
trunk:
|
|
||||||
- Try
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
|
||||||
audio_session:
|
|
||||||
:path: ".symlinks/plugins/audio_session/ios"
|
|
||||||
audioplayers_darwin:
|
|
||||||
:path: ".symlinks/plugins/audioplayers_darwin/ios"
|
|
||||||
Flutter:
|
|
||||||
:path: Flutter
|
|
||||||
flutter_secure_storage:
|
|
||||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
|
||||||
just_audio:
|
|
||||||
:path: ".symlinks/plugins/just_audio/darwin"
|
|
||||||
path_provider_foundation:
|
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
|
||||||
permission_handler_apple:
|
|
||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
|
||||||
shared_preferences_foundation:
|
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
|
||||||
speech_to_text:
|
|
||||||
:path: ".symlinks/plugins/speech_to_text/ios"
|
|
||||||
sqflite_darwin:
|
|
||||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
|
||||||
audio_session: 19e9480dbdd4e5f6c4543826b2e8b0e4ab6145fe
|
|
||||||
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
|
||||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
|
||||||
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
|
|
||||||
just_audio: a42c63806f16995daf5b219ae1d679deb76e6a79
|
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
|
||||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
|
||||||
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
|
|
||||||
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
|
|
||||||
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
|
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
|
||||||
|
|
@ -1,749 +0,0 @@
|
||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 54;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
|
||||||
24A2F4649D20B4FBB14C191F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91353D9CBF7B2EE62DCC837D /* Pods_Runner.framework */; };
|
|
||||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
|
||||||
E7528E253547AB91B2B4F858 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFA8EDD757215D657BFFE46 /* Pods_RunnerTests.framework */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
|
||||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
|
||||||
isa = PBXContainerItemProxy;
|
|
||||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
|
||||||
proxyType = 1;
|
|
||||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
|
||||||
remoteInfo = Runner;
|
|
||||||
};
|
|
||||||
/* End PBXContainerItemProxy section */
|
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
|
||||||
isa = PBXCopyFilesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
dstPath = "";
|
|
||||||
dstSubfolderSpec = 10;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
name = "Embed Frameworks";
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
07BFFB716E3F729DE36E9E62 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
0CFA8EDD757215D657BFFE46 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
|
||||||
2DF005C09CC99A688F7EDA9D /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
|
||||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
|
||||||
4A0BF9949893D60C8D62EDB2 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
68C9F9FDFC9B235BF26627E6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
|
||||||
82777D655BE749ED24F31C7F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
91353D9CBF7B2EE62DCC837D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
||||||
E057BCA2D564C786C955CE59 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
2E17305EED7643B25507D797 /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
E7528E253547AB91B2B4F858 /* Pods_RunnerTests.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
24A2F4649D20B4FBB14C191F /* Pods_Runner.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
07B3C1031D9A8587953FAF94 /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
91353D9CBF7B2EE62DCC837D /* Pods_Runner.framework */,
|
|
||||||
0CFA8EDD757215D657BFFE46 /* Pods_RunnerTests.framework */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
|
||||||
);
|
|
||||||
path = RunnerTests;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Flutter;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146E51CF9000F007C117D = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */,
|
|
||||||
97C146F01CF9000F007C117D /* Runner */,
|
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
|
||||||
C533348C0BB393CA8B27DBD4 /* Pods */,
|
|
||||||
07B3C1031D9A8587953FAF94 /* Frameworks */,
|
|
||||||
);
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146EF1CF9000F007C117D /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
|
||||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
|
||||||
97C147021CF9000F007C117D /* Info.plist */,
|
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
|
||||||
);
|
|
||||||
path = Runner;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
C533348C0BB393CA8B27DBD4 /* Pods */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
07BFFB716E3F729DE36E9E62 /* Pods-Runner.debug.xcconfig */,
|
|
||||||
68C9F9FDFC9B235BF26627E6 /* Pods-Runner.release.xcconfig */,
|
|
||||||
82777D655BE749ED24F31C7F /* Pods-Runner.profile.xcconfig */,
|
|
||||||
4A0BF9949893D60C8D62EDB2 /* Pods-RunnerTests.debug.xcconfig */,
|
|
||||||
E057BCA2D564C786C955CE59 /* Pods-RunnerTests.release.xcconfig */,
|
|
||||||
2DF005C09CC99A688F7EDA9D /* Pods-RunnerTests.profile.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Pods;
|
|
||||||
path = Pods;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
|
||||||
buildPhases = (
|
|
||||||
FEFF7BB44040F35DC10DFC87 /* [CP] Check Pods Manifest.lock */,
|
|
||||||
331C807D294A63A400263BE5 /* Sources */,
|
|
||||||
331C807F294A63A400263BE5 /* Resources */,
|
|
||||||
2E17305EED7643B25507D797 /* Frameworks */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
|
||||||
);
|
|
||||||
name = RunnerTests;
|
|
||||||
productName = RunnerTests;
|
|
||||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
|
||||||
productType = "com.apple.product-type.bundle.unit-test";
|
|
||||||
};
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
|
||||||
buildPhases = (
|
|
||||||
0585B9232D8EC85B106A0C5B /* [CP] Check Pods Manifest.lock */,
|
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
|
||||||
B7DA006F490B39DC5DD7D624 /* [CP] Embed Pods Frameworks */,
|
|
||||||
7328AAE839104E6E980FA1B3 /* [CP] Copy Pods Resources */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = Runner;
|
|
||||||
productName = Runner;
|
|
||||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
|
||||||
productType = "com.apple.product-type.application";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
attributes = {
|
|
||||||
BuildIndependentTargetsInParallel = YES;
|
|
||||||
LastUpgradeCheck = 1510;
|
|
||||||
ORGANIZATIONNAME = "";
|
|
||||||
TargetAttributes = {
|
|
||||||
331C8080294A63A400263BE5 = {
|
|
||||||
CreatedOnToolsVersion = 14.0;
|
|
||||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
|
||||||
};
|
|
||||||
97C146ED1CF9000F007C117D = {
|
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
|
||||||
LastSwiftMigration = 1100;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
|
||||||
compatibilityVersion = "Xcode 9.3";
|
|
||||||
developmentRegion = en;
|
|
||||||
hasScannedForEncodings = 0;
|
|
||||||
knownRegions = (
|
|
||||||
en,
|
|
||||||
Base,
|
|
||||||
);
|
|
||||||
mainGroup = 97C146E51CF9000F007C117D;
|
|
||||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */,
|
|
||||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
331C807F294A63A400263BE5 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXResourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
|
||||||
0585B9232D8EC85B106A0C5B /* [CP] Check Pods Manifest.lock */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
alwaysOutOfDate = 1;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
|
||||||
);
|
|
||||||
name = "Thin Binary";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
|
||||||
};
|
|
||||||
7328AAE839104E6E980FA1B3 /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
alwaysOutOfDate = 1;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "Run Script";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
|
||||||
};
|
|
||||||
B7DA006F490B39DC5DD7D624 /* [CP] Embed Pods Frameworks */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
FEFF7BB44040F35DC10DFC87 /* [CP] Check Pods Manifest.lock */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
/* End PBXShellScriptBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
331C807D294A63A400263BE5 /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXTargetDependency section */
|
|
||||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
|
||||||
isa = PBXTargetDependency;
|
|
||||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
|
||||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
|
||||||
};
|
|
||||||
/* End PBXTargetDependency section */
|
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C146FB1CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = Main.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C147001CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = LaunchScreen.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXVariantGroup section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
DEVELOPMENT_TEAM = ZN2U6988BZ;
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
331C8088294A63A400263BE5 /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 4A0BF9949893D60C8D62EDB2 /* Pods-RunnerTests.debug.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
331C8089294A63A400263BE5 /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = E057BCA2D564C786C955CE59 /* Pods-RunnerTests.release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
331C808A294A63A400263BE5 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 2DF005C09CC99A688F7EDA9D /* Pods-RunnerTests.profile.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
97C147031CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_TESTABILITY = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
||||||
"DEBUG=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147041CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
97C147061CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
DEVELOPMENT_TEAM = ZN2U6988BZ;
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147071CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
DEVELOPMENT_TEAM = ZN2U6988BZ;
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.dramaling;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
331C8088294A63A400263BE5 /* Debug */,
|
|
||||||
331C8089294A63A400263BE5 /* Release */,
|
|
||||||
331C808A294A63A400263BE5 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147031CF9000F007C117D /* Debug */,
|
|
||||||
97C147041CF9000F007C117D /* Release */,
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147061CF9000F007C117D /* Debug */,
|
|
||||||
97C147071CF9000F007C117D /* Release */,
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "self:">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>IDEDidComputeMac32BitWarning</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>PreviewsEnabled</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Scheme
|
|
||||||
LastUpgradeVersion = "1510"
|
|
||||||
version = "1.3">
|
|
||||||
<BuildAction
|
|
||||||
parallelizeBuildables = "YES"
|
|
||||||
buildImplicitDependencies = "YES">
|
|
||||||
<BuildActionEntries>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
|
||||||
</BuildAction>
|
|
||||||
<TestAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
<Testables>
|
|
||||||
<TestableReference
|
|
||||||
skipped = "NO"
|
|
||||||
parallelizable = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
|
||||||
BuildableName = "RunnerTests.xctest"
|
|
||||||
BlueprintName = "RunnerTests"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
|
||||||
<LaunchAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
|
||||||
launchStyle = "0"
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
|
||||||
debugDocumentVersioning = "YES"
|
|
||||||
debugServiceExtension = "internal"
|
|
||||||
enableGPUValidationMode = "1"
|
|
||||||
allowLocationSimulation = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</LaunchAction>
|
|
||||||
<ProfileAction
|
|
||||||
buildConfiguration = "Profile"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
||||||
savedToolIdentifier = ""
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
debugDocumentVersioning = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</ProfileAction>
|
|
||||||
<AnalyzeAction
|
|
||||||
buildConfiguration = "Debug">
|
|
||||||
</AnalyzeAction>
|
|
||||||
<ArchiveAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
revealArchiveInOrganizer = "YES">
|
|
||||||
</ArchiveAction>
|
|
||||||
</Scheme>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "group:Runner.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
<FileRef
|
|
||||||
location = "group:Pods/Pods.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>IDEDidComputeMac32BitWarning</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>PreviewsEnabled</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import Flutter
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
@main
|
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
|
||||||
override func application(
|
|
||||||
_ application: UIApplication,
|
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
||||||
) -> Bool {
|
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
|
@ -1,5 +0,0 @@
|
||||||
# Launch Screen Assets
|
|
||||||
|
|
||||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
|
||||||
|
|
||||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="EHf-IW-A2E">
|
|
||||||
<objects>
|
|
||||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
|
||||||
</imageView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="53" y="375"/>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
<resources>
|
|
||||||
<image name="LaunchImage" width="168" height="185"/>
|
|
||||||
</resources>
|
|
||||||
</document>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--Flutter View Controller-->
|
|
||||||
<scene sceneID="tne-QT-ifu">
|
|
||||||
<objects>
|
|
||||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
</document>
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>Dramaling</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>dramaling</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
#import "GeneratedPluginRegistrant.h"
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import Flutter
|
|
||||||
import UIKit
|
|
||||||
import XCTest
|
|
||||||
|
|
||||||
class RunnerTests: XCTestCase {
|
|
||||||
|
|
||||||
func testExample() {
|
|
||||||
// If you add code to the Runner application, consider adding tests here.
|
|
||||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
class AppConstants {
|
|
||||||
// App Info
|
|
||||||
static const String appName = 'Drama Ling';
|
|
||||||
static const String appVersion = '1.0.0';
|
|
||||||
|
|
||||||
// API Configuration
|
|
||||||
static const String baseUrl = 'https://api.dramaling.com';
|
|
||||||
static const String apiVersion = 'v1';
|
|
||||||
static const String apiBaseUrl = '$baseUrl/api/$apiVersion';
|
|
||||||
|
|
||||||
// Local API for Development
|
|
||||||
static const String localBaseUrl = 'http://localhost:5000';
|
|
||||||
static const String localApiBaseUrl = '$localBaseUrl/api/$apiVersion';
|
|
||||||
|
|
||||||
// Storage Keys
|
|
||||||
static const String accessTokenKey = 'access_token';
|
|
||||||
static const String refreshTokenKey = 'refresh_token';
|
|
||||||
static const String userDataKey = 'user_data';
|
|
||||||
static const String languageKey = 'language';
|
|
||||||
static const String themeKey = 'theme';
|
|
||||||
|
|
||||||
// Learning Constants
|
|
||||||
static const int maxLifePoints = 5;
|
|
||||||
static const int lifePointRecoveryHours = 5;
|
|
||||||
static const int dailyExperienceBonus = 50;
|
|
||||||
|
|
||||||
// Dialogue Constants
|
|
||||||
static const int maxDialogueTurns = 12;
|
|
||||||
static const int dialogueTimeoutSeconds = 600; // 10 minutes
|
|
||||||
static const double passingScore = 60.0;
|
|
||||||
static const double excellentScore = 90.0;
|
|
||||||
|
|
||||||
// Time Challenge Constants
|
|
||||||
static const int timeChallengeSeconds = 300; // 5 minutes
|
|
||||||
static const int timeWarningSeconds = 60;
|
|
||||||
static const int timeCriticalSeconds = 30;
|
|
||||||
|
|
||||||
// Animation Durations
|
|
||||||
static const Duration shortAnimation = Duration(milliseconds: 200);
|
|
||||||
static const Duration normalAnimation = Duration(milliseconds: 300);
|
|
||||||
static const Duration longAnimation = Duration(milliseconds: 500);
|
|
||||||
|
|
||||||
// Network
|
|
||||||
static const Duration connectionTimeout = Duration(seconds: 30);
|
|
||||||
static const Duration receiveTimeout = Duration(seconds: 30);
|
|
||||||
|
|
||||||
// Pagination
|
|
||||||
static const int defaultPageSize = 20;
|
|
||||||
static const int maxPageSize = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AppStrings {
|
|
||||||
// Common
|
|
||||||
static const String ok = '確定';
|
|
||||||
static const String cancel = '取消';
|
|
||||||
static const String retry = '重試';
|
|
||||||
static const String loading = '載入中...';
|
|
||||||
static const String error = '錯誤';
|
|
||||||
static const String success = '成功';
|
|
||||||
|
|
||||||
// Authentication
|
|
||||||
static const String login = '登入';
|
|
||||||
static const String register = '註冊';
|
|
||||||
static const String logout = '登出';
|
|
||||||
static const String email = '電子郵件';
|
|
||||||
static const String password = '密碼';
|
|
||||||
static const String confirmPassword = '確認密碼';
|
|
||||||
static const String forgotPassword = '忘記密碼?';
|
|
||||||
|
|
||||||
// Learning
|
|
||||||
static const String startLearning = '開始學習';
|
|
||||||
static const String continueDialogue = '繼續對話';
|
|
||||||
static const String vocabularyPractice = '詞彙練習';
|
|
||||||
static const String dialoguePractice = '對話練習';
|
|
||||||
static const String timeChallenge = '限時挑戰';
|
|
||||||
|
|
||||||
// Errors
|
|
||||||
static const String networkError = '網路連線錯誤';
|
|
||||||
static const String serverError = '伺服器錯誤';
|
|
||||||
static const String unknownError = '未知錯誤';
|
|
||||||
static const String invalidCredentials = '帳號或密碼錯誤';
|
|
||||||
static const String sessionExpired = '登入已過期,請重新登入';
|
|
||||||
}
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
||||||
|
|
||||||
class StorageService {
|
|
||||||
static late Box _box;
|
|
||||||
static const FlutterSecureStorage _secureStorage = FlutterSecureStorage(
|
|
||||||
aOptions: AndroidOptions(
|
|
||||||
encryptedSharedPreferences: true,
|
|
||||||
),
|
|
||||||
iOptions: IOSOptions(
|
|
||||||
accessibility: KeychainAccessibility.first_unlock_this_device,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
/// 初始化儲存服務
|
|
||||||
static Future<void> init() async {
|
|
||||||
await Hive.initFlutter();
|
|
||||||
_box = await Hive.openBox('dramaling_storage');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 一般資料存取 (使用Hive)
|
|
||||||
|
|
||||||
/// 儲存資料
|
|
||||||
static Future<void> setData<T>(String key, T value) async {
|
|
||||||
await _box.put(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取資料
|
|
||||||
static T? getData<T>(String key) {
|
|
||||||
return _box.get(key) as T?;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 移除資料
|
|
||||||
static Future<void> removeData(String key) async {
|
|
||||||
await _box.delete(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 清除所有資料
|
|
||||||
static Future<void> clearAll() async {
|
|
||||||
await _box.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 檢查資料是否存在
|
|
||||||
static bool hasData(String key) {
|
|
||||||
return _box.containsKey(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 安全資料存取 (使用FlutterSecureStorage)
|
|
||||||
|
|
||||||
/// 安全儲存資料 (用於敏感資料如token)
|
|
||||||
static Future<void> setSecureData(String key, String value) async {
|
|
||||||
await _secureStorage.write(key: key, value: value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取安全資料
|
|
||||||
static Future<String?> getSecureData(String key) async {
|
|
||||||
return await _secureStorage.read(key: key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 移除安全資料
|
|
||||||
static Future<void> removeSecureData(String key) async {
|
|
||||||
await _secureStorage.delete(key: key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 清除所有安全資料
|
|
||||||
static Future<void> clearSecureData() async {
|
|
||||||
await _secureStorage.deleteAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 檢查安全資料是否存在
|
|
||||||
static Future<bool> hasSecureData(String key) async {
|
|
||||||
final data = await _secureStorage.read(key: key);
|
|
||||||
return data != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 便捷方法
|
|
||||||
|
|
||||||
/// 儲存用戶Token
|
|
||||||
static Future<void> saveTokens({
|
|
||||||
required String accessToken,
|
|
||||||
required String refreshToken,
|
|
||||||
}) async {
|
|
||||||
await setSecureData('access_token', accessToken);
|
|
||||||
await setSecureData('refresh_token', refreshToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取存取Token
|
|
||||||
static Future<String?> getAccessToken() async {
|
|
||||||
return await getSecureData('access_token');
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取刷新Token
|
|
||||||
static Future<String?> getRefreshToken() async {
|
|
||||||
return await getSecureData('refresh_token');
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 清除所有Token
|
|
||||||
static Future<void> clearTokens() async {
|
|
||||||
await removeSecureData('access_token');
|
|
||||||
await removeSecureData('refresh_token');
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 儲存用戶偏好設定
|
|
||||||
static Future<void> saveUserPreferences({
|
|
||||||
String? language,
|
|
||||||
String? theme,
|
|
||||||
bool? soundEnabled,
|
|
||||||
bool? vibrationEnabled,
|
|
||||||
}) async {
|
|
||||||
if (language != null) await setData('language', language);
|
|
||||||
if (theme != null) await setData('theme', theme);
|
|
||||||
if (soundEnabled != null) await setData('sound_enabled', soundEnabled);
|
|
||||||
if (vibrationEnabled != null) await setData('vibration_enabled', vibrationEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取用戶偏好設定
|
|
||||||
static Map<String, dynamic> getUserPreferences() {
|
|
||||||
return {
|
|
||||||
'language': getData<String>('language') ?? 'zh',
|
|
||||||
'theme': getData<String>('theme') ?? 'system',
|
|
||||||
'sound_enabled': getData<bool>('sound_enabled') ?? true,
|
|
||||||
'vibration_enabled': getData<bool>('vibration_enabled') ?? true,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,355 +0,0 @@
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
|
||||||
import 'package:speech_to_text/speech_recognition_error.dart';
|
|
||||||
import 'package:speech_to_text/speech_recognition_result.dart';
|
|
||||||
import 'package:speech_to_text/speech_to_text.dart';
|
|
||||||
|
|
||||||
/// AI語音識別服務
|
|
||||||
///
|
|
||||||
/// 提供完整的語音識別功能,支援:
|
|
||||||
/// - 實時語音轉文字
|
|
||||||
/// - 多語言支援(中文、英文)
|
|
||||||
/// - 音頻權限管理
|
|
||||||
/// - 錯誤處理與重試機制
|
|
||||||
/// - 音量監測
|
|
||||||
class VoiceRecognitionService {
|
|
||||||
static final VoiceRecognitionService _instance = VoiceRecognitionService._internal();
|
|
||||||
factory VoiceRecognitionService() => _instance;
|
|
||||||
VoiceRecognitionService._internal();
|
|
||||||
|
|
||||||
final SpeechToText _speechToText = SpeechToText();
|
|
||||||
|
|
||||||
// 語音識別狀態
|
|
||||||
bool _isInitialized = false;
|
|
||||||
bool _isListening = false;
|
|
||||||
bool _isAvailable = false;
|
|
||||||
|
|
||||||
// 識別結果回調
|
|
||||||
final StreamController<VoiceRecognitionResult> _resultController =
|
|
||||||
StreamController<VoiceRecognitionResult>.broadcast();
|
|
||||||
|
|
||||||
// 音量回調
|
|
||||||
final StreamController<double> _soundLevelController =
|
|
||||||
StreamController<double>.broadcast();
|
|
||||||
|
|
||||||
// 狀態回調
|
|
||||||
final StreamController<VoiceRecognitionState> _stateController =
|
|
||||||
StreamController<VoiceRecognitionState>.broadcast();
|
|
||||||
|
|
||||||
// 支援的語言
|
|
||||||
static const Map<String, String> supportedLanguages = {
|
|
||||||
'zh-TW': '繁體中文',
|
|
||||||
'zh-CN': '簡體中文',
|
|
||||||
'en-US': 'English (US)',
|
|
||||||
'en-GB': 'English (UK)',
|
|
||||||
};
|
|
||||||
|
|
||||||
// Getters
|
|
||||||
bool get isInitialized => _isInitialized;
|
|
||||||
bool get isListening => _isListening;
|
|
||||||
bool get isAvailable => _isAvailable;
|
|
||||||
|
|
||||||
// Streams
|
|
||||||
Stream<VoiceRecognitionResult> get resultStream => _resultController.stream;
|
|
||||||
Stream<double> get soundLevelStream => _soundLevelController.stream;
|
|
||||||
Stream<VoiceRecognitionState> get stateStream => _stateController.stream;
|
|
||||||
|
|
||||||
/// 初始化語音識別服務
|
|
||||||
Future<bool> initialize() async {
|
|
||||||
try {
|
|
||||||
// 檢查並請求麥克風權限
|
|
||||||
final permissionStatus = await _requestMicrophonePermission();
|
|
||||||
if (!permissionStatus) {
|
|
||||||
debugPrint('VoiceRecognitionService: 麥克風權限被拒絕');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化語音識別引擎
|
|
||||||
_isAvailable = await _speechToText.initialize(
|
|
||||||
onError: _onError,
|
|
||||||
onStatus: _onStatus,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (_isAvailable) {
|
|
||||||
_isInitialized = true;
|
|
||||||
_stateController.add(VoiceRecognitionState.initialized);
|
|
||||||
debugPrint('VoiceRecognitionService: 初始化成功');
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
debugPrint('VoiceRecognitionService: 語音識別不可用');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('VoiceRecognitionService: 初始化失敗 - $e');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 開始語音識別
|
|
||||||
Future<bool> startListening({
|
|
||||||
String languageId = 'zh-TW',
|
|
||||||
Duration timeout = const Duration(seconds: 30),
|
|
||||||
bool partialResults = true,
|
|
||||||
}) async {
|
|
||||||
if (!_isInitialized || !_isAvailable) {
|
|
||||||
debugPrint('VoiceRecognitionService: 服務未初始化或不可用');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_isListening) {
|
|
||||||
debugPrint('VoiceRecognitionService: 已在監聽中');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
await _speechToText.listen(
|
|
||||||
onResult: _onResult,
|
|
||||||
listenFor: timeout,
|
|
||||||
pauseFor: const Duration(seconds: 3),
|
|
||||||
partialResults: partialResults,
|
|
||||||
localeId: languageId,
|
|
||||||
onSoundLevelChange: _onSoundLevelChange,
|
|
||||||
listenMode: ListenMode.confirmation,
|
|
||||||
);
|
|
||||||
|
|
||||||
_isListening = true;
|
|
||||||
_stateController.add(VoiceRecognitionState.listening);
|
|
||||||
debugPrint('VoiceRecognitionService: 開始監聽');
|
|
||||||
return true;
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('VoiceRecognitionService: 開始監聽失敗 - $e');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 停止語音識別
|
|
||||||
Future<void> stopListening() async {
|
|
||||||
if (!_isListening) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await _speechToText.stop();
|
|
||||||
_isListening = false;
|
|
||||||
_stateController.add(VoiceRecognitionState.stopped);
|
|
||||||
debugPrint('VoiceRecognitionService: 停止監聽');
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('VoiceRecognitionService: 停止監聽失敗 - $e');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 取消語音識別
|
|
||||||
Future<void> cancel() async {
|
|
||||||
if (!_isListening) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await _speechToText.cancel();
|
|
||||||
_isListening = false;
|
|
||||||
_stateController.add(VoiceRecognitionState.cancelled);
|
|
||||||
debugPrint('VoiceRecognitionService: 取消監聽');
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('VoiceRecognitionService: 取消監聽失敗 - $e');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 獲取支援的語言
|
|
||||||
Future<List<LocaleName>> getAvailableLanguages() async {
|
|
||||||
if (!_isInitialized) return [];
|
|
||||||
return await _speechToText.locales();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 檢查特定語言是否支援
|
|
||||||
Future<bool> isLanguageSupported(String languageId) async {
|
|
||||||
final locales = await getAvailableLanguages();
|
|
||||||
return locales.any((locale) => locale.localeId == languageId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 請求麥克風權限
|
|
||||||
Future<bool> _requestMicrophonePermission() async {
|
|
||||||
final status = await Permission.microphone.status;
|
|
||||||
|
|
||||||
if (status.isGranted) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status.isDenied) {
|
|
||||||
final result = await Permission.microphone.request();
|
|
||||||
return result.isGranted;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status.isPermanentlyDenied) {
|
|
||||||
await openAppSettings();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 處理識別結果
|
|
||||||
void _onResult(SpeechRecognitionResult result) {
|
|
||||||
final voiceResult = VoiceRecognitionResult(
|
|
||||||
recognizedWords: result.recognizedWords,
|
|
||||||
confidence: result.confidence,
|
|
||||||
isFinal: result.finalResult,
|
|
||||||
alternatives: result.alternates.map((alt) =>
|
|
||||||
VoiceAlternative(
|
|
||||||
text: alt.recognizedWords,
|
|
||||||
confidence: alt.confidence,
|
|
||||||
)
|
|
||||||
).toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
_resultController.add(voiceResult);
|
|
||||||
|
|
||||||
if (result.finalResult) {
|
|
||||||
debugPrint('VoiceRecognitionService: 最終結果 - ${result.recognizedWords}');
|
|
||||||
} else {
|
|
||||||
debugPrint('VoiceRecognitionService: 部分結果 - ${result.recognizedWords}');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 處理錯誤
|
|
||||||
void _onError(SpeechRecognitionError error) {
|
|
||||||
debugPrint('VoiceRecognitionService: 錯誤 - ${error.errorMsg}');
|
|
||||||
|
|
||||||
final errorType = _mapErrorType(error.errorMsg);
|
|
||||||
_stateController.add(VoiceRecognitionState.error(errorType, error.errorMsg));
|
|
||||||
|
|
||||||
_isListening = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 處理狀態變化
|
|
||||||
void _onStatus(String status) {
|
|
||||||
debugPrint('VoiceRecognitionService: 狀態變化 - $status');
|
|
||||||
|
|
||||||
switch (status) {
|
|
||||||
case 'listening':
|
|
||||||
_isListening = true;
|
|
||||||
_stateController.add(VoiceRecognitionState.listening);
|
|
||||||
break;
|
|
||||||
case 'notListening':
|
|
||||||
_isListening = false;
|
|
||||||
_stateController.add(VoiceRecognitionState.stopped);
|
|
||||||
break;
|
|
||||||
case 'done':
|
|
||||||
_isListening = false;
|
|
||||||
_stateController.add(VoiceRecognitionState.completed);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 處理音量變化
|
|
||||||
void _onSoundLevelChange(double level) {
|
|
||||||
_soundLevelController.add(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 映射錯誤類型
|
|
||||||
VoiceRecognitionErrorType _mapErrorType(String errorMsg) {
|
|
||||||
if (errorMsg.contains('network')) {
|
|
||||||
return VoiceRecognitionErrorType.network;
|
|
||||||
} else if (errorMsg.contains('audio')) {
|
|
||||||
return VoiceRecognitionErrorType.audio;
|
|
||||||
} else if (errorMsg.contains('permission')) {
|
|
||||||
return VoiceRecognitionErrorType.permission;
|
|
||||||
} else if (errorMsg.contains('timeout')) {
|
|
||||||
return VoiceRecognitionErrorType.timeout;
|
|
||||||
} else {
|
|
||||||
return VoiceRecognitionErrorType.unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 清理資源
|
|
||||||
void dispose() {
|
|
||||||
_resultController.close();
|
|
||||||
_soundLevelController.close();
|
|
||||||
_stateController.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語音識別結果
|
|
||||||
class VoiceRecognitionResult {
|
|
||||||
final String recognizedWords;
|
|
||||||
final double confidence;
|
|
||||||
final bool isFinal;
|
|
||||||
final List<VoiceAlternative> alternatives;
|
|
||||||
|
|
||||||
VoiceRecognitionResult({
|
|
||||||
required this.recognizedWords,
|
|
||||||
required this.confidence,
|
|
||||||
required this.isFinal,
|
|
||||||
this.alternatives = const [],
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'VoiceRecognitionResult(words: $recognizedWords, confidence: $confidence, isFinal: $isFinal)';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語音識別替代結果
|
|
||||||
class VoiceAlternative {
|
|
||||||
final String text;
|
|
||||||
final double confidence;
|
|
||||||
|
|
||||||
VoiceAlternative({
|
|
||||||
required this.text,
|
|
||||||
required this.confidence,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'VoiceAlternative(text: $text, confidence: $confidence)';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語音識別狀態
|
|
||||||
class VoiceRecognitionState {
|
|
||||||
final VoiceRecognitionStatus status;
|
|
||||||
final VoiceRecognitionErrorType? errorType;
|
|
||||||
final String? errorMessage;
|
|
||||||
|
|
||||||
VoiceRecognitionState._(this.status, [this.errorType, this.errorMessage]);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get uninitialized =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.uninitialized);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get initialized =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.initialized);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get listening =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.listening);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get stopped =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.stopped);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get completed =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.completed);
|
|
||||||
|
|
||||||
static VoiceRecognitionState get cancelled =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.cancelled);
|
|
||||||
|
|
||||||
static VoiceRecognitionState error(VoiceRecognitionErrorType errorType, String message) =>
|
|
||||||
VoiceRecognitionState._(VoiceRecognitionStatus.error, errorType, message);
|
|
||||||
|
|
||||||
bool get hasError => status == VoiceRecognitionStatus.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語音識別狀態枚舉
|
|
||||||
enum VoiceRecognitionStatus {
|
|
||||||
uninitialized,
|
|
||||||
initialized,
|
|
||||||
listening,
|
|
||||||
stopped,
|
|
||||||
completed,
|
|
||||||
cancelled,
|
|
||||||
error,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語音識別錯誤類型
|
|
||||||
enum VoiceRecognitionErrorType {
|
|
||||||
network,
|
|
||||||
audio,
|
|
||||||
permission,
|
|
||||||
timeout,
|
|
||||||
unknown,
|
|
||||||
}
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
||||||
|
|
||||||
import '../../features/auth/screens/login_screen.dart';
|
|
||||||
import '../../features/auth/screens/register_screen.dart';
|
|
||||||
import '../../features/learning/screens/home_screen.dart';
|
|
||||||
import '../../features/dialogue/screens/dialogue_main_screen.dart';
|
|
||||||
import '../../shared/providers/auth_provider.dart';
|
|
||||||
|
|
||||||
final routerProvider = Provider<GoRouter>((ref) {
|
|
||||||
final authState = ref.watch(authProvider);
|
|
||||||
|
|
||||||
return GoRouter(
|
|
||||||
initialLocation: authState.isAuthenticated ? '/home' : '/login',
|
|
||||||
redirect: (context, state) {
|
|
||||||
final isAuthenticated = authState.isAuthenticated;
|
|
||||||
final isAuthRoute = state.uri.path.startsWith('/auth');
|
|
||||||
|
|
||||||
if (!isAuthenticated && !isAuthRoute) {
|
|
||||||
return '/login';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isAuthenticated && isAuthRoute) {
|
|
||||||
return '/home';
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
routes: [
|
|
||||||
// Authentication Routes
|
|
||||||
GoRoute(
|
|
||||||
path: '/login',
|
|
||||||
builder: (context, state) => const LoginScreen(),
|
|
||||||
),
|
|
||||||
GoRoute(
|
|
||||||
path: '/register',
|
|
||||||
builder: (context, state) => const RegisterScreen(),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Main App Routes
|
|
||||||
GoRoute(
|
|
||||||
path: '/home',
|
|
||||||
builder: (context, state) => const HomeScreen(),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Learning Routes
|
|
||||||
GoRoute(
|
|
||||||
path: '/vocabulary',
|
|
||||||
builder: (context, state) => const Scaffold(
|
|
||||||
body: Center(child: Text('詞彙練習頁面')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
GoRoute(
|
|
||||||
path: '/dialogue',
|
|
||||||
builder: (context, state) {
|
|
||||||
final scenarioId = state.uri.queryParameters['scenarioId'] ?? 'restaurant_001';
|
|
||||||
final levelId = state.uri.queryParameters['levelId'] ?? 'level_001';
|
|
||||||
final isTimeChallenge = state.uri.queryParameters['timeChallenge'] == 'true';
|
|
||||||
|
|
||||||
return DialogueMainScreen(
|
|
||||||
scenarioId: scenarioId,
|
|
||||||
levelId: levelId,
|
|
||||||
isTimeChallenge: isTimeChallenge,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
GoRoute(
|
|
||||||
path: '/challenge',
|
|
||||||
builder: (context, state) => const Scaffold(
|
|
||||||
body: Center(child: Text('限時挑戰頁面')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Profile Routes
|
|
||||||
GoRoute(
|
|
||||||
path: '/profile',
|
|
||||||
builder: (context, state) => const Scaffold(
|
|
||||||
body: Center(child: Text('個人檔案頁面')),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
|
|
||||||
// Error handling
|
|
||||||
errorBuilder: (context, state) => Scaffold(
|
|
||||||
body: Center(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
const Icon(
|
|
||||||
Icons.error_outline,
|
|
||||||
size: 64,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
Text(
|
|
||||||
'頁面未找到',
|
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
state.error?.toString() ?? '未知錯誤',
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () => context.go('/home'),
|
|
||||||
child: const Text('返回首頁'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
@ -1,184 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
|
|
||||||
class AppColors {
|
|
||||||
// Primary Colors
|
|
||||||
static const Color primary = Color(0xFF6366F1); // Indigo
|
|
||||||
static const Color primaryLight = Color(0xFF8B5CF6); // Violet
|
|
||||||
static const Color primaryDark = Color(0xFF4F46E5); // Dark Indigo
|
|
||||||
|
|
||||||
// Secondary Colors
|
|
||||||
static const Color secondary = Color(0xFFF59E0B); // Amber
|
|
||||||
static const Color secondaryLight = Color(0xFFFBBF24);
|
|
||||||
static const Color secondaryDark = Color(0xFFD97706);
|
|
||||||
|
|
||||||
// Learning Status Colors
|
|
||||||
static const Color success = Color(0xFF10B981); // Emerald
|
|
||||||
static const Color warning = Color(0xFFF59E0B); // Amber
|
|
||||||
static const Color error = Color(0xFFEF4444); // Red
|
|
||||||
static const Color info = Color(0xFF3B82F6); // Blue
|
|
||||||
|
|
||||||
// Neutral Colors
|
|
||||||
static const Color white = Color(0xFFFFFFFF);
|
|
||||||
static const Color black = Color(0xFF000000);
|
|
||||||
static const Color grey50 = Color(0xFFF9FAFB);
|
|
||||||
static const Color grey100 = Color(0xFFF3F4F6);
|
|
||||||
static const Color grey200 = Color(0xFFE5E7EB);
|
|
||||||
static const Color grey300 = Color(0xFFD1D5DB);
|
|
||||||
static const Color grey400 = Color(0xFF9CA3AF);
|
|
||||||
static const Color grey500 = Color(0xFF6B7280);
|
|
||||||
static const Color grey600 = Color(0xFF4B5563);
|
|
||||||
static const Color grey700 = Color(0xFF374151);
|
|
||||||
static const Color grey800 = Color(0xFF1F2937);
|
|
||||||
static const Color grey900 = Color(0xFF111827);
|
|
||||||
|
|
||||||
// Surface Colors
|
|
||||||
static const Color surface = Color(0xFFFFFFFF);
|
|
||||||
static const Color surfaceDark = Color(0xFF1F2937);
|
|
||||||
static const Color background = Color(0xFFF9FAFB);
|
|
||||||
static const Color backgroundDark = Color(0xFF111827);
|
|
||||||
}
|
|
||||||
|
|
||||||
class AppTheme {
|
|
||||||
static ThemeData get lightTheme {
|
|
||||||
return ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
brightness: Brightness.light,
|
|
||||||
|
|
||||||
// Color Scheme
|
|
||||||
colorScheme: const ColorScheme.light(
|
|
||||||
primary: AppColors.primary,
|
|
||||||
secondary: AppColors.secondary,
|
|
||||||
surface: AppColors.surface,
|
|
||||||
background: AppColors.background,
|
|
||||||
error: AppColors.error,
|
|
||||||
),
|
|
||||||
|
|
||||||
// Typography
|
|
||||||
textTheme: GoogleFonts.notoSansTextTheme().copyWith(
|
|
||||||
headlineLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 32,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: AppColors.grey900,
|
|
||||||
),
|
|
||||||
headlineMedium: GoogleFonts.notoSans(
|
|
||||||
fontSize: 28,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: AppColors.grey900,
|
|
||||||
),
|
|
||||||
titleLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 22,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColors.grey900,
|
|
||||||
),
|
|
||||||
titleMedium: GoogleFonts.notoSans(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColors.grey700,
|
|
||||||
),
|
|
||||||
bodyLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
color: AppColors.grey800,
|
|
||||||
),
|
|
||||||
bodyMedium: GoogleFonts.notoSans(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
color: AppColors.grey700,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Component Themes
|
|
||||||
appBarTheme: AppBarTheme(
|
|
||||||
backgroundColor: AppColors.white,
|
|
||||||
foregroundColor: AppColors.grey900,
|
|
||||||
elevation: 0,
|
|
||||||
centerTitle: true,
|
|
||||||
titleTextStyle: GoogleFonts.notoSans(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColors.grey900,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: AppColors.primary,
|
|
||||||
foregroundColor: AppColors.white,
|
|
||||||
elevation: 2,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
inputDecorationTheme: InputDecorationTheme(
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
borderSide: const BorderSide(color: AppColors.grey300),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
borderSide: const BorderSide(color: AppColors.primary, width: 2),
|
|
||||||
),
|
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
||||||
),
|
|
||||||
|
|
||||||
cardTheme: const CardThemeData(
|
|
||||||
elevation: 2,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ThemeData get darkTheme {
|
|
||||||
return ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
brightness: Brightness.dark,
|
|
||||||
|
|
||||||
// Color Scheme
|
|
||||||
colorScheme: const ColorScheme.dark(
|
|
||||||
primary: AppColors.primaryLight,
|
|
||||||
secondary: AppColors.secondaryLight,
|
|
||||||
surface: AppColors.surfaceDark,
|
|
||||||
background: AppColors.backgroundDark,
|
|
||||||
error: AppColors.error,
|
|
||||||
),
|
|
||||||
|
|
||||||
// Typography
|
|
||||||
textTheme: GoogleFonts.notoSansTextTheme(ThemeData.dark().textTheme).copyWith(
|
|
||||||
headlineLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 32,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: AppColors.white,
|
|
||||||
),
|
|
||||||
headlineMedium: GoogleFonts.notoSans(
|
|
||||||
fontSize: 28,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: AppColors.white,
|
|
||||||
),
|
|
||||||
titleLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 22,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColors.white,
|
|
||||||
),
|
|
||||||
bodyLarge: GoogleFonts.notoSans(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
color: AppColors.grey200,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Component Themes
|
|
||||||
appBarTheme: AppBarTheme(
|
|
||||||
backgroundColor: AppColors.surfaceDark,
|
|
||||||
foregroundColor: AppColors.white,
|
|
||||||
elevation: 0,
|
|
||||||
centerTitle: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,226 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
|
|
||||||
class LoginScreen extends StatefulWidget {
|
|
||||||
const LoginScreen({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<LoginScreen> createState() => _LoginScreenState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LoginScreenState extends State<LoginScreen> {
|
|
||||||
final _formKey = GlobalKey<FormState>();
|
|
||||||
final _emailController = TextEditingController();
|
|
||||||
final _passwordController = TextEditingController();
|
|
||||||
bool _isLoading = false;
|
|
||||||
bool _obscurePassword = true;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_emailController.dispose();
|
|
||||||
_passwordController.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.background,
|
|
||||||
body: SafeArea(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
padding: const EdgeInsets.all(24.0),
|
|
||||||
child: Form(
|
|
||||||
key: _formKey,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 60),
|
|
||||||
|
|
||||||
// Logo and Title
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 120,
|
|
||||||
height: 120,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: const Icon(
|
|
||||||
Icons.theater_comedy,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 60,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
Text(
|
|
||||||
'Drama Ling',
|
|
||||||
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'歡迎回來!開始您的語言學習之旅',
|
|
||||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.onBackground.withOpacity(0.7),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 48),
|
|
||||||
|
|
||||||
// Email Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _emailController,
|
|
||||||
keyboardType: TextInputType.emailAddress,
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: '電子郵件',
|
|
||||||
hintText: '請輸入您的電子郵件',
|
|
||||||
prefixIcon: Icon(Icons.email_outlined),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請輸入電子郵件';
|
|
||||||
}
|
|
||||||
if (!value.contains('@')) {
|
|
||||||
return '請輸入有效的電子郵件格式';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Password Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _passwordController,
|
|
||||||
obscureText: _obscurePassword,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: '密碼',
|
|
||||||
hintText: '請輸入您的密碼',
|
|
||||||
prefixIcon: const Icon(Icons.lock_outlined),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
_obscurePassword
|
|
||||||
? Icons.visibility_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
_obscurePassword = !_obscurePassword;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請輸入密碼';
|
|
||||||
}
|
|
||||||
if (value.length < 6) {
|
|
||||||
return '密碼長度至少需要6個字符';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
|
|
||||||
// Login Button
|
|
||||||
SizedBox(
|
|
||||||
height: 48,
|
|
||||||
child: ElevatedButton(
|
|
||||||
onPressed: _isLoading ? null : _handleLogin,
|
|
||||||
child: _isLoading
|
|
||||||
? const SizedBox(
|
|
||||||
width: 20,
|
|
||||||
height: 20,
|
|
||||||
child: CircularProgressIndicator(strokeWidth: 2),
|
|
||||||
)
|
|
||||||
: const Text('登入'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Forgot Password
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
// TODO: 實現忘記密碼功能
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text('忘記密碼功能開發中')),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: const Text('忘記密碼?'),
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 32),
|
|
||||||
|
|
||||||
// Divider
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
const Expanded(child: Divider()),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
||||||
child: Text(
|
|
||||||
'或',
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.onBackground.withOpacity(0.5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Expanded(child: Divider()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 32),
|
|
||||||
|
|
||||||
// Register Button
|
|
||||||
OutlinedButton(
|
|
||||||
onPressed: () => context.go('/register'),
|
|
||||||
child: const Text('建立新帳號'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _handleLogin() async {
|
|
||||||
if (!_formKey.currentState!.validate()) return;
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
// TODO: 實現實際的登入邏輯
|
|
||||||
await Future.delayed(const Duration(seconds: 2)); // 模擬API調用
|
|
||||||
|
|
||||||
if (mounted) {
|
|
||||||
// 登入成功,導航到首頁
|
|
||||||
context.go('/home');
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text('登入成功!')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (mounted) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(content: Text('登入失敗:$e')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
if (mounted) {
|
|
||||||
setState(() {
|
|
||||||
_isLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,311 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
|
|
||||||
class RegisterScreen extends StatefulWidget {
|
|
||||||
const RegisterScreen({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<RegisterScreen> createState() => _RegisterScreenState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _RegisterScreenState extends State<RegisterScreen> {
|
|
||||||
final _formKey = GlobalKey<FormState>();
|
|
||||||
final _emailController = TextEditingController();
|
|
||||||
final _passwordController = TextEditingController();
|
|
||||||
final _confirmPasswordController = TextEditingController();
|
|
||||||
final _displayNameController = TextEditingController();
|
|
||||||
bool _isLoading = false;
|
|
||||||
bool _obscurePassword = true;
|
|
||||||
bool _obscureConfirmPassword = true;
|
|
||||||
bool _acceptTerms = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_emailController.dispose();
|
|
||||||
_passwordController.dispose();
|
|
||||||
_confirmPasswordController.dispose();
|
|
||||||
_displayNameController.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.background,
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
elevation: 0,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: const Icon(Icons.arrow_back),
|
|
||||||
onPressed: () => context.go('/login'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: SafeArea(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
padding: const EdgeInsets.all(24.0),
|
|
||||||
child: Form(
|
|
||||||
key: _formKey,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
// Title
|
|
||||||
Text(
|
|
||||||
'建立新帳號',
|
|
||||||
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'開始您的語言學習之旅',
|
|
||||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.onBackground.withOpacity(0.7),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 32),
|
|
||||||
|
|
||||||
// Display Name Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _displayNameController,
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: '顯示名稱',
|
|
||||||
hintText: '請輸入您的顯示名稱',
|
|
||||||
prefixIcon: Icon(Icons.person_outlined),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請輸入顯示名稱';
|
|
||||||
}
|
|
||||||
if (value.length < 2) {
|
|
||||||
return '顯示名稱至少需要2個字符';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Email Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _emailController,
|
|
||||||
keyboardType: TextInputType.emailAddress,
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: '電子郵件',
|
|
||||||
hintText: '請輸入您的電子郵件',
|
|
||||||
prefixIcon: Icon(Icons.email_outlined),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請輸入電子郵件';
|
|
||||||
}
|
|
||||||
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value)) {
|
|
||||||
return '請輸入有效的電子郵件格式';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Password Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _passwordController,
|
|
||||||
obscureText: _obscurePassword,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: '密碼',
|
|
||||||
hintText: '請輸入密碼(至少8個字符)',
|
|
||||||
prefixIcon: const Icon(Icons.lock_outlined),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
_obscurePassword
|
|
||||||
? Icons.visibility_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
_obscurePassword = !_obscurePassword;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請輸入密碼';
|
|
||||||
}
|
|
||||||
if (value.length < 8) {
|
|
||||||
return '密碼長度至少需要8個字符';
|
|
||||||
}
|
|
||||||
if (!RegExp(r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)').hasMatch(value)) {
|
|
||||||
return '密碼需包含大寫字母、小寫字母和數字';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Confirm Password Field
|
|
||||||
TextFormField(
|
|
||||||
controller: _confirmPasswordController,
|
|
||||||
obscureText: _obscureConfirmPassword,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: '確認密碼',
|
|
||||||
hintText: '請再次輸入密碼',
|
|
||||||
prefixIcon: const Icon(Icons.lock_outlined),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
_obscureConfirmPassword
|
|
||||||
? Icons.visibility_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
_obscureConfirmPassword = !_obscureConfirmPassword;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '請確認密碼';
|
|
||||||
}
|
|
||||||
if (value != _passwordController.text) {
|
|
||||||
return '密碼不一致';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
|
|
||||||
// Terms and Conditions
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
value: _acceptTerms,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
_acceptTerms = value ?? false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
_acceptTerms = !_acceptTerms;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 12),
|
|
||||||
child: RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
|
||||||
children: [
|
|
||||||
const TextSpan(text: '我同意'),
|
|
||||||
TextSpan(
|
|
||||||
text: '服務條款',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const TextSpan(text: '和'),
|
|
||||||
TextSpan(
|
|
||||||
text: '隱私政策',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
|
|
||||||
// Register Button
|
|
||||||
SizedBox(
|
|
||||||
height: 48,
|
|
||||||
child: ElevatedButton(
|
|
||||||
onPressed: (_isLoading || !_acceptTerms) ? null : _handleRegister,
|
|
||||||
child: _isLoading
|
|
||||||
? const SizedBox(
|
|
||||||
width: 20,
|
|
||||||
height: 20,
|
|
||||||
child: CircularProgressIndicator(strokeWidth: 2),
|
|
||||||
)
|
|
||||||
: const Text('註冊'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
|
|
||||||
// Back to Login
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
const Text('已經有帳號了?'),
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => context.go('/login'),
|
|
||||||
child: const Text('立即登入'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _handleRegister() async {
|
|
||||||
if (!_formKey.currentState!.validate()) return;
|
|
||||||
|
|
||||||
if (!_acceptTerms) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text('請同意服務條款和隱私政策')),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
_isLoading = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
// TODO: 實現實際的註冊邏輯
|
|
||||||
await Future.delayed(const Duration(seconds: 2)); // 模擬API調用
|
|
||||||
|
|
||||||
if (mounted) {
|
|
||||||
// 註冊成功,導航到首頁
|
|
||||||
context.go('/home');
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text('註冊成功!歡迎使用Drama Ling')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (mounted) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(content: Text('註冊失敗:$e')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
if (mounted) {
|
|
||||||
setState(() {
|
|
||||||
_isLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,547 +0,0 @@
|
||||||
/// 對話場景模型
|
|
||||||
class DialogueScene {
|
|
||||||
final String id;
|
|
||||||
final String name;
|
|
||||||
final String description;
|
|
||||||
final String backgroundImageUrl;
|
|
||||||
final String characterId;
|
|
||||||
final String difficultyLevel;
|
|
||||||
final List<String> tags;
|
|
||||||
final Map<String, dynamic> metadata;
|
|
||||||
|
|
||||||
DialogueScene({
|
|
||||||
required this.id,
|
|
||||||
required this.name,
|
|
||||||
required this.description,
|
|
||||||
required this.backgroundImageUrl,
|
|
||||||
required this.characterId,
|
|
||||||
required this.difficultyLevel,
|
|
||||||
this.tags = const [],
|
|
||||||
this.metadata = const {},
|
|
||||||
});
|
|
||||||
|
|
||||||
factory DialogueScene.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueScene(
|
|
||||||
id: json['id'] as String,
|
|
||||||
name: json['name'] as String,
|
|
||||||
description: json['description'] as String,
|
|
||||||
backgroundImageUrl: json['backgroundImageUrl'] as String,
|
|
||||||
characterId: json['characterId'] as String,
|
|
||||||
difficultyLevel: json['difficultyLevel'] as String,
|
|
||||||
tags: List<String>.from(json['tags'] ?? []),
|
|
||||||
metadata: json['metadata'] as Map<String, dynamic>? ?? {},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'name': name,
|
|
||||||
'description': description,
|
|
||||||
'backgroundImageUrl': backgroundImageUrl,
|
|
||||||
'characterId': characterId,
|
|
||||||
'difficultyLevel': difficultyLevel,
|
|
||||||
'tags': tags,
|
|
||||||
'metadata': metadata,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話角色模型
|
|
||||||
class DialogueCharacter {
|
|
||||||
final String id;
|
|
||||||
final String name;
|
|
||||||
final String description;
|
|
||||||
final String avatarUrl;
|
|
||||||
final String personality;
|
|
||||||
final String role;
|
|
||||||
final String background;
|
|
||||||
final List<String> specialities;
|
|
||||||
final Map<String, String> localizedNames;
|
|
||||||
|
|
||||||
DialogueCharacter({
|
|
||||||
required this.id,
|
|
||||||
required this.name,
|
|
||||||
required this.description,
|
|
||||||
required this.avatarUrl,
|
|
||||||
required this.personality,
|
|
||||||
required this.role,
|
|
||||||
required this.background,
|
|
||||||
this.specialities = const [],
|
|
||||||
this.localizedNames = const {},
|
|
||||||
});
|
|
||||||
|
|
||||||
factory DialogueCharacter.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueCharacter(
|
|
||||||
id: json['id'] as String,
|
|
||||||
name: json['name'] as String,
|
|
||||||
description: json['description'] as String,
|
|
||||||
avatarUrl: json['avatarUrl'] as String,
|
|
||||||
personality: json['personality'] as String,
|
|
||||||
role: json['role'] as String,
|
|
||||||
background: json['background'] as String,
|
|
||||||
specialities: List<String>.from(json['specialities'] ?? []),
|
|
||||||
localizedNames: Map<String, String>.from(json['localizedNames'] ?? {}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'name': name,
|
|
||||||
'description': description,
|
|
||||||
'avatarUrl': avatarUrl,
|
|
||||||
'personality': personality,
|
|
||||||
'role': role,
|
|
||||||
'background': background,
|
|
||||||
'specialities': specialities,
|
|
||||||
'localizedNames': localizedNames,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話消息模型
|
|
||||||
class DialogueMessage {
|
|
||||||
final String id;
|
|
||||||
final String content;
|
|
||||||
final bool isUser;
|
|
||||||
final DateTime timestamp;
|
|
||||||
final DialogueMessageType type;
|
|
||||||
final Map<String, dynamic>? metadata;
|
|
||||||
final String? audioUrl;
|
|
||||||
final double? confidence;
|
|
||||||
|
|
||||||
DialogueMessage({
|
|
||||||
required this.id,
|
|
||||||
required this.content,
|
|
||||||
required this.isUser,
|
|
||||||
required this.timestamp,
|
|
||||||
this.type = DialogueMessageType.text,
|
|
||||||
this.metadata,
|
|
||||||
this.audioUrl,
|
|
||||||
this.confidence,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory DialogueMessage.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueMessage(
|
|
||||||
id: json['id'] as String,
|
|
||||||
content: json['content'] as String,
|
|
||||||
isUser: json['isUser'] as bool,
|
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
|
||||||
type: DialogueMessageType.values.firstWhere(
|
|
||||||
(e) => e.toString() == 'DialogueMessageType.${json['type']}',
|
|
||||||
orElse: () => DialogueMessageType.text,
|
|
||||||
),
|
|
||||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
|
||||||
audioUrl: json['audioUrl'] as String?,
|
|
||||||
confidence: json['confidence'] as double?,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'content': content,
|
|
||||||
'isUser': isUser,
|
|
||||||
'timestamp': timestamp.toIso8601String(),
|
|
||||||
'type': type.toString().split('.').last,
|
|
||||||
'metadata': metadata,
|
|
||||||
'audioUrl': audioUrl,
|
|
||||||
'confidence': confidence,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話消息類型
|
|
||||||
enum DialogueMessageType {
|
|
||||||
text,
|
|
||||||
audio,
|
|
||||||
system,
|
|
||||||
hint,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話任務模型
|
|
||||||
class DialogueTask {
|
|
||||||
final String id;
|
|
||||||
final String title;
|
|
||||||
final String description;
|
|
||||||
final DialogueTaskType type;
|
|
||||||
final Map<String, dynamic> requirements;
|
|
||||||
final double progress;
|
|
||||||
final bool isCompleted;
|
|
||||||
final int maxAttempts;
|
|
||||||
final int currentAttempts;
|
|
||||||
final String? completionMessage;
|
|
||||||
|
|
||||||
DialogueTask({
|
|
||||||
required this.id,
|
|
||||||
required this.title,
|
|
||||||
required this.description,
|
|
||||||
required this.type,
|
|
||||||
required this.requirements,
|
|
||||||
this.progress = 0.0,
|
|
||||||
this.isCompleted = false,
|
|
||||||
this.maxAttempts = 3,
|
|
||||||
this.currentAttempts = 0,
|
|
||||||
this.completionMessage,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory DialogueTask.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueTask(
|
|
||||||
id: json['id'] as String,
|
|
||||||
title: json['title'] as String,
|
|
||||||
description: json['description'] as String,
|
|
||||||
type: DialogueTaskType.values.firstWhere(
|
|
||||||
(e) => e.toString() == 'DialogueTaskType.${json['type']}',
|
|
||||||
orElse: () => DialogueTaskType.conversation,
|
|
||||||
),
|
|
||||||
requirements: json['requirements'] as Map<String, dynamic>,
|
|
||||||
progress: json['progress'] as double? ?? 0.0,
|
|
||||||
isCompleted: json['isCompleted'] as bool? ?? false,
|
|
||||||
maxAttempts: json['maxAttempts'] as int? ?? 3,
|
|
||||||
currentAttempts: json['currentAttempts'] as int? ?? 0,
|
|
||||||
completionMessage: json['completionMessage'] as String?,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'title': title,
|
|
||||||
'description': description,
|
|
||||||
'type': type.toString().split('.').last,
|
|
||||||
'requirements': requirements,
|
|
||||||
'progress': progress,
|
|
||||||
'isCompleted': isCompleted,
|
|
||||||
'maxAttempts': maxAttempts,
|
|
||||||
'currentAttempts': currentAttempts,
|
|
||||||
'completionMessage': completionMessage,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
DialogueTask copyWith({
|
|
||||||
String? id,
|
|
||||||
String? title,
|
|
||||||
String? description,
|
|
||||||
DialogueTaskType? type,
|
|
||||||
Map<String, dynamic>? requirements,
|
|
||||||
double? progress,
|
|
||||||
bool? isCompleted,
|
|
||||||
int? maxAttempts,
|
|
||||||
int? currentAttempts,
|
|
||||||
String? completionMessage,
|
|
||||||
}) {
|
|
||||||
return DialogueTask(
|
|
||||||
id: id ?? this.id,
|
|
||||||
title: title ?? this.title,
|
|
||||||
description: description ?? this.description,
|
|
||||||
type: type ?? this.type,
|
|
||||||
requirements: requirements ?? this.requirements,
|
|
||||||
progress: progress ?? this.progress,
|
|
||||||
isCompleted: isCompleted ?? this.isCompleted,
|
|
||||||
maxAttempts: maxAttempts ?? this.maxAttempts,
|
|
||||||
currentAttempts: currentAttempts ?? this.currentAttempts,
|
|
||||||
completionMessage: completionMessage ?? this.completionMessage,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話任務類型
|
|
||||||
enum DialogueTaskType {
|
|
||||||
conversation, // 完成對話
|
|
||||||
vocabulary, // 使用指定詞彙
|
|
||||||
grammar, // 語法練習
|
|
||||||
pronunciation, // 發音練習
|
|
||||||
comprehension, // 理解測試
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話分析結果模型
|
|
||||||
class DialogueAnalysis {
|
|
||||||
final String id;
|
|
||||||
final String userReply;
|
|
||||||
final DateTime timestamp;
|
|
||||||
|
|
||||||
// 三維度評分
|
|
||||||
final double grammarScore;
|
|
||||||
final double semanticsScore;
|
|
||||||
final double fluencyScore;
|
|
||||||
|
|
||||||
// 詳細分析
|
|
||||||
final List<GrammarIssue> grammarIssues;
|
|
||||||
final List<String> usedVocabulary;
|
|
||||||
final List<String> missedVocabulary;
|
|
||||||
final List<String> suggestions;
|
|
||||||
|
|
||||||
// 任務相關
|
|
||||||
final double? taskProgress;
|
|
||||||
final bool isDialogueComplete;
|
|
||||||
|
|
||||||
// 其他
|
|
||||||
final Map<String, dynamic> metadata;
|
|
||||||
|
|
||||||
DialogueAnalysis({
|
|
||||||
required this.id,
|
|
||||||
required this.userReply,
|
|
||||||
required this.timestamp,
|
|
||||||
required this.grammarScore,
|
|
||||||
required this.semanticsScore,
|
|
||||||
required this.fluencyScore,
|
|
||||||
this.grammarIssues = const [],
|
|
||||||
this.usedVocabulary = const [],
|
|
||||||
this.missedVocabulary = const [],
|
|
||||||
this.suggestions = const [],
|
|
||||||
this.taskProgress,
|
|
||||||
this.isDialogueComplete = false,
|
|
||||||
this.metadata = const {},
|
|
||||||
});
|
|
||||||
|
|
||||||
factory DialogueAnalysis.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueAnalysis(
|
|
||||||
id: json['id'] as String,
|
|
||||||
userReply: json['userReply'] as String,
|
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
|
||||||
grammarScore: json['grammarScore'] as double,
|
|
||||||
semanticsScore: json['semanticsScore'] as double,
|
|
||||||
fluencyScore: json['fluencyScore'] as double,
|
|
||||||
grammarIssues: (json['grammarIssues'] as List?)
|
|
||||||
?.map((e) => GrammarIssue.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList() ?? [],
|
|
||||||
usedVocabulary: List<String>.from(json['usedVocabulary'] ?? []),
|
|
||||||
missedVocabulary: List<String>.from(json['missedVocabulary'] ?? []),
|
|
||||||
suggestions: List<String>.from(json['suggestions'] ?? []),
|
|
||||||
taskProgress: json['taskProgress'] as double?,
|
|
||||||
isDialogueComplete: json['isDialogueComplete'] as bool? ?? false,
|
|
||||||
metadata: json['metadata'] as Map<String, dynamic>? ?? {},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'userReply': userReply,
|
|
||||||
'timestamp': timestamp.toIso8601String(),
|
|
||||||
'grammarScore': grammarScore,
|
|
||||||
'semanticsScore': semanticsScore,
|
|
||||||
'fluencyScore': fluencyScore,
|
|
||||||
'grammarIssues': grammarIssues.map((e) => e.toJson()).toList(),
|
|
||||||
'usedVocabulary': usedVocabulary,
|
|
||||||
'missedVocabulary': missedVocabulary,
|
|
||||||
'suggestions': suggestions,
|
|
||||||
'taskProgress': taskProgress,
|
|
||||||
'isDialogueComplete': isDialogueComplete,
|
|
||||||
'metadata': metadata,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語法問題模型
|
|
||||||
class GrammarIssue {
|
|
||||||
final String type;
|
|
||||||
final String description;
|
|
||||||
final String originalText;
|
|
||||||
final String suggestedText;
|
|
||||||
final int position;
|
|
||||||
final int length;
|
|
||||||
final GrammarIssueSeverity severity;
|
|
||||||
|
|
||||||
GrammarIssue({
|
|
||||||
required this.type,
|
|
||||||
required this.description,
|
|
||||||
required this.originalText,
|
|
||||||
required this.suggestedText,
|
|
||||||
required this.position,
|
|
||||||
required this.length,
|
|
||||||
required this.severity,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory GrammarIssue.fromJson(Map<String, dynamic> json) {
|
|
||||||
return GrammarIssue(
|
|
||||||
type: json['type'] as String,
|
|
||||||
description: json['description'] as String,
|
|
||||||
originalText: json['originalText'] as String,
|
|
||||||
suggestedText: json['suggestedText'] as String,
|
|
||||||
position: json['position'] as int,
|
|
||||||
length: json['length'] as int,
|
|
||||||
severity: GrammarIssueSeverity.values.firstWhere(
|
|
||||||
(e) => e.toString() == 'GrammarIssueSeverity.${json['severity']}',
|
|
||||||
orElse: () => GrammarIssueSeverity.minor,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'type': type,
|
|
||||||
'description': description,
|
|
||||||
'originalText': originalText,
|
|
||||||
'suggestedText': suggestedText,
|
|
||||||
'position': position,
|
|
||||||
'length': length,
|
|
||||||
'severity': severity.toString().split('.').last,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 語法問題嚴重程度
|
|
||||||
enum GrammarIssueSeverity {
|
|
||||||
minor,
|
|
||||||
moderate,
|
|
||||||
major,
|
|
||||||
critical,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 對話最終得分模型
|
|
||||||
class DialogueScore {
|
|
||||||
final double grammarScore;
|
|
||||||
final double semanticsScore;
|
|
||||||
final double fluencyScore;
|
|
||||||
final double taskBonus;
|
|
||||||
final double vocabularyBonus;
|
|
||||||
final double timeBonus;
|
|
||||||
final double totalScore;
|
|
||||||
final int starRating;
|
|
||||||
final DateTime timestamp;
|
|
||||||
final Map<String, dynamic> breakdown;
|
|
||||||
|
|
||||||
DialogueScore({
|
|
||||||
required this.grammarScore,
|
|
||||||
required this.semanticsScore,
|
|
||||||
required this.fluencyScore,
|
|
||||||
required this.taskBonus,
|
|
||||||
required this.vocabularyBonus,
|
|
||||||
required this.timeBonus,
|
|
||||||
required this.totalScore,
|
|
||||||
required this.starRating,
|
|
||||||
DateTime? timestamp,
|
|
||||||
this.breakdown = const {},
|
|
||||||
}) : timestamp = timestamp ?? DateTime.now();
|
|
||||||
|
|
||||||
factory DialogueScore.fromJson(Map<String, dynamic> json) {
|
|
||||||
return DialogueScore(
|
|
||||||
grammarScore: json['grammarScore'] as double,
|
|
||||||
semanticsScore: json['semanticsScore'] as double,
|
|
||||||
fluencyScore: json['fluencyScore'] as double,
|
|
||||||
taskBonus: json['taskBonus'] as double,
|
|
||||||
vocabularyBonus: json['vocabularyBonus'] as double,
|
|
||||||
timeBonus: json['timeBonus'] as double,
|
|
||||||
totalScore: json['totalScore'] as double,
|
|
||||||
starRating: json['starRating'] as int,
|
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
|
||||||
breakdown: json['breakdown'] as Map<String, dynamic>? ?? {},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'grammarScore': grammarScore,
|
|
||||||
'semanticsScore': semanticsScore,
|
|
||||||
'fluencyScore': fluencyScore,
|
|
||||||
'taskBonus': taskBonus,
|
|
||||||
'vocabularyBonus': vocabularyBonus,
|
|
||||||
'timeBonus': timeBonus,
|
|
||||||
'totalScore': totalScore,
|
|
||||||
'starRating': starRating,
|
|
||||||
'timestamp': timestamp.toIso8601String(),
|
|
||||||
'breakdown': breakdown,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
String get grade {
|
|
||||||
if (totalScore >= 90) return 'A+';
|
|
||||||
if (totalScore >= 80) return 'A';
|
|
||||||
if (totalScore >= 70) return 'B';
|
|
||||||
if (totalScore >= 60) return 'C';
|
|
||||||
if (totalScore >= 50) return 'D';
|
|
||||||
return 'F';
|
|
||||||
}
|
|
||||||
|
|
||||||
String get comment {
|
|
||||||
switch (starRating) {
|
|
||||||
case 3:
|
|
||||||
return '優秀!你的表現非常出色!';
|
|
||||||
case 2:
|
|
||||||
return '很好!繼續努力就能更進一步!';
|
|
||||||
case 1:
|
|
||||||
return '不錯!還有改進的空間。';
|
|
||||||
default:
|
|
||||||
return '需要更多練習,加油!';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 詞彙項目模型
|
|
||||||
class VocabularyItem {
|
|
||||||
final String id;
|
|
||||||
final String word;
|
|
||||||
final String definition;
|
|
||||||
final String pronunciation;
|
|
||||||
final List<String> examples;
|
|
||||||
final String category;
|
|
||||||
final int difficulty;
|
|
||||||
final bool isRequired;
|
|
||||||
final bool isUsed;
|
|
||||||
|
|
||||||
VocabularyItem({
|
|
||||||
required this.id,
|
|
||||||
required this.word,
|
|
||||||
required this.definition,
|
|
||||||
required this.pronunciation,
|
|
||||||
this.examples = const [],
|
|
||||||
this.category = '',
|
|
||||||
this.difficulty = 1,
|
|
||||||
this.isRequired = false,
|
|
||||||
this.isUsed = false,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory VocabularyItem.fromJson(Map<String, dynamic> json) {
|
|
||||||
return VocabularyItem(
|
|
||||||
id: json['id'] as String,
|
|
||||||
word: json['word'] as String,
|
|
||||||
definition: json['definition'] as String,
|
|
||||||
pronunciation: json['pronunciation'] as String,
|
|
||||||
examples: List<String>.from(json['examples'] ?? []),
|
|
||||||
category: json['category'] as String? ?? '',
|
|
||||||
difficulty: json['difficulty'] as int? ?? 1,
|
|
||||||
isRequired: json['isRequired'] as bool? ?? false,
|
|
||||||
isUsed: json['isUsed'] as bool? ?? false,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'id': id,
|
|
||||||
'word': word,
|
|
||||||
'definition': definition,
|
|
||||||
'pronunciation': pronunciation,
|
|
||||||
'examples': examples,
|
|
||||||
'category': category,
|
|
||||||
'difficulty': difficulty,
|
|
||||||
'isRequired': isRequired,
|
|
||||||
'isUsed': isUsed,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
VocabularyItem copyWith({
|
|
||||||
String? id,
|
|
||||||
String? word,
|
|
||||||
String? definition,
|
|
||||||
String? pronunciation,
|
|
||||||
List<String>? examples,
|
|
||||||
String? category,
|
|
||||||
int? difficulty,
|
|
||||||
bool? isRequired,
|
|
||||||
bool? isUsed,
|
|
||||||
}) {
|
|
||||||
return VocabularyItem(
|
|
||||||
id: id ?? this.id,
|
|
||||||
word: word ?? this.word,
|
|
||||||
definition: definition ?? this.definition,
|
|
||||||
pronunciation: pronunciation ?? this.pronunciation,
|
|
||||||
examples: examples ?? this.examples,
|
|
||||||
category: category ?? this.category,
|
|
||||||
difficulty: difficulty ?? this.difficulty,
|
|
||||||
isRequired: isRequired ?? this.isRequired,
|
|
||||||
isUsed: isUsed ?? this.isUsed,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||