Fixed hostbanner
This commit is contained in:
parent
b61d210eb7
commit
0f6e517920
3 changed files with 31 additions and 15 deletions
|
@ -97,7 +97,9 @@
|
|||
.fulloverlay .container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
top: 30%
|
||||
top: 30%;
|
||||
|
||||
max-width: unset!important; /* override bootstrap */
|
||||
}
|
||||
|
||||
.no-js {
|
||||
|
@ -148,8 +150,8 @@
|
|||
<!-- Critical load error -->
|
||||
<div class="fulloverlay" id="critical-load">
|
||||
<div class="container">
|
||||
<img src="img/script.svg" height="128px">
|
||||
<h1 style="color: red">Got some trouble while loading important files!</h1>
|
||||
<img src="img/loading_error_right.svg" height="192px">
|
||||
<h1 style="color: red">Ooops, we encountered some trouble while loading important files!</h1>
|
||||
<h3 class="detail"></h3>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2159,7 +2159,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{if property_client_flag_avatar && property_client_flag_avatar.length > 0}}
|
||||
<div style="margin-top: 10px;">
|
||||
<div style="margin-top: 10px;" class="client-avatar">
|
||||
<node key="client_avatar"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -2238,9 +2238,10 @@
|
|||
</script>
|
||||
<script class="jsrender-template" id="tmpl_selected_hostbanner" type="text/html">
|
||||
<div class="hostbanner">
|
||||
<a href="{{:property_virtualserver_hostbanner_url}}" target="_blank" style="display: flex; flex-direction: row; justify-content: center;">
|
||||
<a href="{{:property_virtualserver_hostbanner_url}}" target="_blank" style="display: flex; flex-direction: row; justify-content: center; height: 100%">
|
||||
|
||||
<img src="
|
||||
<div style="
|
||||
background:center no-repeat url(
|
||||
{{:property_virtualserver_hostbanner_gfx_url}}
|
||||
{{if property_virtualserver_hostbanner_gfx_interval > 0}}
|
||||
{{*
|
||||
|
@ -2251,17 +2252,22 @@
|
|||
}}
|
||||
?ts={{*:date}}
|
||||
{{/if}}
|
||||
"
|
||||
{{if property_virtualserver_hostbanner_mode == 0}}
|
||||
);
|
||||
|
||||
{{else property_virtualserver_hostbanner_mode == 1}}
|
||||
style="width: 100%; height: 100%;"
|
||||
{{else property_virtualserver_hostbanner_mode == 2}}
|
||||
style="width: 100%; height: auto;"
|
||||
{{/if}}
|
||||
background-position: center;
|
||||
{{if property_virtualserver_hostbanner_mode == 0}}
|
||||
|
||||
alt="{{tr "Host banner"/}}"
|
||||
>
|
||||
{{else property_virtualserver_hostbanner_mode == 1}}
|
||||
width: 100%; height: auto;
|
||||
{{else property_virtualserver_hostbanner_mode == 2}}
|
||||
background-size:contain;
|
||||
width:100%;
|
||||
height:100%
|
||||
{{/if}}
|
||||
"
|
||||
|
||||
alt="{{tr "Host banner"/}}"
|
||||
></div>
|
||||
</a>
|
||||
</div>
|
||||
</script>
|
||||
|
|
|
@ -160,6 +160,13 @@ class Hostbanner {
|
|||
properties["property_" + key] = server.properties[key];
|
||||
|
||||
const rendered = $("#tmpl_selected_hostbanner").renderTag(properties);
|
||||
|
||||
console.debug(tr("Hostbanner has been loaded"));
|
||||
if(server.properties.virtualserver_hostbanner_gfx_interval > 0)
|
||||
this.updater = setTimeout(() => this.update(), Math.min(server.properties.virtualserver_hostbanner_gfx_interval, 60) * 1000);
|
||||
|
||||
return Promise.resolve(rendered);
|
||||
/*
|
||||
const image = rendered.find("img");
|
||||
return new Promise<JQuery<HTMLElement>>((resolve, reject) => {
|
||||
const node_image = image[0] as HTMLImageElement;
|
||||
|
@ -173,6 +180,7 @@ class Hostbanner {
|
|||
reject(event);
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue