From 6f24f066d6275849ca3c33942ce5c044923c9550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 9 Jul 2019 14:39:28 +0200 Subject: [PATCH] Revert "Get rid of obsolete /search/hashtag page" This reverts commit ec19c732e5678544d8dfd50c25f2c33e5aeb217e. Ok, native module URL cannot parse relative URLs. It ensures that all parts of the URL are present. So I'll revert this to get the ball rolling. We can refactor out the obsolete page later on. FYI @Tirokk --- webapp/components/Editor/Editor.vue | 4 +--- webapp/components/FilterMenu/FilterMenu.vue | 2 +- webapp/pages/search/hashtag/_id.vue | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 webapp/pages/search/hashtag/_id.vue diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index 1d9c41129..4413bfa0d 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -491,8 +491,6 @@ export default { // we have to replace our suggestion text with a mention // so it's important to pass also the position of your suggestion text selectItem(item) { - const searchUrl = new URL('/') - searchUrl.searchParams.set('hashtag', item.name) const typeAttrs = { mention: { // TODO: use router here @@ -501,7 +499,7 @@ export default { }, hashtag: { // TODO: Fill up with input hashtag in search field - url: searchUrl.href, + url: `/search/hashtag/${item.name}`, label: item.name, }, } diff --git a/webapp/components/FilterMenu/FilterMenu.vue b/webapp/components/FilterMenu/FilterMenu.vue index 2640cfead..9bfb3ddba 100644 --- a/webapp/components/FilterMenu/FilterMenu.vue +++ b/webapp/components/FilterMenu/FilterMenu.vue @@ -49,7 +49,7 @@ export default { props: { user: { type: Object, required: true }, - hashtag: { type: String, default: null }, + hashtag: { type: Object, default: null }, }, data() { return { diff --git a/webapp/pages/search/hashtag/_id.vue b/webapp/pages/search/hashtag/_id.vue new file mode 100644 index 000000000..d180b4e4f --- /dev/null +++ b/webapp/pages/search/hashtag/_id.vue @@ -0,0 +1,12 @@ + + +