Linked checkboxes to "download selected" button

This commit is contained in:
Geomitron
2020-02-10 00:43:39 -05:00
parent 1e16371958
commit a98b03dcd4
12 changed files with 105 additions and 36 deletions

View File

@@ -16,8 +16,6 @@ const mkdir = promisify(_mkdir)
export class AddDownloadHandler implements IPCEmitHandler<'add-download'> {
event: 'add-download' = 'add-download'
//TODO: update percent in a way that makes its progress seem as smooth as possible
async handler(data: NewDownload) {
const download: Download = {
versionID: data.versionID,

View File

@@ -7,5 +7,5 @@ export interface Settings {
export const defaultSettings: Settings = {
rateLimitDelay: 31,
theme: 'Default',
libraryPath: 'C:/Users/bouviejs/Desktop/Bridge Notes/TestLibrary'
libraryPath: 'C:/Users/bouviejs/Desktop/Bridge Notes/TestLibrary' // TODO: default should be undefined
}

View File

@@ -1,16 +1,6 @@
/**
* Represents the download of a single chart
* Contains the data required to start downloading a single chart
*/
export interface Download {
versionID: number
title: string
header: string
description: string
percent: number
//TODO: figure out how to handle user clicking "retry"
}
export interface NewDownload {
versionID: number
avTagName: string
@@ -19,15 +9,13 @@ export interface NewDownload {
links: { [type: string]: string }
}
export enum DownloadState {
wait, // Waiting for Google rate limit...
request, // [song.ini] Sending request...
warning, // Warning! [song.ini] has been modified recently and may not match how it was displayed in search results. Download anyway?
download, // [song.ini] Downloading: 25%
extract, // [archive.zip] Extracting: 44%
transfer, // Copying files to library...
complete // Complete
}
// Try again button appears after an error: restarts the stage that failed
/**
* Represents the download progress of a single chart
*/
export interface Download {
versionID: number
title: string
header: string
description: string
percent: number
}