diff --git a/webapp/components/generic/SearchableInput/SearchableInput.vue b/webapp/components/generic/SearchableInput/SearchableInput.vue
index 3260ff082..8c29366da 100644
--- a/webapp/components/generic/SearchableInput/SearchableInput.vue
+++ b/webapp/components/generic/SearchableInput/SearchableInput.vue
@@ -99,14 +99,21 @@ export default {
this.$emit('query', this.value)
}, this.delay)
},
- /**
- * TODO: on enter we should go to a dedicated search page!?
- */
onEnter(event) {
- clearTimeout(this.searchProcess)
- if (!this.loading) {
- this.previousSearchTerm = this.unprocessedSearchInput
- this.$emit('query', this.unprocessedSearchInput)
+ if (this.$router.history.current.path === '/search/search-results') {
+ this.$store.commit('search/SET_VALUE', {
+ searchValue: this.unprocessedSearchInput,
+ })
+
+ this.$router.replace({
+ path: '/search/search-results',
+ query: { item: this.unprocessedSearchInput },
+ })
+ } else {
+ this.$router.replace({
+ path: '/search/search-results',
+ query: { item: this.unprocessedSearchInput },
+ })
}
},
onDelete(event) {
diff --git a/webapp/pages/search/search-results.vue b/webapp/pages/search/search-results.vue
new file mode 100644
index 000000000..abfe8c1e4
--- /dev/null
+++ b/webapp/pages/search/search-results.vue
@@ -0,0 +1,89 @@
+
+
+
+ close
+
+
+
+
+ {{ searchResults.length }}
+ Results for:
+ {{ value }}
+
+
+
+ Beiträge
+ User
+
+
+ {{ searchResults }}
+
+
+
+
+
+
+
diff --git a/webapp/store/search.js b/webapp/store/search.js
new file mode 100644
index 000000000..a10649de1
--- /dev/null
+++ b/webapp/store/search.js
@@ -0,0 +1,17 @@
+export const state = () => {
+ return {
+ searchValue: '',
+ }
+}
+
+export const mutations = {
+ SET_VALUE(state, ctx) {
+ state.searchValue = ctx.searchValue || ''
+ },
+}
+
+export const getters = {
+ searchValue(state) {
+ return state.searchValue
+ },
+}