This commit is contained in:
parent
ba0377f69b
commit
aae6247e3c
4 changed files with 18 additions and 10 deletions
12
DEV.md
12
DEV.md
|
@ -7,15 +7,19 @@
|
|||
|
||||
## NPM dependencies
|
||||
|
||||
Install pnpm
|
||||
|
||||
`npm install -g pnpm`
|
||||
|
||||
In China, it may be necessary to set the Electron mirror environment variable:
|
||||
|
||||
* macOS/Linux: ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D
|
||||
* macOS/Linux: ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" pnpm install electron@14.2.5 -D
|
||||
* Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/`
|
||||
|
||||
NPM mirror:
|
||||
|
||||
* May need to use mirror repository in China `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/`
|
||||
* Revert to using official repository `npm --registry https://registry.npmjs.org i -D`
|
||||
* May need to use mirror repository in China `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/`
|
||||
* Revert to using official repository `pnpm --registry https://registry.npmjs.org i`
|
||||
|
||||
## Kernel
|
||||
|
||||
|
@ -44,4 +48,4 @@ On the desktop, go to the app folder to compile and run:
|
|||
* `npm run dev`
|
||||
* `npm run start`
|
||||
|
||||
For the mobile-end, please refer to the corresponding project repository.
|
||||
For the mobile-end, please refer to the corresponding project repository.
|
||||
|
|
10
DEV_zh_CN.md
10
DEV_zh_CN.md
|
@ -7,15 +7,19 @@
|
|||
|
||||
## NPM 依赖
|
||||
|
||||
安装 pnpm
|
||||
|
||||
`npm install -g pnpm`
|
||||
|
||||
在中国可能需要设置 Electron 镜像环境变量:
|
||||
|
||||
* macOS/Linux:ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" npm install electron@14.2.5 -D
|
||||
* macOS/Linux:ELECTRON_MIRROR="https://cnpmjs.org/mirrors/electron/" pnpm install electron@14.2.5 -D
|
||||
* Windows: `SET ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/`
|
||||
|
||||
NPM 镜像:
|
||||
|
||||
* 在中国可能需要使用镜像仓库 `npm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/`
|
||||
* 恢复使用官方仓库 `npm --registry https://registry.npmjs.org i -D`
|
||||
* 在中国可能需要使用镜像仓库 `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/`
|
||||
* 恢复使用官方仓库 `pnpm --registry https://registry.npmjs.org i`
|
||||
|
||||
## 内核
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ export class Bookmark extends Model {
|
|||
element: this.element.lastElementChild as HTMLElement,
|
||||
data: null,
|
||||
click(element: HTMLElement) {
|
||||
const id = element.getAttribute("data-node-id")
|
||||
const id = element.getAttribute("data-node-id");
|
||||
fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
|
||||
openFileById({
|
||||
id,
|
||||
|
|
|
@ -104,9 +104,9 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
|
|||
}
|
||||
let iconHTML;
|
||||
if (item.type === "NodeDocument") {
|
||||
iconHTML = `<span data-defids='["${item.defID}"]' class="b3-list-item__graphic popover__block" data-id="${item.id}">${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}</span>`
|
||||
iconHTML = `<span data-defids='["${item.defID}"]' class="b3-list-item__graphic popover__block" data-id="${item.id}">${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}</span>`;
|
||||
} else {
|
||||
iconHTML = `<svg data-defids='["${item.defID}"]' class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`
|
||||
iconHTML = `<svg data-defids='["${item.defID}"]' class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`;
|
||||
}
|
||||
html += `<li ${type === "backlink" ? 'draggable="true"' : ""}
|
||||
class="b3-list-item ${isMobile() ? "" : "b3-list-item--hide-action"}"
|
||||
|
|
Loading…
Add table
Reference in a new issue