Skip to content

Commit 5cd2a3f

Browse files
Merge pull request #2189 from frappe/develop
chore(release): dev to main
2 parents c4e3748 + cb5d158 commit 5cd2a3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3967
-2334
lines changed

Diff for: desk/index.html

-2
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@
207207
<script type="module" src="/src/main.js"></script>
208208
<script>
209209
window.csrf_token = "{{ csrf_token }}";
210-
window.frappe_version = "{{ frappe_version }}";
211-
window.helpdesk_version = "{{ helpdesk_version }}";
212210
window.site_name = "{{ site_name }}";
213211
window.favicon = "{{ favicon }}";
214212

Diff for: desk/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"autoprefixer": "^10.4.13",
2626
"dayjs": "^1.11.7",
2727
"echarts": "^5.4.1",
28-
"frappe-ui": "^0.1.53",
28+
"frappe-ui": "0.1.105",
2929
"lodash": "^4.17.21",
3030
"lucide-static": "^0.276.0",
3131
"mime": "^3.0.0",
@@ -43,6 +43,7 @@
4343
"vue-echarts": "^6.5.4",
4444
"vue-router": "^4.2.2",
4545
"vuedraggable": "^4.1.0",
46+
"gemoji": "^8.1.0",
4647
"zod": "^3.21.4"
4748
},
4849
"resolutions": {

Diff for: desk/src/components/ColumnSettings.vue

-212
This file was deleted.

Diff for: desk/src/components/CommentTextEditor.vue

+21-8
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
@click="openFileSelector()"
5656
>
5757
<template #icon>
58-
<AttachmentIcon class="h-4" />
58+
<AttachmentIcon
59+
class="h-4"
60+
style="color: #000000; stroke-width: 1.5 !important"
61+
/>
5962
</template>
6063
</Button>
6164
</template>
@@ -91,7 +94,7 @@
9194
</TextEditor>
9295
</template>
9396
<script setup lang="ts">
94-
import { computed, ref } from "vue";
97+
import { computed, ref, onMounted } from "vue";
9598
import {
9699
TextEditorFixedMenu,
97100
TextEditor,
@@ -104,10 +107,12 @@ import { AttachmentItem } from "@/components/";
104107
import { useAgentStore } from "@/stores/agent";
105108
import { useStorage } from "@vueuse/core";
106109
import { PreserveVideoControls } from "@/tiptap-extensions";
107-
import { textEditorMenuButtons } from "@/utils";
110+
import { isContentEmpty, textEditorMenuButtons } from "@/utils";
108111
109112
const { agents: agentsList } = useAgentStore();
110-
113+
onMounted(() => {
114+
agentsList.fetch();
115+
});
111116
const props = defineProps({
112117
placeholder: {
113118
type: String,
@@ -123,12 +128,12 @@ const props = defineProps({
123128
},
124129
});
125130
126-
const doc = defineModel();
127-
const attachments = ref([]);
128131
const emit = defineEmits(["submit", "discard"]);
129-
const newComment = useStorage("commentBoxContent", "");
132+
const doc = defineModel();
133+
const attachments = useStorage("commentBoxAttachments" + doc.value.name, []);
134+
const newComment = useStorage("commentBoxContent" + doc.value.name, "");
130135
const commentEmpty = computed(() => {
131-
return !newComment.value || newComment.value === "<p></p>";
136+
return isContentEmpty(newComment.value);
132137
});
133138
const loading = ref(false);
134139
@@ -146,6 +151,9 @@ function removeAttachment(attachment) {
146151
}
147152
148153
async function submitComment() {
154+
if (isContentEmpty(newComment.value)) {
155+
return;
156+
}
149157
const comment = createResource({
150158
url: "run_doc_method",
151159
makeParams: () => ({
@@ -160,6 +168,8 @@ async function submitComment() {
160168
onSuccess: () => {
161169
emit("submit");
162170
loading.value = false;
171+
attachments.value = null;
172+
newComment.value = null;
163173
},
164174
onError: () => {
165175
loading.value = false;
@@ -168,4 +178,7 @@ async function submitComment() {
168178
169179
comment.submit();
170180
}
181+
defineExpose({
182+
submitComment,
183+
});
171184
</script>

Diff for: desk/src/components/CommunicationArea.vue

+21-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
</Button>
2828
</div>
2929
</div>
30-
<div v-show="showCommentBox">
30+
<div
31+
v-show="showCommentBox"
32+
@keydown.ctrl.enter.capture.stop="submitComment"
33+
@keydown.meta.enter.capture.stop="submitComment"
34+
>
3135
<CommentTextEditor
36+
ref="commentTextEditorRef"
3237
v-model="doc"
3338
v-model:attachments="attachments"
3439
:editable="showCommentBox"
@@ -83,13 +88,16 @@ import { ref } from "vue";
8388
import { EmailEditor, CommentTextEditor } from "@/components";
8489
import { EmailIcon, CommentIcon } from "@/components/icons/";
8590
91+
const emit = defineEmits(["update"]);
8692
const content = defineModel("content");
93+
const doc = defineModel();
94+
8795
const showEmailBox = ref(false);
8896
const showCommentBox = ref(false);
89-
const doc = defineModel();
9097
const attachments = ref([]);
91-
const emit = defineEmits(["update"]);
98+
9299
const emailEditorRef = ref(null);
100+
const commentTextEditorRef = ref(null);
93101
94102
function toggleEmailBox() {
95103
if (showCommentBox.value) {
@@ -105,6 +113,16 @@ function toggleCommentBox() {
105113
showCommentBox.value = !showCommentBox.value;
106114
}
107115
116+
function submitEmail() {
117+
emailEditorRef.value.submitMail();
118+
emit("update");
119+
}
120+
121+
function submitComment() {
122+
commentTextEditorRef.value.submitComment();
123+
emit("update");
124+
}
125+
108126
function replyToEmail(data: object) {
109127
showEmailBox.value = true;
110128
emailEditorRef.value.addToReply(

Diff for: desk/src/components/EmailArea.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@click="
3535
emit('reply', {
3636
content: content,
37-
to: to ?? sender.name,
37+
to: to && sender.name,
3838
})
3939
"
4040
>

Diff for: desk/src/components/EmailContent.vue

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ const htmlContent = `
220220
<body>
221221
<div ref="emailContentRef" class="email-content prose-f">${_content.value}</div>
222222
</body>
223+
<base target="_blank" />
223224
</html>
224225
`;
225226

0 commit comments

Comments
 (0)