Merge pull request #2388 from pixelfed/staging

Update SearchResults component
This commit is contained in:
daniel 2020-08-20 20:27:35 -06:00 committed by GitHub
commit b75e0aa6c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 15 deletions

2
public/js/search.js vendored

File diff suppressed because one or more lines are too long

View file

@ -23,7 +23,7 @@
"/js/quill.js": "/js/quill.js?id=00f2dca2463b3c9d3920", "/js/quill.js": "/js/quill.js?id=00f2dca2463b3c9d3920",
"/js/rempos.js": "/js/rempos.js?id=b0e81561d85612cf9aab", "/js/rempos.js": "/js/rempos.js?id=b0e81561d85612cf9aab",
"/js/rempro.js": "/js/rempro.js?id=bfe52f1149330c486da7", "/js/rempro.js": "/js/rempro.js?id=bfe52f1149330c486da7",
"/js/search.js": "/js/search.js?id=4920eaab2c3c68947ffe", "/js/search.js": "/js/search.js?id=0c1e20a004ada75853ec",
"/js/status.js": "/js/status.js?id=5aa655780506cde35b92", "/js/status.js": "/js/status.js?id=5aa655780506cde35b92",
"/js/story-compose.js": "/js/story-compose.js?id=8768fd0f62554e98ef10", "/js/story-compose.js": "/js/story-compose.js?id=8768fd0f62554e98ef10",
"/js/theme-monokai.js": "/js/theme-monokai.js?id=3b6e62701f12b717cc5c", "/js/theme-monokai.js": "/js/theme-monokai.js?id=3b6e62701f12b717cc5c",

View file

@ -343,7 +343,8 @@ export default {
showPlaces: false, showPlaces: false,
placesCursor: 1, placesCursor: 1,
placesCache: [], placesCache: [],
placesSearchEnabled: false placesSearchEnabled: false,
searchVersion: 2
} }
}, },
beforeMount() { beforeMount() {
@ -443,7 +444,7 @@ export default {
params: { params: {
'q': this.query, 'q': this.query,
'src': 'metro', 'src': 'metro',
'v': 2, 'v': this.searchVersion,
'scope': 'all' 'scope': 'all'
} }
}).then(res => { }).then(res => {
@ -457,7 +458,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });
break; break;
@ -467,7 +467,7 @@ export default {
params: { params: {
'q': this.query, 'q': this.query,
'src': 'metro', 'src': 'metro',
'v': 1, 'v': this.searchVersion,
'scope': 'remote' 'scope': 'remote'
} }
}).then(res => { }).then(res => {
@ -485,7 +485,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });
break; break;
@ -495,7 +494,7 @@ export default {
params: { params: {
'q': this.query.slice(1), 'q': this.query.slice(1),
'src': 'metro', 'src': 'metro',
'v': 1, 'v': this.searchVersion,
'scope': 'hashtag' 'scope': 'hashtag'
} }
}).then(res => { }).then(res => {
@ -506,7 +505,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });
break; break;
@ -516,7 +514,7 @@ export default {
params: { params: {
'q': this.query, 'q': this.query,
'src': 'metro', 'src': 'metro',
'v': 1, 'v': this.searchVersion,
'scope': 'profile' 'scope': 'profile'
} }
}).then(res => { }).then(res => {
@ -527,7 +525,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });
break; break;
@ -537,7 +534,7 @@ export default {
params: { params: {
'q': this.query, 'q': this.query,
'src': 'metro', 'src': 'metro',
'v': 1, 'v': this.searchVersion,
'scope': 'webfinger' 'scope': 'webfinger'
} }
}).then(res => { }).then(res => {
@ -548,7 +545,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });
break; break;
@ -582,7 +578,7 @@ export default {
params: { params: {
'q': this.query, 'q': this.query,
'src': 'metro', 'src': 'metro',
'v': 2, 'v': this.searchVersion,
'scope': 'all', 'scope': 'all',
'page': this.placesCursor 'page': this.placesCursor
} }
@ -593,7 +589,6 @@ export default {
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
console.log(err);
this.networkError = true; this.networkError = true;
}); });