Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Sync profile and apps #105

Open
wants to merge 143 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
1104da9
Add sync-profile messages
G-Ray May 27, 2019
8d83545
sync: Check the db is authorized
G-Ray May 27, 2019
e8bc623
Add public profile to localstorage
G-Ray May 27, 2019
f2ce446
Profile sync
G-Ray May 28, 2019
dd60181
clear localstorage after tests
G-Ray May 28, 2019
b27f7ec
sync-profile: Move reusable functions to utils
G-Ray May 28, 2019
57fb2d5
remove comments
G-Ray May 29, 2019
127e76c
Check that synced profile is equal
G-Ray May 29, 2019
780466c
Move sync-profile to lib/
G-Ray Jul 5, 2019
4392c8c
Define and use waitForSync function
G-Ray Jul 8, 2019
32439f4
Add localKey when adding device
G-Ray Jul 8, 2019
7fed931
Update device with app localKey when adding an app
G-Ray Jul 8, 2019
1e2208a
Update device test with localKey
G-Ray Jul 9, 2019
3fc4ee0
openProfile: Register current device
G-Ray Jul 9, 2019
68ca61f
Sync and authorize other devices apps
G-Ray Jul 11, 2019
39bba35
Handle app sync logic inside in masq.js
G-Ray Jul 11, 2019
170256e
ReAdd requiredParametersDevice
G-Ray Jul 11, 2019
1d90b39
Clean up code
G-Ray Aug 7, 2019
934d90f
Devices: Add FloatingButton to open QRCodeModal
G-Ray Aug 7, 2019
512512d
Devices: add translation
G-Ray Aug 9, 2019
fb76076
TextInput: Add padding when button is set
G-Ray Aug 9, 2019
3089283
QRCode set dynamic secure link
G-Ray Aug 9, 2019
e0c42bf
QRCodeModal: Start pushProfile and sync animation
G-Ray Aug 14, 2019
a580056
sync: dispatch error on hub error
G-Ray Aug 19, 2019
6cdb03f
Upgrade router
G-Ray Aug 20, 2019
8862945
Initial sync page to pull profile successfully
G-Ray Aug 20, 2019
ca26042
Sync UI when pulling profile
G-Ray Aug 21, 2019
efc2dc3
karma: Set NODE_ENV to test
G-Ray Aug 22, 2019
bd9f32a
Fix duplicated apps DB and data when syncing
G-Ray Aug 22, 2019
9460122
throw and display error if already synced
G-Ray Aug 23, 2019
25b613c
QRCodeModal: Get masq instance from actions
G-Ray Aug 28, 2019
2895fd4
masqs: Define standalone function syncApps
G-Ray Aug 28, 2019
ec1ce91
syncApps: Use if/else for better readability
G-Ray Aug 29, 2019
aac0046
Index dbs by dbName only
G-Ray Aug 29, 2019
5aed5e3
prevent duplicated apps entries in devices
G-Ray Aug 29, 2019
da1c9b2
Update package-lock
G-Ray Sep 5, 2019
b364211
lint
G-Ray Sep 5, 2019
5e3189b
Fetch and display synced devices
G-Ray Sep 3, 2019
39f0c7f
Append count to device name
G-Ray Sep 4, 2019
672c673
lint
G-Ray Sep 6, 2019
1772741
Fix notification position
G-Ray Sep 6, 2019
c8746ac
AddProfile Modal
G-Ray Sep 4, 2019
cd08481
SyncUrl modal
G-Ray Sep 6, 2019
2eb1201
Add SyncUrl to Login page
G-Ray Sep 5, 2019
68f31be
Update fr.json
G-Ray Sep 9, 2019
adddc00
Call Sync process from AddProfile
G-Ray Sep 9, 2019
b554d5d
Start SyncUrl from landing
G-Ray Sep 9, 2019
c62bd61
Update translations
G-Ray Sep 10, 2019
86f7699
Update package-lock
G-Ray Sep 12, 2019
4125869
Fix syncing modal
G-Ray Sep 12, 2019
4717349
Display AddProfile modal when linking app
G-Ray Sep 12, 2019
74e200b
Login: Set z-index to plus square
G-Ray Sep 12, 2019
adf0643
SyncUrl: Update go back button text
G-Ray Sep 12, 2019
4dc3451
Devices: Set FloatingButton as fixed
G-Ray Sep 12, 2019
a0f45a0
SyncUrl: Fix mobile style
G-Ray Sep 12, 2019
ab9ebfd
Sync: Fix fetchUsers call when sync is complete
G-Ray Sep 16, 2019
ef39a93
Add password modal during sync
G-Ray Sep 18, 2019
b4caa15
Login: remove unused Sync component
G-Ray Sep 18, 2019
4915a5a
Split pullProfile into two steps, handle canceling
G-Ray Sep 19, 2019
cdc1403
Workaround for chrome when cancelling sync
G-Ray Sep 19, 2019
ef1313d
Update i18n
G-Ray Sep 20, 2019
37723a0
rm comments
G-Ray Sep 20, 2019
71290db
Fix password logic
G-Ray Sep 25, 2019
df3278a
Sync: Fix password check
G-Ray Sep 25, 2019
defac4e
Use switch statement
G-Ray Sep 25, 2019
7d6f993
Add QrCode onboarding (#162)
leventdem Sep 26, 2019
f0a4988
Add Scanner modal
G-Ray Sep 23, 2019
60424a4
Scanner: Add crosshair
G-Ray Sep 24, 2019
d73bceb
Scanner: Update i18n
G-Ray Sep 24, 2019
65a9185
Scanner: Ask for media permission
G-Ray Sep 25, 2019
5de0ce4
Remove scanner from app.jsx
G-Ray Sep 26, 2019
5f00efc
Add error message when sync link is invalid
G-Ray Sep 26, 2019
ff75ebf
Scanner: remove Space before title
G-Ray Sep 26, 2019
0806411
Display scanner when button is clicked
G-Ray Sep 26, 2019
0dfe48a
AddProfile: align title
G-Ray Sep 26, 2019
4820b7b
Center title-modal typography
G-Ray Sep 26, 2019
587d79e
Scan and replace location
G-Ray Sep 26, 2019
7f46fe9
Fix modal display bug on mobile
G-Ray Sep 26, 2019
5106f21
Move onboarding logic for copy to SyncUrl
G-Ray Sep 26, 2019
24cdccc
SyncDevice: Add pading on modal
G-Ray Sep 27, 2019
757b133
Button: Set min height
G-Ray Sep 27, 2019
af40913
Scanner: Handle error instead of asking for perms
G-Ray Sep 27, 2019
587905b
Decrease Signup padding
G-Ray Sep 27, 2019
d37140e
Remove log
G-Ray Sep 27, 2019
da615c3
update click behaviour of already got a profile button for mobile (#164)
leventdem Sep 27, 2019
60e6d1c
fix text, by default onSave transforms ' into \i which causes issue x…
leventdem Sep 27, 2019
6d31397
remove all vertical spaces and add space-around attribute
leventdem Sep 27, 2019
df287aa
Revert "Fix modal display bug on mobile"
G-Ray Sep 27, 2019
dd90cc9
Modal: Remove padding-left and right on mobile
G-Ray Sep 27, 2019
873745d
Sync: Use publicProfile sent from peer
G-Ray Sep 27, 2019
09a226c
Avatar: Set min-width and min-height
G-Ray Sep 27, 2019
08f99e2
Setting: move title
G-Ray Sep 27, 2019
5751fb6
Scanner: bind handleError
G-Ray Sep 30, 2019
d2c33a3
Modal: Update padding on mobile
G-Ray Sep 30, 2019
0acc879
Small fixes (#165)
leventdem Sep 30, 2019
381677a
Add mobile header in modals, and simplify modal
G-Ray Oct 3, 2019
b010d70
Increase Signup width
G-Ray Oct 3, 2019
0a37d8a
Modal: remove extra margin on content
G-Ray Oct 3, 2019
32965dd
Sync: Add onClose handler
G-Ray Oct 3, 2019
08d7e19
Sync: Wait until apps dbs are writable
G-Ray Oct 1, 2019
9807b23
Handle end message to complete sync
G-Ray Oct 1, 2019
1711061
Refresh profile (#168)
leventdem Oct 4, 2019
733923e
Check if during pull profile an existing profile has the same usernam…
leventdem Oct 4, 2019
eb94bef
Margin: Set default padding to 32
G-Ray Oct 4, 2019
e4f54c7
Modal: Fix defaultProps
G-Ray Oct 7, 2019
172908b
Modal: Set padding 0 as important on mobile
G-Ray Oct 7, 2019
f6ae150
Sync: Fix incorrect link detection
G-Ray Oct 8, 2019
e0ed216
Modal: Set min-height on mobile header
G-Ray Oct 7, 2019
0622996
Update SyncUrl title
G-Ray Oct 8, 2019
b91f811
SyncUrl : Remove extra go back button
G-Ray Oct 8, 2019
b3f97dd
DeleteAppDialog: Remove app name from title
G-Ray Oct 8, 2019
96ca5b4
mobileHeader only on some modals
G-Ray Oct 8, 2019
6f89f91
Revert "SyncUrl : Remove extra go back button"
G-Ray Oct 8, 2019
e0d0b31
SyncUrl: Remove go back button on mobile
G-Ray Oct 8, 2019
e9e5350
Handle goBack from addProfile modal
G-Ray Oct 8, 2019
fbea9d3
Signup: keyboard accessibility
G-Ray Oct 8, 2019
fbadec4
Sync: Close when on error
G-Ray Oct 8, 2019
d3c6b29
SyncUrl: Use form
G-Ray Oct 9, 2019
234225f
Setting: wrap inputs within a form
G-Ray Oct 9, 2019
b2559d1
Modal: Set overflow to improve autofocus
G-Ray Oct 9, 2019
d3966dd
App check for profile watcher before destroy
G-Ray Oct 9, 2019
8a66465
Settings: Add autoComplete properties
G-Ray Oct 10, 2019
fa5a427
PasswordEdit: Use form
G-Ray Oct 10, 2019
7b85e24
Signup: Remove handleKeyUp
G-Ray Oct 10, 2019
bb7954b
Wrap Login password field in a form
G-Ray Oct 10, 2019
5069a3a
fix center of next button
leventdem Oct 11, 2019
9fbbddf
Rebase timout (#180)
leventdem Oct 11, 2019
b92610f
package.json, package-lock.json: Update signalhubws dependency
sujeebant Oct 9, 2019
1aae3d9
Login: preventDefault of form action
G-Ray Oct 11, 2019
4a050af
update fr and en translation (#182)
leventdem Oct 14, 2019
1a59df4
containers/Landing: change layout of landing page
sujeebant Oct 15, 2019
4bbe32a
Modals - fix margin and improve responsiveness (#181)
G-Ray Oct 17, 2019
31460ea
Add migration for new release (#186)
leventdem Oct 17, 2019
1849a7a
Handle sync url with redux
G-Ray Oct 17, 2019
35d6e2d
Sync: Silent fail if peer is offline when aborting
G-Ray Oct 17, 2019
a246c9c
Sync: listen on url change
G-Ray Oct 17, 2019
a71339b
Sync modals are not closable
G-Ray Oct 17, 2019
cde82bb
sync-profile: fix aborting process
G-Ray Oct 17, 2019
3e4964c
fix font size and color for syncMethod modal (#188)
leventdem Oct 22, 2019
8b87146
Workaround to effectively delete db on app load
G-Ray Oct 22, 2019
1b051f4
Fix remoeProfile test
G-Ray Oct 22, 2019
682b60d
TextField: Set min-height
G-Ray Oct 23, 2019
ca620cf
Remove log
G-Ray Oct 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
@@ -1,5 +1,6 @@
EXTEND_ESLINT=true
REACT_APP_SIGNALHUB_URLS='localhost:8080'
REACT_APP_REMOTE_WEBRTC=false
REACT_APP_VERSION=0.16
# REACT_APP_STUN_URLS
# REACT_APP_TURN_URLS
3 changes: 2 additions & 1 deletion .eslintrc.js
Expand Up @@ -7,7 +7,8 @@ module.exports = {
overrides: [{
files: '*.test.js',
rules: {
'no-unused-expressions': 'off'
'no-unused-expressions': 'off',
'import/first': 'off'
}
}],
settings: {
Expand Down
11 changes: 9 additions & 2 deletions karma.conf.js
@@ -1,3 +1,5 @@
const webpack = require('webpack')

process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = function (config) {
Expand All @@ -13,13 +15,18 @@ module.exports = function (config) {
singleRun: true,
concurrency: Infinity,
preprocessors: {
'test/**/*.js': [ 'webpack', 'sourcemap' ]
'test/**/*.js': ['webpack', 'sourcemap']
},
webpack: {
mode: 'development',
node: {
fs: 'empty'
}
},
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'test'
})
]
},
webpackMiddleware: {
stats: 'errors-only',
Expand Down
3,979 changes: 1,559 additions & 2,420 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -40,14 +40,15 @@
"react-dom": "^16.6.0",
"react-feather": "^1.1.6",
"react-i18next": "^10.9.0",
"react-qr-reader": "^2.2.1",
"react-redux": "^6.0.0",
"react-responsive": "^6.1.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-responsive": "^8.0.1",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"react-scripts": "^3.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"signalhubws": "git+https://github.com/QwantResearch/signalhubws#masq",
"signalhubws": "1.0.12",
"typeface-asap": "0.0.35",
"typeface-asap-condensed": "0.0.35",
"uuid": "^3.3.2",
Expand Down
37 changes: 34 additions & 3 deletions public/locales/en.json
Expand Up @@ -9,7 +9,6 @@
"My applications": "My applications",
"You do not have a registered application yet": "You do not have a registered application yet",
"My devices": "My devices",
"Add a new devce (coming soon)": "Add a new devce (coming soon)",
"Create a new profile": "Create a new profile",
"Respects your privacy": "Respects your privacy",
"Masq allows you to store all your preferences while guaranteeing your privacy": "Masq allows you to store all your preferences while guaranteeing your privacy",
Expand Down Expand Up @@ -102,7 +101,6 @@
"Copy the following link and paste it in the browser you want to use:": "Copy the following link and paste it in the browser you want to use:",
"Link Copied !": "Link Copied !",
"Connection failure, please retry.": "Connection failure, please retry.",
"on": "on",
"This device": "This device",
"You have refused the access of the application": "You have refused the access of the application",
"to your Masq storage.": "to your Masq storage.",
Expand All @@ -119,5 +117,38 @@
"Synchronization finished!": "Synchronization finished!",
"Synchronization failure": "Synchronization failure",
"You can choose from": "You can choose from",
"1 special character ": "1 special character "
"1 special character ": "1 special character ",
"Add a new device": "Add a new device",
"This profile is already synchronized on this device.": "This profile is already synchronized on this device.",
"Add a new profile": "Add a new profile",
"Sync an existing profile": "Sync an existing profile",
"Copy the link displayed on your initial device, then paste it in the field \"link to existing profile\" on this device.": "Copy the link displayed on your initial device, then paste it in the field \"link to existing profile\" on this device.",
"Link to existing profile": "Link to existing profile",
"Synchronize": "Synchronize",
"Already got a profile ? SYNCHRONIZE IT": "Already got a profile ? SYNCHRONIZE IT",
"Okay, I get it!": "Okay, I get it!",
"How to find the profile link?": "How to find the profile link?",
"Log in to Masq from the device on which you already have a profile": "Log in to Masq from the device on which you already have a profile",
"In the \"Devices\" section, click the \"Add a device\" button": "In the \"Devices\" section, click the \"Add a device\" button",
"Copy the link displayed on your original device, then paste it in the \"existing profile link\" field on this device.": "Copy the link displayed on your original device, then paste it in the \"existing profile link\" field on this device.",
"How to display the QR code of my profile?": "How to display the QR code of my profile?",
"Using the new device, scan the QR code displayed on the original device": "Using the new device, scan the QR code displayed on the original device",
"Synchronization method": "Synchronization method",
"Scan the QR code": "Scan the QR code",
"How to display the QR code?": "How to display the QR code?",
"Copy the link displayed on your original device and paste it into this mobile:": "Copy the link displayed on your original device and paste it into this mobile:",
"Paste the profile link": "Paste the profile link",
"The sync process has been aborted, please try again.": "The sync process has been aborted, please try again.",
"Please enter you secret key to finish the synchronization process": "Please enter you secret key to finish the synchronization process",
"Scan QR code": "Scan QR code",
"Position this phone in front of your initial device to scan the QR code": "Position this phone in front of your initial device to scan the QR code",
"This synchronization link is invalid. Please go back to the profile you want to import and generate a new link or QR code.": "This synchronization link is invalid. Please go back to the profile you want to import and generate a new link or QR code.",
"Hold your device over the QR Code so that it is clearly visible within your smartphone's screen:": "Hold your device over the QR Code so that it is clearly visible within your smartphone's screen:",
"A profile with the same username already exists in this device, rename it and try again.": "A profile with the same username already exists in this device, rename it and try again.",
"Error during the synchronization. Please retry.": "Error during the synchronization. Please retry.",
"Paste profile link": "Paste profile link",
"The link has expired. Please retry with a fresh link.": "The link has expired. Please retry with a fresh link.",
"Scanner failure": "Scanner failure",
"To scan the QR code, you must allow this browser to access your camera. You can do this through your mobile settings. Warning: on iOS this is only possible with Safari.": "To scan the QR code, you must allow this browser to access your camera. You can do this through your mobile settings. Warning: on iOS this is only possible with Safari.",
"This import link is incorrect or the connection between the devices can not be done . Please, return to the profile you want to import and generate a new link or QR code.": "This import link is incorrect or the connection between the devices can not be done . Please, return to the profile you want to import and generate a new link or QR code."
}
37 changes: 34 additions & 3 deletions public/locales/fr.json
Expand Up @@ -9,7 +9,6 @@
"My applications": "Mes applications",
"You do not have a registered application yet": "Vous n'avez pas d'applications pour le moment",
"My devices": "Mes appareils",
"Add a new devce (coming soon)": "Ajouter un appareil (bientôt)",
"Create a new profile": "Créer un nouveau profil",
"Respects your privacy": "Respect de la vie privée",
"Masq allows you to store all your preferences while guaranteeing your privacy": "Masq vous permet de stocker les données personnelles de vos applications tout en garantissant le respect de votre vie privée.",
Expand Down Expand Up @@ -102,7 +101,6 @@
"Copy the following link and paste it in the browser you want to use:": "Copiez le lien ci-dessous et collez le dans le navigateur que vous souhaitez utiliser :",
"Link Copied !": "Lien Copié !",
"Connection failure, please retry.": "Connexion interrompue, veuillez réessayer.",
"on": "sur",
"This device": "Cet appareil",
"You have refused the access of the application": "Vous avez refusé l'accès de l'application",
"to your Masq storage.": "à votre stockage Masq.",
Expand All @@ -119,5 +117,38 @@
"close": "fermer",
"go back": "retour",
"You can choose from": "Vous pouvez choisir parmi ",
"1 special character ": "1 caractère spécial "
"1 special character ": "1 caractère spécial ",
"Add a new device": "Ajouter un appareil",
"This profile is already synchronized on this device.": "Ce profil est déjà synchronisé sur cet appareil.",
"Add a new profile": "Ajouter un nouveau profil",
"Sync an existing profile": "Synchroniser un profil existant",
"Copy the link displayed on your initial device, then paste it in the field \"link to existing profile\" on this device.": "Copiez le lien affiché sur votre appareil initial, puis collez le dans le champ \"lien du profil existant\" sur cet appareil",
"Link to existing profile": "Lien du profil existant",
"Synchronize": "Synchroniser",
"Already got a profile ? SYNCHRONIZE IT": "Déjà un profil ? SYNCHRONISEZ-LE",
"Okay, I get it!": "Ok, j'ai compris !",
"How to find the profile link?": "Comment récupérer le lien du profil ?",
"Log in to Masq from the device on which you already have a profile": "Connectez-vous à Masq depuis l'appareil sur lequel vous possédez déjà un profil",
"In the \"Devices\" section, click the \"Add a device\" button": "Dans la rubrique \"Appareils\", cliquez sur le bouton \"Ajouter un appareil\"",
"Copy the link displayed on your original device, then paste it in the \"existing profile link\" field on this device.": "Copiez le lien affiché sur votre appareil initial, puis collez-le dans le champs \"lien du profil existant\" sur cet appareil",
"How to display the QR code of my profile?": "Comment afficher le QR code de mon profil ?",
"Using the new device, scan the QR code displayed on the original device": "Avec le nouvel appareil, scannez le QR code qui est affiché sur l'appareil initial",
"Synchronization method": "Méthode de synchronisation",
"Scan the QR code": "Scannez le QR code",
"How to display the QR code?": "Comment afficher le QR code ? ",
"Copy the link displayed on your original device and paste it into this mobile:": "Copiez le lien affiché sur l'appareil original et collez le sur ce smartphone",
"Paste the profile link": "Collez le lien du profil",
"The sync process has been aborted, please try again.": "La synchronisation à été interrompue, merci de réessayer.",
"Please enter you secret key to finish the synchronization process": "Saisir votre clé secrète pour finaliser la synchronisation",
"Scan QR code": "Scanner un QR code",
"Position this phone in front of your initial device to scan the QR code": "Placez ce téléphone face à votre appareil initial pour scanner le QR code",
"This synchronization link is invalid. Please go back to the profile you want to import and generate a new link or QR code.": "Ce lien d'importation est incorrect. Veuillez retourner au profil que vous voulez importer et générer un nouveau lien ou code QR.",
"Hold your device over the QR Code so that it is clearly visible within your smartphone's screen:": "Placez ce téléphone face à votre appareil initial pour scanner le QR code :",
"A profile with the same username already exists in this device, rename it and try again.": "Un profil avec le même nom existe sur cet appareil, merci de le renommer et recommencer la synchronisation.",
"Error during the synchronization. Please retry.": "Echec de la synchronisation. Merci de réessayer.",
"Paste profile link": "Coller le lien du profil",
"The link has expired. Please retry with a fresh link.": "Le lien a expiré, merci de réessayer avec nouveau lien.",
"Scanner failure": "Echec du scan",
"To scan the QR code, you must allow this browser to access your camera. You can do this through your mobile settings. Warning: on iOS this is only possible with Safari.": "Pour scanner le QR code, vous devez autoriser ce navigateur à accéder à votre appareil photo. Vous pouvez le faire via les paramètres de votre mobile. Attention : sur iOS, cela n'est possible qu'avec Safari.",
"This import link is incorrect or the connection between the devices can not be done . Please, return to the profile you want to import and generate a new link or QR code.": "Ce lien est incorrect ou la connexion entre les deux appareils n'a pu être faite. Retournez sur le profil que vous souhaitez importer et générez un nouveau lien ou QR code."
}