mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-17 09:30:48 +08:00
This commit is contained in:
parent
2c7a58d3b9
commit
7d41575c2f
@ -140,7 +140,7 @@ export class BlockPanel {
|
|||||||
pinElement.classList.add("block__icon--active");
|
pinElement.classList.add("block__icon--active");
|
||||||
pinElement.setAttribute("aria-label", window.siyuan.languages.unpin);
|
pinElement.setAttribute("aria-label", window.siyuan.languages.unpin);
|
||||||
this.element.setAttribute("data-pin", "true");
|
this.element.setAttribute("data-pin", "true");
|
||||||
})
|
});
|
||||||
/// #endif
|
/// #endif
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
@ -491,8 +491,19 @@ export const bazaar = {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bazaar._genMyHTML(bazaarType, app);
|
|
||||||
bazaar._onBazaar(response, bazaarType, ["themes", "icons"].includes(bazaarType));
|
bazaar._onBazaar(response, bazaarType, ["themes", "icons"].includes(bazaarType));
|
||||||
|
bazaar._genMyHTML(bazaarType, app);
|
||||||
|
if (bazaarType === "plugins") {
|
||||||
|
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.enablePluginTip, () => {
|
||||||
|
fetchPost("/api/petal/setPetalEnabled", {
|
||||||
|
packageName: dataObj.name,
|
||||||
|
enabled: true,
|
||||||
|
}, (response) => {
|
||||||
|
loadPlugin(app, response.data);
|
||||||
|
bazaar._genMyHTML(bazaarType, app);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -4,8 +4,8 @@ import {Constants} from "../constants";
|
|||||||
export const moveResize = (element: HTMLElement, afterCB?: (type: string) => void) => {
|
export const moveResize = (element: HTMLElement, afterCB?: (type: string) => void) => {
|
||||||
element.addEventListener("mousedown", (event: MouseEvent & { target: HTMLElement }) => {
|
element.addEventListener("mousedown", (event: MouseEvent & { target: HTMLElement }) => {
|
||||||
let iconsElement = hasClosestByClassName(event.target, "resize__move");
|
let iconsElement = hasClosestByClassName(event.target, "resize__move");
|
||||||
let x: number
|
let x: number;
|
||||||
let y: number
|
let y: number;
|
||||||
const elementRect = element.getBoundingClientRect();
|
const elementRect = element.getBoundingClientRect();
|
||||||
if (!iconsElement) {
|
if (!iconsElement) {
|
||||||
x = event.clientX;
|
x = event.clientX;
|
||||||
@ -124,4 +124,4 @@ export const moveResize = (element: HTMLElement, afterCB?: (type: string) => voi
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
@ -90,7 +90,7 @@ export class Tag extends Model {
|
|||||||
openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed);
|
openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed);
|
||||||
},
|
},
|
||||||
rightClick: (element: HTMLElement, event: MouseEvent) => {
|
rightClick: (element: HTMLElement, event: MouseEvent) => {
|
||||||
openTagMenu(element, event, element.getAttribute("data-label"))
|
openTagMenu(element, event, element.getAttribute("data-label"));
|
||||||
},
|
},
|
||||||
blockExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>',
|
blockExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>',
|
||||||
topExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>'
|
topExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>'
|
||||||
|
@ -3,7 +3,7 @@ import {showMessage} from "../dialog/message";
|
|||||||
import {isMobile} from "./functions";
|
import {isMobile} from "./functions";
|
||||||
import {fetchPost} from "./fetch";
|
import {fetchPost} from "./fetch";
|
||||||
import {Dialog} from "../dialog";
|
import {Dialog} from "../dialog";
|
||||||
import {getNotebookName, getOpenNotebookCount} from "./pathName";
|
import {getOpenNotebookCount} from "./pathName";
|
||||||
import {validateName} from "../editor/rename";
|
import {validateName} from "../editor/rename";
|
||||||
import {setStorageVal} from "../protyle/util/compatibility";
|
import {setStorageVal} from "../protyle/util/compatibility";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user