From a07e026dc6272840a81f2d498bac5c511b886bb0 Mon Sep 17 00:00:00 2001 From: GeonWoo <56182112+lgvv@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:26:37 +0900 Subject: [PATCH] =?UTF-8?q?[2.0.0]=20=EA=B3=B5=EC=A7=80=20border=20?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20=EB=A7=88=EC=A7=84=20=EB=B0=8F=20=EB=8C=80?= =?UTF-8?q?=ED=91=9C=ED=95=99=EA=B3=BC=20=EC=B9=A9=20UI=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KuringApp/KuringApp.xcodeproj/project.pbxproj | 2 +- .../{ => KuringApp}/PrivacyInfo.xcprivacy | 0 .../UIKit/DepartmentUI/DepartmentRow.swift | 18 ++++++++++++++++++ .../Sources/UIKit/NoticeUI/NoticeList.swift | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) rename KuringApp/{ => KuringApp}/PrivacyInfo.xcprivacy (100%) diff --git a/KuringApp/KuringApp.xcodeproj/project.pbxproj b/KuringApp/KuringApp.xcodeproj/project.pbxproj index a466b979..20c148c6 100644 --- a/KuringApp/KuringApp.xcodeproj/project.pbxproj +++ b/KuringApp/KuringApp.xcodeproj/project.pbxproj @@ -81,7 +81,6 @@ A9DAFA472AB1F04B0064F748 = { isa = PBXGroup; children = ( - 1A0C8B412BCA5BB400B314C7 /* PrivacyInfo.xcprivacy */, A9DAFA522AB1F04B0064F748 /* KuringApp */, CA52DF302AD58DF2009B9272 /* KuringAppTests */, A9DAFA512AB1F04B0064F748 /* Products */, @@ -101,6 +100,7 @@ A9DAFA522AB1F04B0064F748 /* KuringApp */ = { isa = PBXGroup; children = ( + 1A0C8B412BCA5BB400B314C7 /* PrivacyInfo.xcprivacy */, CACC2F4B2B7E638C003142E2 /* KuringApp.entitlements */, DF062D4A2AC87B6D00FC48C0 /* Info.plist */, DFE7AB132AC332D200230934 /* Setting */, diff --git a/KuringApp/PrivacyInfo.xcprivacy b/KuringApp/KuringApp/PrivacyInfo.xcprivacy similarity index 100% rename from KuringApp/PrivacyInfo.xcprivacy rename to KuringApp/KuringApp/PrivacyInfo.xcprivacy diff --git a/package-kuring/Sources/UIKit/DepartmentUI/DepartmentRow.swift b/package-kuring/Sources/UIKit/DepartmentUI/DepartmentRow.swift index 6c77d990..323d7ed9 100644 --- a/package-kuring/Sources/UIKit/DepartmentUI/DepartmentRow.swift +++ b/package-kuring/Sources/UIKit/DepartmentUI/DepartmentRow.swift @@ -6,6 +6,7 @@ import Models import SwiftUI import ColorSet +import Dependencies import DepartmentFeatures public struct DepartmentRow: View { @@ -17,10 +18,16 @@ public struct DepartmentRow: View { case delete case radio(Bool) } + + @Dependency(\.departments) var departments public var body: some View { HStack(alignment: .center) { Text(department.korName) + + if departments.getCurrent()?.id == department.id { + RepresentativeDepartmentChip + } Spacer() @@ -54,6 +61,17 @@ public struct DepartmentRow: View { self.style = style self.action = action } + + /// 대표 학과 여부를 나타내는 칩 + private var RepresentativeDepartmentChip: some View { + Text("대표") + .font(.system(size: 12, weight: .semibold)) + .foregroundStyle(Color.Kuring.primary) + .padding(.horizontal, 8) + .padding(.vertical, 2) + .background(Color.Kuring.primarySelected) + .clipShape(Capsule()) + } } #Preview { diff --git a/package-kuring/Sources/UIKit/NoticeUI/NoticeList.swift b/package-kuring/Sources/UIKit/NoticeUI/NoticeList.swift index 1a75ecc5..8e3356fb 100644 --- a/package-kuring/Sources/UIKit/NoticeUI/NoticeList.swift +++ b/package-kuring/Sources/UIKit/NoticeUI/NoticeList.swift @@ -57,6 +57,7 @@ struct NoticeList: View { Divider() .frame(height: 0.25) + .padding(.horizontal, 20) } } .listRowSeparator(.hidden)