mirror of
https://github.com/PaiGramTeam/luoxu-api-pub.git
synced 2024-11-22 07:08:05 +00:00
filter search results by sender
This commit is contained in:
parent
f1d931107c
commit
c772025148
@ -98,8 +98,11 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
error = ''
|
error = ''
|
||||||
console.log(`searching ${query} for group ${group}, older than ${more}`)
|
console.log(`searching ${query} for group ${group}, older than ${more}, from ${sender}`)
|
||||||
const q = `g=${group}&q=${encodeURIComponent(query)}`
|
let q = `g=${group}&q=${encodeURIComponent(query)}`
|
||||||
|
if(sender) {
|
||||||
|
q += `&sender=${sender}`
|
||||||
|
}
|
||||||
let url
|
let url
|
||||||
if(!more) {
|
if(!more) {
|
||||||
location.hash = `#${q}`
|
location.hash = `#${q}`
|
||||||
@ -164,7 +167,7 @@
|
|||||||
on:input={() => error = ''}
|
on:input={() => error = ''}
|
||||||
on:keydown={e => {if(e.key == 'Enter'){do_search()}}}
|
on:keydown={e => {if(e.key == 'Enter'){do_search()}}}
|
||||||
/>
|
/>
|
||||||
<Name group={group} selected={sender}/>
|
<Name group={group} bind:selected={sender}/>
|
||||||
<button on:click={() => do_search()}>搜索</button>
|
<button on:click={() => do_search()}>搜索</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user