Skip to content

Commit

Permalink
Merge pull request #175 from niscy-eudiw/main
Browse files Browse the repository at this point in the history
Resolved presentation issue with document displayName when the document type is unknown to the wallet, Changed dashboard document cell behavior when no expiration date is available, dependencies updates
  • Loading branch information
stzouvaras authored Sep 27, 2024
2 parents fdfcf9b + 10a78a9 commit 66c9f72
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-openid4vci-swift.git",
"state" : {
"revision" : "134b1ef6878e1ca8afa8ab92d18af29f84baa862",
"version" : "0.4.4"
"revision" : "78fbd3f8599537649dcea3331d8b54ea00fe2551",
"version" : "0.5.0"
}
},
{
Expand All @@ -149,17 +149,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift.git",
"state" : {
"revision" : "894b2de7ee21affbb065522f3d3ea6467b963797",
"version" : "0.3.4"
"revision" : "294e198eb9daf7fbed1b6f6cac27b2ca86a38f50",
"version" : "0.4.0"
}
},
{
"identity" : "eudi-lib-ios-wallet-kit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit.git",
"state" : {
"revision" : "39dc4b004ce04911e1851194327dc987c9b740e8",
"version" : "0.6.7"
"revision" : "00fcd4c7018004bdb23134315a8a6f5004de59f8",
"version" : "0.6.9"
}
},
{
Expand All @@ -185,17 +185,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/KittyMac/Hitch.git",
"state" : {
"revision" : "77b592f4c21c454a24da2fad80901e6b19751780",
"version" : "0.4.147"
"revision" : "d6c147a1d70992db39a141cb5bf9cf8fbb776250",
"version" : "0.4.148"
}
},
{
"identity" : "joseswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/niscy-eudiw/JOSESwift.git",
"location" : "https://github.com/airsidemobile/JOSESwift.git",
"state" : {
"revision" : "518cedba79ef18867191811b161471298b6cb7c8",
"version" : "2.4.1-gcm"
"revision" : "c2664a902e75c0426a1d43132bd4babc6fd173d3",
"version" : "3.0.0"
}
},
{
Expand Down Expand Up @@ -347,8 +347,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
"version" : "1.1.3"
"revision" : "671108c96644956dddcd89dd59c203dcdb36cec7",
"version" : "1.1.4"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,14 @@ extension RequestDataUiModel {
}

fileprivate static func documentSectionHeader(for docElement: DocElementsViewModel) -> RequestDataUIModel {
.requestDataSection(
let documentIdentifier = DocumentTypeIdentifier(rawValue: docElement.docType)
return .requestDataSection(
.init(
id: docElement.id,
type: .init(docType: DocumentTypeIdentifier(rawValue: docElement.docType)),
title: DocumentTypeIdentifier(rawValue: docElement.docType).localizedTitle
type: .init(docType: documentIdentifier),
title: documentIdentifier.isSupported
? documentIdentifier.localizedTitle
: docElement.displayName.ifNullOrEmpty { documentIdentifier.localizedTitle }
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,18 @@ extension DocumentListView {
}
.frame(maxWidth: 48)

Spacer()
VSpacer.small()

Text(.custom(item.value.title))
.typography(Theme.shared.font.titleMedium)
.foregroundColor(Theme.shared.color.textPrimaryDark)
.minimumScaleFactor(0.5)
.lineLimit(1)

Spacer()

if let expiresAt = item.value.expiresAt {

Spacer()

if item.value.hasExpired {
ZStack {
Text(.expired)
Expand Down Expand Up @@ -160,7 +161,7 @@ extension DocumentListView {
}
.frame(maxWidth: 48)

Spacer()
VSpacer.small()

Text(.custom(item.value.title))
.typography(Theme.shared.font.titleMedium)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct DocumentListView: View {
var body: some View {
ScrollView {
LazyVGrid(
columns: [GridItem(), GridItem()],
columns: [GridItem(alignment: .top), GridItem(alignment: .top)],
spacing: SPACING_SMALL
) {
ForEach(items) { item in
Expand Down
1 change: 1 addition & 0 deletions Modules/feature-test/Sources/Utils/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ extension Constants {
DocElementsViewModel(
docId: Constants.isoMdlModelId,
docType: DocumentTypeIdentifier.MDL.rawValue,
displayName: "Driving License",
isEnabled: true,
elements: [
ElementViewModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ public extension String? {
}
return self
}
func ifNullOrEmpty(_ fallback: () -> String) -> String {
guard let self = self, !self.isEmpty else {
return fallback()
}
return self
}
}

public extension String {
Expand Down
2 changes: 1 addition & 1 deletion Modules/logic-core/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit.git",
exact: "0.6.7"
exact: "0.6.9"
),
.package(
name: "logic-resources",
Expand Down

0 comments on commit 66c9f72

Please sign in to comment.