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-24 17:43:27 +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>
|
2017-04-17 08:18:06 +00:00
|
|
|
<div class='form-bottom'>
|
|
|
|
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
|
|
|
|
<button :disabled="submitDisabled" type="submit" class="btn btn-default base05 base01-background">Submit</button>
|
|
|
|
</div>
|
2016-10-30 15:53:58 +00:00
|
|
|
<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>
|
|
|
|
</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;
|
2017-04-17 08:18:06 +00:00
|
|
|
height: 32px;
|
2016-11-12 20:05:01 +00:00
|
|
|
|
|
|
|
button {
|
2017-04-17 08:18:06 +00:00
|
|
|
width: 10em;
|
2016-11-12 20:05:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.attachments {
|
2017-04-17 08:18:06 +00:00
|
|
|
padding: 0 0.5em;
|
2017-02-21 14:24:35 +00:00
|
|
|
|
2017-04-17 07:45:12 +00:00
|
|
|
.attachment {
|
|
|
|
position: relative;
|
2017-04-17 08:42:33 +00:00
|
|
|
margin: 0.5em 0.8em 0.2em 0;
|
2017-04-17 07:45:12 +00:00
|
|
|
}
|
|
|
|
|
2017-02-21 14:24:35 +00:00
|
|
|
i {
|
|
|
|
position: absolute;
|
|
|
|
margin: 10px;
|
|
|
|
padding: 5px;
|
|
|
|
background: rgba(230,230,230,0.6);
|
2017-02-24 15:32:41 +00:00
|
|
|
border-radius: 5px;
|
2017-02-21 14:24:35 +00:00
|
|
|
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 {
|
2017-02-24 15:32:41 +00:00
|
|
|
border: solid;
|
|
|
|
border-width: 1px;
|
2017-02-24 17:43:27 +00:00
|
|
|
border-color: silver;
|
2017-02-24 15:32:41 +00:00
|
|
|
border-radius: 5px;
|
2017-02-18 07:54:54 +00:00
|
|
|
line-height:16px;
|
2017-02-24 15:32:41 +00:00
|
|
|
padding: 5px;
|
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>
|