feat: show background color for direct post to reduce mistake (#2732)
This commit is contained in:
parent
d8d9975756
commit
5064b269e7
|
@ -158,6 +158,8 @@ const isExceedingCharacterLimit = computed(() => {
|
||||||
|
|
||||||
const postLanguageDisplay = computed(() => languagesNameList.find(i => i.code === (draft.value.params.language || preferredLanguage))?.nativeName)
|
const postLanguageDisplay = computed(() => languagesNameList.find(i => i.code === (draft.value.params.language || preferredLanguage))?.nativeName)
|
||||||
|
|
||||||
|
const isDM = computed(() => draft.value.params.visibility === 'direct')
|
||||||
|
|
||||||
async function handlePaste(evt: ClipboardEvent) {
|
async function handlePaste(evt: ClipboardEvent) {
|
||||||
const files = evt.clipboardData?.files
|
const files = evt.clipboardData?.files
|
||||||
if (!files || files.length === 0)
|
if (!files || files.length === 0)
|
||||||
|
@ -281,7 +283,10 @@ onDeactivated(() => {
|
||||||
<EditorContent
|
<EditorContent
|
||||||
:editor="editor"
|
:editor="editor"
|
||||||
flex max-w-full
|
flex max-w-full
|
||||||
: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' : ''"
|
:class="{
|
||||||
|
'min-h-30 md:max-h-[calc(100vh-200px)] sm:max-h-[calc(100vh-400px)] max-h-35 of-y-auto overscroll-contain': shouldExpanded,
|
||||||
|
'pt2 pb0.5 px3.5 bg-dm rounded-4 me--1 ms--1 mt--1': isDM,
|
||||||
|
}"
|
||||||
@keydown="stopQuestionMarkPropagation"
|
@keydown="stopQuestionMarkPropagation"
|
||||||
@keydown.esc.prevent="editor?.commands.blur()"
|
@keydown.esc.prevent="editor?.commands.blur()"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue