fix: Fix empty board view design
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -22,23 +22,27 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<DeckIcon />
|
<DeckIcon />
|
||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #name>
|
||||||
{{ t('deck', 'No lists available') }}
|
{{ t('deck', 'No lists available') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="canManage" #action>
|
<template v-if="canManage" #action>
|
||||||
{{ t('deck', 'Create a new list to add cards to this board') }}
|
{{ t('deck', 'Create a new list to add cards to this board') }}
|
||||||
<form @submit.prevent="addNewStack()">
|
<form @submit.prevent="addNewStack()">
|
||||||
<input id="new-stack-input-main"
|
<NcTextField ref="newStackInput"
|
||||||
v-model="newStackTitle"
|
:disable="loading"
|
||||||
v-focus
|
:value.sync="newStackTitle"
|
||||||
type="text"
|
|
||||||
class="no-close"
|
|
||||||
:placeholder="t('deck', 'List name')"
|
:placeholder="t('deck', 'List name')"
|
||||||
required>
|
type="text" />
|
||||||
<input title="t('deck', 'Add list')"
|
<NcButton type="secondary"
|
||||||
class="icon-confirm"
|
native-type="submit"
|
||||||
type="submit"
|
:disabled="loading"
|
||||||
value="">
|
:title="t('deck', 'Add list')">
|
||||||
|
<template #icon>
|
||||||
|
<CheckIcon v-if="!loading" :size="20" />
|
||||||
|
<NcLoadingIcon v-else :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t('deck', 'Add list') }}
|
||||||
|
</NcButton>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</NcEmptyContent>
|
||||||
@@ -82,8 +86,9 @@ import { Container, Draggable } from 'vue-smooth-dnd'
|
|||||||
import { mapState, mapGetters } from 'vuex'
|
import { mapState, mapGetters } from 'vuex'
|
||||||
import Controls from '../Controls.vue'
|
import Controls from '../Controls.vue'
|
||||||
import DeckIcon from '../icons/DeckIcon.vue'
|
import DeckIcon from '../icons/DeckIcon.vue'
|
||||||
|
import CheckIcon from 'vue-material-design-icons/Check.vue'
|
||||||
import Stack from './Stack.vue'
|
import Stack from './Stack.vue'
|
||||||
import { NcEmptyContent, NcModal } from '@nextcloud/vue'
|
import { NcEmptyContent, NcModal, NcButton, NcTextField, NcLoadingIcon } from '@nextcloud/vue'
|
||||||
import GlobalSearchResults from '../search/GlobalSearchResults.vue'
|
import GlobalSearchResults from '../search/GlobalSearchResults.vue'
|
||||||
import { showError } from '../../helpers/errors.js'
|
import { showError } from '../../helpers/errors.js'
|
||||||
import { createSession } from '../../sessions.js'
|
import { createSession } from '../../sessions.js'
|
||||||
@@ -99,6 +104,10 @@ export default {
|
|||||||
Stack,
|
Stack,
|
||||||
NcEmptyContent,
|
NcEmptyContent,
|
||||||
NcModal,
|
NcModal,
|
||||||
|
NcTextField,
|
||||||
|
NcButton,
|
||||||
|
NcLoadingIcon,
|
||||||
|
CheckIcon,
|
||||||
CardSidebar,
|
CardSidebar,
|
||||||
},
|
},
|
||||||
inject: [
|
inject: [
|
||||||
@@ -131,7 +140,7 @@ export default {
|
|||||||
'canManage',
|
'canManage',
|
||||||
]),
|
]),
|
||||||
stacksByBoard() {
|
stacksByBoard() {
|
||||||
return this.$store.getters.stacksByBoard(this.board.id)
|
return this.board?.id ? this.$store.getters.stacksByBoard(this.board.id) : []
|
||||||
},
|
},
|
||||||
dragHandleSelector() {
|
dragHandleSelector() {
|
||||||
return this.canEdit ? '.stack__title' : '.no-drag'
|
return this.canEdit ? '.stack__title' : '.no-drag'
|
||||||
@@ -147,6 +156,11 @@ export default {
|
|||||||
showArchived() {
|
showArchived() {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
|
isEmpty(newValue) {
|
||||||
|
newValue && this.$nextTick(() => {
|
||||||
|
this.$refs?.newStackInput.focus()
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.session = createSession(this.id)
|
this.session = createSession(this.id)
|
||||||
@@ -236,13 +250,16 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 200px;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 20px;
|
margin-top: calc(var(--default-grid-baseline) * 4);
|
||||||
|
gap: var(--default-grid-baseline);
|
||||||
|
|
||||||
input[type=text] {
|
input[type="text"] {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
button[type="submit"] {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.board-wrapper {
|
.board-wrapper {
|
||||||
|
|||||||
Reference in New Issue
Block a user