From 64a1783e6f8b86d7b681ddbf53bc6c69b6933dcb Mon Sep 17 00:00:00 2001 From: Ed Eykholt Date: Wed, 25 Sep 2024 13:04:44 -0700 Subject: [PATCH] Updated layout CredentialsPage --- .../UI/Pages/CredentialsPage.razor | 60 ++++++++++++++----- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/KeriAuth.BrowserExtension/UI/Pages/CredentialsPage.razor b/KeriAuth.BrowserExtension/UI/Pages/CredentialsPage.razor index 9b22d78..4f282e4 100644 --- a/KeriAuth.BrowserExtension/UI/Pages/CredentialsPage.razor +++ b/KeriAuth.BrowserExtension/UI/Pages/CredentialsPage.razor @@ -37,28 +37,39 @@ @{ foreach (var credential in credentials) { - + - @{ string SchemaTitle = " "; string SchemaDescr = " "; - string dt = " "; try { SchemaTitle = DictionaryConverter.GetValueByPath(credential, "schema.title")?.Value?.ToString() ?? string.Empty; SchemaDescr = DictionaryConverter.GetValueByPath(credential, "schema.description")?.Value?.ToString() ?? string.Empty; + } + catch (Exception ex) + { + logger.LogError(ex, "Error getting schema title or description"); + } + finally + { + @SchemaTitle
@SchemaDescr
+ } + } - // Issued date + @{ + // Issued date + string dt = " "; + try + { dt = DictionaryConverter.GetValueByPath(credential, "sad.a.dt")?.Value?.ToString()?.Substring(0, 10) ?? string.Empty; } catch (Exception ex) { - logger.LogError(ex, "Error getting schema title or description or date issued"); + logger.LogError(ex, "Error getting date issued"); } finally { - @SchemaTitle
@SchemaDescr
Issued: @dt } } @@ -78,8 +89,14 @@ } finally { - @iLabel: @iValue - + if (iLabel != String.Empty) + { + @iLabel: @iValue + + /* + + */ + } } } @@ -115,18 +132,33 @@ } catch (Exception ex) { - logger.LogError(ex, "Error getting personLegalName or i or engagementContextRole"); + logger.LogError(ex, "Error getting personLegalName or i or engagementContextRole"); } finally { - @personLabel @personValue - @aiLabel @iValueValue - - @ecrLabel @ecrValue + if (personLabel != String.Empty) + { + @personLabel: @personValue + } + if (aiLabel != String.Empty) + { + + + @aiLabel: + @iValueValue + + } + if (ecrLabel != String.Empty) + { + @ecrLabel: @ecrValue + } } }
- + + + +
} }