2016-10-30 15:53:58 +00:00
|
|
|
<template>
|
|
|
|
<div class="post-status-form">
|
2016-11-24 22:07:21 +00:00
|
|
|
<form @submit.prevent="postStatus(newStatus)">
|
2016-10-30 15:53:58 +00:00
|
|
|
<div class="form-group" >
|
2017-02-22 13:04:28 +00:00
|
|
|
<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>
|
2016-10-30 15:53:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="attachments">
|
|
|
|
<div class="attachment" v-for="file in newStatus.files">
|
2017-02-21 14:24:35 +00:00
|
|
|
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
|
2016-11-25 17:21:25 +00:00
|
|
|
<img class="thumbnail media-upload" :src="file.image" v-if="type(file) === 'image'"></img>
|
2016-11-26 00:19:25 +00:00
|
|
|
<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>
|
2016-10-30 15:53:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='form-bottom'>
|
2017-02-21 13:13:19 +00:00
|
|
|
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
|
2016-11-24 22:07:21 +00:00
|
|
|
<button :disabled="submitDisabled" type="submit" class="btn btn-default">Submit</button>
|
2016-10-30 15:53:58 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./post_status_form.js"></script>
|
2016-11-12 20:05:01 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
2016-11-30 12:39:17 +00:00
|
|
|
.tribute-container {
|
|
|
|
ul {
|
|
|
|
padding: 0px;
|
|
|
|
li {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
padding: 3px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-12 20:31:41 +00:00
|
|
|
.post-status-form, .login {
|
2016-11-12 20:05:01 +00:00
|
|
|
.form-bottom {
|
|
|
|
display: flex;
|
|
|
|
padding: 0.5em;
|
|
|
|
|
|
|
|
button {
|
|
|
|
flex: 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.attachments {
|
|
|
|
padding: 0.5em;
|
2017-02-21 14:24:35 +00:00
|
|
|
|
|
|
|
i {
|
|
|
|
position: absolute;
|
|
|
|
margin: 10px;
|
|
|
|
padding: 5px;
|
|
|
|
background: rgba(230,230,230,0.6);
|
|
|
|
border-radius: 0.5em;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2016-11-12 20:05:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
form {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2017-02-18 07:48:35 +00:00
|
|
|
padding: 0.6em;
|
2016-11-12 20:05:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2017-02-18 07:48:35 +00:00
|
|
|
padding: 0.3em 0.5em 0.6em;
|
|
|
|
line-height:24px;
|
|
|
|
}
|
2017-02-18 23:41:51 +00:00
|
|
|
|
2017-02-18 07:48:35 +00:00
|
|
|
form textarea {
|
|
|
|
border: none;
|
|
|
|
border-radius: 2px;
|
2017-02-18 07:54:54 +00:00
|
|
|
line-height:16px;
|
2016-11-12 20:05:01 +00:00
|
|
|
padding: 0.5em;
|
2017-02-18 07:48:35 +00:00
|
|
|
resize: vertical;
|
2016-11-12 20:05:01 +00:00
|
|
|
}
|
2016-11-22 22:58:25 +00:00
|
|
|
|
|
|
|
.btn {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-24 22:07:21 +00:00
|
|
|
|
|
|
|
.btn[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2016-11-26 02:00:06 +00:00
|
|
|
|
|
|
|
.icon-cancel {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-12 20:05:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|