1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Fix progress bar

This commit is contained in:
ksamuel 2020-08-12 11:15:01 +02:00
parent 23d7b73514
commit b2f49953f5
4 changed files with 34 additions and 38 deletions

View File

@ -290,7 +290,6 @@ form textarea {
.progress {
margin: 8px 0 8px 0;
height: 1.5rem;
display: none;
}
.progress .bar {

View File

@ -339,13 +339,13 @@ window.zerobin = {
if (doneCallback) {
doneCallback(content);
}
}, 250);
}, 50);
}, 250);
}, 50);
}, 250);
}, 50);
}, 250);
}, 50);
},
/** Base64 decoding + uncompress + decrypt, with callbacks before each operation,
@ -394,25 +394,25 @@ window.zerobin = {
errorCallback(err);
}
}, 250); /* "End of from bits to string" */
}, 50); /* "End of from bits to string" */
} catch (err) {
errorCallback(err);
}
}, 250); /* End of "from base 64 to bits" */
}, 50); /* End of "from base 64 to bits" */
} catch (err) {
errorCallback(err);
}
}, 250); /* End of "decompress" */
}, 50); /* End of "decompress" */
} catch (err) {
errorCallback(err);
}
}, 250); /* End of "decrypt" */
}, 50); /* End of "decrypt" */
},
/** Create a random base64-like string long enought to be suitable as

View File

@ -1,25 +1,25 @@
<form class="well" method="post" action="/paste/create" @submit.prevent="encryptAndSendPaste()">
<div class="d-flex justify-content-between">
<div>
<label class="col-form-label">Upload text/img:</label>
<div class="file-upload" v-if="support.fileUpload">
<input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'"
:disabled="isUploading">
<input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'"
:disabled="isUploading">
<input type="file" class="hide-upload" id="file-upload" @change="handleUpload($event.target.files)">
</div>
</div>
</div>
<div class="form-group select-date paste-option">
<label class="col-form-label">Expiration:</label>
<div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option>
<option value="1_month">1 month</option>
<option value="never">Never</option>
</select>
<div class="input-group-append">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
@ -28,32 +28,29 @@
</div>
<div>
<div class="progress-bar progress-bar-striped progress" v-show="isLoading">
<div class="bar"></div>
<div class="progress" v-show="isLoading">
<div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div>
<textarea rows="10" style="width:100%;"
class="form-control"
id="content" name="content" autofocus
<textarea rows="10" style="width:100%;" class="form-control" id="content" name="content" autofocus
@keydown.prevent.ctrl.enter="encryptAndSendPaste()"></textarea>
</div>
<div class="form-group select-date paste-option down" v-if="displayBottomToolBar">
<label class="col-form-label">Expiration:</label>
<div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option>
<option value="1_month">1 month</option>
<option value="never">Never</option>
</select>
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
<div class="form-group select-date paste-option down" v-if="displayBottomToolBar">
<label class="col-form-label">Expiration:</label>
<div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option>
<option value="1_month">1 month</option>
<option value="never">Never</option>
</select>
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</form>
% rebase("base", settings=settings, pastes_count=pastes_count)

View File

@ -46,8 +46,8 @@
</div>
<div class="progress-container">
<div class="progress progress-bar progress-bar-striped active" v-show="isLoading">
<div class="bar"></div>
<div class="progress active" v-show="isLoading">
<div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div>
</div>
@ -113,8 +113,8 @@
</div>
<div class="progress-container progress-clone">
<div class="progress progress-bar progress-bar-striped active" v-show="isLoading">
<div class="bar"></div>
<div class="progress active" v-show="isLoading">
<div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div>
</div>