diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-14 21:11:27 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-14 21:11:27 +0100 |
| commit | d4284686fa791cc1a43ae058375e1d51d8f1bd5b (patch) | |
| tree | ac590e54fbe6e3455022c268ed2f61933aed62bf /src | |
| parent | aeb8868b82c767e6c8bf19aa8e6355f71941fea5 (diff) | |
| parent | a9d65a488f12968fe947418846a3942d43b424fa (diff) | |
Merge branch 'master' of ssh.gitgud.io:lambadalambda/pleroma-fe into feature/retweet
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.scss | 8 | ||||
| -rw-r--r-- | src/_variables.scss | 6 | ||||
| -rw-r--r-- | src/components/favorite_button/favorite_button.vue | 15 | ||||
| -rw-r--r-- | src/components/media_upload/media_upload.js | 13 | ||||
| -rw-r--r-- | src/components/media_upload/media_upload.vue | 3 | ||||
| -rw-r--r-- | src/components/retweet_button/retweet_button.vue | 18 | ||||
| -rw-r--r-- | src/components/status/status.vue | 13 |
7 files changed, 55 insertions, 21 deletions
diff --git a/src/App.scss b/src/App.scss index c155de73..a97ad56d 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,7 +1,4 @@ -$main-color: #f58d2c; -$main-background: white; -$darkened-background: whitesmoke; - +@import './_variables.scss'; #app { background-color: $main-color; background-size: cover; @@ -225,9 +222,10 @@ status.ng-enter.ng-enter-active { } .fa { - color: $main-color; + color: grey; } + .status-actions { width: 50%; display: flex; diff --git a/src/_variables.scss b/src/_variables.scss new file mode 100644 index 00000000..c317fd32 --- /dev/null +++ b/src/_variables.scss @@ -0,0 +1,6 @@ +$main-color: #f58d2c; +$main-background: white; +$darkened-background: whitesmoke; +$green: #0fa00f; +$blue: #0095ff; + diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue index 0455c706..6eaf0607 100644 --- a/src/components/favorite_button/favorite_button.vue +++ b/src/components/favorite_button/favorite_button.vue @@ -7,8 +7,15 @@ <script src="./favorite_button.js" ></script> -<style> - .favorite-button { - cursor: pointer - } +<style lang='scss'> + @import '../../_variables.scss'; + .favorite-button { + cursor: pointer; + &:hover { + color: $main-color; + } + } + .icon-star { + color: $main-color; + } </style> diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index 8ae86a8d..3f2e3964 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -11,11 +11,24 @@ const mediaUpload = { const file = target.files[0] const formData = new FormData() formData.append('media', file) + + self.$emit('uploading') + self.uploading = true + statusPosterService.uploadMedia({ store, formData }) .then((fileData) => { self.$emit('uploaded', fileData) + self.uploading = false + }, (error) => { + self.$emit('upload-failed') + self.uploading = false }) }) + }, + data () { + return { + uploading: false + } } } diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue index a62d8316..f2f0b83f 100644 --- a/src/components/media_upload/media_upload.vue +++ b/src/components/media_upload/media_upload.vue @@ -1,7 +1,8 @@ <template> <div class="media-upload"> <label class="btn btn-default"> - <i class="fa icon-upload"></i> + <i class="fa icon-spin4 animate-spin" v-if="uploading"></i> + <i class="fa icon-upload" v-if="!uploading"></i> <input type=file style="position: fixed; top: -100em"></input> </label> </div> diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index ec94356a..9b2f5c7b 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -7,12 +7,16 @@ <script src="./retweet_button.js" ></script> -<style> - .icon-retweet { - cursor: pointer - } - .retweeted { +<style lang='scss'> + @import '../../_variables.scss'; + .icon-retweet { + cursor: pointer; + &:hover { + color: $green; + } + } + .retweeted { cursor: auto; - color: green; - } + color: $green; + } </style> diff --git a/src/components/status/status.vue b/src/components/status/status.vue index d309c495..d4bcc279 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -51,7 +51,8 @@ <script src="./status.js" ></script> <style lang="scss"> - .status-el { + @import '../../_variables.scss'; + .status-el { hyphens: auto; overflow-wrap: break-word; word-wrap: break-word; @@ -66,9 +67,13 @@ margin-top: 3px; margin-bottom: 3px; } - } + } - .status-actions { + .status-actions { padding-top: 5px; - } + } + + .icon-reply:hover { + color: $blue; + } </style> |
