diff --git a/src/cloud-ui.html b/src/cloud-ui.html index 9f91a3f91..62f120206 100644 --- a/src/cloud-ui.html +++ b/src/cloud-ui.html @@ -14,7 +14,7 @@
cog
- +  
diff --git a/src/css/cloud-ui.css b/src/css/cloud-ui.css index bf4505362..02d28001d 100644 --- a/src/css/cloud-ui.css +++ b/src/css/cloud-ui.css @@ -1,7 +1,7 @@ #cloudWidget { background: url("../img/cloud.png") hsl(216, 100%, 93%); margin: 0.5em 0; - overflow: auto; + min-width: max-content; position: relative; } #cloudWidget.hide { @@ -81,19 +81,25 @@ fill: inherit; } #cloudWidget #cloudOptions { + align-items: center; background-color: var(--default-surface); border: 1px solid var(--bg-1-border); + bottom: 2px; display: none; + font-size: small; padding: 0.5em; position: absolute; - right: 0; + right: 2px; text-align: center; + top: 2px; z-index: 10; } +#cloudWidget #cloudOptions label { + display: inline-flex; + flex-direction: column; + align-items: flex-start; + } #cloudWidget #cloudOptions.show { - display: block; + display: flex; white-space: nowrap; } -#cloudOptions button { - min-height: var(--default-gap-xlarge); - } diff --git a/src/js/i18n.js b/src/js/i18n.js index 3aa1719d4..e8a53c622 100644 --- a/src/js/i18n.js +++ b/src/js/i18n.js @@ -101,7 +101,21 @@ const safeTextToDOM = function(text, parent) { // Fast path (most common). if ( text.indexOf('<') === -1 ) { - parent.appendChild(safeTextToTextNode(text)); + const toInsert = safeTextToTextNode(text); + let toReplace = parent.childElementCount !== 0 + ? parent.firstChild + : null; + while ( toReplace !== null ) { + if ( toReplace.nodeType === 3 && toReplace.nodeValue === '_' ) { + break; + } + toReplace = toReplace.nextSibling; + } + if ( toReplace !== null ) { + parent.replaceChild(toInsert, toReplace); + } else { + parent.appendChild(toInsert); + } return; } // Slow path.