From b335d7126c29e0f85700ee570cba19c613954e4a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 1 Jul 2024 21:55:36 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/11839 --- app/src/constants.ts | 1 + app/src/protyle/render/av/row.ts | 15 +++++++++++++++ app/src/protyle/render/av/view.ts | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/src/constants.ts b/app/src/constants.ts index 0d9340d8d..0d78fa3d8 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -65,6 +65,7 @@ export abstract class Constants { public static readonly CUSTOM_RIFF_DECKS: string = "custom-riff-decks"; // size + public static readonly SIZE_DATABASE_MAZ_SIZE: number = 102400; public static readonly SIZE_SCROLL_TB: number = 24; public static readonly SIZE_SCROLL_STEP: number = 256; public static readonly SIZE_LINK_TEXT_MAX: number = 64; diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts index ccfe5806f..a8bf23d64 100644 --- a/app/src/protyle/render/av/row.ts +++ b/app/src/protyle/render/av/row.ts @@ -6,6 +6,7 @@ import {genCellValueByElement, getTypeByCellElement, popTextCell, renderCell, re import {fetchPost} from "../../../util/fetch"; import {showMessage} from "../../../dialog/message"; import * as dayjs from "dayjs"; +import {Constants} from "../../../constants"; export const selectRow = (checkElement: Element, type: "toggle" | "select" | "unselect" | "unselectAll") => { const rowElement = hasClosestByClassName(checkElement, "av__row"); @@ -355,6 +356,20 @@ export const setPageSize = (options: { }); } }); + menu.addItem({ + iconHTML: "", + checked: currentPageSize === Constants.SIZE_DATABASE_MAZ_SIZE.toString(), + label: window.siyuan.languages.all, + click() { + updatePageSize({ + currentPageSize, + newPageSize: Constants.SIZE_DATABASE_MAZ_SIZE.toString(), + protyle: options.protyle, + avID: options.avID, + nodeElement: options.nodeElement + }); + } + }); const rect = options.target.getBoundingClientRect(); menu.open({ x: rect.left, diff --git a/app/src/protyle/render/av/view.ts b/app/src/protyle/render/av/view.ts index 99ac7e9de..3dbeccc97 100644 --- a/app/src/protyle/render/av/view.ts +++ b/app/src/protyle/render/av/view.ts @@ -188,7 +188,7 @@ export const getViewHTML = (data: IAVTable) => {