Skip to content

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

Pass password to the to be created credential (#758)

Leendert de Borst74c0ace2b5cc
diff --git a/browser-extension/src/entrypoints/contentScript/Popup.ts b/browser-extension/src/entrypoints/contentScript/Popup.ts
index 4b30fa798..7509dbbb7 100644
--- a/browser-extension/src/entrypoints/contentScript/Popup.ts
+++ b/browser-extension/src/entrypoints/contentScript/Popup.ts
@@ -217,7 +217,7 @@ export function createAutofillPopup(input: HTMLInputElement, credentials: Creden
Email: result.customEmail || '',
Logo: faviconBytes || undefined,
Username: result.customUsername || '',
- Password: '', // Will be set by the popup
+ Password: result.customPassword || '', // Set the generated password
Notes: '',
Alias: {
FirstName: '',
@@ -651,7 +651,7 @@ export async function disableAutoShowPopup(): Promise<void> {
/**
* Create edit name popup. Part of the "create new alias" flow.
*/
-export async function createEditNamePopup(defaultName: string, rootContainer: HTMLElement): Promise<{ serviceName: string | null, isCustomCredential: boolean, customEmail?: string, customUsername?: string } | null> {
+export async function createEditNamePopup(defaultName: string, rootContainer: HTMLElement): Promise<{ serviceName: string | null, isCustomCredential: boolean, customEmail?: string, customUsername?: string, customPassword?: string } | null> {
// Close existing popup
removeExistingPopup(rootContainer);
@@ -763,7 +763,6 @@ export async function createEditNamePopup(defaultName: string, rootContainer: HT
id="password-preview"
data-aliasvault-ignore="true"
class="av-create-popup-input"
- readonly
>
<button id="regenerate-password" class="av-create-popup-regenerate-btn">
<svg class="av-icon" viewBox="0 0 24 24">
@@ -857,7 +856,7 @@ export async function createEditNamePopup(defaultName: string, rootContainer: HT
/**
* Close the popup.
*/
- const closePopup = (value: { serviceName: string | null, isCustomCredential: boolean, customEmail?: string, customUsername?: string } | null) : void => {
+ const closePopup = (value: { serviceName: string | null, isCustomCredential: boolean, customEmail?: string, customUsername?: string, customPassword?: string } | null) : void => {
popup.classList.remove('show');
setTimeout(() => {
overlay.remove();
@@ -921,7 +920,8 @@ export async function createEditNamePopup(defaultName: string, rootContainer: HT
serviceName,
isCustomCredential: true,
customEmail: customEmail.value.trim(),
- customUsername: customUsername.value.trim()
+ customUsername: customUsername.value.trim(),
+ customPassword: passwordPreview.value
});
}
});
diff --git a/browser-extension/src/entrypoints/contentScript/style.css b/browser-extension/src/entrypoints/contentScript/style.css
index 164e3307c..808634e09 100644
--- a/browser-extension/src/entrypoints/contentScript/style.css
+++ b/browser-extension/src/entrypoints/contentScript/style.css
@@ -478,32 +478,41 @@ body {
.av-create-popup-password-preview {
display: flex;
- gap: 8px;
align-items: center;
+ gap: 8px;
+ width: 100%;
}
.av-create-popup-password-preview input {
flex: 1;
+ width: 100%;
}
.av-create-popup-regenerate-btn {
- padding: 8px;
- border: none;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 6px;
background: #374151;
- cursor: pointer;
- color: #9ca3af;
+ border: none;
border-radius: 4px;
- transition: all 0.2s ease;
+ cursor: pointer;
+ color: #e5e7eb;
+ transition: background-color 0.2s ease;
+ flex-shrink: 0;
}
.av-create-popup-regenerate-btn:hover {
- background: #4b5563;
- color: #f8f9fa;
+ background-color: #4b5563;
}
.av-create-popup-regenerate-btn .av-icon {
width: 16px;
height: 16px;
+ stroke: currentColor;
+ stroke-width: 2;
+ stroke-linecap: round;
+ stroke-linejoin: round;
}
.av-create-popup-error {