feat: implement upload speed calculation and ETA estimation (#2677)

This commit is contained in:
M A E R Y O
2023-09-15 07:41:36 +09:00
committed by GitHub
parent 36af01daa6
commit ecdd684bf1
5 changed files with 138 additions and 19 deletions

View File

@@ -97,12 +97,20 @@ const mutations = {
state.clipboard.key = "";
state.clipboard.items = [];
},
setUploadSpeed: (state, value) => {
state.upload.speedMbyte = value;
},
setETA(state, value) {
state.upload.eta = value;
},
resetUpload(state) {
state.upload.uploads = {};
state.upload.queue = [];
state.upload.progress = [];
state.upload.sizes = [];
state.upload.id = 0;
state.upload.speedMbyte = 0;
state.upload.eta = 0;
},
};