Skip to content

Commit

Permalink
feat: show background color for direct post to reduce mistake (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuuji3 committed Apr 1, 2024
1 parent d8d9975 commit 5064b26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/publish/PublishWidget.vue
Expand Up @@ -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)
Expand Down Expand Up @@ -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()"
/>
Expand Down

0 comments on commit 5064b26

Please sign in to comment.