BigW Consortium Gitlab

Commit 1cb9de1b by Phil Hughes

Added loading icon to boards vue app

parent d1a2be9f
...@@ -11,7 +11,6 @@ $(function () { ...@@ -11,7 +11,6 @@ $(function () {
if (!window.gl) { if (!window.gl) {
window.gl = {}; window.gl = {};
} }
gl.boardService = new BoardService($('#board-app').data('endpoint'));
if (gl.IssueBoardsApp) { if (gl.IssueBoardsApp) {
gl.IssueBoardsApp.$destroy(true); gl.IssueBoardsApp.$destroy(true);
...@@ -20,14 +19,20 @@ $(function () { ...@@ -20,14 +19,20 @@ $(function () {
gl.IssueBoardsApp = new Vue({ gl.IssueBoardsApp = new Vue({
el: '#board-app', el: '#board-app',
props: { props: {
disabled: Boolean disabled: Boolean,
endpoint: String
}, },
data: { data: {
state: BoardsStore.state state: BoardsStore.state,
loading: true
}, },
init: function () { init: function () {
BoardsStore.create(); BoardsStore.create();
}, },
created: function () {
this.loading = true;
gl.boardService = new BoardService(this.endpoint);
},
ready: function () { ready: function () {
BoardsStore.disabled = this.disabled; BoardsStore.disabled = this.disabled;
gl.boardService.all() gl.boardService.all()
...@@ -45,6 +50,7 @@ $(function () { ...@@ -45,6 +50,7 @@ $(function () {
}); });
BoardsStore.addBlankState(); BoardsStore.addBlankState();
this.loading = false;
}); });
} }
}); });
......
...@@ -71,6 +71,11 @@ ...@@ -71,6 +71,11 @@
} }
} }
.boards-app-loading {
width: 100%;
font-size: 34px;
}
.boards-list { .boards-list {
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
= render 'shared/issuable/filter', type: :boards = render 'shared/issuable/filter', type: :boards
.boards-list#board-app{ "data-endpoint" => "#{namespace_project_board_path(@project.namespace, @project)}", .boards-list#board-app{ ":endpoint" => "'#{namespace_project_board_path(@project.namespace, @project)}'",
":disabled" => "#{current_user.nil?}" } ":disabled" => "#{current_user.nil?}" }
.boards-app-loading.text-center{ "v-if" => "loading" }
= icon("spinner spin")
= render "projects/boards/components/board" = render "projects/boards/components/board"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment