Add following from the timeline entry
This commit is contained in:
parent
b7dfcdf0f0
commit
0530394990
|
@ -24,6 +24,8 @@
|
|||
<div><a :href="author_url">{{ author_name }}</a>
|
||||
·
|
||||
<a :href="currentItem.url" target="_new"><span class="published" v-html="niceTime"></span></a>
|
||||
·
|
||||
<button class="button is-small" @click="$emit('followFeed', author_url)">Follow</button>
|
||||
</div>
|
||||
|
||||
<h3 class="title is-6" v-if="currentItem.name" v-text="currentItem.name"></h3>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
export default {
|
||||
name: "FeedFollower",
|
||||
components: {FeedChooser, Timeline},
|
||||
props: ['isOpen', 'channel'],
|
||||
props: ['isOpen', 'channel', 'initialQuery'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
@ -62,6 +62,8 @@
|
|||
// eslint-disable-next-line no-unused-vars
|
||||
isOpen(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.query = this.initialQuery
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$refs.query.focus()
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :class="this.className">
|
||||
<div class="timeline--item" v-for="item in items" :key="item.id">
|
||||
<TimelineEntry :item="item" @debug="debug" @markRead="markRead(channel.uid, ...arguments)"
|
||||
<TimelineEntry :item="item" @debug="debug" @markRead="markRead(channel.uid, ...arguments)" @followFeed="$emit('followFeed', arguments[0])"
|
||||
:is-main-entry="true"/>
|
||||
</div>
|
||||
<div class="level">
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
<new-post class="mt-20"></new-post>
|
||||
<h1 class="title is-5 mt-20">{{ channel.name }}</h1>
|
||||
<Timeline style="margin-top:20px" :timeline="this.$store.state.timeline" :channel="channel"
|
||||
@getPage="getPage"></Timeline>
|
||||
@getPage="getPage" @followFeed="openFeedFollower(arguments[0])"></Timeline>
|
||||
</div>
|
||||
|
||||
<div class="column"></div>
|
||||
|
||||
<channel-creator :is-open="this.$store.state.channelCreatorIsOpen"></channel-creator>
|
||||
<feed-follower :is-open="feedFollowerIsOpen" @close="closeFeedFollower" :channel="channel"></feed-follower>
|
||||
<feed-follower :is-open="feedFollowerIsOpen" @close="closeFeedFollower" :channel="channel" :initial-query="feedFollowerQuery"></feed-follower>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
|||
data() {
|
||||
return {
|
||||
feedFollowerIsOpen: false,
|
||||
feedFollowerQuery: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -56,8 +57,11 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
openFeedFollower() {
|
||||
openFeedFollower(query) {
|
||||
// eslint-disable-next-line
|
||||
console.log(query)
|
||||
this.feedFollowerIsOpen = true
|
||||
this.feedFollowerQuery = query
|
||||
},
|
||||
closeFeedFollower() {
|
||||
this.feedFollowerIsOpen = false
|
||||
|
|
Loading…
Reference in New Issue
Block a user