Fix url-preview visibility

This commit is contained in:
Alice Gaudon 2020-07-10 14:08:31 +02:00
parent 521c8d2d48
commit 9dbbed8da8
3 changed files with 5 additions and 4 deletions

View File

@ -50,7 +50,7 @@
<div id="services">
<div class="loader"></div>
<div id="url-preview" class="hidden"></div>
<div id="url-preview" class="invisible"></div>
<div id="empty-message">Load a service using the menu on the left.</div>
</div>
</body>

View File

@ -302,6 +302,7 @@ body {
#url-preview {
position: absolute;
z-index: 10000;
bottom: 0;
left: 0;
display: block;
@ -333,7 +334,7 @@ body {
border-radius: 5px 0 0 0;
}
#url-preview.hidden {
#url-preview.invisible {
opacity: 0;
}

View File

@ -587,9 +587,9 @@ function loadService(serviceId: number, service: any) {
// Display target urls
service.view.addEventListener('update-target-url', (event: UpdateTargetUrlEvent) => {
if (event.url.length === 0) {
urlPreview?.classList.add('hidden');
urlPreview?.classList.add('invisible');
} else {
urlPreview?.classList.remove('hidden');
urlPreview?.classList.remove('invisible');
if (urlPreview) {
urlPreview.innerHTML = event.url;
}