@studiotitta/studio-editori 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/selain/Paneeli.js +6 -1
- package/package.json +1 -1
package/dist/selain/Paneeli.js
CHANGED
|
@@ -393,7 +393,12 @@ function Kuvakentta({ maaritys, arvo, muuta, lataa, }) {
|
|
|
393
393
|
setVirhe(syy instanceof Error ? syy.message : "Kuvan lataus ei onnistunut.");
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
return (_jsxs("div", { className: "kuva", children: [esikatselu ?? (typeof kuva?.src === "string" ? kuva.src : null) ? (_jsxs(_Fragment, { children: [_jsx("img", { src: esikatselu ?? kuva?.src, alt: "" }), esikatselu ? (_jsx("p", { className: "ohje", children: "Uusi kuva. Se tulee sivulle, kun tallennat." })) : null] })) : (_jsx("p", { className: "tyhja", children: "Ei kuvaa." })), _jsxs("label", { className: "lataus", children: [_jsx("span", { children: tila === "lataa" ? "Käsitellään…" : "Vaihda kuva" }), _jsx("input", { type: "file", accept: "image/*", disabled: tila === "lataa", onChange: (tapahtuma) => valitse(tapahtuma.target.files?.[0]) })] }), tila === "virhe" ? _jsx("p", { className: "virheviesti", children: virhe }) : null, _jsxs("label", { className: "alt", children: ["Kuvan kuvaus", _jsx("input", { type: "text",
|
|
396
|
+
return (_jsxs("div", { className: "kuva", children: [esikatselu ?? (typeof kuva?.src === "string" ? kuva.src : null) ? (_jsxs(_Fragment, { children: [_jsx("img", { src: esikatselu ?? kuva?.src, alt: "" }), esikatselu ? (_jsx("p", { className: "ohje", children: "Uusi kuva. Se tulee sivulle, kun tallennat." })) : null] })) : (_jsx("p", { className: "tyhja", children: "Ei kuvaa." })), _jsxs("label", { className: "lataus", children: [_jsx("span", { children: tila === "lataa" ? "Käsitellään…" : "Vaihda kuva" }), _jsx("input", { type: "file", accept: "image/*", disabled: tila === "lataa", onChange: (tapahtuma) => valitse(tapahtuma.target.files?.[0]) })] }), tila === "virhe" ? _jsx("p", { className: "virheviesti", children: virhe }) : null, _jsxs("label", { className: "alt", children: ["Kuvan kuvaus", _jsx("input", { type: "text",
|
|
397
|
+
/* Vihje opettaa muodon, ei sisältöä. Aiempi "Esimerkiksi: kynttilä
|
|
398
|
+
ikkunalaudalla" luettiin ehdotukseksi siitä, mitä kenttään pitäisi
|
|
399
|
+
kirjoittaa, eikä esimerkiksi alt-tekstin muodosta — eikä kynttilä
|
|
400
|
+
liity mihinkään sivustoon, joilla editoria käytetään. */
|
|
401
|
+
placeholder: "Lyhyesti: mit\u00E4 kuvassa n\u00E4kyy", value: typeof kuva?.alt === "string" ? kuva.alt : "", onChange: (tapahtuma) => {
|
|
397
402
|
setVaihdettu(false);
|
|
398
403
|
muuta({ ...(kuva ?? {}), alt: tapahtuma.target.value });
|
|
399
404
|
} })] }), ehdotus ? (_jsxs("div", { className: "huomio", role: "status", children: [_jsxs("p", { children: ["Ehdotus: \u201C", ehdotus, "\u201D"] }), _jsx("button", { type: "button", onClick: () => {
|
package/package.json
CHANGED