app now only allows a single instance
This commit is contained in:
@ -52,7 +52,7 @@ func (a *App) AniListLogin() {
|
||||
refreshToken, err := aniRing.Get("anilistRefreshToken")
|
||||
if err != nil || len(accessToken.Data) == 0 {
|
||||
getAniListCodeUrl := "https://anilist.co/api/v2/oauth/authorize?client_id=" + Environment.ANILIST_APP_ID + "&redirect_uri=" + Environment.ANILIST_CALLBACK_URI + "&response_type=code"
|
||||
runtime.BrowserOpenURL(a.ctx, getAniListCodeUrl)
|
||||
runtime.BrowserOpenURL(*wailsContext, getAniListCodeUrl)
|
||||
|
||||
serverDone := &sync.WaitGroup{}
|
||||
serverDone.Add(1)
|
||||
@ -97,7 +97,7 @@ func (a *App) handleAniListCallback(wg *sync.WaitGroup) {
|
||||
Key: "anilistRefreshToken",
|
||||
Data: []byte(aniListJwt.RefreshToken),
|
||||
})
|
||||
_, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{
|
||||
_, err := runtime.MessageDialog(*wailsContext, runtime.MessageDialogOptions{
|
||||
Title: "AniList Authorization",
|
||||
Message: "It is now safe to close your browser tab",
|
||||
})
|
||||
|
Reference in New Issue
Block a user