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 { .progress {
margin: 8px 0 8px 0; margin: 8px 0 8px 0;
height: 1.5rem; height: 1.5rem;
display: none;
} }
.progress .bar { .progress .bar {

View File

@ -339,13 +339,13 @@ window.zerobin = {
if (doneCallback) { if (doneCallback) {
doneCallback(content); doneCallback(content);
} }
}, 250); }, 50);
}, 250); }, 50);
}, 250); }, 50);
}, 250); }, 50);
}, },
/** Base64 decoding + uncompress + decrypt, with callbacks before each operation, /** Base64 decoding + uncompress + decrypt, with callbacks before each operation,
@ -394,25 +394,25 @@ window.zerobin = {
errorCallback(err); errorCallback(err);
} }
}, 250); /* "End of from bits to string" */ }, 50); /* "End of from bits to string" */
} catch (err) { } catch (err) {
errorCallback(err); errorCallback(err);
} }
}, 250); /* End of "from base 64 to bits" */ }, 50); /* End of "from base 64 to bits" */
} catch (err) { } catch (err) {
errorCallback(err); errorCallback(err);
} }
}, 250); /* End of "decompress" */ }, 50); /* End of "decompress" */
} catch (err) { } catch (err) {
errorCallback(err); errorCallback(err);
} }
}, 250); /* End of "decrypt" */ }, 50); /* End of "decrypt" */
}, },
/** Create a random base64-like string long enought to be suitable as /** 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()"> <form class="well" method="post" action="/paste/create" @submit.prevent="encryptAndSendPaste()">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<div> <div>
<label class="col-form-label">Upload text/img:</label> <label class="col-form-label">Upload text/img:</label>
<div class="file-upload" v-if="support.fileUpload"> <div class="file-upload" v-if="support.fileUpload">
<input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'" <input type="button" class="btn btn-primary" :value="isUploading ? 'Uploading...': 'Upload file'"
:disabled="isUploading"> :disabled="isUploading">
<input type="file" class="hide-upload" id="file-upload" @change="handleUpload($event.target.files)"> <input type="file" class="hide-upload" id="file-upload" @change="handleUpload($event.target.files)">
</div> </div>
</div> </div>
<div class="form-group select-date paste-option"> <div class="form-group select-date paste-option">
<label class="col-form-label">Expiration:</label> <label class="col-form-label">Expiration:</label>
<div class="input-group"> <div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration"> <select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<option value="burn_after_reading">Burn after reading</option> <option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option> <option selected value="1_day">1 day</option>
<option value="1_month">1 month</option> <option value="1_month">1 month</option>
<option value="never">Never</option> <option value="never">Never</option>
</select> </select>
<div class="input-group-append"> <div class="input-group-append">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
</div> </div>
</div> </div>
@ -28,32 +28,29 @@
</div> </div>
<div> <div>
<div class="progress-bar progress-bar-striped progress" v-show="isLoading"> <div class="progress" v-show="isLoading">
<div class="bar"></div> <div class="progress-bar progress-bar-striped" role="progressbar"></div>
</div> </div>
<textarea rows="10" style="width:100%;" <textarea rows="10" style="width:100%;" class="form-control" id="content" name="content" autofocus
class="form-control"
id="content" name="content" autofocus
@keydown.prevent.ctrl.enter="encryptAndSendPaste()"></textarea> @keydown.prevent.ctrl.enter="encryptAndSendPaste()"></textarea>
</div> </div>
<div class="form-group select-date paste-option down" v-if="displayBottomToolBar"> <div class="form-group select-date paste-option down" v-if="displayBottomToolBar">
<label class="col-form-label">Expiration:</label> <label class="col-form-label">Expiration:</label>
<div class="input-group"> <div class="input-group">
<select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration"> <select id="expiration" name="expiration" class="custom-select" v-model="newPaste.expiration">
<option value="burn_after_reading">Burn after reading</option> <option value="burn_after_reading">Burn after reading</option>
<option selected value="1_day">1 day</option> <option selected value="1_day">1 day</option>
<option value="1_month">1 month</option> <option value="1_month">1 month</option>
<option value="never">Never</option> <option value="never">Never</option>
</select> </select>
<div class="input-group-append"> <div class="input-group-append">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
</div>
</div> </div>
</div> </div>
</div>
</form> </form>
% rebase("base", settings=settings, pastes_count=pastes_count) % rebase("base", settings=settings, pastes_count=pastes_count)

View File

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