Add search event listeners on graphs
This commit is contained in:
parent
fdf4c6628f
commit
c8f0ee8b3b
@ -24,7 +24,9 @@
|
|||||||
|
|
||||||
const preferencesPromise = getPreferences();
|
const preferencesPromise = getPreferences();
|
||||||
|
|
||||||
const refreshWith = async (search: string, days: number) => {
|
const refreshWith = async (searchNew: string, days: number) => {
|
||||||
|
search = searchNew
|
||||||
|
|
||||||
active = true;
|
active = true;
|
||||||
try {
|
try {
|
||||||
[sourceData, preferences] = await Promise.all([
|
[sourceData, preferences] = await Promise.all([
|
||||||
@ -44,6 +46,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
refreshWith(search, days);
|
refreshWith(search, days);
|
||||||
|
|
||||||
|
const browserSearch = (event: CustomEvent) => {
|
||||||
|
const query = `${search} ${event.detail.query}`
|
||||||
|
bridgeCommand(`browserSearch:${query}`)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if controller}
|
{#if controller}
|
||||||
@ -65,7 +72,8 @@
|
|||||||
{preferences}
|
{preferences}
|
||||||
{revlogRange}
|
{revlogRange}
|
||||||
{i18n}
|
{i18n}
|
||||||
{nightMode} />
|
{nightMode}
|
||||||
|
on:search={browserSearch} />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user