This commit is contained in:
Vanessa 2023-09-25 15:49:34 +08:00
parent b873692e78
commit 5e8ed05ec5

View file

@ -20,6 +20,7 @@ import {hideElements} from "../ui/hideElements";
import {genAssetHTML} from "../../asset/renderAssets";
import {unicode2Emoji} from "../../emoji";
import {avRender} from "../render/av/render";
import {needSubscribe} from "../../util/needSubscribe";
export const hintSlash = (key: string, protyle: IProtyle) => {
const allList: IHintData[] = [{
@ -46,11 +47,15 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
filter: ["ai chat"],
value: Constants.ZWSP + 5,
html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
}, {
}]
if (!needSubscribe("")) {
allList.push({
filter: ["数据库", "属性视图", "shujuku", "shuxingshitu", "sjk", "sxst", "database", "attribute view"],
value: '<div data-type="NodeAttributeView" data-av-type="table"></div>',
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconDatabase"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.database}</span></div>`,
}, {
})
}
[{
filter: ["文档", "子文档", "wendang", "wd", "ziwendang", "zwd", "xjwd"],
value: Constants.ZWSP + 4,
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newFile}</span><span class="b3-menu__accelerator">${updateHotkeyTip(window.siyuan.config.keymap.general.newFile.custom)}</span></div>`,
@ -246,7 +251,9 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
filter: ["移除样式", "yichuyangshi", "ycys", "remove style"],
value: `style${Constants.ZWSP}`,
html: `<div class="b3-list-item__first"><div class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.clearFontStyle}</span></div>`,
}];
}].forEach(item => {
allList.push(item);
});
allList.push({
value: "",
html: "separator",