fix(desktop): use stored URL instead of window.API_URL in template
window is not accessible as a global in Vue templates, causing "Cannot read properties of undefined (reading 'API_URL')" when clicking sign in on the desktop app.
This commit is contained in:
parent
eeb9caf87b
commit
af7eaa9aea
|
|
@ -18,7 +18,7 @@
|
|||
<XButton
|
||||
:loading="waitingForAuth"
|
||||
class="is-fullwidth"
|
||||
@click="loginWithServer(window.API_URL)"
|
||||
@click="loginWithServer(storedServerUrl!)"
|
||||
>
|
||||
{{ $t('user.auth.login') }}
|
||||
</XButton>
|
||||
|
|
@ -87,7 +87,8 @@ const {redirectIfSaved} = useRedirectToLastVisited()
|
|||
|
||||
const waitingForAuth = ref(false)
|
||||
const errorMessage = ref('')
|
||||
const hasStoredServer = localStorage.getItem('API_URL') !== null
|
||||
const storedServerUrl = localStorage.getItem('API_URL')
|
||||
const hasStoredServer = storedServerUrl !== null
|
||||
const showCustomServerInput = ref(false)
|
||||
|
||||
listenForDesktopOAuthTokens(async (tokens) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue