Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/board/Stack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
:disabled="stateCardCreating"
:placeholder="t('deck', 'Card name')"
required
pattern=".*\S+.*"
@keydown.esc="stopCardCreation">

<input v-show="!stateCardCreating"
class="icon-confirm"
type="submit"
Expand Down
5 changes: 5 additions & 0 deletions src/components/card/CardSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ import {
getMonthNamesShort,
} from '@nextcloud/l10n'
import moment from '@nextcloud/moment'
import { showError } from '@nextcloud/dialogs'

const markdownIt = new MarkdownIt({
linkify: true,
Expand Down Expand Up @@ -464,6 +465,10 @@ export default {
this.descriptionSaving = false
},
updateTitle(newTitle) {
if (newTitle.trim === '') {
showError('Could not update card title')
return
}
this.$set(this.copiedCard, 'title', newTitle)
this.$store.dispatch('updateCardTitle', this.copiedCard).then(() => {
this.titleEditable = false
Expand Down
8 changes: 6 additions & 2 deletions src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
class="dragDisabled"
@keyup.esc="cancelEdit"
@submit.prevent="finishedEdit(card)">
<input v-model="copiedCard.title" v-focus type="text">
<input type="button" class="icon-confirm" @click="finishedEdit(card)">
<input v-model="copiedCard.title"
v-focus
type="text"
required
pattern=".*\S+.*">
<input type="submit" value="" class="icon-confirm">
</form>

<DueDate v-if="!editing" :card="card" />
Expand Down