Skip to content

Feature/qr code#198

Merged
micahnyc merged 15 commits intomasterfrom
feature/qr-code
Feb 27, 2026
Merged

Feature/qr code#198
micahnyc merged 15 commits intomasterfrom
feature/qr-code

Conversation

@micahnyc
Copy link
Copy Markdown
Contributor

@micahnyc micahnyc commented Feb 4, 2026

Added a menu modal for showing a QR code to open the routes page on a device. Open to any/all changes.

Note: in order to use this in dev mode, you must change your enviornment.js and set your computers IP address instead of localhost.

Note: once we fix this issue on openspace: OpenSpace/OpenSpace#1804 we can get rid of the first Alert box, but I think we will always need the 2nd alert box because of security.

@ylvaselling
Copy link
Copy Markdown
Collaborator

Cool! Very useful

  • Can we use the properties for allow address and ip so that you can set them during runtime? So for example by adding the properties to the modal (see image below). I tried it and it seems to work.
image
  • In the same vein, use the Modules.WebGui.Address property instead of the window location? That way you can update the QR code during runtime. Might also be more reliable. I got localhost when running built version before changing it to the property, for some reason.
  • I couldnt get the GUI to connect to OpenSpace (I got the gui showing up but it had the "houston, are disconnected..." modal up). Turns out it was because the dev mode qr code was using the wrong port. How about that the port is set as well from a property instead of the window? That way it would work in dev mode too.
  • I found myself wanting to copy text from the modal, maybe make the text selectable? See styles below
import styles from '@/theme/global.module.css';
className={styles.selectable}
  • If we swap the modal to using properties, we don't really need to mention the .cfg than at the end of the modal.
  • Also, maybe we should give the users a hint on how to find their IP? Like "open a terminal and type in ipconfig on windows. Find the IPv4 property" or something.
  • Make the QR code centered in the left hand side column?

Copy link
Copy Markdown
Collaborator

@ylvaselling ylvaselling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice idea!

Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
micahnyc and others added 5 commits February 6, 2026 11:04
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
@micahnyc
Copy link
Copy Markdown
Contributor Author

micahnyc commented Feb 6, 2026

I updated with all of your suggestions, however I couldn't get the address property to work without having to change it in the openspace.cfg (I was able to get the allow to work by changing at runtime)

I think the problem comes from here: https://github.com/OpenSpace/OpenSpace-WebGuiBackend/blob/fb89a8ca4a4e645f558a692a4c59548650d7df2b/backend.js#L97 where we are sending that value to the gui but not pulling it from the engine on demand.

Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
@alexanderbock alexanderbock self-requested a review February 9, 2026 15:40
@micahnyc
Copy link
Copy Markdown
Contributor Author

Current screenshot
image

Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
Comment thread src/components/QRCode/QRCode.tsx Outdated
micahnyc and others added 3 commits February 26, 2026 12:02
Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Comment thread public/locales/en/components.json Outdated
Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
@micahnyc micahnyc merged commit 36c97ef into master Feb 27, 2026
@micahnyc micahnyc deleted the feature/qr-code branch February 27, 2026 15:35
WeirdRubberDuck added a commit to OpenSpace/OpenSpace that referenced this pull request Mar 18, 2026
* Windown panel reordering OpenSpace/OpenSpace-WebGui#202
* Fixes #3914
* QR code emnu modal to open GUI in browser: OpenSpace/OpenSpace-WebGui#198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants