Capacitor: Android: LeapChat login and WS connection work!!! 🎉#326
Open
elimisteve wants to merge 21 commits intocapacitorjsfrom
Open
Capacitor: Android: LeapChat login and WS connection work!!! 🎉#326elimisteve wants to merge 21 commits intocapacitorjsfrom
elimisteve wants to merge 21 commits intocapacitorjsfrom
Conversation
elimisteve
commented
Mar 2, 2023
| if (Capacitor.isNativePlatform()){ | ||
| authUrl = "http://192.168.1.247:8080/api/login"; | ||
| if (Capacitor.isNativePlatform()) { | ||
| authUrl = "http://10.0.2.2:8080/api/login"; |
Member
Author
There was a problem hiding this comment.
We should probably create global constants like NATIVE_BASE_URL or whatever, but I've hardcoded this for now.
elimisteve
commented
Mar 2, 2023
| import { Capacitor } from '@capacitor/core'; | ||
|
|
||
| let wsUrl = `${window.location.origin.replace('http', 'ws')}/api/ws/messages/all`; | ||
| if (Capacitor.isNativePlatform()) { |
Member
Author
There was a problem hiding this comment.
I did what was quickest to get something working, but we should probably do this conditional once, in one place, and define what are effectively global constants which we then export, then import in places like this.
But... IT WORKS!!!
...for easing testing now and to add to conditional logic soon ™️
Member
Author
|
Closing this because @jimmcgaw already merged these commits into |
I used document.location.hash to store the passphrase of the current room, even in Capacitor And I used localStorage["roomList"] to store the list of LeapChat rooms the user has visited TODO: Make it so clicking on another room you already visited takes you to that room
…le, not $funky-purple
switch rooms
QR code on invite screen
No more ridiculous error: ionic-team/capacitor#2183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The emoji image is broken but WHO CARES!!! All these work now:
/api/login(and turn intoBlobto pass to miniLock) => Successful login!