Compare commits

...

3 Commits

Author SHA1 Message Date
6d8dcec152 Remove yellow box-shadow 2018-12-29 21:56:44 +01:00
39e4d272b6 Hide posting interface 2018-12-29 21:56:25 +01:00
502944f2ad Fix mark_read at bottom scrolling 2018-12-29 21:46:25 +01:00
4 changed files with 22 additions and 13 deletions

View File

@ -270,12 +270,7 @@
<style scoped> <style scoped>
.entry.unread { .entry.unread {
border: 1px solid #ccc; outline: 1px solid #ccc;
border-radius: 3px;
}
.unread {
box-shadow: 0 4px 8px 0 rgba(255, 255, 0, 0.8), 0 6px 20px 0 rgba(255, 255, 0, 0.5);
} }
.media .entry { .media .entry {

View File

@ -50,6 +50,7 @@
}, },
}).then(() => { }).then(() => {
this.newPost = ''; this.newPost = '';
this.$emit('close')
}) })
}, },
} }

View File

@ -62,7 +62,7 @@
}, },
handleScroll() { handleScroll() {
// let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight; // let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight;
let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === this.$el.offsetHeight + document.documentElement.offsetHeight + 12 let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight >= this.$el.offsetHeight + document.documentElement.offsetHeight
if (bottomOfWindow) { if (bottomOfWindow) {
this.$store.dispatch('bottomReached') this.$store.dispatch('bottomReached')
return return

View File

@ -7,9 +7,20 @@
</Channels> </Channels>
<div class="timeline column is-three-fifths"> <div class="timeline column is-three-fifths">
<button class="button" @click="openFeedFollower">Add feed</button> <div class="level">
<new-post class="mt-20"></new-post> <div class="level-left">
<h1 class="title is-5 mt-20">{{ channel.name }}</h1> <h1 class="title is-5">{{ channel.name }}</h1>
</div>
<div class="level-right">
<div class="level-item">
<button class="button" @click.prevent="openPost">New Post</button>
</div>
<div class="level-item">
<button class="button" @click.prevent="openFeedFollower('')">Add feed</button>
</div>
</div>
</div>
<new-post class="mt-20" v-if="showPost" @close="showPost = false"></new-post>
<Timeline style="margin-top:20px" :timeline="this.$store.state.timeline" :channel="channel" <Timeline style="margin-top:20px" :timeline="this.$store.state.timeline" :channel="channel"
@getPage="getPage" @followFeed="openFeedFollower(arguments[0])"></Timeline> @getPage="getPage" @followFeed="openFeedFollower(arguments[0])"></Timeline>
</div> </div>
@ -43,7 +54,8 @@
data() { data() {
return { return {
feedFollowerIsOpen: false, feedFollowerIsOpen: false,
feedFollowerQuery: '' feedFollowerQuery: '',
showPost: false
} }
}, },
@ -58,8 +70,6 @@
methods: { methods: {
openFeedFollower(query) { openFeedFollower(query) {
// eslint-disable-next-line
console.log(query)
this.feedFollowerIsOpen = true this.feedFollowerIsOpen = true
this.feedFollowerQuery = query this.feedFollowerQuery = query
}, },
@ -77,6 +87,9 @@
this.$store.dispatch('fetchTimeline', next).then(() => { this.$store.dispatch('fetchTimeline', next).then(() => {
window.scrollTo({top: 0}) window.scrollTo({top: 0})
}) })
},
openPost() {
this.showPost = true
} }
}, },