2016-10-30 16:53:58 +01:00
|
|
|
<template>
|
|
|
|
<div class="post-status-form">
|
2016-11-24 23:07:21 +01:00
|
|
|
<form @submit.prevent="postStatus(newStatus)">
|
2016-10-30 16:53:58 +01:00
|
|
|
<div class="form-group" >
|
2017-03-15 17:06:48 +01:00
|
|
|
<textarea @click="setCaret" @keyup="setCaret" 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 16:53:58 +01:00
|
|
|
</div>
|
|
|
|
<div class="attachments">
|
|
|
|
<div class="attachment" v-for="file in newStatus.files">
|
2017-02-21 15:24:35 +01:00
|
|
|
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
|
2016-11-25 18:21:25 +01:00
|
|
|
<img class="thumbnail media-upload" :src="file.image" v-if="type(file) === 'image'"></img>
|
2016-11-26 01:19:25 +01: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 16:53:58 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-15 17:06:48 +01:00
|
|
|
<div>
|
|
|
|
<h1>Word</h1>
|
|
|
|
<h2>{{textAtCaret}}</h2>
|
|
|
|
<h1>Candidates</h1>
|
|
|
|
|
|
|
|
<h3 v-for="candidate in candidates" @click="replace('@' + candidate)">{{candidate}}</h3>
|
|
|
|
</div>
|
2016-10-30 16:53:58 +01:00
|
|
|
<div class='form-bottom'>
|
2017-02-21 14:13:19 +01:00
|
|
|
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
|
2017-02-24 16:32:41 +01:00
|
|
|
<button :disabled="submitDisabled" type="submit" class="btn btn-default base05 base01-background">Submit</button>
|
2016-10-30 16:53:58 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./post_status_form.js"></script>
|
2016-11-12 21:05:01 +01:00
|
|
|
|
|
|
|
<style lang="scss">
|
2016-11-30 13:39:17 +01: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 21:31:41 +01:00
|
|
|
.post-status-form, .login {
|
2016-11-12 21:05:01 +01:00
|
|
|
.form-bottom {
|
|
|
|
display: flex;
|
|
|
|
padding: 0.5em;
|
|
|
|
|
|
|
|
button {
|
|
|
|
flex: 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.attachments {
|
|
|
|
padding: 0.5em;
|
2017-02-21 15:24:35 +01:00
|
|
|
|
|
|
|
i {
|
|
|
|
position: absolute;
|
|
|
|
margin: 10px;
|
|
|
|
padding: 5px;
|
|
|
|
background: rgba(230,230,230,0.6);
|
2017-02-24 16:32:41 +01:00
|
|
|
border-radius: 5px;
|
2017-02-21 15:24:35 +01:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
2016-11-12 21:05:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
form {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2017-02-18 08:48:35 +01:00
|
|
|
padding: 0.6em;
|
2016-11-12 21:05:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2017-02-18 08:48:35 +01:00
|
|
|
padding: 0.3em 0.5em 0.6em;
|
|
|
|
line-height:24px;
|
|
|
|
}
|
2017-02-19 00:41:51 +01:00
|
|
|
|
2017-02-18 08:48:35 +01:00
|
|
|
form textarea {
|
2017-02-24 16:32:41 +01:00
|
|
|
border: solid;
|
|
|
|
border-width: 1px;
|
2017-02-24 18:43:27 +01:00
|
|
|
border-color: silver;
|
2017-02-24 16:32:41 +01:00
|
|
|
border-radius: 5px;
|
2017-02-18 08:54:54 +01:00
|
|
|
line-height:16px;
|
2017-02-24 16:32:41 +01:00
|
|
|
padding: 5px;
|
2017-02-18 08:48:35 +01:00
|
|
|
resize: vertical;
|
2016-11-12 21:05:01 +01:00
|
|
|
}
|
2016-11-22 23:58:25 +01:00
|
|
|
|
|
|
|
.btn {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-24 23:07:21 +01:00
|
|
|
|
|
|
|
.btn[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2016-11-26 03:00:06 +01:00
|
|
|
|
|
|
|
.icon-cancel {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-12 21:05:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|