Skip to content

Commit

Permalink
fixup! feat: create new poll from drafts
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Oct 18, 2024
1 parent f8e5bb0 commit 5e43f15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@

<PollDraftHandler v-if="canCreatePollDrafts && showPollDraftHandler"
:token="token"
:show-create-button="!showPollEditor"
@close="togglePollDraftHandler" />

<!-- New file creation dialog -->
Expand Down
5 changes: 3 additions & 2 deletions src/components/PollViewer/PollDraftHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
:token="token"
:name="item.question"
draft
@click="openPollEditor(item.id)" />
@click="openPollEditor" />
</div>
<template #actions>
<template v-if="props.showCreateButton" #actions>
<NcButton @click="openPollEditor(null)">
{{ t('spreed', 'Create new poll') }}
</NcButton>
Expand All @@ -54,6 +54,7 @@ import { usePollsStore } from '../../stores/polls.ts'

const props = defineProps<{
token: string,
showCreateButton?: boolean,
}>()
const emit = defineEmits<{
(event: 'close'): void,
Expand Down

0 comments on commit 5e43f15

Please sign in to comment.