Inline
This commit is contained in:
parent
e217635a1b
commit
2b82c61853
2 changed files with 24 additions and 24 deletions
|
@ -1,23 +0,0 @@
|
|||
interface UploadCancelStatus {
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
class UploadCancelService {
|
||||
private shouldUploadBeCancelled: UploadCancelStatus = {
|
||||
value: false,
|
||||
};
|
||||
|
||||
reset() {
|
||||
this.shouldUploadBeCancelled.value = false;
|
||||
}
|
||||
|
||||
requestUploadCancelation() {
|
||||
this.shouldUploadBeCancelled.value = true;
|
||||
}
|
||||
|
||||
isUploadCancelationRequested(): boolean {
|
||||
return this.shouldUploadBeCancelled.value;
|
||||
}
|
||||
}
|
||||
|
||||
export default new UploadCancelService();
|
|
@ -48,7 +48,6 @@ import {
|
|||
tryParseTakeoutMetadataJSON,
|
||||
type ParsedMetadataJSON,
|
||||
} from "./takeout";
|
||||
import uploadCancelService from "./uploadCancelService";
|
||||
import UploadService, {
|
||||
assetName,
|
||||
getAssetName,
|
||||
|
@ -59,6 +58,30 @@ import UploadService, {
|
|||
/** The number of uploads to process in parallel. */
|
||||
const maxConcurrentUploads = 4;
|
||||
|
||||
interface UploadCancelStatus {
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
class UploadCancelService {
|
||||
private shouldUploadBeCancelled: UploadCancelStatus = {
|
||||
value: false,
|
||||
};
|
||||
|
||||
reset() {
|
||||
this.shouldUploadBeCancelled.value = false;
|
||||
}
|
||||
|
||||
requestUploadCancelation() {
|
||||
this.shouldUploadBeCancelled.value = true;
|
||||
}
|
||||
|
||||
isUploadCancelationRequested(): boolean {
|
||||
return this.shouldUploadBeCancelled.value;
|
||||
}
|
||||
}
|
||||
|
||||
const uploadCancelService = new UploadCancelService();
|
||||
|
||||
class UIService {
|
||||
private progressUpdater: ProgressUpdater;
|
||||
|
||||
|
|
Loading…
Reference in a new issue