This commit is contained in:
parent
1a7ac92d22
commit
b335d7126c
3 changed files with 17 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -188,7 +188,7 @@ export const getViewHTML = (data: IAVTable) => {
|
|||
<button class="b3-menu__item" data-type="set-page-size" data-size="${data.pageSize}">
|
||||
<svg class="b3-menu__icon"></svg>
|
||||
<span class="b3-menu__label">${window.siyuan.languages.pageCount}</span>
|
||||
<span class="b3-menu__accelerator">${data.pageSize}</span>
|
||||
<span class="b3-menu__accelerator">${data.pageSize === Constants.SIZE_DATABASE_MAZ_SIZE ? window.siyuan.languages.all : data.pageSize}</span>
|
||||
<svg class="b3-menu__icon b3-menu__icon--small"><use xlink:href="#iconRight"></use></svg>
|
||||
</button>
|
||||
<label class="b3-menu__item">
|
||||
|
|
Loading…
Add table
Reference in a new issue