mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58:49 +01:00
This commit is contained in:
parent
f4b91dd8c9
commit
9249d4e010
4 changed files with 13 additions and 13 deletions
|
|
@ -59,7 +59,7 @@ export const makeCard = (nodeElement: Element[]) => {
|
||||||
html += genCardItem(item);
|
html += genCardItem(item);
|
||||||
});
|
});
|
||||||
const dialog = new Dialog({
|
const dialog = new Dialog({
|
||||||
width: isMobile() ? "90vw" : "50vw",
|
width: isMobile() ? "90vw" : "768px",
|
||||||
height: "70vh",
|
height: "70vh",
|
||||||
title: window.siyuan.languages.riffCard,
|
title: window.siyuan.languages.riffCard,
|
||||||
content: `<div class="b3-dialog__content fn__flex-column" style="box-sizing: border-box;height: 100%">
|
content: `<div class="b3-dialog__content fn__flex-column" style="box-sizing: border-box;height: 100%">
|
||||||
|
|
@ -79,7 +79,7 @@ export const makeCard = (nodeElement: Element[]) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog.element.setAttribute("data-key", "makeCard");
|
dialog.element.setAttribute("data-key", "makeCard");
|
||||||
dialog.element.style.zIndex = "199";
|
dialog.element.style.zIndex = "200";
|
||||||
dialog.element.addEventListener("click", (event) => {
|
dialog.element.addEventListener("click", (event) => {
|
||||||
let target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
while (target && !target.isSameNode(dialog.element)) {
|
while (target && !target.isSameNode(dialog.element)) {
|
||||||
|
|
|
||||||
|
|
@ -328,13 +328,13 @@ export abstract class Constants {
|
||||||
data: [
|
data: [
|
||||||
[{
|
[{
|
||||||
type: "file",
|
type: "file",
|
||||||
size: {width: 240, height: 0},
|
size: {width: 220, height: 0},
|
||||||
show: true,
|
show: true,
|
||||||
icon: "iconFiles",
|
icon: "iconFiles",
|
||||||
hotkeyLangId: "fileTree",
|
hotkeyLangId: "fileTree",
|
||||||
}, {
|
}, {
|
||||||
type: "outline",
|
type: "outline",
|
||||||
size: {width: 240, height: 0},
|
size: {width: 220, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconAlignCenter",
|
icon: "iconAlignCenter",
|
||||||
hotkeyLangId: "outline",
|
hotkeyLangId: "outline",
|
||||||
|
|
@ -346,13 +346,13 @@ export abstract class Constants {
|
||||||
hotkeyLangId: "inbox",
|
hotkeyLangId: "inbox",
|
||||||
}], [{
|
}], [{
|
||||||
type: "bookmark",
|
type: "bookmark",
|
||||||
size: {width: 240, height: 0},
|
size: {width: 220, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconBookmark",
|
icon: "iconBookmark",
|
||||||
hotkeyLangId: "bookmark",
|
hotkeyLangId: "bookmark",
|
||||||
}, {
|
}, {
|
||||||
type: "tag",
|
type: "tag",
|
||||||
size: {width: 240, height: 0},
|
size: {width: 220, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconTags",
|
icon: "iconTags",
|
||||||
hotkeyLangId: "tag",
|
hotkeyLangId: "tag",
|
||||||
|
|
@ -364,19 +364,19 @@ export abstract class Constants {
|
||||||
data: [
|
data: [
|
||||||
[{
|
[{
|
||||||
type: "graph",
|
type: "graph",
|
||||||
size: {width: 360, height: 0},
|
size: {width: 320, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconGraph",
|
icon: "iconGraph",
|
||||||
hotkeyLangId: "graphView",
|
hotkeyLangId: "graphView",
|
||||||
}, {
|
}, {
|
||||||
type: "globalGraph",
|
type: "globalGraph",
|
||||||
size: {width: 360, height: 0},
|
size: {width: 320, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconGlobalGraph",
|
icon: "iconGlobalGraph",
|
||||||
hotkeyLangId: "globalGraph",
|
hotkeyLangId: "globalGraph",
|
||||||
}], [{
|
}], [{
|
||||||
type: "backlink",
|
type: "backlink",
|
||||||
size: {width: 360, height: 0},
|
size: {width: 320, height: 0},
|
||||||
show: false,
|
show: false,
|
||||||
icon: "iconLink",
|
icon: "iconLink",
|
||||||
hotkeyLangId: "backlinks",
|
hotkeyLangId: "backlinks",
|
||||||
|
|
|
||||||
|
|
@ -525,9 +525,9 @@ ${this.position === "Top" ? "top" : "bottom"}:-${this.layout.element.clientHeigh
|
||||||
this.element.querySelectorAll(".dock__item--active").forEach((item) => {
|
this.element.querySelectorAll(".dock__item--active").forEach((item) => {
|
||||||
let size;
|
let size;
|
||||||
if (this.position === "Left" || this.position === "Right") {
|
if (this.position === "Left" || this.position === "Right") {
|
||||||
size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 240);
|
size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 220);
|
||||||
} else {
|
} else {
|
||||||
size = parseInt(item.getAttribute("data-height")) || 240;
|
size = parseInt(item.getAttribute("data-height")) || 220;
|
||||||
}
|
}
|
||||||
if (size > max) {
|
if (size > max) {
|
||||||
max = size;
|
max = size;
|
||||||
|
|
|
||||||
|
|
@ -653,10 +653,10 @@ export const addResize = (obj: Layout | Wnd) => {
|
||||||
if (previousNowSize < 8 || nextNowSize < 8) {
|
if (previousNowSize < 8 || nextNowSize < 8) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (window.siyuan.layout.leftDock?.layout.element.contains(previousElement) && previousNowSize < 188) {
|
if (window.siyuan.layout.leftDock?.layout.element.contains(previousElement) && previousNowSize < 220) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (window.siyuan.layout.rightDock?.layout.element.contains(nextElement) && nextNowSize < 188) {
|
if (window.siyuan.layout.rightDock?.layout.element.contains(nextElement) && nextNowSize < 320) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
previousElement.style[direction === "lr" ? "width" : "height"] = previousNowSize + "px";
|
previousElement.style[direction === "lr" ? "width" : "height"] = previousNowSize + "px";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue