X-Git-Url: https://git.r.bdr.sh/rbdr/dasein/blobdiff_plain/a6ccda0fbc4df683f9568d85eb22b21684d2a0bd..a3f9e2603dfdf8c492ec0dc355cd434fc6100f06:/app/components/post_form.js
diff --git a/app/components/post_form.js b/app/components/post_form.js
index cee17b0..1f45f0c 100644
--- a/app/components/post_form.js
+++ b/app/components/post_form.js
@@ -8,10 +8,11 @@ internals.kPostsRoute = '/api/posts';
export default internals.PostFormComponent = Vue.component('post-form', {
template: '
' +
- '
sup.
' +
- '
' +
+ '
hi {{authService.user.name}}
' +
+ '
' +
+ '
' +
'
{{message}}
' +
- '
' +
+ '
' +
'
',
data() {
@@ -20,11 +21,22 @@ export default internals.PostFormComponent = Vue.component('post-form', {
content: '',
message: '',
submitting: false,
+ active: false,
authService: new AuthService()
};
},
methods: {
+
+ // Activates the form.
+
+ activate() {
+
+ this.active = true;
+ },
+
+ // Creates a post
+
submit() {
this.submitting = true;
@@ -44,6 +56,7 @@ export default internals.PostFormComponent = Vue.component('post-form', {
this.content = '';
this.message = '';
this.submitting = false;
+ this.active = false;
}).catch((err) => {
console.error(err.stack);