mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 01:11:00 +00:00
Improve loading, add TM warning
This commit is contained in:
parent
640d4f5bf2
commit
e0a143987f
3 changed files with 17 additions and 3 deletions
|
@ -74,6 +74,14 @@ a:not(.noline) {
|
|||
min-height: 80vh;
|
||||
}
|
||||
|
||||
.component{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#app.loaded .component{
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
h3.header {
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
},
|
||||
mounted: function() {
|
||||
const self = this;
|
||||
self.$el.classList.add("loaded");
|
||||
|
||||
const settingsRequest = new XMLHttpRequest();
|
||||
settingsRequest.open("GET", BaseUrl + "/frontend/settings", true);
|
||||
|
@ -68,6 +69,11 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
} else {
|
||||
langsRequest.onload = function() {
|
||||
handleLangsResponse(self, this);
|
||||
|
||||
var hostname = window.location.hostname.toLowerCase();
|
||||
if (hostname.indexOf("libretranslate.") === 0 && !hostname.endsWith(".com")){
|
||||
self.error = "This website might be in violation of our trademark guidelines: https://github.com/LibreTranslate/LibreTranslate/blob/main/TRADEMARK.md";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -141,11 +141,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="error">
|
||||
<div v-else-if="error" class="component">
|
||||
<div class="section no-pad-bot">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12 m7">
|
||||
<div class="col s12 m12">
|
||||
<div class="card horizontal">
|
||||
<div class="card-stacked">
|
||||
<div class="card-content">
|
||||
|
@ -162,7 +162,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div v-else class="component">
|
||||
<div class="section no-pad-bot">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue