Update:Handle navigating to library item pages when server connection goes down

- Added loading indicator to library item page on initial request to server
- Redirect to downloaded item page if server item request fails
This commit is contained in:
advplyr 2024-02-04 15:46:26 -06:00
parent d03949f5d1
commit 8fc2058db8
4 changed files with 85 additions and 50 deletions

View file

@ -139,7 +139,7 @@ export default {
console.log(`[default] Got server config, attempt authorize ${serverConfig.address}`)
const authRes = await this.postRequest(`${serverConfig.address}/api/authorize`, null, { Authorization: `Bearer ${serverConfig.token}` }, 10000).catch((error) => {
const authRes = await this.postRequest(`${serverConfig.address}/api/authorize`, null, { Authorization: `Bearer ${serverConfig.token}` }, 6000).catch((error) => {
console.error('[default] Server auth failed', error)
return false
})