Fixed VC service title %

This commit is contained in:
daniel 2021-03-09 16:39:55 +00:00 committed by Daniel Rodriguez
parent 4d1cab6b67
commit b434e05376
3 changed files with 18 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -68,6 +68,14 @@ export default class Service extends Item<ServiceProps> {
element.style.background = `url(${this.props.statusImageSrc}) no-repeat`; element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;
element.style.backgroundSize = "contain"; element.style.backgroundSize = "contain";
element.style.backgroundPosition = "center"; element.style.backgroundPosition = "center";
if (this.props.encodedTitle !== null) {
element.className = "service image forced_title";
element.setAttribute("data-use_title_for_force_title", "1");
element.setAttribute(
"data-title",
decodeBase64(this.props.encodedTitle)
);
}
} else if (this.props.encodedTitle !== null) { } else if (this.props.encodedTitle !== null) {
element.innerHTML = decodeBase64(this.props.encodedTitle); element.innerHTML = decodeBase64(this.props.encodedTitle);
} }
@ -84,6 +92,14 @@ export default class Service extends Item<ServiceProps> {
element.style.background = `url(${this.props.statusImageSrc}) no-repeat`; element.style.background = `url(${this.props.statusImageSrc}) no-repeat`;
element.style.backgroundSize = "contain"; element.style.backgroundSize = "contain";
element.style.backgroundPosition = "center"; element.style.backgroundPosition = "center";
if (this.props.encodedTitle !== null) {
element.className = "service image forced_title";
element.setAttribute("data-use_title_for_force_title", "1");
element.setAttribute(
"data-title",
decodeBase64(this.props.encodedTitle)
);
}
element.innerHTML = ""; element.innerHTML = "";
} else if (this.props.encodedTitle !== null) { } else if (this.props.encodedTitle !== null) {
element.innerHTML = decodeBase64(this.props.encodedTitle); element.innerHTML = decodeBase64(this.props.encodedTitle);