Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-01-09 11:28:02 +08:00
commit 4edcc84abc
3 changed files with 14 additions and 11 deletions

View file

@ -1888,7 +1888,8 @@ export class Gutter {
// this.genHeights([nodeElement], protyle);
}
window.siyuan.menus.menu.append(new MenuItem({id: "separator_4", type: "separator"}).element);
if (!["NodeThematicBreak", "NodeBlockQueryEmbed", "NodeIFrame", "NodeHTMLBlock", "NodeWidget", "NodeVideo", "NodeAudio"].includes(type) &&
if (window.siyuan.config.cloudRegion === 0 &&
!["NodeThematicBreak", "NodeBlockQueryEmbed", "NodeIFrame", "NodeHTMLBlock", "NodeWidget", "NodeVideo", "NodeAudio"].includes(type) &&
getContenteditableElement(nodeElement)?.textContent.trim() !== "" &&
(type !== "NodeCodeBlock" || (type === "NodeCodeBlock" && !nodeElement.getAttribute("data-subtype")))) {
window.siyuan.menus.menu.append(new MenuItem({

View file

@ -118,14 +118,16 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
}
}).element);
if (!window.siyuan.config.readonly) {
window.siyuan.menus.menu.append(new MenuItem({
id: "wechatReminder",
label: window.siyuan.languages.wechatReminder,
icon: "iconMp",
click() {
openFileWechatNotify(protyle);
}
}).element);
if (window.siyuan.config.cloudRegion === 0) {
window.siyuan.menus.menu.append(new MenuItem({
id: "wechatReminder",
label: window.siyuan.languages.wechatReminder,
icon: "iconMp",
click() {
openFileWechatNotify(protyle);
}
}).element);
}
const riffCardMenu: IMenu[] = [{
id: "spaceRepetition",
iconHTML: "",

View file

@ -32,8 +32,8 @@ declare namespace Config {
bazaar: IBazaar;
/**
* Cloud Service Provider Region
* - `0`: Chinese mainland
* - `1`: North America
* - `0`: Chinese mainland (LianDi)
* - `1`: North America (LiuYun)
*/
cloudRegion: number;
editor: IEditor;