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