diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-04-17 18:36:07 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 18:36:07 +0530 |
commit | b94b52a42ddc2325b539d0956fd0adcf35308b52 (patch) | |
tree | 21f35526cfc444db82e1b4b08d083e49a3c1843b /app/src/main/res/values | |
parent | 4ffd7ed9bffa5139277ffb91de5a69f2b714222c (diff) |
Refactor Git related activities (#685)
* Refactor git logic into separate parts
* Extract hardcoded strings
* Add KDoc to updateHostname, remove unused field
* Cleanups
* Fix dialog message
* Wire in repository clone flow
* spotless
* Remove unused method
* Cleanup GitActivity
- Rename to GitOperationActivity.
- Ensure identityBuilder is always closed regardless of what fragment uses it.
- Remove hardcoded "Operation" strings and replace with REQUEST_ARG_OP.
- Apply a transparent theme to GitOperationActivity make the UI less jarring.
* Tweak some stupidly worded dialog messages
As pointed out in #629, these strings are shoddily worded and do not express any clear intent to the
user, leaving them confused and angry.
* GitOperationActivity: wrap Context to ensure right theme is used
* spotless
* undo build.gradle change
* Use correct parent theme, remove now useless wrapping
* GitServerConfigActivity: fix repository clone flow
* temp: disable leakcanary
framework leaks on Samsung are pissing me off
* Make system bars transparent in git activity
* Tweak HTTPS password layout
* Unhardcode wrong passphrase string
* Store SSH passphrase in EncryptedSharedPreferences
Also revamp the dialog to look a bit better
* Implement support for remembering HTTPS password
Fixes #521
* Try to patch HTTPS remote creation logic
* Update security-crypto
* Clear saved passphrase/password on auth failure
* Revert "Update security-crypto"
Broken on R DP2.1
This reverts commit 4b20371dd42c512a3dd3b759859abb6c1ffd2961.
* Revert "temp: disable leakcanary"
This reverts commit 2db7d41bd67b79c6dc8c5b359a7b27100379f45f.
* Update CHANGELOG
* Remove spacer
* Remove useless override
* Wrap git server activity in a ScrollView
* GitOperation: always finish calling activity when dialogs are dismissed
* Wipe saved password/passphrase when hostname changes
* Don't commit prefs updates
* Don't call listFiles excessively
* Finish activity after saving configuration
* Make ConnectionMode and Protocol enum classes
* Change SSH key passphrase key, don't wipe on host change
* Reimplement BaseGitActivity.updateUrl (was updateHostname)
* Use SharedPreferences.edit KTX extension
* Disable inapplicable connection modes depending on scheme
* BaseGitActivity: annotate onDestroy with CallSuper
We'll leak the identityBuilder connection otherwise
* Move input hack for AlertDialog into an extension function
We re-use this in many places
* Fix protocol/mode toggle issue and consistenly name options
* Fix a crash when opening GitServerConfigActivity without a repo
* Fix OpenKeychain callbacks by moving onActivityResult to BaseGitActivity
* Run spotlessApply
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
Diffstat (limited to 'app/src/main/res/values')
-rw-r--r-- | app/src/main/res/values/colors.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 15 |
3 files changed, 32 insertions, 5 deletions
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 13bc049d..54a3af70 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -19,6 +19,8 @@ <color name="list_multiselect_background">#668eacbb</color> <color name="navigation_bar_color">#000000</color> <color name="status_bar_color">@color/primary_dark_color</color> + <color name="ripple_color">#aaff7043</color> + <color name="button_color">#44ff7043</color> <!-- Override TextInputEditText stroke color like a boss --> <color name="mtrl_textinput_default_box_stroke_color" tools:override="true"> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bd2aa75e..dafad85a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -19,7 +19,7 @@ <!-- Password Store --> <string name="creation_dialog_text">Please clone or create a new repository below before trying to add a password or running any synchronization operation.</string> - <string name="key_dialog_text">You have to select your PGP key ID before initializing the repository</string> + <string name="key_dialog_text">A valid PGP key must be selected in Settings before initializing the repository</string> <string name="delete_dialog_text">Are you sure you want to delete the password %1$s?</string> <string name="move">Move</string> <string name="edit">Edit</string> @@ -57,7 +57,7 @@ <!-- Git Handler --> <string name="forget_username_dialog_text">Did you forget to specify a username?</string> - <string name="set_information_dialog_text">You have to set the information about the server before synchronizing with the server</string> + <string name="set_information_dialog_text">Please fix the remote server configuration in settings before proceeding</string> <string name="ssh_preferences_dialog_text">Please import or generate your SSH key file in the preferences</string> <string name="ssh_preferences_dialog_title">No SSH key</string> <string name="ssh_preferences_dialog_import">Import</string> @@ -228,8 +228,8 @@ <string name="dialog_ok">OK</string> <string name="dialog_yes">Yes</string> <string name="dialog_no">No</string> - <string name="dialog_positive">On my way…</string> - <string name="dialog_negative">Nah… later</string> + <string name="dialog_positive">Go to Settings</string> + <string name="dialog_negative">Go back</string> <string name="dialog_oops">Oops…</string> <string name="dialog_cancel">Cancel</string> <string name="git_sync">Synchronize repository</string> @@ -309,7 +309,7 @@ <string name="jgit_error_push_dialog_text">Error occurred during the push operation:</string> <string name="ssh_key_clear_passphrase">Clear ssh-key saved passphrase</string> <string name="hotp_remember_clear_choice">Clear saved preference for HOTP incrementing</string> - <string name="remember_the_passphrase">Remember the passphrase in the app configuration (insecure)</string> + <string name="remember_the_passphrase">Remember key passphrase</string> <string name="hackish_tools">Hackish tools</string> <string name="abort_rebase">Abort rebase and push new branch</string> <string name="reset_to_remote">Hard reset to remote branch</string> @@ -349,4 +349,14 @@ <string name="theme_dark">Dark</string> <string name="theme_battery_saver">Set by Battery Saver</string> <string name="theme_follow_system">System default</string> + <string name="clone_protocol_ssh" translatable="false">SSH</string> + <string name="clone_protocol_https" translatable="false">HTTPS</string> + <string name="connection_mode_ssh_key" translatable="false">SSH key</string> + <string name="connection_mode_basic_authentication" translatable="false">Password</string> + <string name="connection_mode_openkeychain" translatable="false">OpenKeychain</string> + <string name="git_server_config_save_success">Successfully saved configuration</string> + <string name="git_server_config_save_failure">Configuration error: please verify your settings and try again</string> + <string name="git_operation_unable_to_open_ssh_key_title">Unable to open the ssh-key</string> + <string name="git_operation_unable_to_open_ssh_key_message">Please check that it was imported.</string> + <string name="git_operation_wrong_passphrase">Wrong passphrase</string> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 090b56b9..b5a03bb4 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -33,6 +33,21 @@ <item name="background">@color/primary_color</item> </style> + <style name="NoBackgroundTheme" parent="@style/AppTheme"> + <item name="android:background">@android:color/transparent</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:navigationBarColor">@android:color/transparent</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:windowActionBar">false</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowEnterAnimation">@android:anim/fade_in</item> + <item name="android:windowExitAnimation">@android:anim/fade_out</item> + <item name="colorPrimaryDark">@android:color/transparent</item> + <item name="windowNoTitle">true</item> + </style> + <style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox"> <item name="colorControlActivated">@color/color_control_normal</item> </style> |