HOME 퀘스트 줄 분류 · 일시 정지 표기
This commit is contained in:
@@ -11,7 +11,7 @@ library;
|
||||
import 'package:flutter/painting.dart' show Color;
|
||||
import '../../core/i18n/app_locale.dart';
|
||||
import '../../core/ui/planet_25d.dart' show planetColors;
|
||||
import '../quest/quest_data.dart' show QuestType;
|
||||
import '../quest/quest_data.dart' show QuestSession, QuestType;
|
||||
import '../inside/inside_data.dart' show InsideQuestion, SampleInsideRepository;
|
||||
|
||||
/// 팬덤 행성의 성장 상태. 정책 근거는 정책 설계서 §P-08.
|
||||
@@ -182,12 +182,16 @@ class QuestSummary {
|
||||
this.endsAt,
|
||||
this.type,
|
||||
this.category,
|
||||
this.pausedSession,
|
||||
});
|
||||
|
||||
/// 일시 정지 세션(원장 C-83). 있으면 보조 줄이 「카테고리 · 일시 정지 · n/m」.
|
||||
final QuestSession? pausedSession;
|
||||
|
||||
final String title;
|
||||
|
||||
/// 보조 줄 — 퀘스트 카테고리(사본 「오늘의 출석체크」 · 「커뮤니티」). 퀘스트 목록의
|
||||
/// 카테고리 이름과 같은 원천(`QuestType.label`).
|
||||
/// 카테고리 이름과 같은 원천(`QuestType.category`).
|
||||
final String? category;
|
||||
|
||||
/// `quests.type`. 줄 왼쪽 아이콘을 고르는 데만 쓴다(없으면 제목으로 고른다).
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'home_data.dart';
|
||||
import '../inside/inside_repository_firestore.dart' show insideQuestionFrom;
|
||||
import '../quest/quest_data.dart' show QuestType;
|
||||
import '../quest/quest_repository_firestore.dart'
|
||||
show openTimeAttack, questTitle, questToday;
|
||||
show FirestoreQuestRepository, openTimeAttack, questTitle, questToday;
|
||||
import '../../core/i18n/app_locale.dart';
|
||||
|
||||
/// 홈의 실 서버 구현 — 화면 대조 원장 F1.
|
||||
@@ -413,7 +413,14 @@ class FirestoreHomeRepository implements HomeRepository {
|
||||
return QuestSummary(
|
||||
title: questTitle(quest),
|
||||
type: QuestType.parse(quest.strOr('type')),
|
||||
category: QuestType.parse(quest.strOr('type')).label,
|
||||
// 퀘스트 목록 · 상세와 같은 분류 표기(Figma `264:46867` 줄 아래 「커뮤니티」).
|
||||
category: QuestType.parse(quest.strOr('type')).category,
|
||||
pausedSession: progress == null
|
||||
? null
|
||||
: FirestoreQuestRepository.pausedSessionOf(
|
||||
QuestType.parse(quest.strOr('type')),
|
||||
progress,
|
||||
),
|
||||
rewardPop:
|
||||
openTimeAttack(quest)?.rewardPop ??
|
||||
QuestType.parse(quest.strOr('type')).rewardFrom(quest, policy),
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import '../../../core/theme/tokens.dart';
|
||||
import '../../../core/ui/app_icons.dart';
|
||||
import '../../quest/widgets/quest_card_tile.dart'
|
||||
show QuestIconBox, questImageFor;
|
||||
show QuestIconBox, questImageFor, questSubLine;
|
||||
import '../home_data.dart';
|
||||
|
||||
/// 홈 「TODAY'S QUEST」 묶음 — Figma 「홈」 `2097:16428`: 343×270 · r12 안에 343×90 줄
|
||||
@@ -98,7 +98,8 @@ class QuestRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
_sub(quest.category ?? ''),
|
||||
// 진행중 탭 카드와 같은 일시 정지 표기(원장 C-83).
|
||||
_sub(questSubLine(quest.category ?? '', quest.pausedSession)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user