Plantnet-detection: finishing touches
This commit is contained in:
parent
d713e00671
commit
03dad39949
4 changed files with 8 additions and 7 deletions
|
@ -90,14 +90,14 @@ export default class PlantNetSpeciesSearch extends VariableUiElement {
|
||||||
const buttons = new Combine([
|
const buttons = new Combine([
|
||||||
new Button(
|
new Button(
|
||||||
new Combine([
|
new Combine([
|
||||||
Svg.back_svg().SetClass("w-4"),
|
Svg.back_svg().SetClass("w-6 mr-1 bg-white rounded-full p-1"),
|
||||||
t.back]).SetClass("flex"),
|
t.back]).SetClass("flex"),
|
||||||
() => {
|
() => {
|
||||||
selectedSpecies.setData(undefined)
|
selectedSpecies.setData(undefined)
|
||||||
}).SetClass("btn btn-secondary"),
|
}).SetClass("btn btn-secondary"),
|
||||||
|
|
||||||
new Button(
|
new Button(
|
||||||
new Combine([Svg.confirm_svg().SetClass("w-4"), t.confirm]).SetClass("flex")
|
new Combine([Svg.confirm_svg().SetClass("w-6 mr-1"), t.confirm]).SetClass("flex")
|
||||||
, () => {
|
, () => {
|
||||||
onConfirm(wikidataSpecies)
|
onConfirm(wikidataSpecies)
|
||||||
}).SetClass("btn"),
|
}).SetClass("btn"),
|
||||||
|
|
|
@ -130,16 +130,17 @@ export class ImageUploadFlow extends Toggle {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
if (l == 1) {
|
if (l == 1) {
|
||||||
return t.uploadingPicture.Clone().SetClass("alert")
|
return new Loading( t.uploadingPicture).SetClass("alert")
|
||||||
} else {
|
} else {
|
||||||
return t.uploadingMultiple.Subs({count: "" + l}).SetClass("alert")
|
return new Loading(t.uploadingMultiple.Subs({count: "" + l})).SetClass("alert")
|
||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
new VariableUiElement(uploader.failed.map(q => q.length).map(l => {
|
new VariableUiElement(uploader.failed.map(q => q.length).map(l => {
|
||||||
if (l == 0) {
|
if (l == 0) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
return new Loading(t.uploadFailed).SetClass("alert");
|
console.log(l)
|
||||||
|
return t.uploadFailed.SetClass("block alert");
|
||||||
})),
|
})),
|
||||||
new VariableUiElement(uploadedCount.map(l => {
|
new VariableUiElement(uploadedCount.map(l => {
|
||||||
if (l == 0) {
|
if (l == 0) {
|
||||||
|
|
|
@ -1343,7 +1343,7 @@ export default class SpecialVisualizations {
|
||||||
|
|
||||||
return new Combine([
|
return new Combine([
|
||||||
toggle,
|
toggle,
|
||||||
new Combine([Svg.plantnet_logo_svg().SetClass("w-8"),
|
new Combine([Svg.plantnet_logo_svg().SetClass("w-10 h-10 p-1 mr-1 bg-white rounded-full"),
|
||||||
Translations.t.plantDetection.poweredByPlantnet])
|
Translations.t.plantDetection.poweredByPlantnet])
|
||||||
.SetClass("flex p-2 bg-gray-200 rounded-xl self-end")
|
.SetClass("flex p-2 bg-gray-200 rounded-xl self-end")
|
||||||
]).SetClass("flex flex-col")
|
]).SetClass("flex flex-col")
|
||||||
|
|
|
@ -992,7 +992,7 @@
|
||||||
"https://plantnet.org"
|
"https://plantnet.org"
|
||||||
],
|
],
|
||||||
"sources": [
|
"sources": [
|
||||||
"Plantnet.org"
|
"https://plantnet.org"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue