mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 03:26:09 +03:00
cleanup
This commit is contained in:
parent
82013e3139
commit
f0d228bb60
@ -22,7 +22,6 @@ export interface MessageBoxResult {
|
||||
|
||||
export abstract class FileTransfer {
|
||||
abstract getName (): string
|
||||
abstract getRelativePath (): string | null
|
||||
abstract getMode (): number
|
||||
abstract getSize (): number
|
||||
abstract close (): void
|
||||
@ -244,7 +243,7 @@ export class HTMLFileUpload extends FileUpload {
|
||||
private stream: ReadableStream
|
||||
private reader: ReadableStreamDefaultReader
|
||||
|
||||
constructor (private file: File, private relativePath: string|null = null) {
|
||||
constructor (private file: File) {
|
||||
super()
|
||||
this.stream = this.file.stream()
|
||||
this.reader = this.stream.getReader()
|
||||
@ -254,10 +253,6 @@ export class HTMLFileUpload extends FileUpload {
|
||||
return this.file.name
|
||||
}
|
||||
|
||||
getRelativePath (): string|null {
|
||||
return this.relativePath
|
||||
}
|
||||
|
||||
getMode (): number {
|
||||
return 0o644
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ class ElectronFileUpload extends FileUpload {
|
||||
private buffer: Buffer
|
||||
private powerSaveBlocker = 0
|
||||
|
||||
constructor (private filePath: string, private electron: ElectronService, private relativePath: string|null = null ) {
|
||||
constructor (private filePath: string, private electron: ElectronService) {
|
||||
super()
|
||||
this.buffer = Buffer.alloc(256 * 1024)
|
||||
this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension')
|
||||
@ -320,10 +320,6 @@ class ElectronFileUpload extends FileUpload {
|
||||
return path.basename(this.filePath)
|
||||
}
|
||||
|
||||
getRelativePath (): string|null {
|
||||
return this.relativePath
|
||||
}
|
||||
|
||||
getMode (): number {
|
||||
return this.mode
|
||||
}
|
||||
@ -366,10 +362,6 @@ class ElectronFileDownload extends FileDownload {
|
||||
return path.basename(this.filePath)
|
||||
}
|
||||
|
||||
getRelativePath (): null {
|
||||
return null
|
||||
}
|
||||
|
||||
getMode (): number {
|
||||
return this.mode
|
||||
}
|
||||
|
@ -155,7 +155,6 @@ class HTMLFileDownload extends FileDownload {
|
||||
private name: string,
|
||||
private mode: number,
|
||||
private size: number,
|
||||
private relativePath: string|null = null,
|
||||
) {
|
||||
super()
|
||||
}
|
||||
@ -164,10 +163,6 @@ class HTMLFileDownload extends FileDownload {
|
||||
return this.name
|
||||
}
|
||||
|
||||
getRelativePath (): string|null {
|
||||
return this.relativePath
|
||||
}
|
||||
|
||||
getMode (): number {
|
||||
return this.mode
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user