aboutsummaryrefslogtreecommitdiff
path: root/src/components/retweet_button
diff options
context:
space:
mode:
authorJiayi Zheng <thebluber@gmail.com>2016-11-13 16:42:56 +0100
committerJiayi Zheng <thebluber@gmail.com>2016-11-13 16:42:56 +0100
commit242ae8e91b1586aee185873b2f2d10bb52495ef3 (patch)
tree80da97ba9cf26c48e28860ba15ad12d250c027f0 /src/components/retweet_button
parentee009f63dd2f4856f8daf29d66301f67ab8f2021 (diff)
Add retweet button component
Expand API service for retweet
Diffstat (limited to 'src/components/retweet_button')
-rw-r--r--src/components/retweet_button/retweet_button.js16
-rw-r--r--src/components/retweet_button/retweet_button.vue18
2 files changed, 34 insertions, 0 deletions
diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js
new file mode 100644
index 00000000..42da2531
--- /dev/null
+++ b/src/components/retweet_button/retweet_button.js
@@ -0,0 +1,16 @@
+const RetweetButton = {
+ props: [ 'status' ],
+ methods: {
+ retweet () {
+ }
+ },
+ computed: {
+ classes () {
+ return {
+ 'retweeted': this.status.repeated
+ }
+ }
+ }
+}
+
+export default RetweetButton
diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
new file mode 100644
index 00000000..ed5cb935
--- /dev/null
+++ b/src/components/retweet_button/retweet_button.vue
@@ -0,0 +1,18 @@
+<template>
+ <div>
+ <i :class='classes' class='icon-retweet fa' v-on:click.prevent=''></i>
+ <span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
+ </div>
+</template>
+
+<script src="./retweet_button.js" ></script>
+
+<style>
+ .icon-retweet {
+ cursor: pointer
+ }
+ .retweeted {
+ cursor: auto;
+ color: green;
+ }
+</style>