diff --git a/imgbook/config/app.php b/imgbook/config/app.php
index 2f1cf7c..28fcaa2 100644
--- a/imgbook/config/app.php
+++ b/imgbook/config/app.php
@@ -13,7 +13,7 @@
|
*/
- 'name' => env('APP_NAME', 'ImgBook'),
+ 'name' => env('APP_NAME', 'Imgbook'),
/*
|--------------------------------------------------------------------------
diff --git a/imgbook/public/js/app.js b/imgbook/public/js/app.js
index 42f5521..14a4f3f 100644
--- a/imgbook/public/js/app.js
+++ b/imgbook/public/js/app.js
@@ -1855,6 +1855,16 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
/* harmony default export */ __webpack_exports__["default"] = ({
props: ['postId', 'userId'],
data: function data() {
@@ -1877,6 +1887,7 @@ __webpack_require__.r(__webpack_exports__);
//success
_this.comments = response.data;
_this.newComment = '';
+ console.log(response.data);
})["catch"](function (response) {
//failure
console.log(response);
@@ -37328,63 +37339,95 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
- return _c("div", { attrs: { id: "root" } }, [
- _vm._v("\n " + _vm._s(_vm.commentMessage) + "\n \n "),
- _c("input", {
- directives: [
- {
- name: "model",
- rawName: "v-model",
- value: _vm.newComment,
- expression: "newComment"
- }
- ],
- attrs: { type: "text", id: "input" },
- domProps: { value: _vm.newComment },
- on: {
- input: function($event) {
- if ($event.target.composing) {
- return
- }
- _vm.newComment = $event.target.value
- }
- }
- }),
- _vm._v(" "),
- _c("button", { on: { click: _vm.createComment } }, [
- _vm._v(_vm._s(_vm.changeOrPost))
- ]),
- _vm._v("\n\n Comments:\n "),
- _c(
- "ul",
+ return _c(
+ "div",
+ { attrs: { id: "root" } },
+ [
+ _c("div", { staticClass: "form-group" }, [
+ _c("label", [_c("b", [_vm._v(_vm._s(_vm.commentMessage))])]),
+ _vm._v(" "),
+ _c("div", { staticClass: "input-group" }, [
+ _c("input", {
+ directives: [
+ {
+ name: "model",
+ rawName: "v-model",
+ value: _vm.newComment,
+ expression: "newComment"
+ }
+ ],
+ staticClass: "form-control",
+ attrs: {
+ type: "textarea",
+ name: "text",
+ placeholder: "Enter a comment"
+ },
+ domProps: { value: _vm.newComment },
+ on: {
+ input: function($event) {
+ if ($event.target.composing) {
+ return
+ }
+ _vm.newComment = $event.target.value
+ }
+ }
+ }),
+ _vm._v(" "),
+ _c(
+ "button",
+ {
+ staticClass: "btn btn-primary",
+ on: { click: _vm.createComment }
+ },
+ [_vm._v(_vm._s(_vm.changeOrPost))]
+ )
+ ])
+ ]),
+ _vm._v(" "),
+ _c("hr"),
+ _vm._v(" "),
_vm._l(_vm.comments, function(comment) {
- return _c("li", { key: comment.id }, [
- _vm._v(
- "\n " +
- _vm._s(comment.user.username) +
- " -- " +
- _vm._s(comment.text) +
- "\n "
- ),
- comment.user.id == _vm.userId
- ? _c(
- "button",
- {
- attrs: { id: "editButton" },
- on: {
- click: function($event) {
- return _vm.editCommentButton(comment)
- }
- }
- },
- [_vm._v("Edit")]
- )
- : _vm._e()
+ return _c("div", { key: comment.id }, [
+ _c("h4", { staticClass: "media-heading user_name" }, [
+ _vm._v(_vm._s(comment.user.username))
+ ]),
+ _vm._v(" "),
+ _c("p", [_c("small", [_vm._v(_vm._s(comment.updated_at))])]),
+ _vm._v(" "),
+ _c("div", { staticClass: "container" }, [
+ _c("div", { staticClass: "row" }, [
+ _c("div", { staticClass: "col" }, [
+ _vm._v(
+ "\n " +
+ _vm._s(comment.text) +
+ "\n "
+ )
+ ]),
+ _vm._v(" "),
+ _c("div", { staticClass: "col-md-auto" }, [
+ comment.user.id == _vm.userId
+ ? _c(
+ "button",
+ {
+ staticClass: "btn btn-primary pull-right",
+ attrs: { id: "editButton" },
+ on: {
+ click: function($event) {
+ return _vm.editCommentButton(comment)
+ }
+ }
+ },
+ [_vm._v("Edit")]
+ )
+ : _vm._e()
+ ])
+ ])
+ ])
])
- }),
- 0
- )
- ])
+ })
+ ],
+ 2
+ )
}
var staticRenderFns = []
render._withStripped = true
@@ -49720,8 +49763,8 @@ __webpack_require__.r(__webpack_exports__);
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(/*! /home/vagrant/laravel/testsite/resources/js/app.js */"./resources/js/app.js");
-module.exports = __webpack_require__(/*! /home/vagrant/laravel/testsite/resources/sass/app.scss */"./resources/sass/app.scss");
+__webpack_require__(/*! /home/vagrant/laravel/laravel-web-app/imgbook/resources/js/app.js */"./resources/js/app.js");
+module.exports = __webpack_require__(/*! /home/vagrant/laravel/laravel-web-app/imgbook/resources/sass/app.scss */"./resources/sass/app.scss");
/***/ })
diff --git a/imgbook/resources/js/components/CommentComponent.vue b/imgbook/resources/js/components/CommentComponent.vue
index fd97758..afbed3b 100644
--- a/imgbook/resources/js/components/CommentComponent.vue
+++ b/imgbook/resources/js/components/CommentComponent.vue
@@ -1,17 +1,28 @@
{{ comment.updated_at }}
-
+
+
+
+ {{ comment.user.username }}
+