1
0
Fork 0
mirror of synced 2024-06-27 10:41:00 +12:00

Fixed project logo not showing up

This commit is contained in:
Eldad Fux 2020-01-14 11:33:51 +02:00
parent f68a135106
commit acc12bf4d4
3 changed files with 4 additions and 3 deletions

View file

@ -2649,7 +2649,7 @@ var units=si?["KB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB",
preview.innerHTML="";count.innerHTML="0 / "+max;files.map(function(obj){var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/files/"+
obj+"/preview?width="+
previewWidth+"&height="+
previewHeight;file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");}
previewHeight+"&project=console";file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");}
var remove=(function(obj){return function(event){output=Array.isArray(output)?output.filter(function(e){return e!==obj;}):[];render(output);};})(obj);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=multiple?JSON.stringify(output):output[0];});};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));if(!multiple){output=[];}
sdk.storage.createFile(files[0],read,write,1).then(function(response){response.map(function(obj){if(!Array.isArray(output)){throw new Error("Can't append new file to non array value");}
output[output.length]=obj["$uid"];});onComplete(message);render(output);},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;}

View file

@ -375,7 +375,7 @@ var units=si?["KB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB",
preview.innerHTML="";count.innerHTML="0 / "+max;files.map(function(obj){var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/files/"+
obj+"/preview?width="+
previewWidth+"&height="+
previewHeight;file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");}
previewHeight+"&project=console";file.className="file avatar";file.tabIndex=0;file.appendChild(image);count.innerHTML=files.length+" / "+max;preview.appendChild(file);if(files.length>=max){input.disabled=true;upload.classList.add("disabled");}else{input.disabled=false;upload.classList.remove("disabled");}
var remove=(function(obj){return function(event){output=Array.isArray(output)?output.filter(function(e){return e!==obj;}):[];render(output);};})(obj);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=multiple?JSON.stringify(output):output[0];});};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));if(!multiple){output=[];}
sdk.storage.createFile(files[0],read,write,1).then(function(response){response.map(function(obj){if(!Array.isArray(output)){throw new Error("Can't append new file to non array value");}
output[output.length]=obj["$uid"];});onComplete(message);render(output);},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;}

View file

@ -102,7 +102,8 @@
"/preview?width=" +
previewWidth +
"&height=" +
previewHeight;
previewHeight +
"&project=console";
file.className = "file avatar";
file.tabIndex = 0;