Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: iconClass render #942

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/components/UploadPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:close-after-click="true"
class="upload-picker__menu-entry"
@click="entry.handler(destination, content)">
<template #icon>
<template #icon v-if="entry.iconSvgInline">
<NcIconSvgWrapper :svg="entry.iconSvgInline" />
</template>
{{ entry.displayName }}
Expand Down
6 changes: 3 additions & 3 deletions lib/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class Uploader {
* @param {string} destinationPath the destination path relative to the root folder. e.g. /foo/bar.txt
* @param {File} file the file to upload
*/
upload(destinationPath: string, file: File) {
upload(destinationPath: string, file: File): PCancelable<Upload> {
const destinationFile = `${this.root}/${destinationPath.replace(/^\//, '')}`

logger.debug(`Uploading ${file.name} to ${destinationFile}`)
Expand Down Expand Up @@ -206,7 +206,7 @@ export class Uploader {
.then(() => { upload.uploaded = upload.uploaded + maxChunkSize })
.catch((error) => {
if (!(error instanceof CanceledError)) {
logger.error(`Chunk ${chunk+1} ${bufferStart} - ${bufferEnd} uploading failed`)
logger.error(`Chunk ${chunk + 1} ${bufferStart} - ${bufferEnd} uploading failed`)
upload.status = UploadStatus.FAILED
}
throw error
Expand Down Expand Up @@ -296,7 +296,7 @@ export class Uploader {
this._jobQueue.onIdle()
.then(() => this.reset())
return upload
})
}) as PCancelable<Upload>

return promise
}
Expand Down