mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-09 06:02:33 +01:00
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # app/src/protyle/toolbar/index.ts
This commit is contained in:
commit
a00e47a9b7
5 changed files with 35 additions and 22 deletions
|
|
@ -71,11 +71,12 @@ if (process.platform === "linux") {
|
|||
"KYLIN", // 麒麟备用标识
|
||||
"NEWSTART" // 中兴新支点
|
||||
].some(key => desktop.includes(key));
|
||||
const isKylinFile = fs.existsSync("/etc/kylin-release");
|
||||
const isKylinFile = fs.existsSync("/etc/kylin-version");
|
||||
const isUosFile = fs.existsSync("/etc/uos-version");
|
||||
const isDeepinFile = fs.existsSync("/etc/deepin-release");
|
||||
const isDeepinFile = fs.existsSync("/etc/deepin-version");
|
||||
if (isChineseOS || isKylinFile || isUosFile || isDeepinFile) {
|
||||
app.commandLine.appendSwitch("ozone-platform", "x11");
|
||||
app.commandLine.appendSwitch("enable-wayland-ime");
|
||||
app.commandLine.appendSwitch("wayland-text-input-version", "3");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1454,7 +1454,7 @@ export class Toolbar {
|
|||
k: inputElement.value,
|
||||
}, (response) => {
|
||||
let searchHTML = "";
|
||||
response.data.blocks.forEach((item: { path: string, content: string }, index: number) => {
|
||||
response.data.templates.forEach((item: { path: string, content: string }, index: number) => {
|
||||
searchHTML += `<div data-value="${item.path}" class="b3-list-item--hide-action b3-list-item${index === 0 ? " b3-list-item--focus" : ""}">
|
||||
<span class="b3-list-item__text">${item.content}</span>`;
|
||||
/// #if !BROWSER
|
||||
|
|
@ -1469,7 +1469,7 @@ export class Toolbar {
|
|||
listElement.innerHTML = searchHTML || `<li class="b3-list--empty">${window.siyuan.languages.emptyContent}</li>`;
|
||||
|
||||
if (!previewPath) {
|
||||
previewPath = response.data.blocks[0]?.path;
|
||||
previewPath = response.data.templates[0]?.path;
|
||||
/// #if !MOBILE
|
||||
const rangePosition = getSelectionPosition(nodeElement, range);
|
||||
setPosition(this.subElement, rangePosition.left, rangePosition.top + 18, Constants.SIZE_TOOLBAR_HEIGHT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue