diff --git a/app/src/assets/scss/business/_custom.scss b/app/src/assets/scss/business/_custom.scss index bc9ae08a9..daafeb01b 100644 --- a/app/src/assets/scss/business/_custom.scss +++ b/app/src/assets/scss/business/_custom.scss @@ -1,10 +1,44 @@ .custom-attr { + + &__avvalue { + cursor: pointer; + transition: var(--b3-transition); + border-radius: var(--b3-border-radius); + padding: 4px 8px; + line-height: 26px; + min-height: 26px; + + &:hover { + background-color: var(--b3-theme-background); + } + } + + &__avheader { + border-bottom: 1px solid var(--b3-border-color); + padding: 8px; + + .block__logo { + color: var(--b3-protyle-inline-blockref-color); + opacity: .86; + transition: var(--b3-transition); + cursor: pointer; + + svg { + margin-right: 4px; + } + + &:hover { + opacity: 1; + } + } + } + .b3-label { display: block; padding: 8px 16px; } - .block__logo { + .block__logo:not(.popover__block) { width: 160px; color: var(--b3-theme-on-surface); @@ -17,22 +51,6 @@ white-space: nowrap; overflow: hidden; } - - &.custom-attr__avheader { - color: var(--b3-protyle-inline-blockref-color); - opacity: .86; - transition: var(--b3-transition); - width: 100%; - align-items: center; - justify-content: center; - border-bottom: 1px solid var(--b3-border-color); - padding: 8px 0; - cursor: pointer; - - &:hover { - opacity: 1; - } - } } .block__icons { @@ -54,19 +72,6 @@ } } - .custom-attr__avvalue { - cursor: pointer; - transition: var(--b3-transition); - border-radius: var(--b3-border-radius); - padding: 4px 8px; - line-height: 26px; - min-height: 26px; - - &:hover { - background-color: var(--b3-theme-background); - } - } - .b3-chip { margin: 1px 2px; } diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts index 3c3313a62..b31a400ff 100644 --- a/app/src/protyle/render/av/blockAttr.ts +++ b/app/src/protyle/render/av/blockAttr.ts @@ -1,8 +1,9 @@ import {fetchPost} from "../../../util/fetch"; -import {getColIconByType} from "./col"; +import {addCol, getColIconByType} from "./col"; import {escapeAttr} from "../../../util/escape"; import * as dayjs from "dayjs"; import {popTextCell} from "./cell"; +import {hasClosestBlock} from "../../util/hasClosest"; const genAVRollupHTML = (value: IAVCellValue) => { let html = ""; @@ -149,9 +150,13 @@ export const renderAVAttribute = (element: HTMLElement, id: string, protyle: IPr avName: string }) => { html += `