diff --git a/apps/server/AliasVault.Client/Main/Components/Credentials/CredentialCard.razor b/apps/server/AliasVault.Client/Main/Components/Credentials/CredentialCard.razor deleted file mode 100644 index 639b5a1da..000000000 --- a/apps/server/AliasVault.Client/Main/Components/Credentials/CredentialCard.razor +++ /dev/null @@ -1,79 +0,0 @@ -@inject NavigationManager NavigationManager - -
-
- -
-
@GetServiceName()
- @if (Obj.HasPasskey) - { - - - - } - @if (Obj.HasAttachment) - { - - - - } -
-
@GetDisplayText()
-
-
- -@code { - /// - /// Gets or sets the credentials object to show. - /// - [Parameter] - public required ItemListEntry Obj { get; set; } - - /// - /// Gets the display text for the credential, showing username by default, - /// falling back to email only if username is null/empty. - /// - private string GetDisplayText() - { - var returnValue = string.Empty; - - // Show username if available - if (!string.IsNullOrEmpty(Obj.Username)) - { - returnValue = Obj.Username; - } - - // Show email if username is not available - if (!string.IsNullOrEmpty(Obj.Email)) - { - returnValue = Obj.Email; - } - - return returnValue; - } - - /// - /// Get the service name for a credential. - /// - private string GetServiceName() - { - var returnValue = "Untitled"; - - if (!string.IsNullOrEmpty(Obj.Service)) - { - returnValue = Obj.Service; - } - - return returnValue; - } - - /// - /// Navigate to the details page of the credential. - /// - private void ShowDetails() - { - // Redirect to view page instead for now. - NavigationManager.NavigateTo($"/items/{Obj.Id}"); - } -} diff --git a/apps/server/AliasVault.Client/Main/Components/Credentials/DisplayFavicon.razor b/apps/server/AliasVault.Client/Main/Components/Credentials/DisplayFavicon.razor deleted file mode 100644 index 80959d9ee..000000000 --- a/apps/server/AliasVault.Client/Main/Components/Credentials/DisplayFavicon.razor +++ /dev/null @@ -1,81 +0,0 @@ -@if (FaviconBytes != null) -{ - Favicon -} -else -{ - Favicon -} - -@code { - /// - /// Byte[] of the favicon. - /// - [Parameter] - public byte[]? FaviconBytes { get; set; } - - /// - /// The width (in pixels) to show the icon as. Defaults to 50px. - /// - [Parameter] - public int Width { get; set; } = 50; - - /// - /// Boolean indicating whether to add padding to the icon. Defaults to false. - /// - [Parameter] - public bool Padding { get; set; } - - /// - /// The data URL of the favicon. - /// - private string? _faviconDataUrl; - - /// - protected override void OnParametersSet() - { - if (FaviconBytes is not null) - { - string mimeType = DetectMimeType(FaviconBytes); - string base64String = Convert.ToBase64String(FaviconBytes); - _faviconDataUrl = $"data:{mimeType};base64,{base64String}"; - } - } - - /// - /// Detect the mime type of the favicon. - /// - /// The bytes of the favicon. - /// The mime type of the favicon. - private static string DetectMimeType(byte[] bytes) - { - // Check for SVG. - if (bytes.Length >= 5) - { - string header = System.Text.Encoding.ASCII.GetString(bytes.Take(5).ToArray()).ToLower(); - if (header.Contains("= 4 && - bytes[0] == 0x00 && bytes[1] == 0x00 && - bytes[2] == 0x01 && bytes[3] == 0x00) - { - return "image/x-icon"; - } - - // Check for PNG. - if (bytes.Length >= 4 && - bytes[0] == 0x89 && bytes[1] == 0x50 && - bytes[2] == 0x4E && bytes[3] == 0x47) - { - return "image/png"; - } - - // Default to x-icon if unknown. - return "image/x-icon"; - } -} diff --git a/apps/server/AliasVault.Client/Main/Components/Credentials/FormattedNote.razor b/apps/server/AliasVault.Client/Main/Components/Credentials/FormattedNote.razor deleted file mode 100644 index b948a55ff..000000000 --- a/apps/server/AliasVault.Client/Main/Components/Credentials/FormattedNote.razor +++ /dev/null @@ -1,37 +0,0 @@ -@using System.Text.RegularExpressions -@using Microsoft.Extensions.Localization -@inject IStringLocalizerFactory LocalizerFactory - -
-

@SharedLocalizer["Notes"]

-
- @((MarkupString)ConvertUrlsToLinks(Notes).Replace(Environment.NewLine, "
")) -
-
- -@code { - private IStringLocalizer SharedLocalizer => LocalizerFactory.Create("SharedResources", "AliasVault.Client"); - - /// - /// The notes to display. - /// - [Parameter] - public string Notes { get; set; } = ""; - - private static string ConvertUrlsToLinks(string text) - { - // HTML-encode the text before processing URLs - var encodedText = System.Web.HttpUtility.HtmlEncode(text); - - string urlPattern = @"(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})"; - return Regex.Replace(encodedText, urlPattern, match => - { - string url = match.Value; - if (!url.StartsWith("http://") && !url.StartsWith("https://")) - { - url = "http://" + url; - } - return $"{match.Value}"; - }, RegexOptions.None, TimeSpan.FromMilliseconds(200)); - } -} diff --git a/apps/server/AliasVault.Client/Main/Components/Items/ItemsTable.razor b/apps/server/AliasVault.Client/Main/Components/Items/ItemsTable.razor index dbefab46f..1a8829b34 100644 --- a/apps/server/AliasVault.Client/Main/Components/Items/ItemsTable.razor +++ b/apps/server/AliasVault.Client/Main/Components/Items/ItemsTable.razor @@ -8,7 +8,12 @@
- + @credential.Service
diff --git a/apps/server/AliasVault.Client/Main/Components/Widgets/SearchWidget.razor b/apps/server/AliasVault.Client/Main/Components/Widgets/SearchWidget.razor index 382f41f7a..13afb3ad7 100644 --- a/apps/server/AliasVault.Client/Main/Components/Widgets/SearchWidget.razor +++ b/apps/server/AliasVault.Client/Main/Components/Widgets/SearchWidget.razor @@ -69,7 +69,12 @@
- +
@if (result.FolderId.HasValue && FolderPathCache.TryGetValue(result.FolderId.Value, out var folderPath)) diff --git a/apps/server/AliasVault.Client/_Imports.razor b/apps/server/AliasVault.Client/_Imports.razor index 62cc64016..2cbebe90c 100644 --- a/apps/server/AliasVault.Client/_Imports.razor +++ b/apps/server/AliasVault.Client/_Imports.razor @@ -14,9 +14,9 @@ @using AliasVault.Client.Main.Components @using AliasVault.Client.Main.Components.Alerts @using AliasVault.Client.Main.Components.Attachments -@using AliasVault.Client.Main.Components.Credentials @using AliasVault.Client.Main.Components.Email @using AliasVault.Client.Main.Components.Forms +@using AliasVault.Client.Main.Components.Items @using AliasVault.Client.Main.Components.Layout @using AliasVault.Client.Main.Components.Loading @using AliasVault.Client.Main.Components.Settings diff --git a/apps/server/AliasVault.Client/wwwroot/css/tailwind.css b/apps/server/AliasVault.Client/wwwroot/css/tailwind.css index 10dbae118..4a8ad1a82 100644 --- a/apps/server/AliasVault.Client/wwwroot/css/tailwind.css +++ b/apps/server/AliasVault.Client/wwwroot/css/tailwind.css @@ -1165,10 +1165,6 @@ video { width: 6rem; } -.w-28 { - width: 7rem; -} - .w-3 { width: 0.75rem; } @@ -3959,11 +3955,6 @@ video { --tw-ring-color: rgb(153 27 27 / var(--tw-ring-opacity)); } -.dark\:focus\:ring-red-900:focus:is(.dark *) { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(127 29 29 / var(--tw-ring-opacity)); -} - .dark\:focus\:ring-offset-gray-800:focus:is(.dark *) { --tw-ring-offset-color: #1f2937; } @@ -3991,10 +3982,6 @@ video { margin-bottom: 2rem; } - .sm\:mb-0 { - margin-bottom: 0px; - } - .sm\:ml-1 { margin-left: 0.25rem; } @@ -4354,10 +4341,6 @@ video { margin-bottom: 0.5rem; } - .xl\:mb-4 { - margin-bottom: 1rem; - } - .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @@ -4381,10 +4364,6 @@ video { .\32xl\:col-span-2 { grid-column: span 2 / span 2; } - - .\32xl\:mb-0 { - margin-bottom: 0px; - } } .\[\&\>svg\]\:h-full>svg { diff --git a/apps/server/AliasVault.Client/wwwroot/img/service-placeholder.webp b/apps/server/AliasVault.Client/wwwroot/img/service-placeholder.webp deleted file mode 100644 index 85460a537..000000000 Binary files a/apps/server/AliasVault.Client/wwwroot/img/service-placeholder.webp and /dev/null differ