-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: NPC에 종족과 출현장소를 추가 * feat: NPC 상세 정보에 종족과 출현 장소를 추가 * fix: 전체 검색에서 사용자가 가지고있는 아이템을 표시하지 않는 현상 개선 * feat: 전체 검색 화면에서 검색창을 자동으로 활성화하도록 개선 * refactor: 이중으로 dispose하고 있던 부분을 flatMap으로 개선
- Loading branch information
Showing
17 changed files
with
611 additions
and
76 deletions.
There are no files selected for viewing
289 changes: 239 additions & 50 deletions
289
Animal-Crossing-Wiki/Projects/App/Resources/en.lproj/Localizable.strings
Large diffs are not rendered by default.
Oops, something went wrong.
191 changes: 191 additions & 0 deletions
191
Animal-Crossing-Wiki/Projects/App/Resources/ko.lproj/Localizable.strings
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Animal-Crossing-Wiki/Projects/App/Sources/Models/AppearanceLocation.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// AppearanceLocation.swift | ||
// ACNH-wiki | ||
// | ||
// Created by Ari on 11/26/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct AppearanceLocation: Codable { | ||
let place: String | ||
let time: Time? | ||
let conditions: String? | ||
let features: [String]? | ||
let schedule: [Schedule]? | ||
} | ||
|
||
struct Time: Codable { | ||
let start: String | ||
let end: String | ||
let nextDay: Bool? | ||
|
||
var formatted: String { | ||
let nextDay = nextDay == true ? "Next day " : "" | ||
return "\(start) - \(nextDay.localized + end)" | ||
} | ||
} | ||
|
||
struct Schedule: Codable { | ||
let day: String | ||
let note: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...rossing-Wiki/Projects/App/Sources/Presentation/Animals/Views/AppearanceLocationView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// AppearanceLocationView.swift | ||
// ACNH-wiki | ||
// | ||
// Created by Ari on 11/27/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct AppearanceLocationView: View { | ||
let item: AppearanceLocation | ||
|
||
var body: some View { | ||
VStack(spacing: 10) { | ||
infoView(title: "place".localized, description: item.place.localized) | ||
if let time = item.time?.formatted { | ||
infoView(title: "time".localized, description: time) | ||
} | ||
if let conditions = item.conditions { | ||
infoView(title: "conditions".localized, description: conditions.localized) | ||
} | ||
if let features = item.features?.map({ $0.localized }).joined(separator: "\n") { | ||
infoView(title: "features".localized, description: features) | ||
} | ||
} | ||
.background(SwiftUI.Color.clear) | ||
.padding(.horizontal, 20) | ||
.padding(.vertical, 20) | ||
} | ||
|
||
@ViewBuilder | ||
func infoView(title: String, description: String) -> some View { | ||
HStack(alignment: .firstTextBaseline, spacing: 0) { | ||
Text(title) | ||
.font(.callout) | ||
.fontWeight(.semibold) | ||
.foregroundStyle(SwiftUI.Color(uiColor: .acText)) | ||
|
||
Spacer(minLength: 8) | ||
|
||
Text(description) | ||
.font(.footnote) | ||
.fontWeight(.regular) | ||
.multilineTextAlignment(.trailing) | ||
.foregroundStyle(SwiftUI.Color(uiColor: .acSecondaryText)) | ||
|
||
} | ||
.background(SwiftUI.Color.clear) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters