This commit is contained in:
Vanessa 2023-03-18 10:12:19 +08:00
parent 1cfe63c64f
commit 7076dcd5c7
2 changed files with 16 additions and 6 deletions

View file

@ -9,11 +9,11 @@
transition: box-shadow 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
background-color: var(--b3-theme-background);
&:hover {
&:not(.b3-text-field--text):hover {
box-shadow: inset 0 0 0 .4px var(--b3-theme-on-background);
}
&:focus {
&:not(.b3-text-field--text):focus {
box-shadow: inset 0 0 0 1px var(--b3-theme-primary), 0 0 0 3px var(--b3-theme-primary-lightest);
}
@ -28,9 +28,5 @@
&--text {
box-shadow: 0 0 0;
&:focus {
box-shadow: 0 0 0;
}
}
}

View file

@ -957,6 +957,20 @@ export class Toolbar {
});
const exportImg = () => {
const msgId = showMessage(window.siyuan.languages.exporting, 0);
if (renderElement.getAttribute("data-subtype") === "plantuml") {
fetch(renderElement.querySelector("img").getAttribute("src")).then(function (response) {
return response.blob()
}).then(function (blob) {
const formData = new FormData();
formData.append("file", blob);
formData.append("type", "image/png");
fetchPost("/api/export/exportAsFile", formData, (response) => {
openByMobile(response.data.file);
hideMessage(msgId);
});
});
return;
}
setTimeout(() => {
addScript("stage/protyle/js/html2canvas.min.js?v=1.4.1", "protyleHtml2canvas").then(() => {
window.html2canvas(renderElement).then((canvas) => {