-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: kick screen would allow going back with lockConnect parameter #253
base: next
Are you sure you want to change the base?
fix: kick screen would allow going back with lockConnect parameter #253
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
can we refactor to have some centralized typed QS params getters. eg we can them from one place |
Yeah that would probably be good, I can look into that tomorrow. |
I think typed proxy object should be used so anywhere in the app we can just use // somefile.ts
appQueryParams.reconnectOnCrash // getter would be called that would check if query param is present at THAT moment wdym? seems ideal and clear solution |
Checking if it's present at the moment it's queried is not ideal in all cases because the user can't really change those at runtime but I get what you mean.
Well, I'm just not that well-versed in TypeScript and what features it has to offer hence why I said that I will look into it. Also are you sure it's the best solution? It seems wasteful to create a new I mean I think I have the code working for this and can adjust it everywhere if you don't think that is that big of an issue. I'm just used to not wanting to waste even a little bit of memory and garbage collector time from Java server development. |
Also while I am able to get it to work crudely via declaring a I tried this code: declare const appQueryParams = new Proxy({}, {
get (target, property) {
if (typeof property !== "string") {
return false
}
return new URLSearchParams(window.location.search)?.get(property)
},
}) as any But that throws this error:
which does not make sense as the globals are imported in the |
Sorry for asking you to make it! I actually wanted to implement it myself, will update your branch soon, sorry for the confusion. Would be good if you could focus on finishing item frames branch instead, thank you |
User description
Fix that the kick screen would still contain a button to go back to the main menu even if the connection was locked.
This hides that button (similar to the main menu) and resetting takes you back to the connection screen.
PR Type
Bug fix
Description
Fixes the issue where the "Back" button was visible on the kick screen despite the
lockConnect
parameter.Introduces a check for the
lockConnect
parameter to conditionally hide the "Back" button.Ensures consistent behavior with the locked connection state.
Changes walkthrough 📝
AppStatus.tsx
Conditional rendering of "Back" button based on `lockConnect`
src/react/AppStatus.tsx
lockConnect
parameter from URL query string.lockConnect
is true.