mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Get rid of obsolete /search/hashtag page
@Tirokk there is this neat URL module: https://nodejs.org/api/url.html It has convenience methods for adding query params. I'm just not quite sure about browser compatibility though.
This commit is contained in:
parent
20c118eab1
commit
ec19c732e5
@ -491,6 +491,8 @@ export default {
|
|||||||
// we have to replace our suggestion text with a mention
|
// we have to replace our suggestion text with a mention
|
||||||
// so it's important to pass also the position of your suggestion text
|
// so it's important to pass also the position of your suggestion text
|
||||||
selectItem(item) {
|
selectItem(item) {
|
||||||
|
const searchUrl = new URL('/')
|
||||||
|
searchUrl.searchParams.set('hashtag', item.name)
|
||||||
const typeAttrs = {
|
const typeAttrs = {
|
||||||
mention: {
|
mention: {
|
||||||
// TODO: use router here
|
// TODO: use router here
|
||||||
@ -499,7 +501,7 @@ export default {
|
|||||||
},
|
},
|
||||||
hashtag: {
|
hashtag: {
|
||||||
// TODO: Fill up with input hashtag in search field
|
// TODO: Fill up with input hashtag in search field
|
||||||
url: `/search/hashtag/${item.name}`,
|
url: searchUrl.href,
|
||||||
label: item.name,
|
label: item.name,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
user: { type: Object, required: true },
|
user: { type: Object, required: true },
|
||||||
hashtag: { type: Object, default: null },
|
hashtag: { type: String, default: null },
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
mounted() {
|
|
||||||
const { id: hashtag } = this.$route.params
|
|
||||||
this.$router.push({ path: '/', query: { hashtag } })
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user