Merged existing changes from 'develop'

This commit is contained in:
shpuld 2017-02-22 15:04:28 +02:00
commit ded2d54cca
10 changed files with 83 additions and 28 deletions

View file

@ -23,7 +23,7 @@ module.exports = {
extensions: ['', '.js', '.vue'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'vue$': 'vue/dist/vue',
'vue$': 'vue/dist/vue.runtime.common',
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components')

View file

@ -25,6 +25,7 @@
"tributejs": "^2.1.0",
"vue": "^2.1.0",
"vue-router": "^2.2.0",
"vue-template-compiler": "^2.1.10",
"vue-timeago": "^3.1.2",
"vuex": "^2.1.0"
},
@ -82,8 +83,8 @@
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
"url-loader": "^0.5.7",
"vue-loader": "^9.4.0",
"vue-style-loader": "^1.0.0",
"vue-loader": "^11.1.0",
"vue-style-loader": "^2.0.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",

View file

@ -16,8 +16,6 @@
<audio v-if="type === 'audio'" :src="attachment.url" controls></audio>
<span v-if="type === 'unknown'">Don't know how to display this...</span>
<div @click.prevent="linkClicked" v-if="type === 'html' && attachment.oembed" class="oembed">
<div v-if="attachment.thumb_url" class="image">
<img :src="attachment.thumb_url"></img>
@ -38,12 +36,12 @@
flex-wrap: wrap;
.attachment {
flex: 1 0 30%;
display: flex;
margin: 0.5em 0.8em 0.6em 0.1em;
align-self: flex-start;
&.html {
flex-basis: 100%;
display: flex;
}
.hider {

View file

@ -54,10 +54,11 @@ const mediaUpload = {
],
watch: {
'dropFiles': function (fileInfos) {
if (!this.uploading)
if (!this.uploading) {
this.uploadFile(fileInfos[0])
}
}
}
}
export default mediaUpload

View file

@ -2,15 +2,15 @@
<div class="post-status-form">
<form @submit.prevent="postStatus(newStatus)">
<div class="form-group" >
<textarea v-model="newStatus.status" placeholder="Just landed in L.A." rows="3" class="form-control" @keyup.ctrl.enter="postStatus(newStatus)" @drop="fileDrop" @dragover.prevent="fileDrag"></textarea>
<textarea v-model="newStatus.status" placeholder="Just landed in L.A." rows="3" class="form-control" @keyup.meta.enter="postStatus(newStatus)" @keyup.ctrl.enter="postStatus(newStatus)" @drop="fileDrop" @dragover.prevent="fileDrag"></textarea>
</div>
<div class="attachments">
<div class="attachment" v-for="file in newStatus.files">
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
<img class="thumbnail media-upload" :src="file.image" v-if="type(file) === 'image'"></img>
<video v-if="type(file) === 'video'" :src="file.image" controls></video>
<audio v-if="type(file) === 'audio'" :src="file.image" controls></audio>
<a v-if="type(file) === 'unknown'" :href="file.image">{{file.url}}</a>
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
</div>
</div>
<div class='form-bottom'>
@ -52,6 +52,15 @@
.attachments {
padding: 0.5em;
i {
position: absolute;
margin: 10px;
padding: 5px;
background: rgba(230,230,230,0.6);
border-radius: 0.5em;
font-weight: bold;
}
}
form {

View file

@ -7,18 +7,18 @@
<div class='user-name'>{{user.name}}</div>
<div class='user-screen-name'>@{{user.screen_name}}</div>
<div v-if="isOtherUser" class="user-interactions">
<div v-if="user.follows_you" class="following base06">
<div v-if="user.follows_you && loggedIn" class="following base06">
Follows you!
</div>
<div class="follow">
<div class="follow" v-if="loggedIn">
<span v-if="user.following">
<!--Following them!-->
<button @click="unfollowUser" class="base06 base01-background base06-border">
<button @click="unfollowUser" class="base06 base01-background">
Unfollow
</button>
</span>
<span v-if="!user.following">
<button @click="followUser" class="base01 base04-background base01-border">
<button @click="followUser" class="base01 base04-background">
Follow
</button>
</span>
@ -66,6 +66,9 @@
},
isOtherUser () {
return this.user !== this.$store.state.users.currentUser
},
loggedIn () {
return this.$store.state.users.currentUser
}
},
methods: {

View file

@ -51,7 +51,7 @@ export default function createPersistedState ({
}
return value && value !== 'undefined' ? JSON.parse(value) : undefined
},
setState = throttle(defaultSetState, 5000),
setState = throttle(defaultSetState, 60000),
reducer = defaultReducer,
storage = defaultStorage,
subscriber = store => handler => store.subscribe(handler)

View file

@ -67,8 +67,7 @@ new Vue({
router,
store,
el: '#app',
template: '<App/>',
components: { App }
render: h => h(App)
})
window.fetch('/static/config.json')

View file

@ -1356,6 +1356,17 @@ core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
cosmiconfig@^2.1.0, cosmiconfig@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.1.1.tgz#817f2c2039347a1e9bf7d090c0923e53f749ca82"
dependencies:
js-yaml "^3.4.3"
minimist "^1.2.0"
object-assign "^4.1.0"
os-homedir "^1.0.1"
parse-json "^2.2.0"
require-from-string "^1.1.0"
cross-spawn@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
@ -3007,7 +3018,7 @@ js-tokens@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
js-yaml@3.x, js-yaml@^3.5.1:
js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.5.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628"
dependencies:
@ -3909,7 +3920,7 @@ object-assign@4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
@ -3996,7 +4007,7 @@ os-browserify@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f"
os-homedir@^1.0.0:
os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
@ -4229,6 +4240,29 @@ postcss-filter-plugins@^2.0.0:
postcss "^5.0.4"
uniqid "^4.0.0"
postcss-load-config@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a"
dependencies:
cosmiconfig "^2.1.0"
object-assign "^4.1.0"
postcss-load-options "^1.2.0"
postcss-load-plugins "^2.3.0"
postcss-load-options@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c"
dependencies:
cosmiconfig "^2.1.0"
object-assign "^4.1.0"
postcss-load-plugins@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92"
dependencies:
cosmiconfig "^2.1.1"
object-assign "^4.1.0"
postcss-merge-idents@^2.1.5:
version "2.1.7"
resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
@ -4814,6 +4848,10 @@ require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
require-from-string@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418"
require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
@ -5570,22 +5608,21 @@ vue-hot-reload-api@^2.0.1:
version "2.0.9"
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.0.9.tgz#2e8cfbfc8e531eea57d8c1f0bd761047c7e11b56"
vue-loader@^9.4.0:
version "9.9.5"
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-9.9.5.tgz#0893e3093e90c8fbe852053b2b0f4854a3bf4651"
vue-loader@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-11.1.0.tgz#8f3fcdd8a233ce96b3e99bd3d56e83cc0f2050f2"
dependencies:
consolidate "^0.14.0"
hash-sum "^1.0.2"
js-beautify "^1.6.3"
loader-utils "^0.2.10"
lru-cache "^4.0.1"
object-assign "^4.0.0"
postcss "^5.0.10"
postcss-load-config "^1.1.0"
postcss-selector-parser "^2.0.0"
source-map "^0.5.6"
vue-hot-reload-api "^2.0.1"
vue-style-loader "^1.0.0"
vue-template-compiler "^2.0.5"
vue-style-loader "^2.0.0"
vue-template-es2015-compiler "^1.2.2"
vue-router@^2.2.0:
@ -5598,7 +5635,14 @@ vue-style-loader@^1.0.0:
dependencies:
loader-utils "^0.2.7"
vue-template-compiler@^2.0.5:
vue-style-loader@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-2.0.0.tgz#1a3bb55239ac541ee3af0301d66f16fc86786543"
dependencies:
hash-sum "^1.0.2"
loader-utils "^0.2.7"
vue-template-compiler@^2.1.10:
version "2.1.10"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.1.10.tgz#cb89643adc395e97435585522e43d0a9b1913257"
dependencies: