Skip to content

Commit 5064b26

Browse files
authored
feat: show background color for direct post to reduce mistake (elk-zone#2732)
1 parent d8d9975 commit 5064b26

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/publish/PublishWidget.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ const isExceedingCharacterLimit = computed(() => {
158158
159159
const postLanguageDisplay = computed(() => languagesNameList.find(i => i.code === (draft.value.params.language || preferredLanguage))?.nativeName)
160160
161+
const isDM = computed(() => draft.value.params.visibility === 'direct')
162+
161163
async function handlePaste(evt: ClipboardEvent) {
162164
const files = evt.clipboardData?.files
163165
if (!files || files.length === 0)
@@ -281,7 +283,10 @@ onDeactivated(() => {
281283
<EditorContent
282284
:editor="editor"
283285
flex max-w-full
284-
:class="shouldExpanded ? 'min-h-30 md:max-h-[calc(100vh-200px)] sm:max-h-[calc(100vh-400px)] max-h-35 of-y-auto overscroll-contain' : ''"
286+
:class="{
287+
'min-h-30 md:max-h-[calc(100vh-200px)] sm:max-h-[calc(100vh-400px)] max-h-35 of-y-auto overscroll-contain': shouldExpanded,
288+
'pt2 pb0.5 px3.5 bg-dm rounded-4 me--1 ms--1 mt--1': isDM,
289+
}"
285290
@keydown="stopQuestionMarkPropagation"
286291
@keydown.esc.prevent="editor?.commands.blur()"
287292
/>

0 commit comments

Comments
 (0)