Compare commits

...

4 commits

3 changed files with 15 additions and 3 deletions

View file

@ -83,6 +83,7 @@ export const setFilter = async (options: {
rectTarget = options.protyle.wysiwyg.element.querySelector(`[data-col-id="${options.target.dataset.colId}"]`).getBoundingClientRect();
}
const blockID = options.blockElement.getAttribute("data-node-id");
let operationElement: HTMLSelectElement = undefined;
const menu = new Menu("set-filter-" + options.filter.column, () => {
const oldFilters = JSON.parse(JSON.stringify(options.data.view.filters));
if (!operationElement || !operationElement.value) {
@ -211,6 +212,7 @@ export const setFilter = async (options: {
if (colData.type === "rollup") {
if (!colData.rollup || !colData.rollup.relationKeyID || !colData.rollup.keyID) {
showMessage(window.siyuan.languages.plsChoose);
document.querySelector(".av__panel")?.remove();
openMenuPanel({
protyle: options.protyle,
blockElement: options.blockElement,
@ -530,8 +532,8 @@ export const setFilter = async (options: {
}
}
});
const operationElement = (menu.element.querySelector('.b3-select[data-type="operation"]') as HTMLSelectElement);
operationElement.addEventListener("change", () => {
operationElement = (menu.element.querySelector('.b3-select[data-type="operation"]') as HTMLSelectElement);
operationElement?.addEventListener("change", () => {
toggleEmpty(operationElement, operationElement.value, filterValue.type);
});
const dateTypeElement = menu.element.querySelector('.b3-select[data-type="dateType"]') as HTMLSelectElement;

View file

@ -1796,7 +1796,10 @@ export class WYSIWYG {
const topElement = getTopAloneElement(item);
if (item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
needClipboardWrite = true;
const response = await fetchSyncPost("/api/block/getHeadingChildrenDOM", {id: item.getAttribute("data-node-id")});
const response = await fetchSyncPost("/api/block/getHeadingChildrenDOM", {
id: item.getAttribute("data-node-id"),
removeFoldAttr: false
});
html += response.data;
} else {
html += removeEmbed(topElement);

View file

@ -203,6 +203,12 @@ func Mount(boxID string) (alreadyMount bool, err error) {
return
}
boxes, _ := ListNotebooks()
var sort int
if len(boxes) > 0 {
sort = boxes[0].Sort - 1
}
p := filepath.Join(util.WorkingDir, "guide", boxID)
if err = filelock.Copy(p, localPath); err != nil {
return
@ -218,6 +224,7 @@ func Mount(boxID string) (alreadyMount bool, err error) {
if box := Conf.Box(boxID); nil != box {
boxConf := box.GetConf()
boxConf.Closed = true
boxConf.Sort = sort
box.SaveConf(boxConf)
}