mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
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";
|
public static readonly CUSTOM_RIFF_DECKS: string = "custom-riff-decks";
|
||||||
|
|
||||||
// size
|
// size
|
||||||
|
public static readonly SIZE_DATABASE_MAZ_SIZE: number = 102400;
|
||||||
public static readonly SIZE_SCROLL_TB: number = 24;
|
public static readonly SIZE_SCROLL_TB: number = 24;
|
||||||
public static readonly SIZE_SCROLL_STEP: number = 256;
|
public static readonly SIZE_SCROLL_STEP: number = 256;
|
||||||
public static readonly SIZE_LINK_TEXT_MAX: number = 64;
|
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 {fetchPost} from "../../../util/fetch";
|
||||||
import {showMessage} from "../../../dialog/message";
|
import {showMessage} from "../../../dialog/message";
|
||||||
import * as dayjs from "dayjs";
|
import * as dayjs from "dayjs";
|
||||||
|
import {Constants} from "../../../constants";
|
||||||
|
|
||||||
export const selectRow = (checkElement: Element, type: "toggle" | "select" | "unselect" | "unselectAll") => {
|
export const selectRow = (checkElement: Element, type: "toggle" | "select" | "unselect" | "unselectAll") => {
|
||||||
const rowElement = hasClosestByClassName(checkElement, "av__row");
|
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();
|
const rect = options.target.getBoundingClientRect();
|
||||||
menu.open({
|
menu.open({
|
||||||
x: rect.left,
|
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}">
|
<button class="b3-menu__item" data-type="set-page-size" data-size="${data.pageSize}">
|
||||||
<svg class="b3-menu__icon"></svg>
|
<svg class="b3-menu__icon"></svg>
|
||||||
<span class="b3-menu__label">${window.siyuan.languages.pageCount}</span>
|
<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>
|
<svg class="b3-menu__icon b3-menu__icon--small"><use xlink:href="#iconRight"></use></svg>
|
||||||
</button>
|
</button>
|
||||||
<label class="b3-menu__item">
|
<label class="b3-menu__item">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue