Update StoryCompose.vue

This commit is contained in:
Daniel Supernault 2020-07-20 09:24:58 -06:00
parent 894a7ddbe3
commit 8aa66a6ae8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="container mt-2 mt-md-5"> <div class="container mt-2 mt-md-5">
<input type="file" id="pf-dz" name="media" class="d-none file-input" v-bind:accept="config.mimes"> <input type="file" id="pf-dz" name="media" class="d-none file-input" v-bind:accept="config.mimes">
<div class="row"> <div v-if="loaded" class="row">
<div class="col-12 col-md-6 offset-md-3"> <div class="col-12 col-md-6 offset-md-3">
<!-- LANDING --> <!-- LANDING -->
@ -9,12 +9,19 @@
<div class="text-center flex-fill mt-5 pt-5"> <div class="text-center flex-fill mt-5 pt-5">
<img src="/img/pixelfed-icon-grey.svg" width="60px" height="60px"> <img src="/img/pixelfed-icon-grey.svg" width="60px" height="60px">
<p class="font-weight-bold lead text-lighter mt-1">Stories</p> <p class="font-weight-bold lead text-lighter mt-1">Stories</p>
<!-- <p v-if="loaded" class="font-weight-bold small text-uppercase text-muted">
<span>{{stories.length}} Active</span>
<span class="px-2">|</span>
<span>30K Views</span>
</p> -->
</div> </div>
<div class="flex-fill"> <div class="flex-fill py-4">
<div class="card w-100 shadow-none"> <div class="card w-100 shadow-none">
<div class="list-group"> <div class="list-group">
<!-- <a class="list-group-item text-center lead text-decoration-none text-dark" href="#">Camera</a> -->
<a class="list-group-item text-center lead text-decoration-none text-dark" href="#" @click.prevent="upload()">Add Photo</a> <a class="list-group-item text-center lead text-decoration-none text-dark" href="#" @click.prevent="upload()">Add Photo</a>
<a v-if="stories.length" class="list-group-item text-center lead text-decoration-none text-dark" href="#" @click.prevent="edit()">Edit Story</a> <a v-if="stories.length" class="list-group-item text-center lead text-decoration-none text-dark" href="#" @click.prevent="edit()">Edit</a>
<!-- <a class="list-group-item text-center lead text-decoration-none text-dark" href="#">Options</a> -->
</div> </div>
</div> </div>
</div> </div>
@ -150,10 +157,12 @@
props: ['profile-id'], props: ['profile-id'],
data() { data() {
return { return {
loaded: false,
config: window.App.config, config: window.App.config,
mimes: [ mimes: [
'image/jpeg', 'image/jpeg',
'image/png' 'image/png',
// 'video/mp4'
], ],
page: 'landing', page: 'landing',
pages: [ pages: [
@ -181,7 +190,10 @@
mounted() { mounted() {
this.mediaWatcher(); this.mediaWatcher();
axios.get('/api/stories/v0/fetch/' + this.profileId) axios.get('/api/stories/v0/fetch/' + this.profileId)
.then(res => this.stories = res.data); .then(res => {
this.stories = res.data;
this.loaded = true;
});
}, },
methods: { methods: {