mirror of
https://github.com/pinry/pinry.git
synced 2025-11-16 01:45:51 +01:00
Feature: Add update trigger for board-creation
This commit is contained in:
committed by
Isaac Bythewood
parent
68638deeb3
commit
e56e315723
@@ -54,6 +54,7 @@
|
||||
<script>
|
||||
import API from './api';
|
||||
import ModelForm from './utils/ModelForm';
|
||||
import bus from './utils/bus';
|
||||
|
||||
const fields = ['name'];
|
||||
|
||||
@@ -110,6 +111,7 @@ export default {
|
||||
const promise = API.Board.create(this.createModel.form.name.value);
|
||||
promise.then(
|
||||
(resp) => {
|
||||
bus.bus.$emit(bus.events.refreshBoards);
|
||||
self.$emit('boardCreated', resp);
|
||||
self.$parent.close();
|
||||
},
|
||||
|
||||
@@ -62,6 +62,7 @@ import noMore from './noMore.vue';
|
||||
import scroll from './utils/scroll';
|
||||
import placeholder from '../assets/pinry-placeholder.jpg';
|
||||
import BoardEditorUI from './editors/BoardEditUI.vue';
|
||||
import bus from './utils/bus';
|
||||
|
||||
function createBoardItem(board) {
|
||||
const defaultPreviewImage = placeholder;
|
||||
@@ -194,6 +195,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
bus.bus.$on(bus.events.refreshBoards, this.reset);
|
||||
this.registerScrollEvent();
|
||||
this.initialize();
|
||||
},
|
||||
|
||||
@@ -6,5 +6,6 @@ export default {
|
||||
bus: eventBus,
|
||||
events: {
|
||||
refreshPin: 'refreshPin',
|
||||
refreshBoards: 'refreshBoards',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user