Skip to content

Commit cda37e0

Browse files
authored
Merge pull request #78 from Retsomm/dev
refactor(mobile): 清償技術債(手勢/API重試/元件拆分/ErrorBoundary)+ 修正合圖姓名殘留與 Andro…
2 parents 0b20e81 + be872f6 commit cda37e0

37 files changed

Lines changed: 718 additions & 2145 deletions

app/api/aura-flow/live-svg/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ACT_CONSCIOUS,
1111
ACT_UNCONSCIOUS,
1212
INTEGRATION_PAIRS,
13-
} from '@/components/humanDesign/hd-chart-data'
13+
} from '@/shared/humanDesign/hd-chart-data'
1414

1515
// Lib CenterName uses 'ego' / 'solarPlexus'; chart data uses 'heart' / 'solar'
1616
const LIB_TO_CHART: Record<string, string> = { ego: 'heart', solarPlexus: 'solar' }

components/humanDesign/BodyGraph.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ACT_CONSCIOUS,
1313
ACT_UNCONSCIOUS,
1414
type ChartChannel,
15-
} from './hd-chart-data'
15+
} from '@/shared/humanDesign/hd-chart-data'
1616

1717
export type { GateActivation, Activations }
1818

components/humanDesign/ChartView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import PlanetIcon from '@/components/humanDesign/PlanetIcon'
77
import { fmtGate, fmtCenterName } from '@/utils/format'
88
import BodyGraph, { type SelectionPayload, type AnnotationLabels } from '@/components/humanDesign/BodyGraph'
99
import DetailDrawer from '@/components/humanDesign/DetailDrawer'
10-
import { HD_GATES, HD_CENTERS_INFO, HD_CHANNELS } from '@/components/humanDesign/hd-chart-data'
10+
import { HD_GATES, HD_CENTERS_INFO, HD_CHANNELS } from '@/shared/humanDesign/hd-chart-data'
1111
import {
1212
CENTER_INFO,
1313
CHANNEL_DEFS,

components/humanDesign/DetailDrawer.tsx

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import { useEffect, useState } from 'react'
44
import { fmtGate } from '@/utils/format'
5-
import { HD_GATES, HD_CENTERS_INFO, type ChartChannel } from './hd-chart-data'
5+
import { HD_GATES, HD_CENTERS_INFO, HD_CHANNELS, INTEGRATION_PAIRS, type ChartChannel } from '@/shared/humanDesign/hd-chart-data'
66
import type { SelectionPayload } from './BodyGraph'
7-
import { HD_TYPE_CONTENT, HD_PROFILE_CONTENT, HD_AUTHORITY_CONTENT, HD_DEFINITION_CONTENT } from './hd-summary-data'
8-
import type { GateCrossData } from './hd-cross-data'
7+
import { HD_TYPE_CONTENT, HD_PROFILE_CONTENT, HD_AUTHORITY_CONTENT, HD_DEFINITION_CONTENT } from '@/shared/humanDesign/hd-summary-data'
8+
import type { GateCrossData } from '@/shared/humanDesign/hd-cross-data'
99

1010
interface DetailDrawerProps {
1111
selection: SelectionPayload | null
@@ -20,7 +20,7 @@ export default function DetailDrawer({ selection, onClose, onJumpToGate }: Detai
2020
useEffect(() => {
2121
if (selection?.kind !== 'cross' || crossContent) return
2222
let cancelled = false
23-
import('./hd-cross-data').then(m => {
23+
import('@/shared/humanDesign/hd-cross-data').then(m => {
2424
if (!cancelled) setCrossContent(m.HD_CROSS_CONTENT)
2525
})
2626
return () => { cancelled = true }
@@ -146,26 +146,25 @@ export default function DetailDrawer({ selection, onClose, onJumpToGate }: Detai
146146
</>
147147
)
148148
} else if (kind === 'integration') {
149-
const integrationList = [
150-
{ a: 10, b: 20, name: { zh: '覺醒通道', en: 'Awakening' }, desc: { zh: '你對「真不真實」有一種近乎本能的敏感,要求自己活得誠實有原則,這種處世態度讓身邊的人不自覺開始思考「我是不是也可以更做自己一點」。你只在乎「當下」,這種活在當下的能量是你給周圍人最大的禮物之一。', en: 'Awakening to self — authentic expression in the now.' } },
151-
{ a: 10, b: 34, name: { zh: '探索通道', en: 'Exploration' }, desc: { zh: '你就是要走自己的路,當你按照自己的感覺和直覺行動,你會感覺對了、有力量。這條通道有個特別能量:當你真的活出自己的樣子,你身邊的人也會被感染,開始有勇氣去做自己。', en: "Acting in accordance with one's own convictions." } },
152-
{ a: 10, b: 57, name: { zh: '生存力通道', en: 'Perfected Form' }, desc: { zh: '你有一種很難用邏輯解釋的化險為夷能力,脾中心有一套超靈敏的生存雷達,在危險靠近之前就悄悄提醒你。你的直覺靠「聽起來對不對」來判斷,前提是你要願意相信它。', en: "Intuition of one's own survival and self-expression." } },
153-
{ a: 20, b: 34, name: { zh: '忙碌通道', en: 'Charisma' }, desc: { zh: '當你找到一件真心喜歡的事,你會整個人燃起來,精力充沛停不下來,旁邊的人光看著你就會被帶動。但不是每一件事都值得你去忙——只為你愛的事忙,才是這條通道最美的狀態。', en: 'The present-moment exhibitor. The power of being busy in the now.' } },
154-
{ a: 34, b: 57, name: { zh: '力量通道', en: 'Power' }, desc: { zh: '這條通道讓你天生精力充沛,在關鍵時刻反應特別快特別準,在危機處理上特別厲害。你很自然地想替人療傷解決問題,但要先照顧好自己才能照顧好別人,選擇值得你投入力量的人和事。', en: 'Archetypal existence — perfect survival intuition.' } },
155-
]
149+
// 六條整合通道皆已存在於 HD_CHANNELS,直接依 INTEGRATION_PAIRS 篩選,
150+
// 不重複維護一份名稱/說明;20-57 是複合圖形的主幹(trunk),與其餘四條
151+
// 支線(10-20/10-34/10-57/20-34/34-57)並列顯示,不特別區分。
152+
const integrationChannels = Array.from(INTEGRATION_PAIRS)
153+
.map(pairId => HD_CHANNELS.find(ch => `${ch.from}-${ch.to}` === pairId))
154+
.filter((ch): ch is ChartChannel => !!ch)
156155
kicker = '整合'
157156
title = '整合通道'
158-
sub = '四條整合通道'
157+
sub = `${integrationChannels.length} 條整合通道`
159158
body = (
160159
<>
161160
<p className="lead">這些通道代表你整體的整合力量與表達方式。</p>
162-
<h4>四條主要通道</h4>
161+
<h4>{integrationChannels.length} 條主要通道</h4>
163162
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
164-
{integrationList.map(ch => (
165-
<div key={`${ch.a}-${ch.b}`} className="hd-ch-card">
163+
{integrationChannels.map(ch => (
164+
<div key={ch.id} className="hd-ch-card">
166165
<div className="hd-ch-card-head">
167166
<span className="hd-ch-card-title">{pick(ch.name)}</span>
168-
<span className="hd-ch-card-ref">CH.{ch.a}{ch.b}</span>
167+
<span className="hd-ch-card-ref">CH.{ch.from}{ch.to}</span>
169168
</div>
170169
<p style={{ margin: 0, fontSize: 13, lineHeight: 1.55 }}>{pick(ch.desc)}</p>
171170
</div>

0 commit comments

Comments
 (0)