|
|
@ -1,8 +1,9 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { CommentType } from 'nocodb-sdk' |
|
|
|
import { type CommentType, ProjectRoles } from 'nocodb-sdk' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
|
loading: boolean |
|
|
|
loading: boolean |
|
|
|
|
|
|
|
primaryKey: string |
|
|
|
}>() |
|
|
|
}>() |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
@ -32,6 +33,14 @@ const { dashboardUrl } = useDashboard() |
|
|
|
|
|
|
|
|
|
|
|
const { user, appInfo } = useGlobal() |
|
|
|
const { user, appInfo } = useGlobal() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const basesStore = useBases() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { basesUser } = storeToRefs(basesStore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj, ref()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const baseUsers = computed(() => (meta.value?.base_id ? basesUser.value.get(meta.value?.base_id) || [] : [])) |
|
|
|
|
|
|
|
|
|
|
|
const isExpandedFormLoading = computed(() => props.loading) |
|
|
|
const isExpandedFormLoading = computed(() => props.loading) |
|
|
|
|
|
|
|
|
|
|
|
const tab = ref<'comments' | 'audits'>('comments') |
|
|
|
const tab = ref<'comments' | 'audits'>('comments') |
|
|
@ -42,34 +51,22 @@ const router = useRouter() |
|
|
|
|
|
|
|
|
|
|
|
const hasEditPermission = computed(() => isUIAllowed('commentEdit')) |
|
|
|
const hasEditPermission = computed(() => isUIAllowed('commentEdit')) |
|
|
|
|
|
|
|
|
|
|
|
const editComment = ref<CommentType>() |
|
|
|
const editCommentValue = ref<CommentType>() |
|
|
|
|
|
|
|
|
|
|
|
const isEditing = ref<boolean>(false) |
|
|
|
const isEditing = ref<boolean>(false) |
|
|
|
|
|
|
|
|
|
|
|
const isCommentMode = ref(false) |
|
|
|
const isCommentMode = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
function onKeyDown(event: KeyboardEvent) { |
|
|
|
|
|
|
|
if (event.key === 'Escape') { |
|
|
|
|
|
|
|
onKeyEsc(event) |
|
|
|
|
|
|
|
} else if (event.key === 'Enter' && !event.shiftKey) { |
|
|
|
|
|
|
|
onKeyEnter(event) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onKeyEnter(event: KeyboardEvent) { |
|
|
|
|
|
|
|
event.stopImmediatePropagation() |
|
|
|
|
|
|
|
event.preventDefault() |
|
|
|
|
|
|
|
onEditComment() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onKeyEsc(event: KeyboardEvent) { |
|
|
|
|
|
|
|
event.stopImmediatePropagation() |
|
|
|
|
|
|
|
event.preventDefault() |
|
|
|
|
|
|
|
onCancel() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function onEditComment() { |
|
|
|
async function onEditComment() { |
|
|
|
if (!isEditing.value || !editComment.value) return |
|
|
|
if (!isEditing.value || !editCommentValue.value?.comment) return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (editCommentValue.value.comment.endsWith('<br />') || editCommentValue.value.comment.endsWith('\n')) { |
|
|
|
|
|
|
|
if (editCommentValue.value.comment.endsWith('<br />')) { |
|
|
|
|
|
|
|
editCommentValue.value.comment = editCommentValue.value.comment.slice(0, -6) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
editCommentValue.value.comment = editCommentValue.value.comment.slice(0, -2) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isCommentMode.value = true |
|
|
|
isCommentMode.value = true |
|
|
|
|
|
|
|
|
|
|
@ -85,26 +82,20 @@ async function onEditComment() { |
|
|
|
loadComments() |
|
|
|
loadComments() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onCancel() { |
|
|
|
function onCancel(e: KeyboardEvent) { |
|
|
|
if (!isEditing.value) return |
|
|
|
if (!isEditing.value) return |
|
|
|
editComment.value = undefined |
|
|
|
e.preventDefault() |
|
|
|
onStopEdit() |
|
|
|
e.stopPropagation() |
|
|
|
} |
|
|
|
editCommentValue.value = undefined |
|
|
|
|
|
|
|
|
|
|
|
function onStopEdit() { |
|
|
|
|
|
|
|
loadComments() |
|
|
|
loadComments() |
|
|
|
isEditing.value = false |
|
|
|
isEditing.value = false |
|
|
|
editComment.value = undefined |
|
|
|
editCommentValue.value = undefined |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onKeyStroke('Enter', (event) => { |
|
|
|
function editComment(comment: CommentType) { |
|
|
|
if (isEditing.value) { |
|
|
|
editCommentValue.value = { |
|
|
|
onKeyEnter(event) |
|
|
|
...comment, |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function editComments(comment: CommentType) { |
|
|
|
|
|
|
|
editComment.value = comment |
|
|
|
|
|
|
|
isEditing.value = true |
|
|
|
isEditing.value = true |
|
|
|
nextTick(() => { |
|
|
|
nextTick(() => { |
|
|
|
scrollToComment(comment.id) |
|
|
|
scrollToComment(comment.id) |
|
|
@ -113,11 +104,11 @@ function editComments(comment: CommentType) { |
|
|
|
|
|
|
|
|
|
|
|
const value = computed({ |
|
|
|
const value = computed({ |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return editComment.value?.comment || '' |
|
|
|
return editCommentValue.value?.comment || '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
set(val) { |
|
|
|
if (!editComment.value) return |
|
|
|
if (!editCommentValue.value) return |
|
|
|
editComment.value.comment = val |
|
|
|
editCommentValue.value.comment = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -142,9 +133,8 @@ const saveComment = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isCommentMode.value = true |
|
|
|
isCommentMode.value = true |
|
|
|
isSaving.value = true |
|
|
|
|
|
|
|
// Optimistic Insert |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Optimistic Insert |
|
|
|
comments.value = [ |
|
|
|
comments.value = [ |
|
|
|
...comments.value, |
|
|
|
...comments.value, |
|
|
|
{ |
|
|
|
{ |
|
|
@ -173,11 +163,17 @@ const saveComment = async () => { |
|
|
|
scrollComments() |
|
|
|
scrollComments() |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
console.error(e) |
|
|
|
console.error(e) |
|
|
|
} finally { |
|
|
|
|
|
|
|
isSaving.value = false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const copyComment = async (comment: CommentType) => { |
|
|
|
|
|
|
|
await copy( |
|
|
|
|
|
|
|
encodeURI( |
|
|
|
|
|
|
|
`${dashboardUrl?.value}#/${route.params.typeOrId}/${route.params.baseId}/${meta.value?.id}?rowId=${props.primaryKey}&commentId=${comment.id}`, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function scrollToComment(commentId: string) { |
|
|
|
function scrollToComment(commentId: string) { |
|
|
|
const commentEl = document.querySelector(`.${commentId}`) |
|
|
|
const commentEl = document.querySelector(`.${commentId}`) |
|
|
|
if (commentEl) { |
|
|
|
if (commentEl) { |
|
|
@ -207,10 +203,6 @@ watch(commentsWrapperEl, () => { |
|
|
|
}, 100) |
|
|
|
}, 100) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const timesAgo = (comment: CommentType) => { |
|
|
|
|
|
|
|
return comment.created_at !== comment.updated_at ? `Edited ${timeAgo(comment.updated_at!)}` : timeAgo(comment.created_at!) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const createdBy = ( |
|
|
|
const createdBy = ( |
|
|
|
comment: CommentType & { |
|
|
|
comment: CommentType & { |
|
|
|
created_display_name?: string |
|
|
|
created_display_name?: string |
|
|
@ -219,7 +211,7 @@ const createdBy = ( |
|
|
|
if (comment.created_by === user.value?.id) { |
|
|
|
if (comment.created_by === user.value?.id) { |
|
|
|
return 'You' |
|
|
|
return 'You' |
|
|
|
} else if (comment.created_display_name?.trim()) { |
|
|
|
} else if (comment.created_display_name?.trim()) { |
|
|
|
return comment.created_by_email || 'Shared source' |
|
|
|
return comment.created_display_name || 'Shared source' |
|
|
|
} else if (comment.created_by_email) { |
|
|
|
} else if (comment.created_by_email) { |
|
|
|
return comment.created_by_email |
|
|
|
return comment.created_by_email |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -244,7 +236,7 @@ const editedAt = (comment: CommentType) => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="flex flex-col !h-full w-full"> |
|
|
|
<div class="flex flex-col bg-white !h-full w-full rounded-br-2xl"> |
|
|
|
<NcTabs v-model:activeKey="tab" class="h-full"> |
|
|
|
<NcTabs v-model:activeKey="tab" class="h-full"> |
|
|
|
<a-tab-pane key="comments" class="w-full h-full"> |
|
|
|
<a-tab-pane key="comments" class="w-full h-full"> |
|
|
|
<template #tab> |
|
|
|
<template #tab> |
|
|
@ -259,8 +251,8 @@ const editedAt = (comment: CommentType) => { |
|
|
|
'pb-1': tab !== 'comments' && !appInfo.ee, |
|
|
|
'pb-1': tab !== 'comments' && !appInfo.ee, |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-if="isExpandedFormLoading" class="flex flex-col h-full"> |
|
|
|
<div v-if="isExpandedFormLoading" class="flex flex-col items-center justify-center w-full h-full"> |
|
|
|
<GeneralLoader class="!mt-16" size="xlarge" /> |
|
|
|
<GeneralLoader size="xlarge" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else class="flex flex-col h-full"> |
|
|
|
<div v-else class="flex flex-col h-full"> |
|
|
|
<div v-if="comments.length === 0" class="flex flex-col my-1 text-center justify-center h-full nc-scrollbar-thin"> |
|
|
|
<div v-if="comments.length === 0" class="flex flex-col my-1 text-center justify-center h-full nc-scrollbar-thin"> |
|
|
@ -270,6 +262,11 @@ const editedAt = (comment: CommentType) => { |
|
|
|
<div class="font-medium text-center my-6 text-gray-500">{{ $t('activity.startCommenting') }}</div> |
|
|
|
<div class="font-medium text-center my-6 text-gray-500">{{ $t('activity.startCommenting') }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else ref="commentsWrapperEl" class="flex flex-col h-full py-1 nc-scrollbar-thin"> |
|
|
|
<div v-else ref="commentsWrapperEl" class="flex flex-col h-full py-1 nc-scrollbar-thin"> |
|
|
|
|
|
|
|
<!-- The scrollbar doesn't work when flex-end is used. https://issues.chromium.org/issues/41130651 |
|
|
|
|
|
|
|
Hence using a div to fix the issue |
|
|
|
|
|
|
|
https://stackoverflow.com/questions/36130760/use-justify-content-flex-end-and-to-have-vertical-scrollbar |
|
|
|
|
|
|
|
--> |
|
|
|
|
|
|
|
<div class="scroll-fix"></div> |
|
|
|
<div v-for="comment of comments" :key="comment.id" :class="`${comment.id}`" class="nc-comment-item"> |
|
|
|
<div v-for="comment of comments" :key="comment.id" :class="`${comment.id}`" class="nc-comment-item"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
@ -286,28 +283,54 @@ const editedAt = (comment: CommentType) => { |
|
|
|
size="medium" |
|
|
|
size="medium" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<div class="flex h-[28px] items-center gap-3"> |
|
|
|
<div class="flex h-[28px] items-center gap-3"> |
|
|
|
<NcTooltip class="truncate capitalize text-gray-800 font-weight-700 !text-[13px] max-w-42"> |
|
|
|
<NcDropdown placement="topLeft" :trigger="['hover']"> |
|
|
|
<template #title> |
|
|
|
<span class="text-ellipsis text-gray-800 font-medium !text-[13px] max-w-42 overflow-hidden" :style="{}"> |
|
|
|
{{ comment.created_display_name?.trim() || comment.created_by_email || 'Shared source' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span class="text-ellipsis capitalize overflow-hidden" :style="{}"> |
|
|
|
|
|
|
|
{{ createdBy(comment) }} |
|
|
|
{{ createdBy(comment) }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
|
|
|
<div class="bg-white rounded-lg"> |
|
|
|
|
|
|
|
<div class="flex items-center gap-4 py-3 px-2"> |
|
|
|
|
|
|
|
<GeneralUserIcon |
|
|
|
|
|
|
|
class="!w-8 !h-8 border-1 border-gray-200 rounded-full" |
|
|
|
|
|
|
|
:name="comment.created_display_name" |
|
|
|
|
|
|
|
:email="comment.created_by_email" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div class="flex flex-col"> |
|
|
|
|
|
|
|
<div class="font-semibold text-gray-800"> |
|
|
|
|
|
|
|
{{ createdBy(comment) }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="text-xs text-gray-600"> |
|
|
|
|
|
|
|
{{ comment.created_by_email }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
class="px-3 rounded-b-lg !text-[13px] items-center text-gray-600 flex gap-1 bg-gray-100 py-1.5" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Has <RolesBadge size="sm" :border="false" :role="getUserRole(comment.created_by_email!)" /> |
|
|
|
|
|
|
|
role in base |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</NcDropdown> |
|
|
|
<div class="text-xs text-gray-500"> |
|
|
|
<div class="text-xs text-gray-500"> |
|
|
|
{{ timesAgo(comment) }} |
|
|
|
{{ timeAgo(comment.created_at!) }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<div class="flex items-center"> |
|
|
|
<NcDropdown |
|
|
|
<NcDropdown |
|
|
|
v-if="!editCommentValue" |
|
|
|
v-if="!editCommentValue" |
|
|
|
class="!hidden !group-hover:block" |
|
|
|
class="!hidden !group-hover:block" |
|
|
|
overlay-class-name="!min-w-[160px]" |
|
|
|
overlay-class-name="!min-w-[160px]" |
|
|
|
placement="bottomRight" |
|
|
|
placement="bottomRight" |
|
|
|
> |
|
|
|
> |
|
|
|
<NcButton class="nc-expand-form-more-actions !w-7 !h-7 !bg-transparent" size="xsmall" type="text"> |
|
|
|
<NcButton |
|
|
|
|
|
|
|
class="nc-expand-form-more-actions !hover:bg-gray-200 !w-7 !h-7 !bg-transparent" |
|
|
|
|
|
|
|
size="xsmall" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
> |
|
|
|
<GeneralIcon class="text-md" icon="threeDotVertical" /> |
|
|
|
<GeneralIcon class="text-md" icon="threeDotVertical" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
@ -316,7 +339,7 @@ const editedAt = (comment: CommentType) => { |
|
|
|
v-if="user && comment.created_by_email === user.email" |
|
|
|
v-if="user && comment.created_by_email === user.email" |
|
|
|
v-e="['c:comment-expand:comment:edit']" |
|
|
|
v-e="['c:comment-expand:comment:edit']" |
|
|
|
class="text-gray-700" |
|
|
|
class="text-gray-700" |
|
|
|
@click="editComments(comment)" |
|
|
|
@click="editComment(comment)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<component :is="iconMap.rename" class="cursor-pointer" /> |
|
|
|
<component :is="iconMap.rename" class="cursor-pointer" /> |
|
|
@ -349,11 +372,10 @@ const editedAt = (comment: CommentType) => { |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="appInfo.ee"> |
|
|
|
<div v-if="appInfo.ee"> |
|
|
|
<NcTooltip v-if="!comment.resolved_by"> |
|
|
|
<NcTooltip v-if="!comment.resolved_by"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
class="!w-7 !h-7 !bg-transparent opacity-0 group-hover:opacity-100" |
|
|
|
class="!w-7 !h-7 !bg-transparent !hover:bg-gray-200 !hidden !group-hover:block" |
|
|
|
size="xsmall" |
|
|
|
size="xsmall" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
@click="resolveComment(comment.id!)" |
|
|
|
@click="resolveComment(comment.id!)" |
|
|
@ -366,19 +388,24 @@ const editedAt = (comment: CommentType) => { |
|
|
|
|
|
|
|
|
|
|
|
<NcTooltip v-else> |
|
|
|
<NcTooltip v-else> |
|
|
|
<template #title>{{ `Resolved by ${comment.resolved_display_name}` }}</template> |
|
|
|
<template #title>{{ `Resolved by ${comment.resolved_display_name}` }}</template> |
|
|
|
<div class="flex text-[#17803D] font-semibold items-center"> |
|
|
|
<NcButton |
|
|
|
<NcButton class="!h-7 !bg-transparent" size="xsmall" type="text" @click="resolveComment(comment.id)"> |
|
|
|
class="!h-7 !w-7 !bg-transparent !hover:bg-gray-200 text-semibold" |
|
|
|
<div class="flex items-center gap-2 !text-[#17803D]"> |
|
|
|
size="xsmall" |
|
|
|
<span> Resolved </span> |
|
|
|
type="text" |
|
|
|
<component :is="iconMap.checkCircle" /> |
|
|
|
@click="resolveComment(comment.id)" |
|
|
|
</div> |
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon class="text-md rounded-full bg-[#17803D] text-white" icon="checkFill" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 flex flex-col gap-1 mt-1 max-w-[calc(100%)]"> |
|
|
|
<div |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'mt-3': comment.id === editCommentValue?.id, |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
class="flex-1 flex flex-col gap-1 max-w-[calc(100%)]" |
|
|
|
|
|
|
|
> |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
v-if="comment.id === editCommentValue?.id" |
|
|
|
v-if="comment.id === editCommentValue?.id" |
|
|
|
v-model:value="value" |
|
|
|
v-model:value="value" |
|
|
@ -388,19 +415,19 @@ const editedAt = (comment: CommentType) => { |
|
|
|
data-testid="expanded-form-comment-input" |
|
|
|
data-testid="expanded-form-comment-input" |
|
|
|
sync-value-change |
|
|
|
sync-value-change |
|
|
|
@save="onEditComment" |
|
|
|
@save="onEditComment" |
|
|
|
@keydown.stop="onKeyDown" |
|
|
|
@keydown.esc="onCancel" |
|
|
|
@blur=" |
|
|
|
@blur=" |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
editComment = undefined |
|
|
|
editCommentValue = undefined |
|
|
|
isEditing = false |
|
|
|
isEditing = false |
|
|
|
} |
|
|
|
} |
|
|
|
" |
|
|
|
" |
|
|
|
@keydown.enter.exact.prevent="onEditComment" |
|
|
|
@keydown.enter.exact.prevent="onEditComment" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<div v-else class="text-small pl-9 leading-18px text-gray-800"> |
|
|
|
<div v-else class="space-y-1 pl-9"> |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
:value="comment.comment" |
|
|
|
:value="`${comment.comment} ${editedAt(comment)}`" |
|
|
|
class="!text-small !leading-18px !text-gray-800 -ml-1" |
|
|
|
class="!text-small !leading-18px !text-gray-800 -ml-1" |
|
|
|
read-only |
|
|
|
read-only |
|
|
|
sync-value-change |
|
|
|
sync-value-change |
|
|
@ -410,7 +437,7 @@ const editedAt = (comment: CommentType) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="hasEditPermission" class="bg-gray-50 nc-comment-input !rounded-br-2xl gap-2 flex"> |
|
|
|
<div v-if="hasEditPermission" class="px-3 pb-3 nc-comment-input !rounded-br-2xl gap-2 flex"> |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
<SmartsheetExpandedFormRichComment |
|
|
|
ref="commentInputRef" |
|
|
|
ref="commentInputRef" |
|
|
|
v-model:value="comment" |
|
|
|
v-model:value="comment" |
|
|
@ -451,8 +478,8 @@ const editedAt = (comment: CommentType) => { |
|
|
|
'pb-1': !appInfo.ee, |
|
|
|
'pb-1': !appInfo.ee, |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-if="isExpandedFormLoading || isAuditLoading" class="flex flex-col h-full"> |
|
|
|
<div v-if="isExpandedFormLoading || isAuditLoading" class="flex flex-col items-center justify-center w-full h-full"> |
|
|
|
<GeneralLoader class="!mt-16" size="xlarge" /> |
|
|
|
<GeneralLoader size="xlarge" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-else ref="commentsWrapperEl" class="flex flex-col h-full py-1 nc-scrollbar-thin !overflow-y-auto"> |
|
|
|
<div v-else ref="commentsWrapperEl" class="flex flex-col h-full py-1 nc-scrollbar-thin !overflow-y-auto"> |
|
|
@ -498,10 +525,8 @@ const editedAt = (comment: CommentType) => { |
|
|
|
@apply max-w-1/2; |
|
|
|
@apply max-w-1/2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-comment-input { |
|
|
|
.scroll-fix { |
|
|
|
:deep(.nc-comment-rich-editor) { |
|
|
|
flex: 1 1 auto; |
|
|
|
@apply !ml-1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-audit-item { |
|
|
|
.nc-audit-item { |
|
|
@ -534,7 +559,7 @@ const editedAt = (comment: CommentType) => { |
|
|
|
:deep(.ant-tabs) { |
|
|
|
:deep(.ant-tabs) { |
|
|
|
@apply !overflow-visible; |
|
|
|
@apply !overflow-visible; |
|
|
|
.ant-tabs-nav { |
|
|
|
.ant-tabs-nav { |
|
|
|
@apply px-3; |
|
|
|
@apply px-3 bg-white; |
|
|
|
.ant-tabs-nav-list { |
|
|
|
.ant-tabs-nav-list { |
|
|
|
@apply w-[99%] mx-auto gap-6; |
|
|
|
@apply w-[99%] mx-auto gap-6; |
|
|
|
|
|
|
|
|
|
|
@ -568,6 +593,6 @@ const editedAt = (comment: CommentType) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.expanded-form-comment-edit-input .nc-comment-rich-editor) { |
|
|
|
:deep(.expanded-form-comment-edit-input .nc-comment-rich-editor) { |
|
|
|
@apply !pl-2 bg-white; |
|
|
|
@apply bg-white; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|