당직근무 0.16.0 (웹 2026-12-01.1): 관리자 공지 메뉴와 앱 첫 화면 공지 띠

This commit is contained in:
블리어 committed 2026-12-01 05:50:27 +00:00
1 parent 2116ef5607
commit 5f2e2f6952
22 files changed
+265 -27

No files matched your search

@@ -138,6 +138,20 @@ class MainActivity : Activity() {
space(content, 8)
content.addView(label(if (SyncClient.connected(this)) SyncClient.message else "나의 근무 기록 · 이 기기에 저장", 12f, muted))
space(content, 20)
// 관리자 '공지'에서 켠 공지 띠를 홈페이지와 같은 색으로 맨 위에 보인다(0.16.0).
val notice = Notice.load(this)
if (notice.shown) {
val bar = row().apply {
background = background(if (notice.warn) 0xFFF8ECE5.toInt() else 0xFFE9EEF5.toInt(), 5, if (notice.warn) 0xFFE8CBBB.toInt() else 0xFFCFD8E3.toInt())
setPadding(dp(14), dp(11), dp(14), dp(11))
contentDescription = "공지 " + notice.text
}
bar.addView(View(this).apply { background = GradientDrawable().apply { shape = GradientDrawable.OVAL; setColor(if (notice.warn) 0xFFB65B3C.toInt() else 0xFF365FAD.toInt()) } },
LinearLayout.LayoutParams(dp(8), dp(8)).apply { marginEnd = dp(10) })
bar.addView(label(notice.text, 14f, ink), LinearLayout.LayoutParams(0, -2, 1f))
content.addView(bar, LinearLayout.LayoutParams(-1, -2))
space(content, 12)
}
val todayCard = card(content, 0xFFFFFEFA.toInt())
todayCard.addView(label(today.format(DateTimeFormatter.ofPattern("M월 d일 EEEE", Locale.KOREAN)), 12f, muted))
space(todayCard, 6)