diff --git a/CHANGELOG.md b/CHANGELOG.md index ae3d1bf0..1ccd763f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- links to the app info in web app +- Links to the app info in web app +- Loading indicator for search page in web app ### Fixed diff --git a/playlet-web/src/lib/ScreenSearch.svelte b/playlet-web/src/lib/ScreenSearch.svelte index 6b02037f..4981fce3 100644 --- a/playlet-web/src/lib/ScreenSearch.svelte +++ b/playlet-web/src/lib/ScreenSearch.svelte @@ -14,6 +14,7 @@ let suggestions: { suggestions: any[] } = { suggestions: [] }; let videos = []; let searchHistory = []; + let isLoading = false; playletStateStore.subscribe((value) => { invidiousApi.instance = value?.invidious?.current_instance; @@ -76,7 +77,13 @@ return; } - videos = await invidiousApi.search(searchBoxText); + try { + isLoading = true; + videos = await invidiousApi.search(searchBoxText); + } finally { + isLoading = false; + } + const newSearchHistory = await PlayletApi.putSearchHistory(searchBoxText); searchHistoryStore.set(newSearchHistory); } @@ -134,6 +141,12 @@