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:
@@ -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?"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user