Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add chrome import card (#542)

Leendert de Borst014a705a5efb
diff --git a/src/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceChrome.razor b/src/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceChrome.razor
new file mode 100644
index 000000000..45a738eba
--- /dev/null
+++ b/src/AliasVault.Client/Main/Pages/Settings/ImportExport/Components/ImportServiceChrome.razor
@@ -0,0 +1,21 @@
+@using AliasVault.ImportExport.Models
+@using AliasVault.ImportExport.Importers
+@inject NavigationManager NavigationManager
+@inject GlobalNotificationService GlobalNotificationService
+@inject ILogger<ImportServiceChrome> Logger
+
+<ImportServiceCard
+ ServiceName="Chrome"
+ Description="Import passwords from your Chrome Password Manager"
+ LogoUrl="img/importers/chrome.svg"
+ ProcessFileCallback="ProcessFile">
+ <p class="text-gray-700 dark:text-gray-300 mb-4">In order to import your Chrome Password Manager, you need to export it as a CSV file. You can do this by logging into your Chrome browser, going to the 'Settings' menu > 'Password and AutoFill' > 'Google Password Manager'. Then click on 'Export passwords'.</p>
+ <p class="text-gray-700 dark:text-gray-300 mb-4">Once you have exported the file, you can upload it below.</p>
+</ImportServiceCard>
+
+@code {
+ private async Task<List<ImportedCredential>> ProcessFile(string fileContents)
+ {
+ return await ChromeImporter.ImportFromCsvAsync(fileContents);
+ }
+}
diff --git a/src/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor b/src/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor
index 06f8ee4e1..9a2ad790e 100644
--- a/src/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor
+++ b/src/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor
@@ -24,6 +24,7 @@
<ImportServiceBitwarden />
<ImportServiceKeePass />
<ImportService1Password />
+ <ImportServiceChrome />
<ImportServiceAliasVault />
</div>
</div>
diff --git a/src/AliasVault.Client/wwwroot/img/importers/chrome.svg b/src/AliasVault.Client/wwwroot/img/importers/chrome.svg
new file mode 100644
index 000000000..dcc3b1106
--- /dev/null
+++ b/src/AliasVault.Client/wwwroot/img/importers/chrome.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -10 276 276"><linearGradient id="a" x1="145" x2="34" y1="253" y2="61" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1e8e3e"/><stop offset="1" stop-color="#34a853"/></linearGradient><linearGradient id="b" x1="111" x2="222" y1="254" y2="62" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fcc934"/><stop offset="1" stop-color="#fbbc04"/></linearGradient><linearGradient id="c" x1="17" x2="239" y1="80" y2="80" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d93025"/><stop offset="1" stop-color="#ea4335"/></linearGradient><circle cx="128" cy="128" r="64" fill="#fff"/><path fill="url(#a)" d="M96 183.4A63.7 63.7 0 0 1 72.6 160L17.2 64A128 128 0 0 0 128 256l55.4-96A64 64 0 0 1 96 183.4Z"/><path fill="url(#b)" d="M192 128a63.7 63.7 0 0 1-8.6 32L128 256A128 128 0 0 0 238.9 64h-111a64 64 0 0 1 64 64Z"/><circle cx="128" cy="128" r="52" fill="#1a73e8"/><path fill="url(#c)" d="M96 72.6a63.7 63.7 0 0 1 32-8.6h110.8a128 128 0 0 0-221.7 0l55.5 96A64 64 0 0 1 96 72.6Z"/></svg>
\ No newline at end of file