2019-02-15 06:52:21 +01:00
|
|
|
<template>
|
|
|
|
<x-column>
|
2019-02-18 03:13:56 +01:00
|
|
|
<template #header>
|
2019-02-15 06:52:21 +01:00
|
|
|
<fa icon="search"/><span>{{ q }}</span>
|
2019-02-18 01:48:00 +01:00
|
|
|
</template>
|
2019-02-15 06:52:21 +01:00
|
|
|
|
|
|
|
<div>
|
2019-05-20 20:07:11 +02:00
|
|
|
<x-notes ref="timeline" :pagination="pagination" @inited="() => $emit('loaded')"/>
|
2019-02-15 06:52:21 +01:00
|
|
|
</div>
|
|
|
|
</x-column>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import XColumn from './deck.column.vue';
|
|
|
|
import XNotes from './deck.notes.vue';
|
2019-04-25 00:46:39 +02:00
|
|
|
import { genSearchQuery } from '../../../common/scripts/gen-search-query';
|
2019-02-15 06:52:21 +01:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
components: {
|
|
|
|
XColumn,
|
|
|
|
XNotes
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2019-05-20 20:07:11 +02:00
|
|
|
pagination: {
|
|
|
|
endpoint: 'notes/search',
|
|
|
|
limit: 20,
|
|
|
|
params: () => genSearchQuery(this, this.q)
|
|
|
|
}
|
2019-02-15 06:52:21 +01:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
q(): string {
|
|
|
|
return this.$route.query.q;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
2019-02-18 01:17:55 +01:00
|
|
|
$route() {
|
|
|
|
this.$refs.timeline.reload();
|
2019-02-15 06:52:21 +01:00
|
|
|
}
|
2019-02-18 01:17:55 +01:00
|
|
|
},
|
2019-02-15 06:52:21 +01:00
|
|
|
});
|
|
|
|
</script>
|