some style tweaks
This commit is contained in:
@@ -17,13 +17,13 @@ var UploadProgressBar = /** @class */ (function () {
|
||||
this.uploadDiv.innerText = "Uploading... " + Math.round(progress * 1000) / 10 + "%\n" + this.file.name;
|
||||
this.uploadDiv.setAttribute('style', 'background: linear-gradient('
|
||||
+ 'to right, '
|
||||
+ '#111 0%, '
|
||||
+ 'var(--file_background_color) 0%, '
|
||||
+ 'var(--highlight_color) ' + ((progress * 100)) + '%, '
|
||||
+ '#111 ' + ((progress * 100) + 1) + '%)');
|
||||
+ 'var(--file_background_color) ' + ((progress * 100) + 1) + '%)');
|
||||
};
|
||||
UploadProgressBar.prototype.onFinished = function (id) {
|
||||
finishedUploads[this.queueNum] = id;
|
||||
this.uploadDiv.setAttribute('style', 'background: #111');
|
||||
this.uploadDiv.setAttribute('style', 'background: var(--file_background_color)');
|
||||
this.uploadDiv.setAttribute('href', '/u/' + id);
|
||||
this.uploadDiv.setAttribute("target", "_blank");
|
||||
this.uploadDivJQ.html('<img src="' + apiEndpoint + '/file/' + id + '/thumbnail" alt="' + this.file.name + '"/>'
|
||||
@@ -31,7 +31,7 @@ var UploadProgressBar = /** @class */ (function () {
|
||||
+ '<span style="color: var(--highlight_color);">' + window.location.hostname + '/u/' + id + '</span>');
|
||||
};
|
||||
UploadProgressBar.prototype.onFailure = function (response, error) {
|
||||
this.uploadDiv.setAttribute('style', 'background: #821C40');
|
||||
this.uploadDiv.setAttribute('style', 'background: var(--danger_color)');
|
||||
this.uploadDivJQ.html(this.file.name + '<br/>'
|
||||
+ 'Upload failed after three tries!<br/>'
|
||||
+ "Message: " + error);
|
||||
|
@@ -58,5 +58,5 @@ function historyAddItem(json) {
|
||||
+ ("00" + date.getDate()).slice(-2)
|
||||
+ "</a>";
|
||||
|
||||
$("#uploadedFiles").append($(uploadItem).hide().fadeIn(400));
|
||||
$("#uploadedFiles").append($(uploadItem).hide().fadeIn(2000));
|
||||
}
|
||||
|
@@ -207,13 +207,6 @@ pre{
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.files_container{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
height: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.file_button, .file_button:hover{
|
||||
position: relative;
|
||||
@@ -224,7 +217,7 @@ pre{
|
||||
margin: 6px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 0px 6px 2px var(--shadow_color);
|
||||
box-shadow: 0px 0px 6px 2px var(--file_background_color);
|
||||
background-color: var(--file_background_color);
|
||||
color: var(--text_color);
|
||||
word-break: break-all;
|
||||
|
@@ -33,15 +33,15 @@ class UploadProgressBar implements FileUpload {
|
||||
'style',
|
||||
'background: linear-gradient('
|
||||
+'to right, '
|
||||
+'#111 0%, '
|
||||
+'var(--file_background_color) 0%, '
|
||||
+'var(--highlight_color) '+ ((progress*100)) +'%, '
|
||||
+'#111 '+ ((progress*100)+1) +'%)'
|
||||
+'var(--file_background_color) '+ ((progress*100)+1) +'%)'
|
||||
)
|
||||
}
|
||||
public onFinished(id: string){
|
||||
finishedUploads[this.queueNum] = id
|
||||
|
||||
this.uploadDiv.setAttribute('style', 'background: #111')
|
||||
this.uploadDiv.setAttribute('style', 'background: var(--file_background_color)')
|
||||
this.uploadDiv.setAttribute('href', '/u/'+id)
|
||||
this.uploadDiv.setAttribute("target", "_blank");
|
||||
this.uploadDivJQ.html(
|
||||
@@ -51,7 +51,7 @@ class UploadProgressBar implements FileUpload {
|
||||
)
|
||||
}
|
||||
public onFailure(response: JQuery.Ajax.ErrorTextStatus, error: string) {
|
||||
this.uploadDiv.setAttribute('style', 'background: #821C40')
|
||||
this.uploadDiv.setAttribute('style', 'background: var(--danger_color)')
|
||||
this.uploadDivJQ.html(
|
||||
this.file.name+'<br/>'
|
||||
+ 'Upload failed after three tries!<br/>'
|
||||
|
Reference in New Issue
Block a user