diff --git a/public/js/bucket-single.js b/public/js/bucket-single.js index 90804ef..6dfa499 100644 --- a/public/js/bucket-single.js +++ b/public/js/bucket-single.js @@ -124,7 +124,7 @@ __webpack_require__.r(__webpack_exports__); getComponent ) { return template( - '
', + '
', [ { 'type': bindingTypes.IF, @@ -135,11 +135,11 @@ __webpack_require__.r(__webpack_exports__); return _scope.state.errors.length > 0; }, - 'redundantAttribute': 'expr3', - 'selector': '[expr3]', + 'redundantAttribute': 'expr0', + 'selector': '[expr0]', 'template': template( - '', + '', [ { 'type': bindingTypes.EACH, @@ -170,8 +170,8 @@ __webpack_require__.r(__webpack_exports__); ] ), - 'redundantAttribute': 'expr4', - 'selector': '[expr4]', + 'redundantAttribute': 'expr1', + 'selector': '[expr1]', 'itemName': 'error', 'indexName': null, @@ -289,7 +289,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') getComponent ) { return template( - '
', + '
', [ { 'type': bindingTypes.IF, @@ -300,8 +300,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') return _scope.state.note && _scope.state.note._id; }, - 'redundantAttribute': 'expr0', - 'selector': '[expr0]', + 'redundantAttribute': 'expr13', + 'selector': '[expr13]', 'template': template( null, @@ -332,8 +332,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') return !_scope.state.note || (_scope.state.note && !_scope.state.note._id); }, - 'redundantAttribute': 'expr1', - 'selector': '[expr1]', + 'redundantAttribute': 'expr14', + 'selector': '[expr14]', 'template': template( '\n Create\n ', @@ -349,8 +349,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') return _scope.state.note && _scope.state.note._id; }, - 'redundantAttribute': 'expr2', - 'selector': '[expr2]', + 'redundantAttribute': 'expr15', + 'selector': '[expr15]', 'template': template( '\n Save\n ', diff --git a/public/js/create-bucket.js b/public/js/create-bucket.js index d285795..f1c7276 100644 --- a/public/js/create-bucket.js +++ b/public/js/create-bucket.js @@ -124,7 +124,7 @@ __webpack_require__.r(__webpack_exports__); getComponent ) { return template( - '
', + '
', [ { 'type': bindingTypes.IF, @@ -135,11 +135,11 @@ __webpack_require__.r(__webpack_exports__); return _scope.state.errors.length > 0; }, - 'redundantAttribute': 'expr3', - 'selector': '[expr3]', + 'redundantAttribute': 'expr0', + 'selector': '[expr0]', 'template': template( - '', + '', [ { 'type': bindingTypes.EACH, @@ -170,8 +170,8 @@ __webpack_require__.r(__webpack_exports__); ] ), - 'redundantAttribute': 'expr4', - 'selector': '[expr4]', + 'redundantAttribute': 'expr1', + 'selector': '[expr1]', 'itemName': 'error', 'indexName': null, diff --git a/public/js/users.js b/public/js/users.js index d6351ab..36584f5 100644 --- a/public/js/users.js +++ b/public/js/users.js @@ -124,7 +124,7 @@ __webpack_require__.r(__webpack_exports__); getComponent ) { return template( - '
', + '
', [ { 'type': bindingTypes.IF, @@ -135,11 +135,11 @@ __webpack_require__.r(__webpack_exports__); return _scope.state.errors.length > 0; }, - 'redundantAttribute': 'expr3', - 'selector': '[expr3]', + 'redundantAttribute': 'expr0', + 'selector': '[expr0]', 'template': template( - '', + '', [ { 'type': bindingTypes.EACH, @@ -170,8 +170,8 @@ __webpack_require__.r(__webpack_exports__); ] ), - 'redundantAttribute': 'expr4', - 'selector': '[expr4]', + 'redundantAttribute': 'expr1', + 'selector': '[expr1]', 'itemName': 'error', 'indexName': null, @@ -193,6 +193,56 @@ __webpack_require__.r(__webpack_exports__); /***/ }), +/***/ "./resources/js/components/loading.riot": +/*!**********************************************!*\ + !*** ./resources/js/components/loading.riot ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + 'css': null, + 'exports': {}, + + 'template': function( + template, + expressionTypes, + bindingTypes, + getComponent + ) { + return template( + '
', + [ + { + 'type': bindingTypes.IF, + + 'evaluate': function( + _scope + ) { + return _scope.props.loading; + }, + + 'redundantAttribute': 'expr32', + 'selector': '[expr32]', + + 'template': template( + '', + [] + ) + } + ] + ); + }, + + 'name': 'app-loading' +}); + +/***/ }), + /***/ "./resources/js/components/modal.riot": /*!********************************************!*\ !*** ./resources/js/components/modal.riot ***! @@ -266,18 +316,18 @@ __webpack_require__.r(__webpack_exports__); getComponent ) { return template( - '', + '', [ { 'type': bindingTypes.SLOT, 'attributes': [], 'name': 'title', - 'redundantAttribute': 'expr31', - 'selector': '[expr31]' + 'redundantAttribute': 'expr33', + 'selector': '[expr33]' }, { - 'redundantAttribute': 'expr32', - 'selector': '[expr32]', + 'redundantAttribute': 'expr34', + 'selector': '[expr34]', 'expressions': [ { @@ -297,8 +347,8 @@ __webpack_require__.r(__webpack_exports__); ] }, { - 'redundantAttribute': 'expr33', - 'selector': '[expr33]', + 'redundantAttribute': 'expr35', + 'selector': '[expr35]', 'expressions': [ { @@ -314,8 +364,8 @@ __webpack_require__.r(__webpack_exports__); ] }, { - 'redundantAttribute': 'expr34', - 'selector': '[expr34]', + 'redundantAttribute': 'expr36', + 'selector': '[expr36]', 'expressions': [ { @@ -421,11 +471,11 @@ __webpack_require__.r(__webpack_exports__); getComponent ) { return template( - '', + '', [ { - 'redundantAttribute': 'expr14', - 'selector': '[expr14]', + 'redundantAttribute': 'expr2', + 'selector': '[expr2]', 'expressions': [ { @@ -444,8 +494,8 @@ __webpack_require__.r(__webpack_exports__); 'type': bindingTypes.SLOT, 'attributes': [], 'name': 'default', - 'redundantAttribute': 'expr15', - 'selector': '[expr15]' + 'redundantAttribute': 'expr3', + 'selector': '[expr3]' } ] ); @@ -557,7 +607,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') getComponent ) { return template( - '
\n Email\n \n Display Name\n \n Roles\n
', + '
\n Email\n \n Display Name\n \n Roles\n
', [ { 'type': bindingTypes.EACH, @@ -565,11 +615,11 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') 'condition': null, 'template': template( - '
', + '
', [ { - 'redundantAttribute': 'expr6', - 'selector': '[expr6]', + 'redundantAttribute': 'expr5', + 'selector': '[expr5]', 'expressions': [ { @@ -589,8 +639,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') ] }, { - 'redundantAttribute': 'expr7', - 'selector': '[expr7]', + 'redundantAttribute': 'expr6', + 'selector': '[expr6]', 'expressions': [ { @@ -618,8 +668,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') return _scope.user.roles && _scope.user.roles.indexOf('admin') >= 0; }, - 'redundantAttribute': 'expr8', - 'selector': '[expr8]', + 'redundantAttribute': 'expr7', + 'selector': '[expr7]', 'template': template( '\n Admin\n ', @@ -657,12 +707,12 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') } ], - 'redundantAttribute': 'expr9', - 'selector': '[expr9]' + 'redundantAttribute': 'expr8', + 'selector': '[expr8]' }, { - 'redundantAttribute': 'expr10', - 'selector': '[expr10]', + 'redundantAttribute': 'expr9', + 'selector': '[expr9]', 'expressions': [ { @@ -680,8 +730,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') ] ), - 'redundantAttribute': 'expr5', - 'selector': '[expr5]', + 'redundantAttribute': 'expr4', + 'selector': '[expr4]', 'itemName': 'user', 'indexName': null, @@ -710,8 +760,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') ], 'attributes': [], - 'redundantAttribute': 'expr11', - 'selector': '[expr11]' + 'redundantAttribute': 'expr10', + 'selector': '[expr10]' }, { 'type': bindingTypes.IF, @@ -722,15 +772,15 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('app-modal') return _scope.state.maxLength > _scope.state.users.length; }, - 'redundantAttribute': 'expr12', - 'selector': '[expr12]', + 'redundantAttribute': 'expr11', + 'selector': '[expr11]', 'template': template( - '
', + '
', [ { - 'redundantAttribute': 'expr13', - 'selector': '[expr13]', + 'redundantAttribute': 'expr12', + 'selector': '[expr12]', 'expressions': [ { @@ -770,17 +820,22 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ }); /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js"); /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js"); +/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js"); /* harmony import */ var _FormValidator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../FormValidator */ "./resources/js/FormValidator.js"); /* harmony import */ var _field_error_riot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../field-error.riot */ "./resources/js/components/field-error.riot"); +/* harmony import */ var _loading_riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../loading.riot */ "./resources/js/components/loading.riot"); + + +riot__WEBPACK_IMPORTED_MODULE_4__.register('field-error', _field_error_riot__WEBPACK_IMPORTED_MODULE_2__.default) +riot__WEBPACK_IMPORTED_MODULE_4__.mount('field-error') -riot__WEBPACK_IMPORTED_MODULE_3__.register('field-error', _field_error_riot__WEBPACK_IMPORTED_MODULE_2__.default) -riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') +riot__WEBPACK_IMPORTED_MODULE_4__.register('app-loading', _loading_riot__WEBPACK_IMPORTED_MODULE_3__.default) +riot__WEBPACK_IMPORTED_MODULE_4__.mount('app-loading') /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 'css': null, @@ -789,7 +844,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') state: { user: { - } + }, + loading: false }, /** @@ -869,6 +925,9 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') url += '/' + this.state.user._id } + this.state.loading = true + this.update() + axios__WEBPACK_IMPORTED_MODULE_0___default()({ method: method, url: url, @@ -877,12 +936,12 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') this.state.user = response.data.data - console.log(event) - + // check if submit has close-attribute if (event.submitter.attributes.close) { this.$('#sidebar-user-form-close').click() } + this.state.loading = false this.update() }) }, @@ -904,7 +963,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') getComponent ) { return template( - '', + '', [ { 'type': bindingTypes.IF, @@ -1048,6 +1107,34 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error') 'attributes': [], 'redundantAttribute': 'expr30', 'selector': '[expr30]' + }, + { + 'type': bindingTypes.TAG, + 'getComponent': getComponent, + + 'evaluate': function( + _scope + ) { + return 'app-loading'; + }, + + 'slots': [], + + 'attributes': [ + { + 'type': expressionTypes.ATTRIBUTE, + 'name': 'loading', + + 'evaluate': function( + _scope + ) { + return _scope.state.loading; + } + } + ], + + 'redundantAttribute': 'expr31', + 'selector': '[expr31]' } ] ); diff --git a/resources/js/components/loading.riot b/resources/js/components/loading.riot index e69de29..952e82a 100644 --- a/resources/js/components/loading.riot +++ b/resources/js/components/loading.riot @@ -0,0 +1,15 @@ + +
+
+ + + +
+
+ + +
\ No newline at end of file diff --git a/resources/js/components/users/form.riot b/resources/js/components/users/form.riot index 75a9908..678271f 100644 --- a/resources/js/components/users/form.riot +++ b/resources/js/components/users/form.riot @@ -74,6 +74,8 @@ + +