1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-30 15:58:06 +09:00

feat: show background color for direct post to reduce mistake (#2732)

This commit is contained in:
TAKAHASHI Shuuji 2024-04-01 14:26:51 +09:00 committed by GitHub
parent d8d9975756
commit 5064b269e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,6 +158,8 @@ const isExceedingCharacterLimit = computed(() => {
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) {
const files = evt.clipboardData?.files
if (!files || files.length === 0)
@ -281,7 +283,10 @@ onDeactivated(() => {
<EditorContent
:editor="editor"
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.esc.prevent="editor?.commands.blur()"
/>