Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ let schemes: [Scheme] = [
let project = Project(
name: env.name,
organizationName: env.organizationName,
options: .options(
defaultKnownRegions: ["ko"],
developmentRegion: "ko"
),
settings: settings,
targets: targets,
schemes: schemes
Expand Down
4 changes: 3 additions & 1 deletion Projects/App/iOS/Sources/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Dependencies
import DesignSystem
import Entity
import EnumUtil
import FeatureFlagClient
Expand Down Expand Up @@ -29,11 +30,12 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
FirebaseApp.configure()
Task {
do {
try await featureFlagClient.activate()
try await RemoteConfig.remoteConfig().fetchAndActivate()
} catch {
TWLog.error(error)
}
}
DesignSystemFontFamily.Suit.all.forEach { $0.register() }
initializeAnalyticsUserID()
sendUserPropertyWidget()
session = WCSession.default
Expand Down
4 changes: 2 additions & 2 deletions Projects/App/iOS/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>9.0</string>
<string>10.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>72</string>
<string>79</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion Projects/App/macOS/Resources/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

*/

TODAYWHAT = "TodayWhat";
TODAYWHAT = "오늘 뭐임";
2 changes: 1 addition & 1 deletion Projects/App/macOS/Resources/ko.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

*/

TODAYWHAT = "오늘 뭐임";
TODAYWHAT = "TodayWhat";
17 changes: 13 additions & 4 deletions Projects/Feature/MainFeature/Sources/Components/ReviewToast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct ReviewToast: View {
let onTap: () -> Void

var body: some View {
Button {
let baseButton = Button {
onTap()
} label: {
HStack(spacing: 8) {
Expand All @@ -21,9 +21,18 @@ struct ReviewToast: View {
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(Color.extraWhite)
.cornerRadius(20)
.shadow(color: .black.opacity(0.1), radius: 10, x: 0, y: 4)
}

if #available(iOS 26.0, *) {
baseButton
.glassEffect(.regular.interactive(), in: .capsule)
} else {
baseButton
.background {
RoundedRectangle(cornerRadius: 20)
.fill(Color.extraWhite)
}
.shadow(color: .black.opacity(0.1), radius: 10, x: 0, y: 4)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import ComposableArchitecture
import DesignSystem
import FirebaseRemoteConfig
import SwiftUI

struct SchoolInfoCardView: View {
let store: StoreOf<MainCore>
@ObservedObject var viewStore: ViewStoreOf<MainCore>
@RemoteConfigProperty(key: "enable_weekly", fallback: false) private var enableWeeklyView

init(store: StoreOf<MainCore>) {
self.store = store
Expand All @@ -20,9 +22,15 @@ struct SchoolInfoCardView: View {

let gradeClassString = "\(viewStore.grade)학년 \(viewStore.class)반"
let dateString = "\(viewStore.displayDate.toString())"
Text("\(gradeClassString) • \(dateString)")
.twFont(.body2, color: .textSecondary)
.accessibilitySortPriority(3)
if enableWeeklyView {
Text(gradeClassString)
.twFont(.body2, color: .textSecondary)
.accessibilitySortPriority(3)
} else {
Text("\(gradeClassString) • \(dateString)")
.twFont(.body2, color: .textSecondary)
.accessibilitySortPriority(3)
}
}

Spacer()
Expand Down
46 changes: 46 additions & 0 deletions Projects/Feature/MainFeature/Sources/DatePolicy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@ public struct DatePolicy: Sendable {
return formatter.string(from: date)
}

public func weekDisplayText(for weekStartDate: Date, baseDate: Date) -> String {
let calendar = Calendar.current
let currentWeekStart = startOfWeek(for: baseDate)
if calendar.isDate(weekStartDate, inSameDayAs: currentWeekStart) {
return "이번주"
}

if let previousWeek = calendar.date(byAdding: .day, value: -7, to: currentWeekStart),
calendar.isDate(weekStartDate, inSameDayAs: previousWeek) {
return "저번주"
}

if let nextWeek = calendar.date(byAdding: .day, value: 7, to: currentWeekStart),
calendar.isDate(weekStartDate, inSameDayAs: nextWeek) {
return "다음주"
}

let formatter = DateFormatter()
formatter.locale = Locale(identifier: "ko_kr")
formatter.dateFormat = "M월 d일"
return "\(formatter.string(from: weekStartDate)) 주"
}

public func adjustedDate(for date: Date) -> Date {
var adjustedDate = date

Expand Down Expand Up @@ -79,4 +102,27 @@ public struct DatePolicy: Sendable {

return nextDate
}

public func startOfWeek(for date: Date) -> Date {
let calendar = Calendar.current

let components = calendar.dateComponents([.yearForWeekOfYear, .weekOfYear], from: date)
let weekStart = calendar.date(from: components) ?? date
return weekStart
}

public func adjustedWeekStart(for date: Date) -> Date {
let adjusted = adjustedDate(for: date)
return startOfWeek(for: adjusted)
}

public func previousWeekStart(from date: Date) -> Date {
let weekStart = startOfWeek(for: date)
return weekStart.adding(by: .day, value: -7)
}

public func nextWeekStart(from date: Date) -> Date {
let weekStart = startOfWeek(for: date)
return weekStart.adding(by: .day, value: 7)
}
}
Loading
Loading