diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss index 3abcb14525a..eb74e61ba6e 100644 --- a/app/src/assets/scss/business/_av.scss +++ b/app/src/assets/scss/business/_av.scss @@ -196,7 +196,6 @@ flex-shrink: 0; border-right: 1px solid var(--b3-theme-surface-lighter); display: flex; - align-items: center; transition: var(--b3-transition); [data-type="block-ref"], @@ -205,11 +204,13 @@ position: absolute; right: 5px; font-size: 85%; + top: 8px; } .block__icon { position: absolute; right: 5px; + top: 5px; } &:hover .block__icon { @@ -240,29 +241,24 @@ .b3-chip { margin: 1px 2px; + padding: 2px 6px; } &--url { text-decoration: underline var(--b3-border-color); } - &--date { - display: flex; - align-items: center; - - svg { - margin: 0 5px; - height: 10px; - width: 10px; - flex-shrink: 0; - } + & > .av__cellicon { + margin: 0 5px; + height: 10px; + width: 10px; } } &__firstcol { svg { color: var(--b3-theme-on-surface); - height: 36px; + height: 33px; width: 24px; opacity: 0; padding: 5px; diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 84c5a591748..c8ba5e11a9c 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -88,9 +88,6 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '${urlContent}`; - if (cell.value && cell.value[cell.valueType as "url"].content) { - text += ``; - } } else if (cell.valueType === "block") { text = `${cell.value.block.content || ""}`; if (cell.value?.isDetached) { @@ -102,7 +99,7 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '${cell.value?.number.formattedContent || ""}`; } else if (cell.valueType === "mSelect" || cell.valueType === "select") { cell.value?.mSelect?.forEach((item) => { - text += `${item.content}`; + text += `${item.content}`; }); if (!text) { text = ''; @@ -110,17 +107,17 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '${text}`; } } else if (cell.valueType === "date") { - text = ''; + text = ''; const dataValue = cell.value ? cell.value.date : null; if (dataValue && dataValue.isNotEmpty) { text += dayjs(dataValue.content).format("YYYY-MM-DD HH:mm"); } if (dataValue && dataValue.hasEndDate && dataValue.isNotEmpty && dataValue.isNotEmpty2) { - text += `${dayjs(dataValue.content2).format("YYYY-MM-DD HH:mm")}`; + text += `${dayjs(dataValue.content2).format("YYYY-MM-DD HH:mm")}`; } text += ""; } else if (["created", "updated"].includes(cell.valueType)) { - text = ''; + text = ''; const dataValue = cell.value ? cell.value[cell.valueType as "date"] : null; if (dataValue && dataValue.isNotEmpty) { text += dayjs(dataValue.content).format("YYYY-MM-DD HH:mm"); @@ -131,7 +128,7 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '`; } else { - text += `${item.name}`; + text += `${item.name}`; } }); if (!text) { @@ -140,6 +137,11 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '${text}`; } } + if (["text", "template", "url", "email", "phone", "number", "date", "created", "updated"].includes(cell.valueType)) { + if (cell.value && cell.value[cell.valueType as "url"].content) { + text += ``; + } + } tableHTML += `