1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-14 15:33:55 +00:00

[PM-27784] - remove url from more options (#18306)

* remove url from more options

* fix test
This commit is contained in:
Jordan Aasen
2026-01-16 12:41:27 -08:00
committed by GitHub
parent 14428a5a8c
commit 16e6756643
4 changed files with 16 additions and 14 deletions

View File

@@ -4739,6 +4739,9 @@
}
}
},
"moreOptionsLabelNoPlaceholder": {
"message": "More options"
},
"moreOptionsTitle": {
"message": "More options - $ITEMNAME$",
"description": "Title for a button that opens a menu with more options for an item.",
@@ -5125,14 +5128,11 @@
}
}
},
"hideMatchDetection": {
"message": "Hide match detection $WEBSITE$",
"placeholders": {
"website": {
"content": "$1",
"example": "https://example.com"
}
}
"showMatchDetectionNoPlaceholder": {
"message": "Show match detection"
},
"hideMatchDetectionNoPlaceholder": {
"message": "Hide match detection"
},
"autoFillOnPageLoad": {
"message": "Autofill on page load?"

View File

@@ -3,7 +3,7 @@
type="button"
bitIconButton="bwi-ellipsis-v"
size="small"
[label]="'moreOptionsLabel' | i18n: cipher.name"
[label]="'moreOptionsLabelNoPlaceholder' | i18n"
[bitMenuTriggerFor]="moreOptions"
></button>
<bit-menu #moreOptions>

View File

@@ -153,12 +153,12 @@ describe("UriOptionComponent", () => {
component.writeValue({ uri: "https://example.com", matchDetection: UriMatchStrategy.Exact });
fixture.detectChanges();
expect(getToggleMatchDetectionBtn().getAttribute("aria-label")).toBe(
"showMatchDetection https://example.com",
"showMatchDetectionNoPlaceholder",
);
getToggleMatchDetectionBtn().click();
fixture.detectChanges();
expect(getToggleMatchDetectionBtn().getAttribute("aria-label")).toBe(
"hideMatchDetection https://example.com",
"hideMatchDetectionNoPlaceholder",
);
});
});

View File

@@ -165,9 +165,11 @@ export class UriOptionComponent implements ControlValueAccessor {
}
protected get toggleTitle() {
return this.showMatchDetection
? this.i18nService.t("hideMatchDetection", this.uriForm.value.uri)
: this.i18nService.t("showMatchDetection", this.uriForm.value.uri);
return this.i18nService.t(
this.showMatchDetection
? "hideMatchDetectionNoPlaceholder"
: "showMatchDetectionNoPlaceholder",
);
}
// NG_VALUE_ACCESSOR implementation