diff --git a/.env b/.env index 9aef94b941..51ab72746f 100644 --- a/.env +++ b/.env @@ -19,5 +19,5 @@ SNOOPY=0 RPC_NETWORKS_ONLY=0 PARTITIONED_TOPIC=0 CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 STATUS_GO_PROTOCOL=0 diff --git a/.env.e2e b/.env.e2e index ce482a3a43..2b74d4f43d 100644 --- a/.env.e2e +++ b/.env.e2e @@ -17,4 +17,4 @@ SNOOPY=0 STICKERS_ENABLED=1 PARTITIONED_TOPIC=0 CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 diff --git a/.env.jenkins b/.env.jenkins index b4aded76cd..268c347ee2 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -19,4 +19,4 @@ SNOOPY=0 RPC_NETWORKS_ONLY=0 PARTITIONED_TOPIC=0 CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 diff --git a/.env.nightly b/.env.nightly index 46e7b09693..db729ee5a7 100644 --- a/.env.nightly +++ b/.env.nightly @@ -17,5 +17,5 @@ SNOOPY=0 RPC_NETWORKS_ONLY=0 PARTITIONED_TOPIC=0 CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 HARDWALLET_ENABLED=1 diff --git a/.env.release b/.env.release index c45cd585df..6c75e99bcb 100644 --- a/.env.release +++ b/.env.release @@ -16,4 +16,4 @@ POW_TIME=1 SNOOPY=0 RPC_NETWORKS_ONLY=1 PARTITIONED_TOPIC=0 -MOBILE_UI_FOR_DESKTOP=0 +MOBILE_UI_FOR_DESKTOP=1 diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index 53b8672968..02bbc28771 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -22,7 +22,7 @@ pipeline { cmn = load('ci/common.groovy') gh = load('ci/github.groovy') /* just for a shorter access */ - btype = cmn.utils.getBuildType() + btype = cmn.utils.getBuildType() } } } stage('Build') { diff --git a/clj-rn.conf.edn b/clj-rn.conf.edn index 1db1c691a7..362d5236e5 100644 --- a/clj-rn.conf.edn +++ b/clj-rn.conf.edn @@ -72,6 +72,7 @@ "react-native-desktop-config" "react-native-desktop-shortcuts" "react-native-desktop-notification" + "react-native-desktop-gesture-handler" "web3-utils" "react-navigation" "react-native-navigation-twopane" @@ -79,7 +80,7 @@ ;; Resoures :resource-dirs ["resources/images" - "resources/icons"] + "desktop/resources"] :figwheel-options {:nrepl-port 7888 :nrepl-middleware ["cider.nrepl/cider-middleware" diff --git a/components/src/status_im/ui/components/react.cljs b/components/src/status_im/ui/components/react.cljs index 00451fcc2e..9680206353 100644 --- a/components/src/status_im/ui/components/react.cljs +++ b/components/src/status_im/ui/components/react.cljs @@ -224,8 +224,9 @@ (.catch show-access-error))))) ;; Net info - -(def net-info (.-default js-dependencies/net-info)) +(def net-info (if platform/desktop? + (get-react-property "NetInfo") + (.-default js-dependencies/net-info))) ;; Clipboard diff --git a/deployment/windows/nsis/setup.nsi b/deployment/windows/nsis/setup.nsi index c61ed0f3eb..d7ff5e72be 100644 --- a/deployment/windows/nsis/setup.nsi +++ b/deployment/windows/nsis/setup.nsi @@ -1,7 +1,7 @@ ;-------------------------------- ; Build environment ;-------------------------------- - + ;Unicode true ;!define top_srcdir @top_srcdir@ ;!define base_image_dir "" @@ -23,15 +23,15 @@ !define UninstallRegKeyPath "Software\Microsoft\Windows\CurrentVersion\Uninstall\Status Desktop" !addplugindir plugins/x86-ansi - + ;-------------------------------- ;General ;-------------------------------- - + ;Name and file Name "Status Desktop ${VERSION}" OutFile "${top_srcdir}/${SetupExeFileName}" - + SetCompressor /FINAL ${COMPRESSION_TYPE} ${COMPRESSION_ALGO} ; Default installation folder @@ -86,7 +86,7 @@ ;-------------------------------- ;Variables ;-------------------------------- - + Var MUI_TEMP Var STARTMENU_FOLDER Var PREVIOUS_INSTALLDIR @@ -108,16 +108,16 @@ ;-------------------------------- ;Interface Settings ;-------------------------------- - + !define MUI_ICON "${top_srcdir}/deployment/windows/status.ico" ;!define MUI_UNICON "${srcdir}/uninstall.ico" - + !define MUI_ABORTWARNING ;-------------------------------- ;Memento settings ;-------------------------------- - + ;!define MEMENTO_REGISTRY_ROOT SHELL_CONTEXT ;!define MEMENTO_REGISTRY_KEY "${AppRegistryKeyPath}" @@ -159,11 +159,11 @@ Function GetUserInfo ${Else} StrCpy $IS_ADMIN 0 ${EndIf} - + FunctionEnd Function UpdateShellVarContext - + ${If} $ALL_USERS == 1 SetShellVarContext all DetailPrint "Installing for all users" @@ -262,31 +262,31 @@ Function ReadPreviousVersion FunctionEnd Function LoadPreviousSettings - + ; Component selection ;${MementoSectionRestore} - + ; Startmenu !define ID "Application" - + !ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME - + ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}" - + ${if} $mui.StartMenuPage.RegistryLocation != "" StrCpy "$STARTMENU_FOLDER" $mui.StartMenuPage.RegistryLocation ${else} StrCpy "$STARTMENU_FOLDER" "" ${endif} - + !undef ID - + !endif - + ${If} $PREVIOUS_INSTALLDIR != "" StrCpy $INSTDIR $PREVIOUS_INSTALLDIR ${EndIf} - + FunctionEnd Function ReadUpdateCommandline @@ -339,7 +339,7 @@ Function ReadQuiet FunctionEnd Function .onInit - + Pop $OldRunDir ; Store command line @@ -382,14 +382,14 @@ uac_tryagain: ; The UAC plugin changes the error level even in the inner process, reset it. SetErrorLevel -1 ${EndIf} - + ; /update argument Call ReadUpdateCommandline Call ReadSkipLicense Call GetUserInfo - + ; Initialize $ALL_USERS with default value ${If} $IS_ADMIN == 1 StrCpy $ALL_USERS 1 @@ -397,11 +397,11 @@ uac_tryagain: StrCpy $ALL_USERS 0 ${EndIf} Call UpdateShellVarContext - + ; See if previous version exists ; This can change ALL_USERS Call ReadPreviousVersion - + ${If} $PREVIOUS_VERSION != "" StrCpy $REINSTALL_UNINSTALL 1 ${EndIf} @@ -444,29 +444,29 @@ uac_tryagain: ${EndIf} StrCpy $ALL_USERS_DEFAULT $ALL_USERS - + FunctionEnd Function StatusVersionCompare - + Exch $1 Exch Exch $0 - + Push $2 Push $3 Push $4 - + versioncomparebegin: ${If} $0 == "" ${AndIf} $1 == "" StrCpy $PREVIOUS_VERSION_STATE "same" goto versioncomparedone ${EndIf} - + StrCpy $2 0 StrCpy $3 0 - + ; Parse rc / beta suffixes for segments StrCpy $4 $0 2 ${If} $4 == "rc" @@ -480,7 +480,7 @@ versioncomparebegin: StrCpy $2 10000 ${EndIf} ${EndIf} - + StrCpy $4 $1 2 ${If} $4 == "rc" StrCpy $3 100 @@ -493,9 +493,9 @@ versioncomparebegin: StrCpy $3 10000 ${EndIf} ${EndIf} - + split1loop: - + StrCmp $0 "" split1loopdone StrCpy $4 $0 1 StrCpy $0 $0 "" 1 @@ -504,9 +504,9 @@ split1loop: StrCpy $2 $2$4 goto split1loop split1loopdone: - + split2loop: - + StrCmp $1 "" split2loopdone StrCpy $4 $1 1 StrCpy $1 $1 "" 1 @@ -515,7 +515,7 @@ split2loop: StrCpy $3 $3$4 goto split2loop split2loopdone: - + ${If} $2 > $3 StrCpy $PREVIOUS_VERSION_STATE "newer" ${ElseIf} $3 > $2 @@ -523,16 +523,16 @@ split2loopdone: ${Else} goto versioncomparebegin ${EndIf} - - + + versioncomparedone: - + Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 - + FunctionEnd Function PageDirectoryPre @@ -573,11 +573,11 @@ FunctionEnd Function .OnInstFailed FunctionEnd - + Function .onInstSuccess - + ;${MementoSectionSave} - + ; Detect multiple install directories ${If} $OldRunDir != '' @@ -615,10 +615,10 @@ Section "Status Desktop" SecMain DetailPrint "${NodeJsServerExeName} is running. Closing it down" ${nsProcess::CloseProcess} "${NodeJsServerExeName}" $R0 DetailPrint "Waiting for ${NodeJsServerExeName} to close" - Sleep 2000 + Sleep 2000 ${Else} - DetailPrint "${NodeJsServerExeName} was not found to be running" - ${EndIf} + DetailPrint "${NodeJsServerExeName} was not found to be running" + ${EndIf} ${nsProcess::Unload} @@ -635,6 +635,9 @@ Section "Status Desktop" SecMain SetOutPath "$INSTDIR\assets\resources\fonts" File /r "${top_srcdir}\resources\fonts\" + SetOutPath "$INSTDIR\assets\desktop\resources" + File /r "${top_srcdir}\desktop\resources\" + SetOutPath "$INSTDIR\assets\resources\images" File /r "${top_srcdir}\resources\images\" @@ -713,7 +716,7 @@ Section "Status Desktop" SecMain WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExeName}" "Path" "$INSTDIR" SectionEnd - + ;-------------------------------- ; Functions ;-------------------------------- @@ -765,14 +768,14 @@ FunctionEnd ;-------------------------------- ; Uninstaller Variables ;-------------------------------- - + Var un.REMOVE_ALL_USERS Var un.REMOVE_CURRENT_USER - + ;-------------------------------- ;Uninstaller Functions ;-------------------------------- - + Function un.GetUserInfo ClearErrors UserInfo::GetName @@ -787,13 +790,13 @@ Function un.GetUserInfo ${Else} StrCpy $IS_ADMIN 0 ${EndIf} - + FunctionEnd - + Function un.ReadPreviousVersion - + ReadRegStr $R0 HKLM "${AppRegistryKeyPath}" "" - + ${If} $R0 != "" ;Detect version ReadRegStr $R2 HKLM "${AppRegistryKeyPath}" "Version" @@ -801,9 +804,9 @@ Function un.ReadPreviousVersion StrCpy $R0 "" ${EndIf} ${EndIf} - + ReadRegStr $R1 HKCU "${AppRegistryKeyPath}" "" - + ${If} $R1 != "" ;Detect version ReadRegStr $R2 HKCU "${AppRegistryKeyPath}" "Version" @@ -811,7 +814,7 @@ Function un.ReadPreviousVersion StrCpy $R1 "" ${EndIf} ${EndIf} - + ${If} $R1 == $INSTDIR Strcpy $un.REMOVE_CURRENT_USER 1 ${EndIf} @@ -829,11 +832,11 @@ Function un.ReadPreviousVersion StrCpy $un.REMOVE_ALL_USERS = 1 ${EndIf} ${EndIf} - + FunctionEnd - + Function un.onInit - + ${un.GetParameters} $CommandLine ${un.GetOptions} $CommandLine "/quiet" $R1 @@ -846,7 +849,7 @@ Function un.onInit Call un.GetUserInfo Call un.ReadPreviousVersion - + ${If} $un.REMOVE_ALL_USERS == 1 ${AndIf} $IS_ADMIN == 0 uac_tryagain: @@ -869,16 +872,16 @@ uac_tryagain: ; The UAC plugin changes the error level even in the inner process, reset it. SetErrorLevel -1 ${EndIf} - + FunctionEnd - + Function un.RemoveStartmenu - + !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - + Delete "$SMPROGRAMS\$MUI_TEMP\${UninstallLinkName}" Delete "$SMPROGRAMS\$MUI_TEMP\${AppLinkFileName}" - + ${un.GetOptions} $CommandLine "/keepstartmenudir" $R1 ${If} ${Errors} @@ -922,7 +925,7 @@ FunctionEnd ;-------------------------------- Section "Uninstall" - + SetShellVarContext all SetDetailsPrint lastused @@ -933,10 +936,10 @@ Section "Uninstall" DetailPrint "${AppExeName} is running. Closing it down" ${nsProcess::CloseProcess} "${AppExeName}" $R0 DetailPrint "Waiting for ${AppExeName} to close" - Sleep 2000 + Sleep 2000 ${Else} - DetailPrint "${AppExeName} was not found to be running" - ${EndIf} + DetailPrint "${AppExeName} was not found to be running" + ${EndIf} ${nsProcess::FindProcess} "${NodeJsServerExeName}" $R0 @@ -944,10 +947,10 @@ Section "Uninstall" DetailPrint "${NodeJsServerExeName} is running. Closing it down" ${nsProcess::CloseProcess} "${NodeJsServerExeName}" $R0 DetailPrint "Waiting for ${NodeJsServerExeName} to close" - Sleep 2000 + Sleep 2000 ${Else} - DetailPrint "${NodeJsServerExeName} was not found to be running" - ${EndIf} + DetailPrint "${NodeJsServerExeName} was not found to be running" + ${EndIf} ${nsProcess::Unload} @@ -984,7 +987,7 @@ Section "Uninstall" RMDir "$INSTDIR\translations" Delete "$INSTDIR" - + ${un.GetOptions} $CommandLine "/frominstall" $R1 ${If} ${Errors} RMDir /r /REBOOTOK "$INSTDIR" @@ -997,11 +1000,11 @@ Section "Uninstall" ${If} $un.REMOVE_ALL_USERS == 1 SetShellVarContext all Call un.RemoveStartmenu - + DeleteRegKey /ifempty HKLM "${AppRegistryKeyPath}" DeleteRegKey /ifempty HKLM "${OrgRegistryKeyPath}" DeleteRegKey HKLM "${UninstallRegKeyPath}" - + Delete "$DESKTOP\${AppLinkFileName}" ; Remove dump key @@ -1025,7 +1028,7 @@ Section "Uninstall" Delete "$DESKTOP\${AppLinkFileName}" ${EndIf} - + DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExeName}" SectionEnd diff --git a/desktop/build.bat b/desktop/build.bat index b053643061..9158b84b08 100644 --- a/desktop/build.bat +++ b/desktop/build.bat @@ -25,6 +25,7 @@ SET option echo "build.bat external modules paths: "%option-e% echo "build.bat JS bundle path: "%option-j% echo "build.bat desktop fonts: "%option-f% +echo "build.bat desktop images: "%option-i% echo "build.bat cmake generator: "%option-g% @rem Workaround @@ -32,4 +33,4 @@ echo "build.bat cmake generator: "%option-g% @rem Build project echo %CD% -cmake -DCMAKE_BUILD_TYPE=Debug -G %option-g% -DEXTERNAL_MODULES_DIR=%option-e% -DJS_BUNDLE_PATH=%option-j% -DDESKTOP_FONTS=%option-f% . && cmake --build . +cmake -DCMAKE_BUILD_TYPE=Debug -G %option-g% -DEXTERNAL_MODULES_DIR=%option-e% -DJS_BUNDLE_PATH=%option-j% -DDESKTOP_FONTS=%option-f% -DDESKTOP_IMAGES=%option-i% . && cmake --build . diff --git a/desktop/build.sh b/desktop/build.sh index 60082c3c31..0767e2cc66 100755 --- a/desktop/build.sh +++ b/desktop/build.sh @@ -23,12 +23,17 @@ if [[ $1 == "-f" ]]; then shift desktopFonts="$1" fi +if [[ $1 == "-i" ]]; then + shift + desktopImages="$1" +fi shift done echo "build.sh external modules paths: "$ExternalModulesPaths echo "build.sh JS bundle path: "$JsBundlePath echo "build.sh desktop fonts: "$desktopFonts +echo "build.sh desktop images: "$desktopImages # Workaround rm -rf CMakeFiles CMakeCache.txt cmake_install.cmake Makefile @@ -38,6 +43,7 @@ cmake -DCMAKE_BUILD_TYPE=Debug \ -DEXTERNAL_MODULES_DIR="$ExternalModulesPaths" \ -DJS_BUNDLE_PATH="$JsBundlePath" \ -DDESKTOP_FONTS="$desktopFonts" \ + -DDESKTOP_IMAGES="$desktopImages" \ -DCMAKE_INSTALL_COMPONENT='' \ . && \ make diff --git a/desktop/js_files/package.json b/desktop/js_files/package.json index f5f5ec57f2..8c23f2d551 100644 --- a/desktop/js_files/package.json +++ b/desktop/js_files/package.json @@ -18,6 +18,7 @@ "modules/react-native-desktop-config/desktop", "modules/react-native-desktop-shortcuts/desktop", "modules/react-native-desktop-notification/desktop", + "modules/react-native-desktop-gesture-handler/desktop", "node_modules/google-breakpad" ], "desktopFonts": [ @@ -60,13 +61,14 @@ "qrcode": "^1.4.1", "react": "16.6.1", "react-dom": "16.4.2", - "react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_10", + "react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_11", "react-native-background-timer": "2.0.0", "react-native-camera": "0.10.0", "react-native-config": "git+https://github.com/status-im/react-native-config.git#v0.11.2-status", "react-native-dialogs": "0.0.20", "react-native-fetch-polyfill": "1.1.2", "react-native-fs": "git+https://github.com/status-im/react-native-fs.git#v2.9.7-status", + "react-native-gesture-handler": "^1.3.0", "react-native-image-crop-picker": "0.18.1", "react-native-image-resizer": "1.0.0", "react-native-keychain": "git+https://github.com/status-im/react-native-keychain.git#v.3.0.0-4-status", @@ -75,7 +77,7 @@ "react-native-os": "1.1.0", "react-native-splash-screen": "3.0.6", "react-native-webview-bridge": "git+https://github.com/status-im/react-native-webview-bridge.git#0.33.16-status-rn049-desktop", - "react-navigation": "^2.12.1", + "react-navigation": "^3.11.0", "status-conan": "git+https://github.com/status-im/status-conan.git#v1.0.0", "web3-utils": "1.0.0-beta.36" }, @@ -93,5 +95,122 @@ }, "optionalDependencies": { "appdmg": "^0.5.2" - } + }, + "desktopImages": [ + "../../../../../desktop/resources/add.png", + "../../../../../desktop/resources/address.png", + "../../../../../desktop/resources/add_contact.png", + "../../../../../desktop/resources/arrow_left.png", + "../../../../../desktop/resources/arrow_right.png", + "../../../../../desktop/resources/arrow_up.png", + "../../../../../desktop/resources/back.png", + "../../../../../desktop/resources/backspace.png", + "../../../../../desktop/resources/bell.png", + "../../../../../desktop/resources/browser.png", + "../../../../../desktop/resources/camera.png", + "../../../../../desktop/resources/cancel.png", + "../../../../../desktop/resources/change.png", + "../../../../../desktop/resources/check.png", + "../../../../../desktop/resources/close.png", + "../../../../../desktop/resources/commands.png", + "../../../../../desktop/resources/copy.png", + "../../../../../desktop/resources/corner_left_bottom.png", + "../../../../../desktop/resources/corner_left_top.png", + "../../../../../desktop/resources/corner_right_bottom.png", + "../../../../../desktop/resources/corner_right_top.png", + "../../../../../desktop/resources/dapp.png", + "../../../../../desktop/resources/delete.png", + "../../../../../desktop/resources/desktop.png", + "../../../../../desktop/resources/download.png", + "../../../../../desktop/resources/dropdown.png", + "../../../../../desktop/resources/dropdown_up.png", + "../../../../../desktop/resources/edit.png", + "../../../../../desktop/resources/filter.png", + "../../../../../desktop/resources/fingerprint.png", + "../../../../../desktop/resources/flash.png", + "../../../../../desktop/resources/flash_active.png", + "../../../../../desktop/resources/group_chat.png", + "../../../../../desktop/resources/help.png", + "../../../../../desktop/resources/history.png", + "../../../../../desktop/resources/home.png", + "../../../../../desktop/resources/home_1.png", + "../../../../../desktop/resources/icon_action_back.png", + "../../../../../desktop/resources/icon_action_forward.png", + "../../../../../desktop/resources/icon_action_fullscreen_collapse.png", + "../../../../../desktop/resources/icon_action_fullscreen_expand.png", + "../../../../../desktop/resources/icon_arrow_top.png", + "../../../../../desktop/resources/icon_avatar.png", + "../../../../../desktop/resources/icon_check_on.png", + "../../../../../desktop/resources/icon_close_light_gray.png", + "../../../../../desktop/resources/icon_forward_gray.png", + "../../../../../desktop/resources/icon_lock_gray.png", + "../../../../../desktop/resources/icon_lock_white.png", + "../../../../../desktop/resources/icon_menu_group.png", + "../../../../../desktop/resources/icon_money_white.png", + "../../../../../desktop/resources/icon_muted.png", + "../../../../../desktop/resources/icon_notifications_on.png", + "../../../../../desktop/resources/icon_phone_white.png", + "../../../../../desktop/resources/ic_background.png", + "../../../../../desktop/resources/ic_foreground.png", + "../../../../../desktop/resources/ic_stat_status_notification.png", + "../../../../../desktop/resources/info.png", + "../../../../../desktop/resources/in_contacts.png", + "../../../../../desktop/resources/keycard.png", + "../../../../../desktop/resources/keycard_logo.png", + "../../../../../desktop/resources/language.png", + "../../../../../desktop/resources/launch_logo.png", + "../../../../../desktop/resources/link.png", + "../../../../../desktop/resources/logo.png", + "../../../../../desktop/resources/log_out.png", + "../../../../../desktop/resources/mailserver.png", + "../../../../../desktop/resources/make_admin.png", + "../../../../../desktop/resources/max.png", + "../../../../../desktop/resources/message.png", + "../../../../../desktop/resources/mobile.png", + "../../../../../desktop/resources/more.png", + "../../../../../desktop/resources/network.png", + "../../../../../desktop/resources/next.png", + "../../../../../desktop/resources/notification.png", + "../../../../../desktop/resources/one_on_one_chat.png", + "../../../../../desktop/resources/password.png", + "../../../../../desktop/resources/paste.png", + "../../../../../desktop/resources/photo.png", + "../../../../../desktop/resources/profile.png", + "../../../../../desktop/resources/public_chat.png", + "../../../../../desktop/resources/qr.png", + "../../../../../desktop/resources/receive.png", + "../../../../../desktop/resources/refresh.png", + "../../../../../desktop/resources/remove_contact.png", + "../../../../../desktop/resources/reply.png", + "../../../../../desktop/resources/rotate_camera.png", + "../../../../../desktop/resources/search.png", + "../../../../../desktop/resources/security.png", + "../../../../../desktop/resources/send.png", + "../../../../../desktop/resources/settings.png", + "../../../../../desktop/resources/settings_advanced.png", + "../../../../../desktop/resources/share.png", + "../../../../../desktop/resources/stickers.png", + "../../../../../desktop/resources/text.png", + "../../../../../desktop/resources/tiny_arrow_down.png", + "../../../../../desktop/resources/tiny_check.png", + "../../../../../desktop/resources/tiny_clear.png", + "../../../../../desktop/resources/tiny_edit.png", + "../../../../../desktop/resources/tiny_external.png", + "../../../../../desktop/resources/tiny_group.png", + "../../../../../desktop/resources/tiny_lock.png", + "../../../../../desktop/resources/tiny_lock_broken.png", + "../../../../../desktop/resources/tiny_new_contact.png", + "../../../../../desktop/resources/tiny_pending.png", + "../../../../../desktop/resources/tiny_public.png", + "../../../../../desktop/resources/tiny_reply.png", + "../../../../../desktop/resources/tiny_settings.png", + "../../../../../desktop/resources/tiny_tribute_to_talk.png", + "../../../../../desktop/resources/tribute_to_talk.png", + "../../../../../desktop/resources/two_arrows.png", + "../../../../../desktop/resources/username.png", + "../../../../../desktop/resources/user_profile.png", + "../../../../../desktop/resources/user_profile_1.png", + "../../../../../desktop/resources/wallet.png", + "../../../../../desktop/resources/warning.png" + ] } diff --git a/desktop/js_files/yarn.lock b/desktop/js_files/yarn.lock index 50af5fdfee..6d738d4bf7 100644 --- a/desktop/js_files/yarn.lock +++ b/desktop/js_files/yarn.lock @@ -1307,6 +1307,25 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== +"@react-navigation/core@~3.4.1": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.4.2.tgz#bec563e94fde40fbab3730cdc97f22afbb2a1498" + integrity sha512-7G+iDzLSTeOUU4vVZeRZKJ+Bd7ds7ZxYNqZcB8i0KlBeQEQfR74Ounfu/p0KIEq2RiNnaE3QT7WVP3C87sebzw== + dependencies: + hoist-non-react-statics "^3.3.0" + path-to-regexp "^1.7.0" + query-string "^6.4.2" + react-is "^16.8.6" + +"@react-navigation/native@~3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.5.0.tgz#f5d16e0845ac26d1147d1caa481f18a00740e7ae" + integrity sha512-TmGOis++ejEXG3sqNJhCSKqB0/qLu3FQgDtO959qpqif36R/diR8SQwJqeSdofoEiK3CepdhFlTCeHdS1/+MsQ== + dependencies: + hoist-non-react-statics "^3.0.1" + react-native-safe-area-view "^0.14.1" + react-native-screens "^1.0.0 || ^1.0.0-alpha" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -2120,11 +2139,6 @@ ci-info@^1.5.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== -clamp@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" - integrity sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ= - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2468,14 +2482,6 @@ create-react-class@^15.6.3: loose-envify "^1.3.1" object-assign "^4.1.1" -create-react-context@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" - integrity sha512-KkpaLARMhsTsgp0d2NA/R94F/eDLbhXERdIq3LvX2biCAXcDvHYoOqHfWCHf1+OLj+HKBotLG3KqaOOf+C1C+A== - dependencies: - fbjs "^0.8.0" - gud "^1.0.0" - cross-spawn-async@^2.1.1: version "2.2.5" resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" @@ -3159,7 +3165,7 @@ fbjs-scripts@^1.0.0: semver "^5.1.0" through2 "^2.0.0" -fbjs@^0.8.0, fbjs@^0.8.16, fbjs@^0.8.9: +fbjs@^0.8.16, fbjs@^0.8.9: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= @@ -3619,11 +3625,6 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gud@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" - integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== - handlebars@^4.1.2: version "4.2.0" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e" @@ -3749,11 +3750,18 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: +hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== +hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" + integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== + dependencies: + react-is "^16.7.0" + home-or-tmp@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" @@ -6064,7 +6072,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^6.1.0: +query-string@^6.4.2: version "6.8.3" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.3.tgz#fd9fb7ffb068b79062b43383685611ee47777d4b" integrity sha512-llcxWccnyaWlODe7A9hRjkvdCKamEKTh+wH8ITdTc3OhchaqUZteiSCX/2ablWHVrkVIe04dntnaZJ7BdyW0lQ== @@ -6148,12 +6156,12 @@ react-dom@16.4.2: object-assign "^4.1.1" prop-types "^15.6.0" -react-is@^16.5.2, react-is@^16.8.1: +react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6: version "16.9.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== -react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -6179,25 +6187,6 @@ react-native-dialogs@0.0.20: resolved "https://registry.yarnpkg.com/react-native-dialogs/-/react-native-dialogs-0.0.20.tgz#f3fb48eadba9d83fb9d4e6d7eca573494a8cefaa" integrity sha512-HeoU9d7wWUUAtxjcIJLaeIs/eYS2ZHTNh3kboeCKngLvfvgptd/7vZXwXdQ+xeOEek+cm95kDfMJQd2xnb+4wA== -react-native-dismiss-keyboard@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49" - integrity sha1-MohiQrPyMX4SHzrrmwpYXiuHm0k= - -react-native-drawer-layout-polyfill@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7" - integrity sha512-XzPhfLDJrYHru+e8+dFwhf0FtTeAp7JXPpFYezYV6P1nTeA1Tia/kDpFT+O2DWTrBKBEI8FGhZnThrroZmHIxg== - dependencies: - react-native-drawer-layout "1.3.2" - -react-native-drawer-layout@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e" - integrity sha512-fjO0scqbJUfNu2wuEpvywL7DYLXuCXJ2W/zYhWz986rdLytidbys1QGVvkaszHrb4Y7OqO96mTkgpOcP8KWevw== - dependencies: - react-native-dismiss-keyboard "1.0.0" - react-native-fetch-polyfill@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/react-native-fetch-polyfill/-/react-native-fetch-polyfill-1.1.2.tgz#256b5a0abd78cc4992f7a7cf82543da2f2124a73" @@ -6210,6 +6199,15 @@ react-native-fetch-polyfill@1.1.2: base-64 "^0.1.0" utf8 "^2.1.1" +react-native-gesture-handler@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.3.0.tgz#d0386f565928ccc1849537f03f2e37fd5f6ad43f" + integrity sha512-ASRFIXBuKRvqlmwkWJhV8yP2dTpvcqVrLNpd7FKVBFHYWr6SAxjGyO9Ik8w1lAxDhMlRP2IcJ9p9eq5X2WWeLQ== + dependencies: + hoist-non-react-statics "^2.3.1" + invariant "^2.2.2" + prop-types "^15.5.10" + react-native-image-crop-picker@0.18.1: version "0.18.1" resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.18.1.tgz#ebdbe72def5afb6c69aa6e2ad72fd3a7de8ee408" @@ -6237,14 +6235,14 @@ react-native-os@1.1.0: resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.1.0.tgz#bfbe1c44d8a5b14a6f3a3a405d8ada6f547a516e" integrity sha1-v74cRNilsUpvOjpAXYrab1R6UW4= -react-native-safe-area-view@0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.11.0.tgz#4f3dda43c2bace37965e7c6aef5fc83d4f19d174" - integrity sha512-N3nElaahu1Me2ltnfc9acpgt1znm6pi8DSadKy79kvdzKwvVIzw0IXueA/Hjr51eCW1BsfNw7D1SgBT9U6qEkA== +react-native-safe-area-view@^0.14.1: + version "0.14.6" + resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.6.tgz#9a9d37d9f8f3887d60c4076eae7b5d2319539446" + integrity sha512-dbzuvaeHFV1VBpyMaC0gtJ2BqFt6ls/405A0t78YN1sXiTrVr3ki86Ysct8mzifWqLdvWzcWagE5wfMtdxnqoA== dependencies: hoist-non-react-statics "^2.3.1" -react-native-screens@^1.0.0-alpha.11: +"react-native-screens@^1.0.0 || ^1.0.0-alpha": version "1.0.0-alpha.23" resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz#25d7ea4d11bda4fcde2d1da7ae50271c6aa636e0" integrity sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw== @@ -6256,14 +6254,7 @@ react-native-splash-screen@3.0.6: resolved "https://registry.yarnpkg.com/react-native-splash-screen/-/react-native-splash-screen-3.0.6.tgz#c0bbf2c8ae40a313c4c7044f55e569414ff68332" integrity sha512-yaTnGAHRyhduLSfD85gP3Vsf0BRePHW3aNNtDXbkbUhwIIeafu2cJH86U/qKFuKLMYLnFOXteOkP80gaYVGAYg== -react-native-tab-view@^0.0.77: - version "0.0.77" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4" - integrity sha512-9vjD4Ly1Zlum1Y4g23ODpi/F3gYIUIsKWrsZO/Oh5cuX1eiB1DRVn11nY1z+j/hsQfhfyW6nDlmySyDvYQvYCA== - dependencies: - prop-types "^15.6.0" - -react-native-tab-view@^1.0.0: +react-native-tab-view@^1.2.0, react-native-tab-view@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9" integrity sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ== @@ -6277,9 +6268,9 @@ react-native-tab-view@^1.0.0: invariant "2.2.0" keymirror "0.1.1" -"react-native@git+https://github.com/status-im/react-native-desktop.git#v0.57.8_10": +"react-native@git+https://github.com/status-im/react-native-desktop.git#v0.57.8_11": version "0.57.8" - resolved "git+https://github.com/status-im/react-native-desktop.git#af9f72e6300d08918685f57e249141646400bac0" + resolved "git+https://github.com/status-im/react-native-desktop.git#6cf317a82ef82ad1102e292110928929c3b68aec" dependencies: "@babel/runtime" "^7.0.0" absolute-path "^0.0.0" @@ -6336,53 +6327,38 @@ react-native-tab-view@^1.0.0: yeoman-environment "^2.3.4" yeoman-generator "^3.2.0" -react-navigation-deprecated-tab-navigator@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7" - integrity sha512-Cm+qYOPFWbvvcuv0YYX0ioYwLGgw7XAqdhAfpo3sIr3trxRW8871ePmfFOPezjQtz4v6ItjZt6LPgtBAVZoroQ== +react-navigation-drawer@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-1.2.1.tgz#7bd5efeee7d2f611d3ebb0933e0c8e8eb7cafe52" + integrity sha512-T2kaBjY2c4/3I6noWFnaf/c18ntNH5DsST38i+pdc2NPxn5Yi5lkK+ZZTeKuHSFD4a7G0jWY9OGf1iRkHWLMAQ== dependencies: - react-native-tab-view "^0.0.77" + react-native-tab-view "^1.2.0" -react-navigation-drawer@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec" - integrity sha512-F1y593uC6pqBMGH+Omz75oNODEbxB/s0EGO8QtYwu1NmOOEUuuLA+c14zm+pgMsI4HlDabiHxPkWqsgGz25xVQ== - dependencies: - react-native-drawer-layout-polyfill "^1.3.2" +react-navigation-stack@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.4.0.tgz#69cdb029ea4ee5877d7e933b3117dc90bc841eb2" + integrity sha512-zEe9wCA0Ot8agarYb//0nSWYW1GM+1R0tY/nydUV0EizeJ27At0EklYVWvYEuYU6C48va6cu8OPL7QD/CcJACw== -react-navigation-stack@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.7.0.tgz#0b2f139ee1cba953037ef51353df992ec6c74fa2" - integrity sha512-3Tbb/SsustBrM9R/qaI6XuOfyqYMVbwkeHFC8NbU890vB0aKZvjAtioWLZ18e/4LgbiOCmoTdp37z3gkGDyNDQ== - -react-navigation-tabs@0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.8.4.tgz#aa767f28b899f13c99f2b034b4a665f8cf0a5737" - integrity sha512-CbS3xIVJVtpu+AYslv0PMLmjddJFVtU3XAhSJ9XnMrKLUJNmnQdW/L0w/Gp5qcBEF9h6bgsY3CoTtp7I6bqyOQ== +react-navigation-tabs@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.4.tgz#00a312250df3c519c60b7815a523ace5ee11163a" + integrity sha512-py2hLCRxPwXOzmY1W9XcY1rWXxdK6RGW/aXh56G9gIf8cpHNDhy/bJV4e46/JrVcse3ybFaN0liT09/DM/NdwQ== dependencies: hoist-non-react-statics "^2.5.0" prop-types "^15.6.1" react-lifecycles-compat "^3.0.4" - react-native-tab-view "^1.0.0" + react-native-tab-view "^1.4.1" -react-navigation@^2.12.1: - version "2.18.3" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" - integrity sha512-/5KGMG1Oj5LN/x/7AKF0MWrpX9Qe29307RxEsMCiRT/A4jCYT0DPY99Bl7ZAGtROxExEy3rwTfTrtvpIT+CU7A== +react-navigation@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-3.11.1.tgz#ba696ad6b512088a97a20cc7e6a250c53dbddd26" + integrity sha512-n64HxLG5s5ucVFo1Gs+D9ujChhHDd98lpQ1p27wL7gq8V1PaRJMvsBEIsguhtc2rTIL/TWDynOesXQDG+Eg6FQ== dependencies: - clamp "^1.0.1" - create-react-context "0.2.2" - hoist-non-react-statics "^2.2.0" - path-to-regexp "^1.7.0" - query-string "^6.1.0" - react-is "^16.5.2" - react-lifecycles-compat "^3" - react-native-safe-area-view "0.11.0" - react-native-screens "^1.0.0-alpha.11" - react-navigation-deprecated-tab-navigator "1.3.0" - react-navigation-drawer "0.5.0" - react-navigation-stack "0.7.0" - react-navigation-tabs "0.8.4" + "@react-navigation/core" "~3.4.1" + "@react-navigation/native" "~3.5.0" + react-navigation-drawer "~1.2.1" + react-navigation-stack "~1.4.0" + react-navigation-tabs "~1.1.4" react-proxy@^1.1.7: version "1.1.8" diff --git a/desktop/resources/add.png b/desktop/resources/add.png new file mode 100644 index 0000000000..21b37f431d Binary files /dev/null and b/desktop/resources/add.png differ diff --git a/desktop/resources/add_contact.png b/desktop/resources/add_contact.png new file mode 100644 index 0000000000..b6dde36dd0 Binary files /dev/null and b/desktop/resources/add_contact.png differ diff --git a/desktop/resources/address.png b/desktop/resources/address.png new file mode 100644 index 0000000000..c3bdccdc79 Binary files /dev/null and b/desktop/resources/address.png differ diff --git a/desktop/resources/arrow_left.png b/desktop/resources/arrow_left.png new file mode 100644 index 0000000000..f44762016d Binary files /dev/null and b/desktop/resources/arrow_left.png differ diff --git a/desktop/resources/arrow_right.png b/desktop/resources/arrow_right.png new file mode 100644 index 0000000000..673ef5572e Binary files /dev/null and b/desktop/resources/arrow_right.png differ diff --git a/desktop/resources/arrow_up.png b/desktop/resources/arrow_up.png new file mode 100644 index 0000000000..41f9f45652 Binary files /dev/null and b/desktop/resources/arrow_up.png differ diff --git a/desktop/resources/back.png b/desktop/resources/back.png new file mode 100644 index 0000000000..874105736a Binary files /dev/null and b/desktop/resources/back.png differ diff --git a/desktop/resources/backspace.png b/desktop/resources/backspace.png new file mode 100644 index 0000000000..f412af1d03 Binary files /dev/null and b/desktop/resources/backspace.png differ diff --git a/desktop/resources/bell.png b/desktop/resources/bell.png new file mode 100644 index 0000000000..76ee86e868 Binary files /dev/null and b/desktop/resources/bell.png differ diff --git a/desktop/resources/browser.png b/desktop/resources/browser.png new file mode 100644 index 0000000000..c9349a2005 Binary files /dev/null and b/desktop/resources/browser.png differ diff --git a/desktop/resources/camera.png b/desktop/resources/camera.png new file mode 100644 index 0000000000..eae2bedfbf Binary files /dev/null and b/desktop/resources/camera.png differ diff --git a/desktop/resources/cancel.png b/desktop/resources/cancel.png new file mode 100644 index 0000000000..89a4086f8c Binary files /dev/null and b/desktop/resources/cancel.png differ diff --git a/desktop/resources/change.png b/desktop/resources/change.png new file mode 100644 index 0000000000..143002657f Binary files /dev/null and b/desktop/resources/change.png differ diff --git a/desktop/resources/check.png b/desktop/resources/check.png new file mode 100644 index 0000000000..acfb992f60 Binary files /dev/null and b/desktop/resources/check.png differ diff --git a/desktop/resources/close.png b/desktop/resources/close.png new file mode 100644 index 0000000000..65e1b4f735 Binary files /dev/null and b/desktop/resources/close.png differ diff --git a/desktop/resources/commands.png b/desktop/resources/commands.png new file mode 100644 index 0000000000..06d320983f Binary files /dev/null and b/desktop/resources/commands.png differ diff --git a/desktop/resources/copy.png b/desktop/resources/copy.png new file mode 100644 index 0000000000..9c19da8d23 Binary files /dev/null and b/desktop/resources/copy.png differ diff --git a/desktop/resources/corner_left_bottom.png b/desktop/resources/corner_left_bottom.png new file mode 100644 index 0000000000..1c9c9b446d Binary files /dev/null and b/desktop/resources/corner_left_bottom.png differ diff --git a/desktop/resources/corner_left_top.png b/desktop/resources/corner_left_top.png new file mode 100644 index 0000000000..1a0a4e57f8 Binary files /dev/null and b/desktop/resources/corner_left_top.png differ diff --git a/desktop/resources/corner_right_bottom.png b/desktop/resources/corner_right_bottom.png new file mode 100644 index 0000000000..e6071d1ae1 Binary files /dev/null and b/desktop/resources/corner_right_bottom.png differ diff --git a/desktop/resources/corner_right_top.png b/desktop/resources/corner_right_top.png new file mode 100644 index 0000000000..6eaca3cd9a Binary files /dev/null and b/desktop/resources/corner_right_top.png differ diff --git a/desktop/resources/dapp.png b/desktop/resources/dapp.png new file mode 100644 index 0000000000..8cd519e6b0 Binary files /dev/null and b/desktop/resources/dapp.png differ diff --git a/desktop/resources/delete.png b/desktop/resources/delete.png new file mode 100644 index 0000000000..5c5ed9404e Binary files /dev/null and b/desktop/resources/delete.png differ diff --git a/desktop/resources/desktop.png b/desktop/resources/desktop.png new file mode 100644 index 0000000000..2b03362c96 Binary files /dev/null and b/desktop/resources/desktop.png differ diff --git a/desktop/resources/download.png b/desktop/resources/download.png new file mode 100644 index 0000000000..0da5eaa1cd Binary files /dev/null and b/desktop/resources/download.png differ diff --git a/desktop/resources/dropdown.png b/desktop/resources/dropdown.png new file mode 100644 index 0000000000..228e20283e Binary files /dev/null and b/desktop/resources/dropdown.png differ diff --git a/desktop/resources/dropdown_up.png b/desktop/resources/dropdown_up.png new file mode 100644 index 0000000000..23efec887e Binary files /dev/null and b/desktop/resources/dropdown_up.png differ diff --git a/desktop/resources/edit.png b/desktop/resources/edit.png new file mode 100644 index 0000000000..f2e54d497c Binary files /dev/null and b/desktop/resources/edit.png differ diff --git a/desktop/resources/filter.png b/desktop/resources/filter.png new file mode 100644 index 0000000000..3c7985a3d9 Binary files /dev/null and b/desktop/resources/filter.png differ diff --git a/desktop/resources/fingerprint.png b/desktop/resources/fingerprint.png new file mode 100644 index 0000000000..17137fe969 Binary files /dev/null and b/desktop/resources/fingerprint.png differ diff --git a/desktop/resources/flash.png b/desktop/resources/flash.png new file mode 100644 index 0000000000..d2486fa6c0 Binary files /dev/null and b/desktop/resources/flash.png differ diff --git a/desktop/resources/flash_active.png b/desktop/resources/flash_active.png new file mode 100644 index 0000000000..15bbb77c8e Binary files /dev/null and b/desktop/resources/flash_active.png differ diff --git a/desktop/resources/group_chat.png b/desktop/resources/group_chat.png new file mode 100644 index 0000000000..27cf5107b3 Binary files /dev/null and b/desktop/resources/group_chat.png differ diff --git a/desktop/resources/help.png b/desktop/resources/help.png new file mode 100644 index 0000000000..f0e3656711 Binary files /dev/null and b/desktop/resources/help.png differ diff --git a/desktop/resources/history.png b/desktop/resources/history.png new file mode 100644 index 0000000000..c8e753b116 Binary files /dev/null and b/desktop/resources/history.png differ diff --git a/desktop/resources/home.png b/desktop/resources/home.png new file mode 100644 index 0000000000..19ddc6d532 Binary files /dev/null and b/desktop/resources/home.png differ diff --git a/desktop/resources/home_1.png b/desktop/resources/home_1.png new file mode 100644 index 0000000000..afb65ba21e Binary files /dev/null and b/desktop/resources/home_1.png differ diff --git a/desktop/resources/ic_background.png b/desktop/resources/ic_background.png new file mode 100644 index 0000000000..0265779ac7 Binary files /dev/null and b/desktop/resources/ic_background.png differ diff --git a/desktop/resources/ic_foreground.png b/desktop/resources/ic_foreground.png new file mode 100644 index 0000000000..ef8ffe231a Binary files /dev/null and b/desktop/resources/ic_foreground.png differ diff --git a/desktop/resources/ic_stat_status_notification.png b/desktop/resources/ic_stat_status_notification.png new file mode 100755 index 0000000000..a040aa06c8 Binary files /dev/null and b/desktop/resources/ic_stat_status_notification.png differ diff --git a/desktop/resources/icon_action_back.png b/desktop/resources/icon_action_back.png new file mode 100644 index 0000000000..89db7e2986 Binary files /dev/null and b/desktop/resources/icon_action_back.png differ diff --git a/desktop/resources/icon_action_forward.png b/desktop/resources/icon_action_forward.png new file mode 100644 index 0000000000..b8abf47c48 Binary files /dev/null and b/desktop/resources/icon_action_forward.png differ diff --git a/desktop/resources/icon_action_fullscreen_collapse.png b/desktop/resources/icon_action_fullscreen_collapse.png new file mode 100644 index 0000000000..8bc5016f2c Binary files /dev/null and b/desktop/resources/icon_action_fullscreen_collapse.png differ diff --git a/desktop/resources/icon_action_fullscreen_expand.png b/desktop/resources/icon_action_fullscreen_expand.png new file mode 100644 index 0000000000..d5b72bb768 Binary files /dev/null and b/desktop/resources/icon_action_fullscreen_expand.png differ diff --git a/desktop/resources/icon_arrow_top.png b/desktop/resources/icon_arrow_top.png new file mode 100644 index 0000000000..193fe2261d Binary files /dev/null and b/desktop/resources/icon_arrow_top.png differ diff --git a/desktop/resources/icon_avatar.png b/desktop/resources/icon_avatar.png new file mode 100644 index 0000000000..d28594fcf1 Binary files /dev/null and b/desktop/resources/icon_avatar.png differ diff --git a/desktop/resources/icon_check_on.png b/desktop/resources/icon_check_on.png new file mode 100644 index 0000000000..d8318e7fcb Binary files /dev/null and b/desktop/resources/icon_check_on.png differ diff --git a/desktop/resources/icon_close_light_gray.png b/desktop/resources/icon_close_light_gray.png new file mode 100644 index 0000000000..4b6d97ccef Binary files /dev/null and b/desktop/resources/icon_close_light_gray.png differ diff --git a/desktop/resources/icon_forward_gray.png b/desktop/resources/icon_forward_gray.png new file mode 100644 index 0000000000..9b96935894 Binary files /dev/null and b/desktop/resources/icon_forward_gray.png differ diff --git a/desktop/resources/icon_lock_gray.png b/desktop/resources/icon_lock_gray.png new file mode 100644 index 0000000000..5e7c958046 Binary files /dev/null and b/desktop/resources/icon_lock_gray.png differ diff --git a/desktop/resources/icon_lock_white.png b/desktop/resources/icon_lock_white.png new file mode 100644 index 0000000000..700c8fdf81 Binary files /dev/null and b/desktop/resources/icon_lock_white.png differ diff --git a/desktop/resources/icon_menu_group.png b/desktop/resources/icon_menu_group.png new file mode 100644 index 0000000000..40e9b7dc41 Binary files /dev/null and b/desktop/resources/icon_menu_group.png differ diff --git a/desktop/resources/icon_money_white.png b/desktop/resources/icon_money_white.png new file mode 100755 index 0000000000..6510ff9c04 Binary files /dev/null and b/desktop/resources/icon_money_white.png differ diff --git a/desktop/resources/icon_muted.png b/desktop/resources/icon_muted.png new file mode 100644 index 0000000000..2c862042ba Binary files /dev/null and b/desktop/resources/icon_muted.png differ diff --git a/desktop/resources/icon_notifications_on.png b/desktop/resources/icon_notifications_on.png new file mode 100644 index 0000000000..207cb4c16f Binary files /dev/null and b/desktop/resources/icon_notifications_on.png differ diff --git a/desktop/resources/icon_phone_white.png b/desktop/resources/icon_phone_white.png new file mode 100755 index 0000000000..d60a9ac7a2 Binary files /dev/null and b/desktop/resources/icon_phone_white.png differ diff --git a/desktop/resources/in_contacts.png b/desktop/resources/in_contacts.png new file mode 100644 index 0000000000..704533ffcc Binary files /dev/null and b/desktop/resources/in_contacts.png differ diff --git a/desktop/resources/info.png b/desktop/resources/info.png new file mode 100644 index 0000000000..6d1080e39b Binary files /dev/null and b/desktop/resources/info.png differ diff --git a/desktop/resources/keycard.png b/desktop/resources/keycard.png new file mode 100644 index 0000000000..8dc1c79dff Binary files /dev/null and b/desktop/resources/keycard.png differ diff --git a/desktop/resources/keycard_logo.png b/desktop/resources/keycard_logo.png new file mode 100644 index 0000000000..0546b5458b Binary files /dev/null and b/desktop/resources/keycard_logo.png differ diff --git a/desktop/resources/language.png b/desktop/resources/language.png new file mode 100644 index 0000000000..289bf5270f Binary files /dev/null and b/desktop/resources/language.png differ diff --git a/desktop/resources/launch_logo.png b/desktop/resources/launch_logo.png new file mode 100644 index 0000000000..b6252c8da3 Binary files /dev/null and b/desktop/resources/launch_logo.png differ diff --git a/desktop/resources/link.png b/desktop/resources/link.png new file mode 100644 index 0000000000..557c9bd19f Binary files /dev/null and b/desktop/resources/link.png differ diff --git a/desktop/resources/log_out.png b/desktop/resources/log_out.png new file mode 100644 index 0000000000..370625beeb Binary files /dev/null and b/desktop/resources/log_out.png differ diff --git a/desktop/resources/logo.png b/desktop/resources/logo.png new file mode 100644 index 0000000000..f703708c1d Binary files /dev/null and b/desktop/resources/logo.png differ diff --git a/desktop/resources/mailserver.png b/desktop/resources/mailserver.png new file mode 100644 index 0000000000..51389784c7 Binary files /dev/null and b/desktop/resources/mailserver.png differ diff --git a/desktop/resources/make_admin.png b/desktop/resources/make_admin.png new file mode 100644 index 0000000000..b2d9b8ecdc Binary files /dev/null and b/desktop/resources/make_admin.png differ diff --git a/desktop/resources/max.png b/desktop/resources/max.png new file mode 100644 index 0000000000..096b9a0b35 Binary files /dev/null and b/desktop/resources/max.png differ diff --git a/desktop/resources/message.png b/desktop/resources/message.png new file mode 100644 index 0000000000..74e7ef02a1 Binary files /dev/null and b/desktop/resources/message.png differ diff --git a/desktop/resources/mobile.png b/desktop/resources/mobile.png new file mode 100644 index 0000000000..0a8e141fab Binary files /dev/null and b/desktop/resources/mobile.png differ diff --git a/desktop/resources/more.png b/desktop/resources/more.png new file mode 100644 index 0000000000..d7acbc6758 Binary files /dev/null and b/desktop/resources/more.png differ diff --git a/desktop/resources/network.png b/desktop/resources/network.png new file mode 100644 index 0000000000..801c5fdc51 Binary files /dev/null and b/desktop/resources/network.png differ diff --git a/desktop/resources/next.png b/desktop/resources/next.png new file mode 100644 index 0000000000..9bb116be24 Binary files /dev/null and b/desktop/resources/next.png differ diff --git a/desktop/resources/notification.png b/desktop/resources/notification.png new file mode 100644 index 0000000000..a0a02e2152 Binary files /dev/null and b/desktop/resources/notification.png differ diff --git a/desktop/resources/one_on_one_chat.png b/desktop/resources/one_on_one_chat.png new file mode 100644 index 0000000000..b94487fe60 Binary files /dev/null and b/desktop/resources/one_on_one_chat.png differ diff --git a/desktop/resources/password.png b/desktop/resources/password.png new file mode 100644 index 0000000000..e22a7f6f4e Binary files /dev/null and b/desktop/resources/password.png differ diff --git a/desktop/resources/paste.png b/desktop/resources/paste.png new file mode 100644 index 0000000000..fd13976457 Binary files /dev/null and b/desktop/resources/paste.png differ diff --git a/desktop/resources/photo.png b/desktop/resources/photo.png new file mode 100644 index 0000000000..762a6eae62 Binary files /dev/null and b/desktop/resources/photo.png differ diff --git a/desktop/resources/profile.png b/desktop/resources/profile.png new file mode 100644 index 0000000000..9fd1068266 Binary files /dev/null and b/desktop/resources/profile.png differ diff --git a/desktop/resources/public_chat.png b/desktop/resources/public_chat.png new file mode 100644 index 0000000000..e1a7639071 Binary files /dev/null and b/desktop/resources/public_chat.png differ diff --git a/desktop/resources/qr.png b/desktop/resources/qr.png new file mode 100644 index 0000000000..2e03d17323 Binary files /dev/null and b/desktop/resources/qr.png differ diff --git a/desktop/resources/receive.png b/desktop/resources/receive.png new file mode 100644 index 0000000000..6b9a0c09ff Binary files /dev/null and b/desktop/resources/receive.png differ diff --git a/desktop/resources/refresh.png b/desktop/resources/refresh.png new file mode 100644 index 0000000000..533559c3dc Binary files /dev/null and b/desktop/resources/refresh.png differ diff --git a/desktop/resources/remove_contact.png b/desktop/resources/remove_contact.png new file mode 100644 index 0000000000..f801fd89f3 Binary files /dev/null and b/desktop/resources/remove_contact.png differ diff --git a/desktop/resources/reply.png b/desktop/resources/reply.png new file mode 100644 index 0000000000..144b8512eb Binary files /dev/null and b/desktop/resources/reply.png differ diff --git a/desktop/resources/rotate_camera.png b/desktop/resources/rotate_camera.png new file mode 100644 index 0000000000..9e59fd9207 Binary files /dev/null and b/desktop/resources/rotate_camera.png differ diff --git a/desktop/resources/search.png b/desktop/resources/search.png new file mode 100644 index 0000000000..14ad5a0adf Binary files /dev/null and b/desktop/resources/search.png differ diff --git a/desktop/resources/security.png b/desktop/resources/security.png new file mode 100644 index 0000000000..6cc34a5634 Binary files /dev/null and b/desktop/resources/security.png differ diff --git a/desktop/resources/send.png b/desktop/resources/send.png new file mode 100644 index 0000000000..565006f41b Binary files /dev/null and b/desktop/resources/send.png differ diff --git a/desktop/resources/settings.png b/desktop/resources/settings.png new file mode 100644 index 0000000000..3d1d718f74 Binary files /dev/null and b/desktop/resources/settings.png differ diff --git a/desktop/resources/settings_advanced.png b/desktop/resources/settings_advanced.png new file mode 100644 index 0000000000..f7ac1c697a Binary files /dev/null and b/desktop/resources/settings_advanced.png differ diff --git a/desktop/resources/share.png b/desktop/resources/share.png new file mode 100644 index 0000000000..f70ab8f28b Binary files /dev/null and b/desktop/resources/share.png differ diff --git a/desktop/resources/stickers.png b/desktop/resources/stickers.png new file mode 100644 index 0000000000..63acc9b8bd Binary files /dev/null and b/desktop/resources/stickers.png differ diff --git a/desktop/resources/text.png b/desktop/resources/text.png new file mode 100644 index 0000000000..cab051f138 Binary files /dev/null and b/desktop/resources/text.png differ diff --git a/desktop/resources/tiny_arrow_down.png b/desktop/resources/tiny_arrow_down.png new file mode 100644 index 0000000000..51ee3d99f8 Binary files /dev/null and b/desktop/resources/tiny_arrow_down.png differ diff --git a/desktop/resources/tiny_check.png b/desktop/resources/tiny_check.png new file mode 100644 index 0000000000..0f33ab5cd0 Binary files /dev/null and b/desktop/resources/tiny_check.png differ diff --git a/desktop/resources/tiny_clear.png b/desktop/resources/tiny_clear.png new file mode 100644 index 0000000000..b047208c4b Binary files /dev/null and b/desktop/resources/tiny_clear.png differ diff --git a/desktop/resources/tiny_edit.png b/desktop/resources/tiny_edit.png new file mode 100644 index 0000000000..60851f1aa8 Binary files /dev/null and b/desktop/resources/tiny_edit.png differ diff --git a/desktop/resources/tiny_external.png b/desktop/resources/tiny_external.png new file mode 100644 index 0000000000..8a6956b60b Binary files /dev/null and b/desktop/resources/tiny_external.png differ diff --git a/desktop/resources/tiny_group.png b/desktop/resources/tiny_group.png new file mode 100644 index 0000000000..9b2a355e1f Binary files /dev/null and b/desktop/resources/tiny_group.png differ diff --git a/desktop/resources/tiny_lock.png b/desktop/resources/tiny_lock.png new file mode 100644 index 0000000000..842deab5a3 Binary files /dev/null and b/desktop/resources/tiny_lock.png differ diff --git a/desktop/resources/tiny_lock_broken.png b/desktop/resources/tiny_lock_broken.png new file mode 100644 index 0000000000..c1a89d012c Binary files /dev/null and b/desktop/resources/tiny_lock_broken.png differ diff --git a/desktop/resources/tiny_new_contact.png b/desktop/resources/tiny_new_contact.png new file mode 100644 index 0000000000..fc273529cd Binary files /dev/null and b/desktop/resources/tiny_new_contact.png differ diff --git a/desktop/resources/tiny_pending.png b/desktop/resources/tiny_pending.png new file mode 100644 index 0000000000..912c8ac449 Binary files /dev/null and b/desktop/resources/tiny_pending.png differ diff --git a/desktop/resources/tiny_public.png b/desktop/resources/tiny_public.png new file mode 100644 index 0000000000..b763156f1b Binary files /dev/null and b/desktop/resources/tiny_public.png differ diff --git a/desktop/resources/tiny_reply.png b/desktop/resources/tiny_reply.png new file mode 100644 index 0000000000..482c1afadb Binary files /dev/null and b/desktop/resources/tiny_reply.png differ diff --git a/desktop/resources/tiny_settings.png b/desktop/resources/tiny_settings.png new file mode 100644 index 0000000000..52d1b24362 Binary files /dev/null and b/desktop/resources/tiny_settings.png differ diff --git a/desktop/resources/tiny_tribute_to_talk.png b/desktop/resources/tiny_tribute_to_talk.png new file mode 100644 index 0000000000..a4f970e105 Binary files /dev/null and b/desktop/resources/tiny_tribute_to_talk.png differ diff --git a/desktop/resources/tribute_to_talk.png b/desktop/resources/tribute_to_talk.png new file mode 100644 index 0000000000..8bb9575d92 Binary files /dev/null and b/desktop/resources/tribute_to_talk.png differ diff --git a/desktop/resources/two_arrows.png b/desktop/resources/two_arrows.png new file mode 100644 index 0000000000..7b561d1748 Binary files /dev/null and b/desktop/resources/two_arrows.png differ diff --git a/desktop/resources/user_profile.png b/desktop/resources/user_profile.png new file mode 100644 index 0000000000..2035b00663 Binary files /dev/null and b/desktop/resources/user_profile.png differ diff --git a/desktop/resources/user_profile_1.png b/desktop/resources/user_profile_1.png new file mode 100644 index 0000000000..2035b00663 Binary files /dev/null and b/desktop/resources/user_profile_1.png differ diff --git a/desktop/resources/username.png b/desktop/resources/username.png new file mode 100644 index 0000000000..819ea7d3e3 Binary files /dev/null and b/desktop/resources/username.png differ diff --git a/desktop/resources/wallet.png b/desktop/resources/wallet.png new file mode 100644 index 0000000000..99d2618ff4 Binary files /dev/null and b/desktop/resources/wallet.png differ diff --git a/desktop/resources/warning.png b/desktop/resources/warning.png new file mode 100644 index 0000000000..05f8a6db8a Binary files /dev/null and b/desktop/resources/warning.png differ diff --git a/modules/react-native-desktop-config/desktop/CMakeLists.txt b/modules/react-native-desktop-config/desktop/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt b/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt new file mode 100644 index 0000000000..2524fde7ff --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/CMakeLists.txt @@ -0,0 +1,9 @@ +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES} + \"GestureHandlerModule\" PARENT_SCOPE) + +set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/gesturehandlermodule.cpp PARENT_SCOPE) + +include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) diff --git a/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp new file mode 100644 index 0000000000..a594a2dace --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.cpp @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2017-present, Status Research and Development GmbH. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "gesturehandlermodule.h" +#include "bridge.h" +#include "eventdispatcher.h" + +#include +#include +#include + +namespace { +struct RegisterQMLMetaType { + RegisterQMLMetaType() { qRegisterMetaType(); } +} registerMetaType; +} // namespace + + +class GestureHandlerModulePrivate { +public: + Bridge* bridge = nullptr; +}; + +GestureHandlerModule::GestureHandlerModule(QObject* parent) : QObject(parent), d_ptr(new GestureHandlerModulePrivate) {} + +GestureHandlerModule::~GestureHandlerModule() {} + +void GestureHandlerModule::setBridge(Bridge* bridge) { + Q_D(GestureHandlerModule); + d->bridge = bridge; +} + +QString GestureHandlerModule::moduleName() { + return "RNGestureHandlerModule"; +} + +QList GestureHandlerModule::methodsToExport() { + return QList{}; +} + +QVariantMap GestureHandlerModule::constantsToExport() { + Q_D(GestureHandlerModule); + + QVariantMap directionValues{{"RIGHT", 1}, {"LEFT", 2}, {"UP", 4}, {"DOWN", 8}}; + + // QRect screenGeometry = screen->geometry(); + // QVariantMap screenValues{{"fontScale", 8}, + // {"width", screenGeometry.width()}, + // {"height", screenGeometry.height()}, + // {"scale", screen->devicePixelRatio()}}; + + // QVariantMap values{{"screen", screenValues}, {"window", windowValues}}; + + return QVariantMap{{"Direction", directionValues}}; +} + +void GestureHandlerModule::handleSetJSResponder(int viewTag, void* blockNativeResponder) {} + +void GestureHandlerModule::handleClearJSResponder() {} + +void GestureHandlerModule::createGestureHandler(const QString& handlerName, int handlerTag, void* config) {} +void GestureHandlerModule::attachGestureHandler(int handlerTag, int viewTag) {} +void GestureHandlerModule::updateGestureHandler(int handlerTag, void* config) {} +void GestureHandlerModule::dropGestureHandler(int handlerTag) {} diff --git a/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h new file mode 100644 index 0000000000..0d0d2c32a2 --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/desktop/gesturehandlermodule.h @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2017-present, Status Research and Development GmbH. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#ifndef GESTUREHANDLER_H +#define GESTUREHANDLER_H + +#include "moduleinterface.h" + +#include + +class GestureHandlerModulePrivate; +class GestureHandlerModule : public QObject, public ModuleInterface { + Q_OBJECT + Q_INTERFACES(ModuleInterface) + + Q_DECLARE_PRIVATE(GestureHandlerModule) + +public: + Q_INVOKABLE GestureHandlerModule(QObject* parent = 0); + ~GestureHandlerModule(); + + void setBridge(Bridge* bridge) override; + + QString moduleName() override; + QList methodsToExport() override; + QVariantMap constantsToExport() override; + + Q_INVOKABLE void handleSetJSResponder(int viewTag, void* blockNativeResponder); + Q_INVOKABLE void handleClearJSResponder(); + Q_INVOKABLE void createGestureHandler(const QString& handlerName, int handlerTag, void* config); + Q_INVOKABLE void attachGestureHandler(int handlerTag, int viewTag); + Q_INVOKABLE void updateGestureHandler(int handlerTag, void* config); + Q_INVOKABLE void dropGestureHandler(int handlerTag); + + +private: + QScopedPointer d_ptr; +}; + +#endif // GESTUREHANDLER_H diff --git a/modules/react-native-desktop-gesture-handler/index.js b/modules/react-native-desktop-gesture-handler/index.js new file mode 100644 index 0000000000..82276071aa --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var RNGestureHandlerModule = require('react-native').NativeModules.RNGestureHandlerModule; + +module.exports = RNGestureHandlerModule; diff --git a/modules/react-native-desktop-gesture-handler/package.json b/modules/react-native-desktop-gesture-handler/package.json new file mode 100644 index 0000000000..11d321c131 --- /dev/null +++ b/modules/react-native-desktop-gesture-handler/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "nativePackage": true, + "name": "react-native-desktop-gesture-handler", + "version": "1.0.0", + "description": "Mock for react-native-gesture-handler package", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "" +} diff --git a/modules/react-native-desktop-linking/desktop/CMakeLists.txt b/modules/react-native-desktop-linking/desktop/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/modules/react-native-desktop-menu/desktop/CMakeLists.txt b/modules/react-native-desktop-menu/desktop/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/modules/react-native-desktop-notification/desktop/CMakeLists.txt b/modules/react-native-desktop-notification/desktop/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/modules/react-native-desktop-shortcuts/desktop/CMakeLists.txt b/modules/react-native-desktop-shortcuts/desktop/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/modules/react-native-status/desktop/rctstatus.cpp b/modules/react-native-status/desktop/rctstatus.cpp index e873750b7f..11c7627ffe 100644 --- a/modules/react-native-status/desktop/rctstatus.cpp +++ b/modules/react-native-status/desktop/rctstatus.cpp @@ -12,14 +12,14 @@ #include "bridge.h" #include "eventdispatcher.h" -#include -#include -#include -#include #include -#include +#include #include +#include +#include #include +#include +#include #include #include "libstatus.h" @@ -29,471 +29,653 @@ extern QString getLogFilePath(); namespace { struct RegisterQMLMetaType { - RegisterQMLMetaType() { - qRegisterMetaType(); - } + RegisterQMLMetaType() { qRegisterMetaType(); } } registerMetaType; } // namespace class RCTStatusPrivate { public: - static Bridge* bridge; - static RCTStatus* rctStatus; + static Bridge *bridge; + static RCTStatus *rctStatus; }; -Bridge* RCTStatusPrivate::bridge = nullptr; -RCTStatus* RCTStatusPrivate::rctStatus = nullptr; +Bridge *RCTStatusPrivate::bridge = nullptr; +RCTStatus *RCTStatusPrivate::rctStatus = nullptr; Q_LOGGING_CATEGORY(RCTSTATUS, "RCTStatus") -RCTStatus::RCTStatus(QObject* parent) : QObject(parent), d_ptr(new RCTStatusPrivate) { - RCTStatusPrivate::rctStatus = this; - SetSignalEventCallback((void*)&RCTStatus::statusGoEventCallback); - connect(this, &RCTStatus::statusGoEvent, this, &RCTStatus::onStatusGoEvent); +RCTStatus::RCTStatus(QObject *parent) + : QObject(parent), d_ptr(new RCTStatusPrivate) { + RCTStatusPrivate::rctStatus = this; + SetSignalEventCallback((void *)&RCTStatus::statusGoEventCallback); + connect(this, &RCTStatus::statusGoEvent, this, &RCTStatus::onStatusGoEvent); } RCTStatus::~RCTStatus() {} -void RCTStatus::setBridge(Bridge* bridge) { - Q_D(RCTStatus); - d->bridge = bridge; +void RCTStatus::setBridge(Bridge *bridge) { + Q_D(RCTStatus); + d->bridge = bridge; } -QString RCTStatus::moduleName() { - return "Status"; +QString RCTStatus::moduleName() { return "Status"; } + +QList RCTStatus::methodsToExport() { + return QList{}; } -QList RCTStatus::methodsToExport() { - return QList{}; +QVariantMap RCTStatus::constantsToExport() { return QVariantMap(); } + +void RCTStatus::shouldMoveToInternalStorage(double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::shouldMoveToInternalStorage call"; + + d->bridge->invokePromiseCallback(callbackId, QVariantList{QVariant()}); } -QVariantMap RCTStatus::constantsToExport() { - return QVariantMap(); +void RCTStatus::moveToInternalStorage(double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::moveToInternalStorage call"; + + d->bridge->invokePromiseCallback(callbackId, QVariantList{QVariant()}); } QString RCTStatus::prepareDirAndUpdateConfig(QString configString) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::prepareDirAndUpdateConfig call - configString:" << configString; + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::prepareDirAndUpdateConfig call - configString:" + << configString; - QJsonParseError jsonError; - const QJsonDocument& jsonDoc = QJsonDocument::fromJson(configString.toUtf8(), &jsonError); - if (jsonError.error != QJsonParseError::NoError){ - qCWarning(RCTSTATUS) << jsonError.errorString(); - } + QJsonParseError jsonError; + const QJsonDocument &jsonDoc = + QJsonDocument::fromJson(configString.toUtf8(), &jsonError); + if (jsonError.error != QJsonParseError::NoError) { + qCWarning(RCTSTATUS) << jsonError.errorString(); + } - QVariantMap configJSON = jsonDoc.toVariant().toMap(); - QVariantMap shhextConfig = configJSON["ShhextConfig"].toMap(); - qCDebug(RCTSTATUS) << "::startNode configString: " << configJSON; + QVariantMap configJSON = jsonDoc.toVariant().toMap(); + QVariantMap shhextConfig = configJSON["ShhextConfig"].toMap(); + qCDebug(RCTSTATUS) << "::startNode configString: " << configJSON; - int networkId = configJSON["NetworkId"].toInt(); - QString relativeDataDirPath = configJSON["DataDir"].toString(); - if (!relativeDataDirPath.startsWith("/")) - relativeDataDirPath.prepend("/"); + int networkId = configJSON["NetworkId"].toInt(); + QString relativeDataDirPath = configJSON["DataDir"].toString(); + if (!relativeDataDirPath.startsWith("/")) + relativeDataDirPath.prepend("/"); - QString rootDirPath = getDataStoragePath(); - QDir rootDir(rootDirPath); - QString absDataDirPath = rootDirPath + relativeDataDirPath; - QDir dataDir(absDataDirPath); - if (!dataDir.exists()) { - dataDir.mkpath("."); - } + QString rootDirPath = getDataStoragePath(); + QDir rootDir(rootDirPath); + QString absDataDirPath = rootDirPath + relativeDataDirPath; + QDir dataDir(absDataDirPath); + if (!dataDir.exists()) { + dataDir.mkpath("."); + } - d_gethLogFilePath = dataDir.absoluteFilePath("geth.log"); - configJSON["DataDir"] = absDataDirPath; - configJSON["KeyStoreDir"] = rootDir.absoluteFilePath("keystore"); - configJSON["LogFile"] = d_gethLogFilePath; + d_gethLogFilePath = dataDir.absoluteFilePath("geth.log"); + configJSON["DataDir"] = absDataDirPath; + configJSON["KeyStoreDir"] = rootDir.absoluteFilePath("keystore"); + configJSON["LogFile"] = d_gethLogFilePath; - shhextConfig["BackupDisabledDataDir"] = rootDirPath; + shhextConfig["BackupDisabledDataDir"] = rootDirPath; - configJSON["ShhExtConfig"] = shhextConfig; + configJSON["ShhExtConfig"] = shhextConfig; - const QJsonDocument& updatedJsonDoc = QJsonDocument::fromVariant(configJSON); - qCInfo(RCTSTATUS) << "::startNode updated configString: " << updatedJsonDoc.toVariant().toMap(); - return QString(updatedJsonDoc.toJson(QJsonDocument::Compact)); + const QJsonDocument &updatedJsonDoc = QJsonDocument::fromVariant(configJSON); + qCInfo(RCTSTATUS) << "::startNode updated configString: " + << updatedJsonDoc.toVariant().toMap(); + return QString(updatedJsonDoc.toJson(QJsonDocument::Compact)); } -void RCTStatus::prepareDirAndUpdateConfig(QString configString, double callbackId) { - Q_D(RCTStatus); - qCInfo(RCTSTATUS) << "::prepareDirAndUpdateConfig call - callbackId:" << callbackId; - QtConcurrent::run([&](QString configString, double callbackId) { - QString updatedConfig = prepareDirAndUpdateConfig(configString); - d->bridge->invokePromiseCallback(callbackId, QVariantList{updatedConfig.toUtf8().data()}); - }, configString, callbackId); +void RCTStatus::prepareDirAndUpdateConfig(QString configString, + double callbackId) { + Q_D(RCTStatus); + qCInfo(RCTSTATUS) << "::prepareDirAndUpdateConfig call - callbackId:" + << callbackId; + QtConcurrent::run( + [&](QString configString, double callbackId) { + QString updatedConfig = prepareDirAndUpdateConfig(configString); + d->bridge->invokePromiseCallback( + callbackId, QVariantList{updatedConfig.toUtf8().data()}); + }, + configString, callbackId); } void RCTStatus::initKeystore() { - qCInfo(RCTSTATUS) << "::initKeystore call"; - QString rootDir = getDataStoragePath(); - const char* result = InitKeystore(rootDir.toUtf8().data()); - logStatusGoResult("::initKeystore InitKeystore", result); + qCInfo(RCTSTATUS) << "::initKeystore call"; + QString rootDir = getDataStoragePath(); + const char *result = InitKeystore(rootDir.toUtf8().data()); + logStatusGoResult("::initKeystore InitKeystore", result); } -void RCTStatus::sendDataNotification(QString dataPayloadJSON, QString tokensJSON, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::sendDataNotification call - callbackId:" << callbackId; - QtConcurrent::run([&](QString dataPayloadJSON, QString tokensJSON, double callbackId) { - const char* result = SendDataNotification(dataPayloadJSON.toUtf8().data(), tokensJSON.toUtf8().data()); - logStatusGoResult("::sendDataNotification SendDataNotification", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, dataPayloadJSON, tokensJSON, callbackId); +void RCTStatus::sendDataNotification(QString dataPayloadJSON, + QString tokensJSON, double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::sendDataNotification call - callbackId:" + << callbackId; + QtConcurrent::run( + [&](QString dataPayloadJSON, QString tokensJSON, double callbackId) { + const char *result = SendDataNotification( + dataPayloadJSON.toUtf8().data(), tokensJSON.toUtf8().data()); + logStatusGoResult("::sendDataNotification SendDataNotification", + result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + dataPayloadJSON, tokensJSON, callbackId); } - #include +#include #include #include -#include #include -void showFileInGraphicalShell(QWidget *parent, const QFileInfo &fileInfo) -{ - // Mac, Windows support folder or file. +void showFileInGraphicalShell(QWidget *parent, const QFileInfo &fileInfo) { +// Mac, Windows support folder or file. #ifdef Q_OS_WIN - const QString explorer = QStandardPaths::findExecutable(QLatin1String("explorer.exe")); - if (explorer.isEmpty()) { - QMessageBox::warning(parent, - QApplication::translate("Core::Internal", - "Launching Windows Explorer Failed"), - QApplication::translate("Core::Internal", - "Could not find explorer.exe in path to launch Windows Explorer.")); - return; - } - QStringList param; - if (!fileInfo.isDir()) - param += QLatin1String("/select,"); - param += QDir::toNativeSeparators(fileInfo.canonicalFilePath()); - QProcess::startDetached(explorer, param); + const QString explorer = + QStandardPaths::findExecutable(QLatin1String("explorer.exe")); + if (explorer.isEmpty()) { + QMessageBox::warning( + parent, QApplication::translate("Core::Internal", + "Launching Windows Explorer Failed"), + QApplication::translate( + "Core::Internal", + "Could not find explorer.exe in path to launch Windows Explorer.")); + return; + } + QStringList param; + if (!fileInfo.isDir()) + param += QLatin1String("/select,"); + param += QDir::toNativeSeparators(fileInfo.canonicalFilePath()); + QProcess::startDetached(explorer, param); #elif defined(Q_OS_MAC) - QStringList scriptArgs; - scriptArgs << QLatin1String("-e") - << QString::fromLatin1("tell application \"Finder\" to reveal POSIX file \"%1\"") - .arg(fileInfo.canonicalFilePath()); - QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); - scriptArgs.clear(); - scriptArgs << QLatin1String("-e") - << QLatin1String("tell application \"Finder\" to activate"); - QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); + QStringList scriptArgs; + scriptArgs << QLatin1String("-e") + << QString::fromLatin1( + "tell application \"Finder\" to reveal POSIX file \"%1\"") + .arg(fileInfo.canonicalFilePath()); + QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); + scriptArgs.clear(); + scriptArgs << QLatin1String("-e") + << QLatin1String("tell application \"Finder\" to activate"); + QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); #else - // we cannot select a file here, because no file browser really supports it... - const QString folder = fileInfo.isDir() ? fileInfo.absoluteFilePath() : fileInfo.dir().absolutePath(); - QProcess browserProc; - browserProc.setProgram("xdg-open"); - browserProc.setArguments(QStringList(folder)); - bool success = browserProc.startDetached(); - const QString error = QString::fromLocal8Bit(browserProc.readAllStandardError()); - success = success && error.isEmpty(); - if (!success) { - QMessageBox::warning(parent, "Launching Explorer Failed", error); - return; - } + // we cannot select a file here, because no file browser really supports it... + const QString folder = fileInfo.isDir() ? fileInfo.absoluteFilePath() + : fileInfo.dir().absolutePath(); + QProcess browserProc; + browserProc.setProgram("xdg-open"); + browserProc.setArguments(QStringList(folder)); + bool success = browserProc.startDetached(); + const QString error = + QString::fromLocal8Bit(browserProc.readAllStandardError()); + success = success && error.isEmpty(); + if (!success) { + QMessageBox::warning(parent, "Launching Explorer Failed", error); + return; + } #endif } void RCTStatus::sendLogs(QString dbJSON, QString jsLogs, double callbackId) { - Q_D(RCTStatus); + Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::sendLogs call - logFilePath:" << getLogFilePath() - << "d_gethLogFilePath:" << d_gethLogFilePath - << "dbJSON:" << dbJSON; + qCDebug(RCTSTATUS) << "::sendLogs call - logFilePath:" << getLogFilePath() + << "d_gethLogFilePath:" << d_gethLogFilePath + << "dbJSON:" << dbJSON; - QString tmpDirName("Status.im"); - QDir tmpDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)); - if (!tmpDir.mkpath(tmpDirName)) { - qCWarning(RCTSTATUS) << "::sendLogs could not create temp dir:" << tmpDirName; - return; - } + QString tmpDirName("Status.im"); + QDir tmpDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)); + if (!tmpDir.mkpath(tmpDirName)) { + qCWarning(RCTSTATUS) << "::sendLogs could not create temp dir:" + << tmpDirName; + return; + } - // Check that at least 20MB are available for log generation - QStorageInfo storage(tmpDir); - if (storage.bytesAvailable() < 20 * 1024 * 1024) { - QMessageBox dlg; - dlg.warning(QApplication::activeWindow(), - "Error", QString("Insufficient storage space available in %1 for log generation. Please free up some space.").arg(storage.rootPath()), - QMessageBox::Close); - return; - } + // Check that at least 20MB are available for log generation + QStorageInfo storage(tmpDir); + if (storage.bytesAvailable() < 20 * 1024 * 1024) { + QMessageBox dlg; + dlg.warning(QApplication::activeWindow(), "Error", + QString("Insufficient storage space available in %1 for log " + "generation. Please free up some space.") + .arg(storage.rootPath()), + QMessageBox::Close); + return; + } - QFile zipFile(tmpDir.absoluteFilePath(tmpDirName + QDir::separator() + "Status-debug-logs.zip")); - QZipWriter zipWriter(&zipFile); - QFile gethLogFile(d_gethLogFilePath); - QFile logFile(getLogFilePath()); - zipWriter.addFile("db.json", dbJSON.toUtf8()); - zipWriter.addFile("js_logs.log", jsLogs.toUtf8()); - if (gethLogFile.exists()) { - zipWriter.addFile(QFileInfo(gethLogFile).fileName(), &gethLogFile); - } - if (logFile.exists()) { - zipWriter.addFile(QFileInfo(logFile).fileName(), &logFile); - } - zipWriter.close(); + QFile zipFile(tmpDir.absoluteFilePath(tmpDirName + QDir::separator() + + "Status-debug-logs.zip")); + QZipWriter zipWriter(&zipFile); + QFile gethLogFile(d_gethLogFilePath); + QFile logFile(getLogFilePath()); + zipWriter.addFile("db.json", dbJSON.toUtf8()); + zipWriter.addFile("js_logs.log", jsLogs.toUtf8()); + if (gethLogFile.exists()) { + zipWriter.addFile(QFileInfo(gethLogFile).fileName(), &gethLogFile); + } + if (logFile.exists()) { + zipWriter.addFile(QFileInfo(logFile).fileName(), &logFile); + } + zipWriter.close(); - showFileInGraphicalShell(QApplication::activeWindow(), QFileInfo(zipFile)); + showFileInGraphicalShell(QApplication::activeWindow(), QFileInfo(zipFile)); } +void RCTStatus::exportLogs(double callbackId) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](double callbackId) { + const char *result = ExportNodeLogs(); + logStatusGoResult("::exportLogs", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + callbackId); +} void RCTStatus::addPeer(QString enode, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::addPeer call - callbackId:" << callbackId; - QtConcurrent::run([&](QString enode, double callbackId) { - const char* result = AddPeer(enode.toUtf8().data()); - logStatusGoResult("::addPeer AddPeer", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, enode, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::addPeer call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString enode, double callbackId) { + const char *result = AddPeer(enode.toUtf8().data()); + logStatusGoResult("::addPeer AddPeer", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + enode, callbackId); } -void RCTStatus::saveAccountAndLogin(QString accountData, QString password, QString config, QString subAccountsData) { +void RCTStatus::saveAccountAndLogin(QString accountData, QString password, + QString config, QString subAccountsData) { - Q_D(RCTStatus); - QString finalConfig = prepareDirAndUpdateConfig(config); - QtConcurrent::run([&](QString accountData, QString password, QString finalConfig, QString subAccountsData) { - const char* result = SaveAccountAndLogin(accountData.toUtf8().data(), password.toUtf8().data(), finalConfig.toUtf8().data(), subAccountsData.toUtf8().data()); + Q_D(RCTStatus); + QString finalConfig = prepareDirAndUpdateConfig(config); + QtConcurrent::run( + [&](QString accountData, QString password, QString finalConfig, + QString subAccountsData) { + const char *result = SaveAccountAndLogin( + accountData.toUtf8().data(), password.toUtf8().data(), + finalConfig.toUtf8().data(), subAccountsData.toUtf8().data()); logStatusGoResult("::saveAccountAndLogin", result); - }, accountData, password, finalConfig, subAccountsData); + }, + accountData, password, finalConfig, subAccountsData); } +// void RCTStatus::saveAccountAndLoginWithKeycard(QString accountData, +// QString password, QString +// config, +// QString chatKey) { +// Q_D(RCTStatus); +// QString finalConfig = prepareDirAndUpdateConfig(config); +// QtConcurrent::run( +// [&](QString accountData, QString password, QString finalConfig, +// QString chatKey) { +// const char *result = SaveAccountAndLoginWithKeycard( +// accountData.toUtf8().data(), password.toUtf8().data(), +// finalConfig.toUtf8().data(), chatKey.toUtf8().data()); +// logStatusGoResult("::saveAccountAndLoginWithKeycard", result); +// }, +// accountData, password, finalConfig, chatKey); +//} + void RCTStatus::login(QString accountData, QString password) { - Q_D(RCTStatus); - QtConcurrent::run([&](QString accountData, QString password) { - const char* result = Login(accountData.toUtf8().data(), password.toUtf8().data()); + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString accountData, QString password) { + const char *result = + Login(accountData.toUtf8().data(), password.toUtf8().data()); logStatusGoResult("::login", result); - }, accountData, password); - + }, + accountData, password); } -void RCTStatus::logout() { - Q_D(RCTStatus); - QtConcurrent::run([&]() { - const char* result = Logout(); - logStatusGoResult("::logout", result); - }); +// void RCTStatus::loginWithKeycard(QString accountData, QString password, +// QString chatKey) { +// +// Q_D(RCTStatus); +// QtConcurrent::run( +// [&](QString accountData, QString password, QString chatKey) { +// const char *result = +// LoginWithKeycard(accountData.toUtf8().data(), +// password.toUtf8().data(), +// chatKey.toUtf8().data()); +// logStatusGoResult("::loginWithKeycard", result); +// }, +// accountData, password, chatKey); +//} +void RCTStatus::logout() { + Q_D(RCTStatus); + QtConcurrent::run([&]() { + const char *result = Logout(); + logStatusGoResult("::logout", result); + }); } void RCTStatus::openAccounts(double callbackId) { - Q_D(RCTStatus); - QtConcurrent::run([&](double callbackId) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](double callbackId) { QString rootDir = getDataStoragePath(); - const char* result = OpenAccounts(rootDir.toUtf8().data()); + const char *result = OpenAccounts(rootDir.toUtf8().data()); logStatusGoResult("::openAccounts", result); d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, callbackId); - + }, + callbackId); } void RCTStatus::multiAccountStoreAccount(QString json, double callbackId) { - Q_D(RCTStatus); - QtConcurrent::run([&](QString json, double callbackId) { - const char* result = MultiAccountStoreAccount(json.toUtf8().data()); + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = MultiAccountStoreAccount(json.toUtf8().data()); logStatusGoResult("::multiAccountStoreAccount", result); d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, json, callbackId); + }, + json, callbackId); } void RCTStatus::multiAccountLoadAccount(QString json, double callbackId) { - Q_D(RCTStatus); - QtConcurrent::run([&](QString json, double callbackId) { - const char* result = MultiAccountLoadAccount(json.toUtf8().data()); + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = MultiAccountLoadAccount(json.toUtf8().data()); logStatusGoResult("::multiAccountLoadAccount", result); d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, json, callbackId); + }, + json, callbackId); } void RCTStatus::multiAccountReset(double callbackId) { - Q_D(RCTStatus); - QtConcurrent::run([&](double callbackId) { - const char* result = MultiAccountReset(); + Q_D(RCTStatus); + QtConcurrent::run( + [&](double callbackId) { + const char *result = MultiAccountReset(); logStatusGoResult("::multiAccountReset", result); d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, callbackId); + }, + callbackId); } void RCTStatus::multiAccountDeriveAddresses(QString json, double callbackId) { - Q_D(RCTStatus); - QtConcurrent::run([&](QString json, double callbackId) { - const char* result = MultiAccountDeriveAddresses(json.toUtf8().data()); + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = MultiAccountDeriveAddresses(json.toUtf8().data()); logStatusGoResult("::multiAccountDeriveAddresses", result); d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, json, callbackId); + }, + json, callbackId); } +void RCTStatus::multiAccountStoreDerived(QString json, double callbackId) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = + MultiAccountStoreDerivedAccounts(json.toUtf8().data()); + logStatusGoResult("::multiAccountStoreDerived", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + json, callbackId); +} + +void RCTStatus::multiAccountGenerateAndDeriveAddresses(QString json, + double callbackId) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = + MultiAccountGenerateAndDeriveAddresses(json.toUtf8().data()); + logStatusGoResult("::multiAccountGenerateAndDeriveAddresses", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + json, callbackId); +} + +void RCTStatus::multiAccountImportMnemonic(QString json, double callbackId) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString json, double callbackId) { + const char *result = MultiAccountImportMnemonic(json.toUtf8().data()); + logStatusGoResult("::multiAccountImportMnemonic", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + json, callbackId); +} void RCTStatus::verify(QString address, QString password, double callbackId) { - Q_D(RCTStatus); - qCInfo(RCTSTATUS) << "::verify call - callbackId:" << callbackId; - QtConcurrent::run([&](QString address, QString password, double callbackId) { - QDir rootDir(getDataStoragePath()); - QString keystorePath = rootDir.absoluteFilePath("keystore"); - const char* result = VerifyAccountPassword(keystorePath.toUtf8().data(), address.toUtf8().data(), password.toUtf8().data()); - logStatusGoResult("::verify VerifyAccountPassword", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, address, password, callbackId); + Q_D(RCTStatus); + qCInfo(RCTSTATUS) << "::verify call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString address, QString password, double callbackId) { + QDir rootDir(getDataStoragePath()); + QString keystorePath = rootDir.absoluteFilePath("keystore"); + const char *result = VerifyAccountPassword(keystorePath.toUtf8().data(), + address.toUtf8().data(), + password.toUtf8().data()); + logStatusGoResult("::verify VerifyAccountPassword", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + address, password, callbackId); } - - -void RCTStatus::sendTransaction(QString txArgsJSON, QString password, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::sendTransaction call - callbackId:" << callbackId; - QtConcurrent::run([&](QString txArgsJSON, QString password, double callbackId) { - const char* result = SendTransaction(txArgsJSON.toUtf8().data(), password.toUtf8().data()); - logStatusGoResult("::sendTransaction SendTransaction", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, txArgsJSON, password, callbackId); +void RCTStatus::sendTransaction(QString txArgsJSON, QString password, + double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::sendTransaction call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString txArgsJSON, QString password, double callbackId) { + const char *result = SendTransaction(txArgsJSON.toUtf8().data(), + password.toUtf8().data()); + logStatusGoResult("::sendTransaction SendTransaction", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + txArgsJSON, password, callbackId); } - void RCTStatus::signMessage(QString rpcParams, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::signMessage call - callbackId:" << callbackId; - QtConcurrent::run([&](QString rpcParams, double callbackId) { - const char* result = SignMessage(rpcParams.toUtf8().data()); - logStatusGoResult("::signMessage SignMessage", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, rpcParams, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::signMessage call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString rpcParams, double callbackId) { + const char *result = SignMessage(rpcParams.toUtf8().data()); + logStatusGoResult("::signMessage SignMessage", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + rpcParams, callbackId); } +void RCTStatus::signTypedData(QString data, QString account, QString password, + double callbackId) { + + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::signMessage call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString data, QString account, QString password, double callbackId) { + const char *result = + SignTypedData(data.toUtf8().data(), account.toUtf8().data(), + password.toUtf8().data()); + logStatusGoResult("::signTypedData signTypedData", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + data, account, password, callbackId); +} void RCTStatus::signGroupMembership(QString content, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::signGroupMembership - callbackId:" << callbackId; - QtConcurrent::run([&](QString content, double callbackId) { - const char* result = SignGroupMembership(content.toUtf8().data()); - logStatusGoResult("::signGroupMembership SignGroupMembership", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, content, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::signGroupMembership - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString content, double callbackId) { + const char *result = SignGroupMembership(content.toUtf8().data()); + logStatusGoResult("::signGroupMembership SignGroupMembership", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + content, callbackId); } -void RCTStatus::extractGroupMembershipSignatures(QString signatures, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::extractGroupMembershipSignatures - callbackId:" << callbackId; - QtConcurrent::run([&](QString signatures, double callbackId) { - const char* result = ExtractGroupMembershipSignatures(signatures.toUtf8().data()); - logStatusGoResult("::extractGroupMembershipSignatures ExtractGroupMembershipSignatures", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, signatures, callbackId); +void RCTStatus::extractGroupMembershipSignatures(QString signatures, + double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::extractGroupMembershipSignatures - callbackId:" + << callbackId; + QtConcurrent::run( + [&](QString signatures, double callbackId) { + const char *result = + ExtractGroupMembershipSignatures(signatures.toUtf8().data()); + logStatusGoResult("::extractGroupMembershipSignatures " + "ExtractGroupMembershipSignatures", + result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + signatures, callbackId); } -void RCTStatus::setAdjustResize() { -} +void RCTStatus::setAdjustResize() {} +void RCTStatus::setAdjustPan() {} -void RCTStatus::setAdjustPan() { -} +void RCTStatus::setSoftInputMode(int i) {} +void RCTStatus::clearCookies() {} -void RCTStatus::setSoftInputMode(int i) { -} - - - -void RCTStatus::clearCookies() { -} - - -void RCTStatus::clearStorageAPIs() { -} - +void RCTStatus::clearStorageAPIs() {} void RCTStatus::callRPC(QString payload, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::callRPC call - payload:" << payload.left(128) << "callbackId:" << callbackId; - QtConcurrent::run([&](QString payload, double callbackId) { - const char* result = CallRPC(payload.toUtf8().data()); - logStatusGoResult("::callRPC CallRPC", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, payload, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::callRPC call - payload:" << payload.left(128) + << "callbackId:" << callbackId; + QtConcurrent::run( + [&](QString payload, double callbackId) { + const char *result = CallRPC(payload.toUtf8().data()); + logStatusGoResult("::callRPC CallRPC", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + payload, callbackId); } void RCTStatus::callPrivateRPC(QString payload, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::callPrivateRPC call - payload:" << payload.left(128) << "callbackId:" << callbackId; - QtConcurrent::run([&](QString payload, double callbackId) { - const char* result = CallPrivateRPC(payload.toUtf8().data()); - logStatusGoResult("::callPrivateRPC CallPrivateRPC", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, payload, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::callPrivateRPC call - payload:" << payload.left(128) + << "callbackId:" << callbackId; + QtConcurrent::run( + [&](QString payload, double callbackId) { + const char *result = CallPrivateRPC(payload.toUtf8().data()); + logStatusGoResult("::callPrivateRPC CallPrivateRPC", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + payload, callbackId); } -void RCTStatus::closeApplication() { +void RCTStatus::closeApplication() {} + +void RCTStatus::connectionChange(QString type, bool isExpensive) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString type, bool isExpensive) { + ConnectionChange(type.toUtf8().data(), isExpensive ? 1 : 0); + qCWarning(RCTSTATUS) << "::connectionChange"; + }, + type, isExpensive); +} + +void RCTStatus::appStateChange(QString type) { + Q_D(RCTStatus); + QtConcurrent::run( + [&](QString type) { + AppStateChange(type.toUtf8().data()); + qCWarning(RCTSTATUS) << "::appStateChange"; + }, + type); } bool RCTStatus::JSCEnabled() { - qCDebug(RCTSTATUS) << "::JSCEnabled call"; - return false; + qCDebug(RCTSTATUS) << "::JSCEnabled call"; + return false; } -void RCTStatus::statusGoEventCallback(const char* event) { - qCDebug(RCTSTATUS) << "::statusGoEventCallback call - event: " << event; - RCTStatusPrivate::rctStatus->emitStatusGoEvent(event); +void RCTStatus::statusGoEventCallback(const char *event) { + qCDebug(RCTSTATUS) << "::statusGoEventCallback call - event: " << event; + RCTStatusPrivate::rctStatus->emitStatusGoEvent(event); } void RCTStatus::emitStatusGoEvent(QString event) { - qCDebug(RCTSTATUS) << "::emitStatusGoEvent call - event: " << event; - Q_EMIT statusGoEvent(event); + qCDebug(RCTSTATUS) << "::emitStatusGoEvent call - event: " << event; + Q_EMIT statusGoEvent(event); } void RCTStatus::onStatusGoEvent(QString event) { - qCDebug(RCTSTATUS) << "::onStatusGoEvent call - event: " << event.toUtf8().data(); - RCTStatusPrivate::bridge->eventDispatcher()->sendDeviceEvent("gethEvent", QVariantMap{{"jsonEvent", event.toUtf8().data()}}); + qCDebug(RCTSTATUS) << "::onStatusGoEvent call - event: " + << event.toUtf8().data(); + RCTStatusPrivate::bridge->eventDispatcher()->sendDeviceEvent( + "gethEvent", QVariantMap{{"jsonEvent", event.toUtf8().data()}}); } -void RCTStatus::logStatusGoResult(const char* methodName, const char* result) -{ - QJsonParseError jsonError; - QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(result).toUtf8(), &jsonError); - if (jsonError.error != QJsonParseError::NoError) { - qCWarning(RCTSTATUS) << qUtf8Printable(jsonError.errorString()); - return; - } +void RCTStatus::logStatusGoResult(const char *methodName, const char *result) { + QJsonParseError jsonError; + QJsonDocument jsonDoc = + QJsonDocument::fromJson(QString(result).toUtf8(), &jsonError); + if (jsonError.error != QJsonParseError::NoError) { + qCWarning(RCTSTATUS) << qUtf8Printable(jsonError.errorString()); + return; + } - QString error = jsonDoc.toVariant().toMap().value("error").toString(); - if (error.isEmpty()) { - qCDebug(RCTSTATUS) << methodName << "succeeded"; - } else { - qCWarning(RCTSTATUS) << methodName << "- error:" << qUtf8Printable(error); - } + QString error = jsonDoc.toVariant().toMap().value("error").toString(); + if (error.isEmpty()) { + qCDebug(RCTSTATUS) << methodName << "succeeded"; + } else { + qCWarning(RCTSTATUS) << methodName << "- error:" << qUtf8Printable(error); + } } void RCTStatus::updateMailservers(QString enodes, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::updateMailservers call - callbackId:" << callbackId; - QtConcurrent::run([&](QString enodes, double callbackId) { - const char* result = UpdateMailservers(enodes.toUtf8().data()); - logStatusGoResult("::updateMailservers UpdateMailservers", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, enodes, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::updateMailservers call - callbackId:" << callbackId; + QtConcurrent::run( + [&](QString enodes, double callbackId) { + const char *result = UpdateMailservers(enodes.toUtf8().data()); + logStatusGoResult("::updateMailservers UpdateMailservers", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + enodes, callbackId); } -void RCTStatus::getNodesFromContract(QString url, QString address, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::getNodesFromContract call - callbackId:" << callbackId; - QtConcurrent::run([&](QString url, QString address, double callbackId) { - const char* result = GetNodesFromContract(url.toUtf8().data(), address.toUtf8().data()); - logStatusGoResult("::getNodesFromContract GetNodesFromContract", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, url, address, callbackId); +void RCTStatus::getNodesFromContract(QString url, QString address, + double callbackId) { + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::getNodesFromContract call - callbackId:" + << callbackId; + QtConcurrent::run( + [&](QString url, QString address, double callbackId) { + const char *result = + GetNodesFromContract(url.toUtf8().data(), address.toUtf8().data()); + logStatusGoResult("::getNodesFromContract GetNodesFromContract", + result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + url, address, callbackId); } void RCTStatus::chaosModeUpdate(bool on, double callbackId) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::chaosModeUpdate call - callbackId:" << callbackId; - QtConcurrent::run([&](bool on, double callbackId) { - const char* result = ChaosModeUpdate(on); - logStatusGoResult("::chaosModeUpdate ChaosModeUpdate", result); - d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); - }, on, callbackId); + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::chaosModeUpdate call - callbackId:" << callbackId; + QtConcurrent::run( + [&](bool on, double callbackId) { + const char *result = ChaosModeUpdate(on); + logStatusGoResult("::chaosModeUpdate ChaosModeUpdate", result); + d->bridge->invokePromiseCallback(callbackId, QVariantList{result}); + }, + on, callbackId); } QString RCTStatus::generateAlias(QString publicKey) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::generateAlias call"; - //return GenerateGfycat(publicKey.toUtf8().data()); - return "test"; + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::generateAlias call"; + // return GenerateGfycat(publicKey.toUtf8().data()); + return "test"; } QString RCTStatus::identicon(QString publicKey) { - Q_D(RCTStatus); - qCDebug(RCTSTATUS) << "::identicon call"; - //return Identicon(publicKey.toUtf8().data()); - return "test"; + Q_D(RCTStatus); + qCDebug(RCTSTATUS) << "::identicon call"; + // return Identicon(publicKey.toUtf8().data()); + return "test"; } diff --git a/modules/react-native-status/desktop/rctstatus.h b/modules/react-native-status/desktop/rctstatus.h index a69cbe30ec..3095389aeb 100644 --- a/modules/react-native-status/desktop/rctstatus.h +++ b/modules/react-native-status/desktop/rctstatus.h @@ -20,73 +20,97 @@ Q_DECLARE_LOGGING_CATEGORY(RCTSTATUS) class RCTStatusPrivate; class RCTStatus : public QObject, public ModuleInterface { - Q_OBJECT - Q_INTERFACES(ModuleInterface) + Q_OBJECT + Q_INTERFACES(ModuleInterface) - Q_DECLARE_PRIVATE(RCTStatus) + Q_DECLARE_PRIVATE(RCTStatus) public: - Q_INVOKABLE RCTStatus(QObject* parent = 0); - ~RCTStatus(); + Q_INVOKABLE RCTStatus(QObject *parent = 0); + ~RCTStatus(); - void setBridge(Bridge* bridge) override; + void setBridge(Bridge *bridge) override; - QString moduleName() override; - QList methodsToExport() override; - QVariantMap constantsToExport() override; + QString moduleName() override; + QList methodsToExport() override; + QVariantMap constantsToExport() override; - Q_INVOKABLE void initKeystore(); - Q_INVOKABLE void sendDataNotification(QString dataPayloadJSON, QString tokensJSON, double callbackId); - Q_INVOKABLE void sendLogs(QString dbJSON, QString jsLogs, double callbackId); - Q_INVOKABLE void addPeer(QString enode, double callbackId); - Q_INVOKABLE void prepareDirAndUpdateConfig(QString configString, double callbackId); - Q_INVOKABLE void login(QString accountData, QString password); - Q_INVOKABLE void saveAccountAndLogin(QString accountData, QString password, QString config, QString subAccountsData); - Q_INVOKABLE void logout(); - Q_INVOKABLE void openAccounts(double callbackId); - Q_INVOKABLE void multiAccountStoreAccount(QString json, double callbackId); - Q_INVOKABLE void multiAccountLoadAccount(QString json, double callbackId); - Q_INVOKABLE void multiAccountReset(double callbackId); - Q_INVOKABLE void multiAccountDeriveAddresses(QString json, double callbackId); - Q_INVOKABLE void verify(QString address, QString password, double callbackId); - Q_INVOKABLE void sendTransaction(QString txArgsJSON, QString password, double callbackId); - Q_INVOKABLE void signMessage(QString rpcParams, double callbackId); - Q_INVOKABLE void signGroupMembership(QString content, double callbackId); - Q_INVOKABLE void extractGroupMembershipSignatures(QString signatures, double callbackId); - Q_INVOKABLE void updateMailservers(QString enodes, double callbackId); - Q_INVOKABLE void getNodesFromContract(QString url, QString address, double callbackId); - Q_INVOKABLE void chaosModeUpdate(bool on, double callbackId); + Q_INVOKABLE void shouldMoveToInternalStorage(double callbackId); + Q_INVOKABLE void moveToInternalStorage(double callbackId); + Q_INVOKABLE void initKeystore(); + Q_INVOKABLE void sendDataNotification(QString dataPayloadJSON, + QString tokensJSON, double callbackId); + Q_INVOKABLE void sendLogs(QString dbJSON, QString jsLogs, double callbackId); + Q_INVOKABLE void exportLogs(double callbackId); + Q_INVOKABLE void addPeer(QString enode, double callbackId); + Q_INVOKABLE void prepareDirAndUpdateConfig(QString configString, + double callbackId); + Q_INVOKABLE void login(QString accountData, QString password); + // Q_INVOKABLE void loginWithKeycard(QString accountData, QString password, + // QString chatKey); + Q_INVOKABLE void saveAccountAndLogin(QString accountData, QString password, + QString config, QString subAccountsData); + // Q_INVOKABLE void saveAccountAndLoginWithKeycard(QString accountData, + // QString password, + // QString config, + // QString chatKey); + Q_INVOKABLE void logout(); + Q_INVOKABLE void openAccounts(double callbackId); + Q_INVOKABLE void multiAccountStoreAccount(QString json, double callbackId); + Q_INVOKABLE void multiAccountLoadAccount(QString json, double callbackId); + Q_INVOKABLE void multiAccountReset(double callbackId); + Q_INVOKABLE void multiAccountDeriveAddresses(QString json, double callbackId); + Q_INVOKABLE void multiAccountImportMnemonic(QString json, double callbackId); + Q_INVOKABLE void multiAccountStoreDerived(QString json, double callbackId); + Q_INVOKABLE void multiAccountGenerateAndDeriveAddresses(QString json, + double callbackId); + Q_INVOKABLE void verify(QString address, QString password, double callbackId); + Q_INVOKABLE void sendTransaction(QString txArgsJSON, QString password, + double callbackId); + Q_INVOKABLE void signMessage(QString rpcParams, double callbackId); + Q_INVOKABLE void signTypedData(QString data, QString account, + QString password, double callbackId); - Q_INVOKABLE void setAdjustResize(); - Q_INVOKABLE void setAdjustPan(); - Q_INVOKABLE void setSoftInputMode(int i); + Q_INVOKABLE void signGroupMembership(QString content, double callbackId); + Q_INVOKABLE void extractGroupMembershipSignatures(QString signatures, + double callbackId); + Q_INVOKABLE void updateMailservers(QString enodes, double callbackId); + Q_INVOKABLE void getNodesFromContract(QString url, QString address, + double callbackId); + Q_INVOKABLE void chaosModeUpdate(bool on, double callbackId); - Q_INVOKABLE void clearCookies(); - Q_INVOKABLE void clearStorageAPIs(); - Q_INVOKABLE void callRPC(QString payload, double callbackId); - Q_INVOKABLE void callPrivateRPC(QString payload, double callbackId); - Q_INVOKABLE void closeApplication(); + Q_INVOKABLE void setAdjustResize(); + Q_INVOKABLE void setAdjustPan(); + Q_INVOKABLE void setSoftInputMode(int i); - Q_INVOKABLE static bool JSCEnabled(); - Q_INVOKABLE static void statusGoEventCallback(const char* event); + Q_INVOKABLE void clearCookies(); + Q_INVOKABLE void clearStorageAPIs(); + Q_INVOKABLE void callRPC(QString payload, double callbackId); + Q_INVOKABLE void callPrivateRPC(QString payload, double callbackId); + Q_INVOKABLE void closeApplication(); + Q_INVOKABLE void connectionChange(QString type, bool isExpensive); + Q_INVOKABLE void appStateChange(QString type); - Q_INVOKABLE QString identicon(QString publicKey); - Q_INVOKABLE QString generateAlias(QString publicKey); + Q_INVOKABLE static bool JSCEnabled(); + Q_INVOKABLE static void statusGoEventCallback(const char *event); - void emitStatusGoEvent(QString event); + Q_INVOKABLE QString identicon(QString publicKey); + Q_INVOKABLE QString generateAlias(QString publicKey); + + void emitStatusGoEvent(QString event); Q_SIGNALS: - void statusGoEvent(QString event); + void statusGoEvent(QString event); private Q_SLOTS: - void onStatusGoEvent(QString event); + void onStatusGoEvent(QString event); private: - void logStatusGoResult(const char* methodName, const char* result); + void logStatusGoResult(const char *methodName, const char *result); - QString prepareDirAndUpdateConfig(QString configString); - QScopedPointer d_ptr; - QString d_gethLogFilePath; + QString prepareDirAndUpdateConfig(QString configString); + QScopedPointer d_ptr; + QString d_gethLogFilePath; }; #endif // RCTSTATUS_H diff --git a/nix/desktop/base-image/default.nix b/nix/desktop/base-image/default.nix new file mode 100644 index 0000000000..031f6ff8a3 --- /dev/null +++ b/nix/desktop/base-image/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchurl, unzip }: + +let + defaultPackageSource = { + version = "20190923"; + hostSystem = "x86_64-linux"; + }; + packageSources = { + "linux" = defaultPackageSource // { + sha256 = "1l2rmqc2mxlz4qp5pnl1763pzqh6y3aawxrd9336q5w35xgrgmcm"; + }; + "macos" = defaultPackageSource // { + sha256 = "1j73l7xry0xw922zxhbsai1391a4i15rni1pfszr3cis8v95n21v"; + hostSystem = "x86_64-darwin"; + }; + "windows" = defaultPackageSource // { + sha256 = "0sb1nqwy2ap7lr1vrk497fqrjhv7c470pm0kmrvwn4nas4gm40g5"; + }; + }; + packageFactory = target-os: + let packageSource = packageSources."${target-os}"; + in stdenv.mkDerivation rec { + inherit (packageSource) version; + pname = "status-im-${target-os}-desktop-files"; + + src = assert stdenv.lib.asserts.assertMsg + (stdenv.hostPlatform.system == packageSource.hostSystem) + "${pname} is not supported on ${stdenv.hostPlatform.system}"; + fetchurl { + inherit (packageSource) sha256; + url = "https://desktop-app-files.ams3.digitaloceanspaces.com/status-im-desktop-files-${target-os}-${packageSource.version}.zip"; + }; + + nativeBuildInputs = [ unzip ]; + + phases = [ "unpackPhase" ]; + unpackPhase = '' + mkdir -p $out/src + unzip $src -d $out/src + ''; + + meta = with stdenv.lib; { + description = "A base image for Status Desktop release distributions"; + homepage = https://desktop-app-files.ams3.digitaloceanspaces.com/; + license = licenses.gpl3; + maintainers = [ maintainers.pombeirp ]; + platforms = platforms.linux ++ platforms.darwin; + }; + }; + +in target-os: + let package = (packageFactory target-os); + in package // { + shellHook = '' + ${package.shellHook or ""} + export STATUSREACT_${stdenv.lib.toUpper target-os}_BASEIMAGE_PATH="${package}/src" + ''; +} diff --git a/nix/desktop/default.nix b/nix/desktop/default.nix index ac6b7cffaa..738eea440e 100644 --- a/nix/desktop/default.nix +++ b/nix/desktop/default.nix @@ -6,9 +6,10 @@ let inherit (stdenv.lib) catAttrs concatStrings optional unique; platform = callPackage ../platform.nix { inherit target-os; }; - linuxPlatform = callPackage ./linux { inherit status-go; }; - darwinPlatform = callPackage ./macos { inherit status-go darwin; }; - windowsPlatform = callPackage ./windows { inherit go; }; + baseImageFactory = callPackage ./base-image { inherit stdenv; }; + linuxPlatform = callPackage ./linux { inherit stdenv status-go baseImageFactory; }; + darwinPlatform = callPackage ./macos { inherit stdenv status-go darwin baseImageFactory; }; + windowsPlatform = callPackage ./windows { inherit stdenv go baseImageFactory; }; snoreNotifySources = callPackage ./cmake/snorenotify { }; qtkeychainSources = callPackage ./cmake/qtkeychain { }; selectedSources = diff --git a/nix/desktop/linux/base-image/default.nix b/nix/desktop/linux/base-image/default.nix deleted file mode 100644 index 82acc68ec3..0000000000 --- a/nix/desktop/linux/base-image/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -let - package = stdenv.mkDerivation rec { - name = "StatusImAppImage"; - version = "20190515"; - - src = - if stdenv.hostPlatform.system == "x86_64-linux" then - fetchurl { - url = "https://desktop-app-files.ams3.digitaloceanspaces.com/${name}_${version}.zip"; - sha256 = "0g7qa97cr0f9807sfd3khxiqz575i9kxi6lfda350ilaw8lnnfv2"; - } - else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; - - nativeBuildInputs = [ unzip ]; - - phases = [ "unpackPhase" ]; - unpackPhase = '' - mkdir -p $out/src - unzip $src -d $out/src - ''; - - meta = with stdenv.lib; { - description = "A base image for Linux Status Desktop release distributions"; - homepage = https://desktop-app-files.ams3.digitaloceanspaces.com/; - license = licenses.gpl3; - maintainers = [ maintainers.pombeirp ]; - platforms = platforms.linux; - }; - }; - -in package // { - shellHook = (package.shellHook or "") + '' - export STATUSREACT_LINUX_BASEIMAGE_PATH="${package}/src" - ''; -} diff --git a/nix/desktop/linux/default.nix b/nix/desktop/linux/default.nix index eb2ee898c0..a08479650c 100644 --- a/nix/desktop/linux/default.nix +++ b/nix/desktop/linux/default.nix @@ -1,5 +1,5 @@ { stdenv, callPackage, - appimagekit, patchelf, qt5, status-go }: + appimagekit, patchelf, qt5, status-go, baseImageFactory }: with stdenv; @@ -7,7 +7,7 @@ assert isLinux; let inherit (lib) concatStrings catAttrs; - baseImage = callPackage ./base-image { }; + baseImage = baseImageFactory "linux"; appimagekit = callPackage ./appimagekit { }; linuxdeployqt = callPackage ./linuxdeployqt { inherit appimagekit; }; @@ -16,7 +16,6 @@ in { appimagekit linuxdeployqt patchelf - baseImage qt5.full ] ++ status-go.buildInputs; diff --git a/nix/desktop/macos/base-image/default.nix b/nix/desktop/macos/base-image/default.nix deleted file mode 100644 index bc87b46e33..0000000000 --- a/nix/desktop/macos/base-image/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -let - package = stdenv.mkDerivation rec { - pname = "StatusImAppBundle"; - version = "20190515"; - - src = - if stdenv.hostPlatform.system == "x86_64-darwin" then - fetchurl { - url = "https://desktop-app-files.ams3.digitaloceanspaces.com/Status_${version}.app.zip"; - sha256 = "1255jgdp0apqh7qfp752nww91iq39x5mm7rf0wazq2vjahfr4pc5"; - } - else throw "${pname} is not supported on ${stdenv.hostPlatform.system}"; - - nativeBuildInputs = [ unzip ]; - - phases = [ "unpackPhase" ]; - unpackPhase = '' - mkdir -p $out/src - unzip $src -d $out/src - ''; - - meta = with stdenv.lib; { - description = "A base image for macOS Status Desktop release distributions"; - homepage = https://desktop-app-files.ams3.digitaloceanspaces.com/; - license = licenses.gpl3; - maintainers = [ maintainers.pombeirp ]; - platforms = platforms.darwin; - }; - }; - -in package // { - shellHook = (package.shellHook or "") + '' - export STATUSREACT_MACOS_BASEIMAGE_PATH="${package}/src" - ''; -} diff --git a/nix/desktop/macos/default.nix b/nix/desktop/macos/default.nix index 55d005d794..8d21cc8fbe 100644 --- a/nix/desktop/macos/default.nix +++ b/nix/desktop/macos/default.nix @@ -1,5 +1,5 @@ { stdenv, callPackage, - darwin, qt5, status-go }: + darwin, qt5, status-go, baseImageFactory }: with darwin.apple_sdk.frameworks; @@ -7,7 +7,7 @@ assert stdenv.isDarwin; let inherit (stdenv.lib) concatStrings catAttrs; - baseImage = callPackage ./base-image { }; + baseImage = baseImageFactory "macos"; in { buildInputs = [ diff --git a/nix/desktop/windows/base-image/default.nix b/nix/desktop/windows/base-image/default.nix deleted file mode 100644 index 59ef0c6884..0000000000 --- a/nix/desktop/windows/base-image/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -assert stdenv.isLinux; - -let - package = stdenv.mkDerivation rec { - pname = "StatusIm-Windows-base-image"; - version = "20190515"; - - src = - if stdenv.hostPlatform.system == "x86_64-linux" then - fetchurl { - url = "https://desktop-app-files.ams3.digitaloceanspaces.com/${pname}_${version}.zip"; - sha256 = "0wkq0khllms2hnbznb1j8l8yfw6z7phzrdg4ndyik20jkl0faj8f"; - } - else throw "${pname} is not supported on ${stdenv.hostPlatform.system}"; - - nativeBuildInputs = [ unzip ]; - - phases = [ "unpackPhase" ]; - unpackPhase = '' - mkdir -p $out/src - unzip $src -d $out/src - ''; - - meta = with stdenv.lib; { - description = "A base image for Windows Status Desktop release distributions"; - homepage = https://desktop-app-files.ams3.digitaloceanspaces.com/; - license = licenses.gpl3; - maintainers = [ maintainers.pombeirp ]; - platforms = platforms.linux; - }; - }; - -in package // { - shellHook = (package.shellHook or "") + '' - export STATUSREACT_WINDOWS_BASEIMAGE_PATH="${package}/src" - ''; -} diff --git a/nix/desktop/windows/default.nix b/nix/desktop/windows/default.nix index d31251717b..3df41b5d56 100644 --- a/nix/desktop/windows/default.nix +++ b/nix/desktop/windows/default.nix @@ -1,10 +1,10 @@ { stdenv, callPackage, - conan, nsis, go }: + conan, nsis, go, baseImageFactory }: assert stdenv.isLinux; let - baseImage = callPackage ./base-image { }; + baseImage = baseImageFactory "windows"; in { buildInputs = stdenv.lib.optionals stdenv.isLinux [ diff --git a/nix/mobile/android/maven-and-npm-deps/default.nix b/nix/mobile/android/maven-and-npm-deps/default.nix index 85ff29676e..313c727bb1 100644 --- a/nix/mobile/android/maven-and-npm-deps/default.nix +++ b/nix/mobile/android/maven-and-npm-deps/default.nix @@ -43,7 +43,7 @@ let ]; dirsToExclude = [ ".git" ".svn" "CVS" ".hg" ".gradle" "build" "intermediates" "libs" "obj" ]; filesToInclude = [ ".babelrc" ]; - filesToExclude = [ "android/gradlew" ]; + filesToExclude = [ "VERSION" "android/gradlew" ]; root = path; }; }; diff --git a/react-native/src/desktop/status_im/react_native/js_dependencies.cljs b/react-native/src/desktop/status_im/react_native/js_dependencies.cljs index 02ba7e88e3..817bd2fdfa 100644 --- a/react-native/src/desktop/status_im/react_native/js_dependencies.cljs +++ b/react-native/src/desktop/status_im/react_native/js_dependencies.cljs @@ -18,10 +18,10 @@ (def desktop-shortcuts (js/require "react-native-desktop-shortcuts")) (def react-native-firebase #js {}) (def touchid #js {}) -(def camera #js {:default #js {:constants {:Aspect "Portrait"}}}) +(def camera #js {:RNCamera #js {:constants #js {:Aspect "Portrait"}}}) (def status-keycard #js {:default #js {}}) (def dialogs #js {}) -(def dismiss-keyboard #js {}) +(def dismiss-keyboard #()) (def image-crop-picker #js {}) (def image-resizer #js {}) (def svg #js {}) @@ -29,6 +29,7 @@ (def snoopy-filter #js {}) (def snoopy-bars #js {}) (def snoopy-buffer #js {}) +(def react-native-screens #js {}) (def background-timer #js {:setTimeout (fn [cb ms] (js/setTimeout cb ms))}) (def react-navigation (js/require "react-navigation")) (def react-native-navigation-twopane (js/require "react-native-navigation-twopane")) diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh index d8c6e904bb..175185d958 100755 --- a/scripts/build-desktop.sh +++ b/scripts/build-desktop.sh @@ -122,6 +122,7 @@ function compile() { local EXTERNAL_MODULES_DIR="$(jq -r '.desktopExternalModules | @tsv | @text' "$jsPackagePath" | tr '\t' ';')" local DESKTOP_FONTS="$(jq -r '.desktopFonts | @tsv | @text' "$jsPackagePath" | tr '\t' ';')" + local DESKTOP_IMAGES="$(jq -r '.desktopImages | @tsv | @text' "$jsPackagePath" | tr '\t' ';')" pushd desktop rm -rf CMakeFiles CMakeCache.txt cmake_install.cmake Makefile modules reportApp/CMakeFiles desktop/node_modules/google-breakpad/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain-prefix/src/qtkeychain-build/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain if is_windows_target; then @@ -142,6 +143,7 @@ function compile() { -DCMAKE_BUILD_TYPE=Release \ -DEXTERNAL_MODULES_DIR="$EXTERNAL_MODULES_DIR" \ -DDESKTOP_FONTS="$DESKTOP_FONTS" \ + -DDESKTOP_IMAGES="$DESKTOP_IMAGES" \ -DJS_BUNDLE_PATH="$JS_BUNDLE_PATH" || exit 1 make -S -j5 || exit 1 popd @@ -322,7 +324,7 @@ if is_macos; then local exeDir="$contentsDir/MacOS" [ $VERBOSE_LEVEL -ge 1 ] && echo "Checking rpaths in ${dylib}" - + # Walk through the dependencies of $dylib local dependencies=$(otool -L "$dylib" | grep -E "\s+/nix/" | sed "s|@executable_path|$exeDir|" | awk -F "(" '{print $1}' | xargs) local moduleDirPath=$(dirname $dylib) @@ -399,7 +401,7 @@ function bundleMacOS() { local usrBinPath=$(joinExistingPath "$WORKFOLDER" "$contentsPath/MacOS") cp -r assets/share/assets $contentsPath/Resources - ln -sf ../Resources/assets ../Resources/ubuntu-server ../Resources/node_modules $usrBinPath + ln -sf ../Resources/assets ../Resources/ubuntu-server $usrBinPath chmod +x $contentsPath/Resources/ubuntu-server cp ../desktop/bin/Status $usrBinPath/Status cp ../desktop/bin/reportApp $usrBinPath diff --git a/src/status_im/ui/components/camera.cljs b/src/status_im/ui/components/camera.cljs index d718f9ac3d..7eb7c5ac5c 100644 --- a/src/status_im/ui/components/camera.cljs +++ b/src/status_im/ui/components/camera.cljs @@ -2,18 +2,21 @@ (:require [goog.object :as object] [reagent.core :as reagent] [clojure.walk :as walk] - [status-im.react-native.js-dependencies :as js-dependencies])) + [status-im.react-native.js-dependencies :as js-dependencies] + [status-im.utils.platform :as platform])) (def default-camera (-> js-dependencies/camera (object/get "RNCamera"))) (defn- constants [t] - (-> default-camera - (object/get "Constants") - (object/get t) - (js->clj) - (walk/keywordize-keys))) + (if platform/desktop? + nil + (-> default-camera + (object/get "Constants") + (object/get t) + (js->clj) + (walk/keywordize-keys)))) (def aspects (constants "Orientation")) (def capture-targets (constants "CaptureTarget")) diff --git a/src/status_im/ui/components/icons/vector_icons.cljs b/src/status_im/ui/components/icons/vector_icons.cljs index 53465a23fc..02e958f3ad 100644 --- a/src/status_im/ui/components/icons/vector_icons.cljs +++ b/src/status_im/ui/components/icons/vector_icons.cljs @@ -1,6 +1,8 @@ (ns status-im.ui.components.icons.vector-icons (:require [status-im.ui.components.react :as react] - [status-im.ui.components.colors :as colors]) + [status-im.ui.components.colors :as colors] + [status-im.utils.platform :as platform] + [clojure.string :as string]) (:refer-clojure :exclude [use])) (defn- match-color [color] @@ -19,6 +21,11 @@ :else colors/black)) +(defn icon-source [name] + (if platform/desktop? + {:uri (keyword (string/replace (clojure.core/name name) "-" "_"))} + {:uri (keyword (clojure.core/name name))})) + (defn icon ([name] (icon name nil)) ([name {:keys [color resize-mode container-style @@ -31,15 +38,15 @@ {:width (or width 24) :height (or height 24)}) :accessibility-label accessibility-label} - [react/image {:source {:uri (keyword (clojure.core/name name))} - :style (cond-> {:width (or width 24) + [react/image {:style (cond-> {:width (or width 24) :height (or height 24)} resize-mode (assoc :resize-mode resize-mode) color - (assoc :tint-color (match-color color)))}]])) + (assoc :tint-color (match-color color))) + :source (icon-source name)}]])) (defn tiny-icon ([name] (tiny-icon name {})) diff --git a/src/status_im/ui/components/tabbar/core.cljs b/src/status_im/ui/components/tabbar/core.cljs index 92c915a881..705c802037 100644 --- a/src/status_im/ui/components/tabbar/core.cljs +++ b/src/status_im/ui/components/tabbar/core.cljs @@ -69,9 +69,10 @@ (when (pos? (if count @count 0)) [react/view tabs.styles/counter [components.common/counter @count]])] - [react/view {:style tabs.styles/tab-title-container} - [react/text {:style (tabs.styles/new-tab-title active?)} - label]]]])) + (when-not platform/desktop? + [react/view {:style tabs.styles/tab-title-container} + [react/text {:style (tabs.styles/new-tab-title active?)} + label]])]])) (defn tabs [current-view-id] [react/view @@ -132,11 +133,18 @@ (when-not (contains? #{:enter-pin-login :enter-pin-sign :enter-pin-settings} view-id) - (if platform/ios? - [tabs-animation-wrapper-ios - [react/animated-view - {:style (tabs.styles/animated-container visible? keyboard-shown?)} - [tabs tab]]] + (case platform/os + "ios" [tabs-animation-wrapper-ios + [react/animated-view + {:style (tabs.styles/animated-container visible? keyboard-shown?)} + [tabs tab]]] + "android" [tabs-animation-wrapper-android + keyboard-shown? + view-id + [react/animated-view + {:style (tabs.styles/animated-container visible? keyboard-shown?)} + [tabs tab]]] + "desktop" [tabs-animation-wrapper-android keyboard-shown? view-id diff --git a/src/status_im/ui/components/tabbar/styles.cljs b/src/status_im/ui/components/tabbar/styles.cljs index ed75e94c10..91fc40cfcd 100644 --- a/src/status_im/ui/components/tabbar/styles.cljs +++ b/src/status_im/ui/components/tabbar/styles.cljs @@ -8,7 +8,7 @@ (cond platform/android? 52 platform/ios? 52 - platform/desktop? 68)) + platform/desktop? 36)) (def minimized-tabs-height 36) @@ -83,6 +83,11 @@ {:height tabs-height :align-self :stretch :ios {:background-color :white + :shadow-radius 4 + :shadow-offset {:width 0 :height -5} + :shadow-opacity 0.3 + :shadow-color "rgba(0, 9, 26, 0.12)"} + :desktop {:background-color :white :shadow-radius 4 :shadow-offset {:width 0 :height -5} :shadow-opacity 0.3 diff --git a/src/status_im/ui/screens/chat/input/input.cljs b/src/status_im/ui/screens/chat/input/input.cljs index 2df3d2be56..fce608a892 100644 --- a/src/status_im/ui/screens/chat/input/input.cljs +++ b/src/status_im/ui/screens/chat/input/input.cljs @@ -89,7 +89,6 @@ :auto-capitalize :sentences} (when cooldown-enabled? {:placeholder (i18n/label :cooldown/text-input-disabled)}))])) -;) (defview invisible-input [{:keys [set-layout-width-fn value]}] (letsubs [{:keys [input-text]} [:chats/current-chat]] diff --git a/src/status_im/ui/screens/chat/styles/main.cljs b/src/status_im/ui/screens/chat/styles/main.cljs index db38ff34fc..0574078efd 100644 --- a/src/status_im/ui/screens/chat/styles/main.cljs +++ b/src/status_im/ui/screens/chat/styles/main.cljs @@ -273,6 +273,9 @@ {:color colors/blue :margin-bottom 40}) +(def select-chat + {:color colors/gray}) + (def messages-list-vertical-padding 46) (def are-you-friends-bubble diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index 3ab8d46a9e..373455165e 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -449,6 +449,6 @@ [chat-root true]) (defview select-chat [] - [react/view {:style {:align-items :center :justify-content :center :flex 1}} - [react/text {:style style/decline-chat} + [react/view {:align-items :center :justify-content :center :flex 1} + [react/text style/select-chat (i18n/label :t/select-chat)]]) diff --git a/src/status_im/ui/screens/desktop/main/chat/views.cljs b/src/status_im/ui/screens/desktop/main/chat/views.cljs index 74ab123201..94be32f7d4 100644 --- a/src/status_im/ui/screens/desktop/main/chat/views.cljs +++ b/src/status_im/ui/screens/desktop/main/chat/views.cljs @@ -66,10 +66,10 @@ (views/defview message-author-name [{:keys [from]}] (views/letsubs [{:keys [username]} [:contacts/contact-name-by-identity from]] [react/view {:flex-direction :row} - (when incoming-name - [react/text {:style styles/author} incoming-name]) + (when username + [react/text {:style styles/author} username]) [react/text {:style styles/author-generated} - (str (when incoming-name " • ") (gfycat/generate-gfy from))]])) + (str (when username " • ") (gfycat/generate-gfy from))]])) (views/defview member-photo [from] (views/letsubs [current-public-key [:multiaccount/public-key] diff --git a/src/status_im/ui/screens/home/styles.cljs b/src/status_im/ui/screens/home/styles.cljs index d9cbcdb5d4..01e4e3c9f8 100644 --- a/src/status_im/ui/screens/home/styles.cljs +++ b/src/status_im/ui/screens/home/styles.cljs @@ -14,11 +14,12 @@ (def last-message-container {:flex-shrink 1}) -(def last-message-text +(styles/def last-message-text {:flex 1 :align-self :stretch :line-height 22 - :color colors/gray}) + :color colors/gray + :desktop {:max-height 20}}) (def search-input-height 56) diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index f7f81ad4fb..dc9573cf4d 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -133,7 +133,7 @@ (when platform/ios? {:margin-bottom tabs.styles/tabs-diff}) (when two-pane-ui-enabled? - {:border-right-width 1 :border-right-color colors/black-transparent})) + {:border-right-width 1 :border-right-color colors/gray-lighter})) [status-bar/status-bar {:type :main}] [react/keyboard-avoiding-view {:style {:flex 1} :on-layout (fn [e]