From 0bd39309c8ba839191684d5d34c247c0af7b42aa Mon Sep 17 00:00:00 2001 From: Nikita Pustovoi Date: Sat, 5 Mar 2022 18:07:35 +1300 Subject: ui: allow importing tunnel from an QR image stored on the device Add a new feature to import a tunnel from a saved QR image, this feature integrates into 'import from file' flow, however adds a condition, if file is an image, attempt to parse it as QR image file. My use case for this feature, is to allow easier sharing of tunnels to family. Scanning QR code is ok when you have an external display to show it, but if you sent QR code to someone, there is no way to import it in the app. If you share a config file, that becomes way harder for a non-technical person to import as now they need to find a file with that name in the file picker etc etc, Where the images are very visible in the file picker, and user can easily recognize it for import. Testing: - Click "+" blue button, try to import a valid `.conf` file - the 'original' file flow should not be affected - Click "+" blue button, try to import a valid QR code image - if QR code was parsed, then a new tunnel will be added. - Click "+" blue button, try to import an invalid QR code image - Error message will be shown Signed-off-by: Nikita Pustovoi Signed-off-by: Harsh Shandilya --- ui/src/main/res/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/src/main/res/values/strings.xml') diff --git a/ui/src/main/res/values/strings.xml b/ui/src/main/res/values/strings.xml index 2754c632..6c090199 100644 --- a/ui/src/main/res/values/strings.xml +++ b/ui/src/main/res/values/strings.xml @@ -80,6 +80,8 @@ Unknown section Value out of range File must be .conf or .zip + QR code not found in image + QR code checksum verification failed Cancel Cannot delete configuration file %s Configuration for ā€œ%sā€ already exists -- cgit v1.2.3-59-g8ed1b