끝난 이클립스 합류 문구 · HOME 헤더 POP · 다국어 HOME 레이아웃 · 캠페인 표시 수정
This commit is contained in:
@@ -100,7 +100,10 @@ class AppNotification {
|
||||
/// 없으면 종류 이름([NotificationKind.label])으로 물러난다.
|
||||
final String? source;
|
||||
|
||||
String get sourceLabel => source ?? kind.label;
|
||||
String get sourceLabel =>
|
||||
source ??
|
||||
(kind == NotificationKind.campaign ? campaignNotificationLabel(id) : null) ??
|
||||
kind.label;
|
||||
|
||||
/// 눌렀을 때 열 대상 문서 경로(`quests/{id}` · `campaigns/{id}` 등). 서버가 싣는다.
|
||||
/// 명세가 *이동 X* 로 정한 종류(이클립스 · 아이템)는 경로가 있어도 쓰지 않는다.
|
||||
@@ -125,6 +128,17 @@ class AppNotification {
|
||||
);
|
||||
}
|
||||
|
||||
/// 캠페인 알림의 세부 종류 이름. 서버(`campaign/settle.ts` `notifyOnce`)는 `eventType` 을 모두
|
||||
/// `campaign` 으로 싣고 문서 ID 앞머리로 가른다 — `campaignSuccess_` · `campaignRefund_`(목표 미달 ·
|
||||
/// 취소 환불) · `campaignCancel_`(개설자 등록비 반환) · `campaignReport_`. 모르는 앞머리는 null
|
||||
/// (종류 이름 「캠페인 달성」으로 물러난다).
|
||||
String? campaignNotificationLabel(String id) => switch (id.split('_').first) {
|
||||
'campaignRefund' => appL10n.notifKindCampaignRefund,
|
||||
'campaignCancel' => appL10n.notifKindCampaignCancel,
|
||||
'campaignReport' => appL10n.notifKindCampaignReport,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// 날짜 머리글. 명세 — *오늘 및 어제를 제외한 과거는 yyyy.mm.dd 로 표시*.
|
||||
String notificationDayLabel(DateTime at, {DateTime? now}) {
|
||||
final today = _dateOnly(now ?? DateTime.now());
|
||||
|
||||
Reference in New Issue
Block a user