From 5238fc4ef3496bd0ad95ce70bea869c77b8d9133 Mon Sep 17 00:00:00 2001 From: Sn-Kinos Date: Mon, 5 Oct 2026 17:48:30 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=B1=EC=9A=B4=20=EC=84=B1=EC=9E=A5?= =?UTF-8?q?=EB=A5=A0=20=ED=91=9C=EC=8B=9C=20=C2=B7=20=EB=82=B4=20=ED=96=89?= =?UTF-8?q?=EC=84=B1=20=EC=B9=B8=20=EA=B7=B8=EB=A6=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/features/galaxy/galaxy_home_screen.dart | 6 ++++-- app/lib/features/planet/planet_data.dart | 4 ++++ app/lib/features/planet/planet_detail_screen.dart | 11 ++++++----- .../features/planet/planet_repository_firestore.dart | 1 + 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/lib/features/galaxy/galaxy_home_screen.dart b/app/lib/features/galaxy/galaxy_home_screen.dart index 4372ff8..57657b6 100644 --- a/app/lib/features/galaxy/galaxy_home_screen.dart +++ b/app/lib/features/galaxy/galaxy_home_screen.dart @@ -29,9 +29,11 @@ class GalaxyHomeScreen extends StatefulWidget { /// 카드 그림 — HOME · 맵과 같이 팬덤 `stage` 로 고른다. Stage0 성운만 성운 그림이고 /// 정식 행성은 시안 행성 그림(`image 8` · 파란 행성 벡터)을 칸마다 번갈아 쓴다. /// 예전엔 칸 순서로 골라 둘째 칸이 행성이어도 성운 그림이 됐다. - static String cardImageOf(PlanetNode p, int i) => p.stage == 0 + // ponytail: 행성마다 고정된 두 그림 중 하나(id 기준) — 칸 순서가 바뀌어도 같은 그림. + // 탄생 때 고른 모양 · 색 에셋은 최신 Figma 행성 에셋 교체(10/8)에서 연결한다. + static String cardImageOf(PlanetNode p, [int _ = 0]) => p.stage == 0 ? 'assets/figma/nebula-card.png' - : (i.isEven + : (p.id.codeUnits.fold(0, (a, c) => a + c).isEven ? 'assets/figma/planet-detail-hero.png' : 'assets/figma/planet-earth.png'); diff --git a/app/lib/features/planet/planet_data.dart b/app/lib/features/planet/planet_data.dart index 266ac8c..b1bcf78 100644 --- a/app/lib/features/planet/planet_data.dart +++ b/app/lib/features/planet/planet_data.dart @@ -248,8 +248,12 @@ class PlanetDetail { this.ownerPhoto, this.fpiUpdatedAt, this.joined = true, + this.growthPop = 0, }); + /// 성운 누적 POP(`fandoms.growthPop`) — 성운 FPI 탭 「성운 성장률」의 분자. + final int growthPop; + /// 내가 이 행성/성운의 멤버인가(`fandoms/{id}/members/{uid}` 존재). 히어로의 /// 「가입중 / 가입하기」 알약이 이 값을 그린다(명세 §2.72 「가입 버튼 - 소속 상태」). final bool joined; diff --git a/app/lib/features/planet/planet_detail_screen.dart b/app/lib/features/planet/planet_detail_screen.dart index f130cd9..6d3f4d9 100644 --- a/app/lib/features/planet/planet_detail_screen.dart +++ b/app/lib/features/planet/planet_detail_screen.dart @@ -408,7 +408,7 @@ class _FpiTab extends StatelessWidget { padding: const EdgeInsets.all(16), sliver: SliverList.list( children: [ - const _NebulaFpi(), + _NebulaFpi(pop: detail.growthPop), ], ), ), @@ -499,10 +499,12 @@ class _FpiTab extends StatelessWidget { /// /// 「기여 현황」 카드(#1a1a1c r12 · 안쪽 12/16) — 성운 성장률 · 진행 막대 · 0 ~ 목표, /// 「실시간 기여 랭킹」 — 1위 왕관 · 빈 원 80 · 「아직 기여자가 없어요」. -/// 목표는 원장 B-10 의 1,000 POP(사본 500,000 은 과거 수치). 성운 누적 POP 과 기여자 -/// 목록은 상세 데이터에 아직 없어 0 · 빈 상태로 둔다. +/// 목표는 원장 B-10 의 1,000 POP(사본 500,000 은 과거 수치). 분자는 서버 `growthPop`. +/// 기여자 목록은 상세 데이터에 아직 없어 빈 상태로 둔다. class _NebulaFpi extends StatelessWidget { - const _NebulaFpi(); + const _NebulaFpi({required this.pop}); + + final int pop; static TextStyle _b(double size, Color color, {double? height}) => TextStyle( fontFamily: AppFonts.body, @@ -524,7 +526,6 @@ class _NebulaFpi extends StatelessWidget { @override Widget build(BuildContext context) { - const pop = 0; final target = defaultNebulaTargets.pop; final rate = pop * 100 ~/ target; return Column( diff --git a/app/lib/features/planet/planet_repository_firestore.dart b/app/lib/features/planet/planet_repository_firestore.dart index 3822d92..8db128c 100644 --- a/app/lib/features/planet/planet_repository_firestore.dart +++ b/app/lib/features/planet/planet_repository_firestore.dart @@ -169,6 +169,7 @@ class FirestorePlanetRepository implements PlanetRepository { }, isNebula: stage == null ? nebula : stage == 0, members: fandom.intOr('memberCount'), + growthPop: fandom.intOr('growthPop'), scores: [ for (final metric in FpiMetric.values) FpiScore(