diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index c1d8844f7..da0e7c0eb 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -637,4 +637,27 @@ .img:hover .protyle-icons { display: none; } + + .av { + .b3-chip[data-type="block-more"], + .av__row--util, + .av__row--header > .block__icons, + .av__views .fn__space, + .av__views .block__icon:not([data-type="av-search-icon"]), + .av__widthdrag { + display: none; + } + + .av__row--footer { + border-top-color: transparent; + } + + .av__row > div:nth-last-child(-n + 2) { + border-right-color: transparent; + } + + .av__row--footer:hover .av__calc:not(.av__calc--ashow) { + opacity: 0; + } + } } diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index da18e54a7..5354269bc 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -49,6 +49,19 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle return true; } + const searchIconElement = hasClosestByAttribute(event.target, "data-type", "av-search-icon"); + if (searchIconElement) { + const searchElement = blockElement.querySelector('input[data-type="av-search"]') as HTMLInputElement; + searchElement.style.width = "128px"; + searchElement.style.paddingLeft = ""; + searchElement.style.paddingRight = ""; + searchElement.focus(); + event.preventDefault(); + event.stopPropagation(); + return true; + } + + if (protyle.disabled) { return false; } @@ -115,15 +128,6 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.preventDefault(); event.stopPropagation(); return true; - } else if (type === "av-search-icon") { - const searchElement = blockElement.querySelector('input[data-type="av-search"]') as HTMLInputElement; - searchElement.style.width = "128px"; - searchElement.style.paddingLeft = ""; - searchElement.style.paddingRight = ""; - searchElement.focus(); - event.preventDefault(); - event.stopPropagation(); - return true; } else if (type === "av-filter") { openMenuPanel({protyle, blockElement, type: "filters"}); event.preventDefault(); diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index dd413bbdc..22e65a6a7 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -608,7 +608,7 @@ export const renderCell = (cellValue: IAVCellValue) => { ${window.siyuan.languages.more}`; } else { text = `${cellValue.block.content || "Untitled"} -${window.siyuan.languages.update}`; +${window.siyuan.languages.update}`; } } else if (cellValue.type === "number") { text = `${cellValue?.number.formattedContent || cellValue?.number.content || ""}`;