fix(web): mobile automation canvas/inspector, compact activity row, timestamped comments
This commit is contained in:
@@ -55,6 +55,12 @@ const dueLabel = computed(() => {
|
||||
return `${formatJalaliDay(d)} ${clock}`;
|
||||
});
|
||||
|
||||
const now = ref(new Date());
|
||||
let clockTimer: ReturnType<typeof setInterval> | undefined;
|
||||
const nowLabel = computed(
|
||||
() => `${formatJalaliDay(now.value)} ساعت ${formatClockFa(now.value)}`,
|
||||
);
|
||||
|
||||
const canSubmit = computed(
|
||||
() => comment.value.trim().length > 0 && !props.saving && !voiceBusy.value,
|
||||
);
|
||||
@@ -115,6 +121,9 @@ function onKeydown(ev: KeyboardEvent) {
|
||||
onMounted(async () => {
|
||||
document.body.style.overflow = 'hidden';
|
||||
window.addEventListener('keydown', onKeydown);
|
||||
clockTimer = setInterval(() => {
|
||||
now.value = new Date();
|
||||
}, 30_000);
|
||||
await nextTick();
|
||||
textareaRef.value?.focus();
|
||||
try {
|
||||
@@ -143,6 +152,7 @@ onMounted(async () => {
|
||||
onBeforeUnmount(() => {
|
||||
document.body.style.overflow = '';
|
||||
window.removeEventListener('keydown', onKeydown);
|
||||
clearInterval(clockTimer);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -182,11 +192,15 @@ onBeforeUnmount(() => {
|
||||
{{ activity.assignee?.fullName || 'بدون مسئول' }}
|
||||
</span>
|
||||
<i />
|
||||
<span>
|
||||
<span title="موعد فعالیت">
|
||||
<UiIcon name="calendar" :size="14" />
|
||||
{{ dueLabel }}
|
||||
موعد: {{ dueLabel }}
|
||||
</span>
|
||||
</div>
|
||||
<p class="stamp">
|
||||
<UiIcon name="clock" :size="14" />
|
||||
زمان ثبت نظر: {{ nowLabel }}
|
||||
</p>
|
||||
</div>
|
||||
<span class="type" :class="activity.type">
|
||||
<UiIcon :name="typeIcon[activity.type]" :size="22" />
|
||||
@@ -396,6 +410,16 @@ onBeforeUnmount(() => {
|
||||
border-top: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.stamp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
margin: 0.55rem 0 0;
|
||||
color: #0f766e;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.meta i {
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
|
||||
Reference in New Issue
Block a user