Skip to content

Commit ba0a482

Browse files
committed
Fix styling of the empty content view
Signed-off-by: Julius Härtl <[email protected]>
1 parent 6372da8 commit ba0a482

2 files changed

Lines changed: 33 additions & 22 deletions

File tree

src/components/board/Board.vue

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,32 @@
2424
<div class="board-wrapper">
2525
<Controls :board="board" />
2626

27-
<EmptyContent v-if="stacksByBoard.length === 0" icon="icon-pause">
28-
{{ t('deck', 'No lists available') }}
29-
<template #desc>
30-
{{ t('deck', 'Create a new list to add cards to this board') }}
31-
<form @submit.prevent="addNewStack()">
32-
<input id="new-stack-input-main"
33-
v-model="newStackTitle"
34-
v-focus
35-
type="text"
36-
class="no-close"
37-
:placeholder="t('deck', 'List name')"
38-
required>
39-
<input v-tooltip="t('deck', 'Add new list')"
40-
class="icon-confirm"
41-
type="submit"
42-
value="">
43-
</form>
44-
</template>
45-
</EmptyContent>
46-
4727
<transition name="fade" mode="out-in">
4828
<div v-if="loading" key="loading" class="emptycontent">
4929
<div class="icon icon-loading" />
5030
<h2>{{ t('deck', 'Loading board') }}</h2>
5131
<p />
5232
</div>
53-
<div v-else-if="board && !loading" key="board" class="board">
33+
<EmptyContent v-else-if="isEmpty" key="empty" icon="icon-deck">
34+
{{ t('deck', 'No lists available') }}
35+
<template #desc>
36+
{{ t('deck', 'Create a new list to add cards to this board') }}
37+
<form @submit.prevent="addNewStack()">
38+
<input id="new-stack-input-main"
39+
v-model="newStackTitle"
40+
v-focus
41+
type="text"
42+
class="no-close"
43+
:placeholder="t('deck', 'List name')"
44+
required>
45+
<input v-tooltip="t('deck', 'Add new list')"
46+
class="icon-confirm"
47+
type="submit"
48+
value="">
49+
</form>
50+
</template>
51+
</EmptyContent>
52+
<div v-else-if="!isEmpty && !loading" key="board" class="board">
5453
<Container lock-axix="y"
5554
orientation="horizontal"
5655
:drag-handle-selector="dragHandleSelector"
@@ -115,6 +114,9 @@ export default {
115114
dragHandleSelector() {
116115
return this.canEdit ? null : '.no-drag'
117116
},
117+
isEmpty() {
118+
return this.stacksByBoard.length === 0
119+
},
118120
},
119121
watch: {
120122
id: 'fetchData',
@@ -163,6 +165,15 @@ export default {
163165
164166
form {
165167
text-align: center;
168+
display: flex;
169+
width: 100%;
170+
max-width: 200px;
171+
margin: auto;
172+
margin-top: 20px;
173+
174+
input[type=text] {
175+
flex-grow: 1;
176+
}
166177
}
167178
168179
.board-wrapper {

webpack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ const config = {
3232
}
3333
};
3434

35-
module.exports = merge(config, webpackConfig)
35+
module.exports = merge(webpackConfig, config)
3636

0 commit comments

Comments
 (0)