Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
N
Neos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Packages
    • Packages
    • List
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issues
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • MyCard
  • Neos
  • Merge Requests
  • !168

Merged
Opened Apr 14, 2023 by timel@timel7 of 7 tasks completed7/7 tasks
  • Report abuse
Report abuse

Dev/refactor duel

  • Overview 6
  • Commits 9
  • Pipelines 5
  • Changes 175

目的:规范文件夹结构,便于代码的阅读理解和增改。

  • 将ui/Duel之中的组件按照message(提供额外信息)和play mat(决斗盘)进行划分
  • 使用官方的组件英文名(墓地:graveyard,除外:banish zone)
  • 将所有组件名字按照React规范改成大写开头的驼峰
  • ui/Duel/utils单独作为文件夹,不同的方法单独放在不同的文件
  • 加入index.ts统一往外导出组件
  • 添加 eslint-plugin-simple-import-sort,使得导入更加规范
  • 将从JSON直接导入的配置,改成从config模块导入

重构后的文件夹结构:

.
├── Duel
│   ├── Layout.tsx
│   ├── Main.tsx
│   ├── Message
│   │   ├── index.ts
│   │   ├── Alert.tsx
│   │   ├── CardListModal.tsx
│   │   ├── CardModal.tsx
│   │   ├── CheckCardModal.tsx
│   │   ├── CheckCardModalV2.tsx
│   │   ├── CheckCardModalV3.tsx
│   │   ├── CheckCounterModal.tsx
│   │   ├── DragModal.tsx
│   │   ├── HintNotification.tsx
│   │   ├── OptionModal.tsx
│   │   ├── Phase.tsx
│   │   ├── PositionModal.tsx
│   │   ├── SendBox.tsx
│   │   ├── SortCardModal.tsx
│   │   ├── Status.tsx
│   │   ├── TimeLine.tsx
│   │   └── YesNoModal.tsx
│   ├── PlayMat
│   │   ├── index.tsx
│   │   ├── BanishedZone.tsx
│   │   ├── Deck.tsx
│   │   ├── ExtraDeck.tsx
│   │   ├── Field.tsx
│   │   ├── FixedSlot.tsx
│   │   ├── Graveyard.tsx
│   │   ├── Hands.tsx
│   │   ├── Magics.tsx
│   │   ├── Monsters.tsx
│   │   └── SingleSlot.tsx
│   ├── spring
│   │   ├── animated.ts
│   │   ├── customProps.ts
│   │   ├── index.ts
│   │   └── primitives.ts
│   └── utils
│       ├── cardSlot.ts
│       ├── index.ts
│       ├── interactTypeToString.ts
│       └── zip.ts
├── LazyLoad.tsx
├── Login.tsx
├── Mora.tsx
├── Neos.tsx
├── WaitRoom.tsx
└── editor.tsx

5 directories, 45 files
Edited Apr 15, 2023 by timel
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: mycard/Neos!168

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.