Set default license if none is set while uploading
This commit is contained in:
parent
b9dc7a7efc
commit
d7083131a1
3 changed files with 5 additions and 9 deletions
|
@ -24,7 +24,7 @@ export class OsmImageUploadHandler {
|
||||||
private generateOptions(license: string) {
|
private generateOptions(license: string) {
|
||||||
const tags = this._tags.data;
|
const tags = this._tags.data;
|
||||||
const self = this;
|
const self = this;
|
||||||
|
license = license ?? "CC0"
|
||||||
const title = tags.name ?? "Unknown area";
|
const title = tags.name ?? "Unknown area";
|
||||||
const description = [
|
const description = [
|
||||||
"author:" + State.state.osmConnection.userDetails.data.name,
|
"author:" + State.state.osmConnection.userDetails.data.name,
|
||||||
|
|
|
@ -19,10 +19,6 @@ export default class ImageCarouselWithUploadConstructor implements TagDependantU
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Priority(): number {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
construct(dependencies): TagDependantUIElement {
|
construct(dependencies): TagDependantUIElement {
|
||||||
return new ImageCarouselWithUpload(dependencies);
|
return new ImageCarouselWithUpload(dependencies);
|
||||||
}
|
}
|
||||||
|
@ -62,8 +58,4 @@ class ImageCarouselWithUpload extends TagDependantUIElement {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Priority(): number {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -148,6 +148,10 @@ export class ImageUploadFlow extends UIElement {
|
||||||
self._isUploading.setData(files.length);
|
self._isUploading.setData(files.length);
|
||||||
self._allDone.setData(false);
|
self._allDone.setData(false);
|
||||||
|
|
||||||
|
if(self._selectedLicence.data === undefined){
|
||||||
|
self._selectedLicence.setData("CC0");
|
||||||
|
}
|
||||||
|
|
||||||
const opts = self._uploadOptions(self._selectedLicence.data);
|
const opts = self._uploadOptions(self._selectedLicence.data);
|
||||||
|
|
||||||
Imgur.uploadMultiple(opts.title, opts.description, files,
|
Imgur.uploadMultiple(opts.title, opts.description, files,
|
||||||
|
|
Loading…
Reference in a new issue