Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
7009ec65
Commit
7009ec65
authored
Mar 09, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move BoardBlankState vue component
parent
85f4e323
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
36 deletions
+48
-36
app/assets/javascripts/boards/components/board.js
app/assets/javascripts/boards/components/board.js
+2
-2
app/assets/javascripts/boards/components/board_blank_state.vue
...ssets/javascripts/boards/components/board_blank_state.vue
+39
-32
changelogs/unreleased/move-board-blank-state-vue-component.yml
...elogs/unreleased/move-board-blank-state-vue-component.yml
+5
-0
spec/javascripts/boards/board_blank_state_spec.js
spec/javascripts/boards/board_blank_state_spec.js
+2
-2
No files found.
app/assets/javascripts/boards/components/board.js
View file @
7009ec65
...
@@ -5,7 +5,7 @@ import Sortable from 'vendor/Sortable';
...
@@ -5,7 +5,7 @@ import Sortable from 'vendor/Sortable';
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
AccessorUtilities
from
'
../../lib/utils/accessor
'
;
import
AccessorUtilities
from
'
../../lib/utils/accessor
'
;
import
boardList
from
'
./board_list.vue
'
;
import
boardList
from
'
./board_list.vue
'
;
import
boardBlankState
from
'
./board_blank_stat
e
'
;
import
BoardBlankState
from
'
./board_blank_state.vu
e
'
;
import
'
./board_delete
'
;
import
'
./board_delete
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
...
@@ -18,7 +18,7 @@ gl.issueBoards.Board = Vue.extend({
...
@@ -18,7 +18,7 @@ gl.issueBoards.Board = Vue.extend({
components
:
{
components
:
{
boardList
,
boardList
,
'
board-delete
'
:
gl
.
issueBoards
.
BoardDelete
,
'
board-delete
'
:
gl
.
issueBoards
.
BoardDelete
,
b
oardBlankState
,
B
oardBlankState
,
},
},
props
:
{
props
:
{
list
:
Object
,
list
:
Object
,
...
...
app/assets/javascripts/boards/components/board_blank_state.
js
→
app/assets/javascripts/boards/components/board_blank_state.
vue
View file @
7009ec65
<
script
>
/* global ListLabel */
/* global ListLabel */
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
export
default
{
export
default
{
template
:
`
<div class="board-blank-state">
<p>
Add the following default lists to your Issue Board with one click:
</p>
<ul class="board-blank-state-list">
<li v-for="label in predefinedLabels">
<span
class="label-color"
:style="{ backgroundColor: label.color }">
</span>
{{ label.title }}
</li>
</ul>
<p>
Starting out with the default set of lists will get you right on the way to making the most of your board.
</p>
<button
class="btn btn-create btn-inverted btn-block"
type="button"
@click.stop="addDefaultLists">
Add default lists
</button>
<button
class="btn btn-default btn-block"
type="button"
@click.stop="clearBlankState">
Nevermind, I'll use my own
</button>
</div>
`
,
data
()
{
data
()
{
return
{
return
{
predefinedLabels
:
[
predefinedLabels
:
[
...
@@ -89,3 +58,41 @@ export default {
...
@@ -89,3 +58,41 @@ export default {
clearBlankState
:
Store
.
removeBlankState
.
bind
(
Store
),
clearBlankState
:
Store
.
removeBlankState
.
bind
(
Store
),
},
},
};
};
</
script
>
<
template
>
<div
class=
"board-blank-state"
>
<p>
Add the following default lists to your Issue Board with one click:
</p>
<ul
class=
"board-blank-state-list"
>
<li
v-for=
"(label, index) in predefinedLabels"
:key=
"index"
>
<span
class=
"label-color"
:style=
"
{ backgroundColor: label.color }">
</span>
{{
label
.
title
}}
</li>
</ul>
<p>
Starting out with the default set of lists will get you
right on the way to making the most of your board.
</p>
<button
class=
"btn btn-create btn-inverted btn-block"
type=
"button"
@
click.stop=
"addDefaultLists"
>
Add default lists
</button>
<button
class=
"btn btn-default btn-block"
type=
"button"
@
click.stop=
"clearBlankState"
>
Nevermind, I'll use my own
</button>
</div>
</
template
>
changelogs/unreleased/move-board-blank-state-vue-component.yml
0 → 100644
View file @
7009ec65
---
title
:
Move BoardBlankState vue component
merge_request
:
17666
author
:
George Tsiolis
type
:
performance
spec/javascripts/boards/board_blank_state_spec.js
View file @
7009ec65
/* global BoardService */
/* global BoardService */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
'
~/boards/stores/boards_store
'
;
import
'
~/boards/stores/boards_store
'
;
import
boardBlankState
from
'
~/boards/components/board_blank_stat
e
'
;
import
BoardBlankState
from
'
~/boards/components/board_blank_state.vu
e
'
;
import
{
mockBoardService
}
from
'
./mock_data
'
;
import
{
mockBoardService
}
from
'
./mock_data
'
;
describe
(
'
Boards blank state
'
,
()
=>
{
describe
(
'
Boards blank state
'
,
()
=>
{
...
@@ -9,7 +9,7 @@ describe('Boards blank state', () => {
...
@@ -9,7 +9,7 @@ describe('Boards blank state', () => {
let
fail
=
false
;
let
fail
=
false
;
beforeEach
((
done
)
=>
{
beforeEach
((
done
)
=>
{
const
Comp
=
Vue
.
extend
(
b
oardBlankState
);
const
Comp
=
Vue
.
extend
(
B
oardBlankState
);
gl
.
issueBoards
.
BoardsStore
.
create
();
gl
.
issueBoards
.
BoardsStore
.
create
();
gl
.
boardService
=
mockBoardService
();
gl
.
boardService
=
mockBoardService
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment