Skip to content

Commit

Permalink
Updated layout CredentialsPage
Browse files Browse the repository at this point in the history
  • Loading branch information
edeykholt committed Sep 25, 2024
1 parent ea55c05 commit 64a1783
Showing 1 changed file with 46 additions and 14 deletions.
60 changes: 46 additions & 14 deletions KeriAuth.BrowserExtension/UI/Pages/CredentialsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,39 @@
@{
foreach (var credential in credentials)
{
<MudCard>
<MudCard Class="pa-3">
<MudStack>

@{
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
{
<MudText><b>@SchemaTitle </b><br /><em>@SchemaDescr</em></MudText>
}
}

// 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
{
<MudText><b>@SchemaTitle </b><br /><em>@SchemaDescr</em></MudText>
<MudText>Issued: <b>@dt</b></MudText>
}
}
Expand All @@ -78,8 +89,14 @@
}
finally
{
<MudText>@iLabel: <b>@iValue</b></MudText>
<MudIcon ViewBox="0 0 100 100" Icon="@MakeIdenticon(iValue)" Style="border-style:solid; border-color:black; border-width:2px; border-radius:50%; width:35px; height:35px; overflow:hidden;" />
if (iLabel != String.Empty)
{
<MudText>@iLabel: <b>@iValue</b></MudText>

/*
<MudIcon ViewBox="0 0 100 100" Icon="@MakeIdenticon(iValue)" Style="border-style:solid; border-color:black; border-width:2px; border-radius:50%; width:35px; height:35px; overflow:hidden;" />
*/
}
}
}

Expand Down Expand Up @@ -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
{
<MudText>@personLabel <b>@personValue</b></MudText>
<MudText>@aiLabel <b>@iValueValue</b></MudText>
<MudIcon ViewBox="0 0 100 100" Icon="@MakeIdenticon(iValueValue)" Style="border-style:solid; border-color:black; border-width:2px; border-radius:50%; width:35px; height:35px; overflow:hidden;" />
<MudText>@ecrLabel <b>@ecrValue</b></MudText>
if (personLabel != String.Empty)
{
<MudText>@personLabel: <b>@personValue</b></MudText>
}
if (aiLabel != String.Empty)
{
<MudStack Row Style="align-items: center;">
<MudIcon ViewBox="0 0 100 100" Icon="@MakeIdenticon(iValueValue)" Style="border-style:solid; border-color:black; border-width:2px; border-radius:50%; width:35px; height:35px; overflow:hidden;" />
<MudText>@aiLabel: </MudText>
<MudText><b>@iValueValue</b></MudText>
</MudStack>
}
if (ecrLabel != String.Empty)
{
<MudText>@ecrLabel: <b>@ecrValue</b></MudText>
}
}
}
</MudStack>
<MudIconButton Style="padding: 0px !important;" Size="Size.Small" OnClick="async () => await UIHelper.Copy2Clipboard(JsonSerializer.Serialize(credential))" Icon="@Icons.Material.Filled.ContentCopy" aria-label="delete"></MudIconButton>
<MudStack Row>
<MudSpacer />
<MudIconButton Style="padding: 0px !important;" Size="Size.Small" OnClick="async () => await UIHelper.Copy2Clipboard(JsonSerializer.Serialize(credential))" Icon="@Icons.Material.Filled.ContentCopy" aria-label="delete"></MudIconButton>
</MudStack>
</MudCard>
}
}
Expand Down

0 comments on commit 64a1783

Please sign in to comment.