summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-05-08 20:50:04 +0530
committerGitHub <noreply@github.com>2020-05-08 20:50:04 +0530
commit4c461fb174428d0c96d80a634e01578e846eb44b (patch)
treec0e7e4c3b603943baaac22334925d9410961486d /app/src/main/res
parented3312b3032ede9786d049706e74a60c973b7b72 (diff)
Introduce no-auth mode for connections (#768)
Fixes #758 Fixes #526
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_refresh_white_24dp.xml9
-rw-r--r--app/src/main/res/layout/activity_git_clone.xml43
-rw-r--r--app/src/main/res/menu/main_menu_git.xml17
-rw-r--r--app/src/main/res/menu/main_menu_no_auth.xml20
-rw-r--r--app/src/main/res/menu/main_menu_non_git.xml9
-rw-r--r--app/src/main/res/values/strings.xml5
6 files changed, 50 insertions, 53 deletions
diff --git a/app/src/main/res/drawable/ic_refresh_white_24dp.xml b/app/src/main/res/drawable/ic_refresh_white_24dp.xml
deleted file mode 100644
index 7d391467..00000000
--- a/app/src/main/res/drawable/ic_refresh_white_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
-</vector>
diff --git a/app/src/main/res/layout/activity_git_clone.xml b/app/src/main/res/layout/activity_git_clone.xml
index de9a240e..e5d41059 100644
--- a/app/src/main/res/layout/activity_git_clone.xml
+++ b/app/src/main/res/layout/activity_git_clone.xml
@@ -156,50 +156,39 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_server_path" />
- <com.google.android.material.button.MaterialButtonToggleGroup
+ <RadioGroup
android:id="@+id/connection_mode_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="8dp"
+ android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/label_connection_mode"
- app:layout_constraintStart_toStartOf="parent"
- app:selectionRequired="true"
- app:singleSelection="true" >
+ app:layout_constraintStart_toStartOf="parent">
- <com.google.android.material.button.MaterialButton
- style="?attr/materialButtonOutlinedStyle"
+ <RadioButton
android:id="@+id/connection_mode_ssh_key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/connection_mode_ssh_key"
- android:textColor="?android:attr/textColorPrimary"
- app:rippleColor="@color/ripple_color"
- app:strokeColor="?attr/colorSecondary"
- app:backgroundTint="@color/toggle_button_selector" />
+ android:text="@string/connection_mode_ssh_key" />
- <com.google.android.material.button.MaterialButton
- style="?attr/materialButtonOutlinedStyle"
+ <RadioButton
android:id="@+id/connection_mode_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/connection_mode_basic_authentication"
- android:textColor="?android:attr/textColorPrimary"
- app:rippleColor="@color/ripple_color"
- app:strokeColor="?attr/colorSecondary"
- app:backgroundTint="@color/toggle_button_selector" />
+ android:text="@string/connection_mode_basic_authentication" />
- <com.google.android.material.button.MaterialButton
- style="?attr/materialButtonOutlinedStyle"
+ <RadioButton
android:id="@+id/connection_mode_open_keychain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/connection_mode_openkeychain"
- android:textColor="?android:attr/textColorPrimary"
- app:rippleColor="@color/ripple_color"
- app:strokeColor="?attr/colorSecondary"
- app:backgroundTint="@color/toggle_button_selector" />
+ android:text="@string/connection_mode_openkeychain" />
- </com.google.android.material.button.MaterialButtonToggleGroup>
+ <RadioButton
+ android:id="@+id/connection_mode_none"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/connection_mode_none" />
+
+ </RadioGroup>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button"
diff --git a/app/src/main/res/menu/main_menu_git.xml b/app/src/main/res/menu/main_menu_git.xml
index 40c99550..90989495 100644
--- a/app/src/main/res/menu/main_menu_git.xml
+++ b/app/src/main/res/menu/main_menu_git.xml
@@ -1,7 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".pwdstore" >
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search"
android:title="@string/action_search"
@@ -10,18 +9,18 @@
app:actionViewClass="androidx.appcompat.widget.SearchView" />
<item android:id="@+id/git_sync"
- android:title="@string/git_sync"/>
+ android:title="@string/git_sync" />
+
<item android:id="@+id/git_pull"
- android:title="@string/git_pull"/>
+ android:title="@string/git_pull" />
+
<item android:id="@+id/git_push"
- android:title="@string/git_push"/>
+ android:title="@string/git_push" />
<item android:id="@+id/refresh"
- android:title="@string/refresh_list"
- android:icon="@drawable/ic_refresh_white_24dp"
- app:showAsAction="never"/>
+ android:title="@string/refresh_list" />
<item android:id="@+id/user_pref"
android:title="@string/action_settings"
- android:orderInCategory="100"/>
+ android:orderInCategory="100" />
</menu>
diff --git a/app/src/main/res/menu/main_menu_no_auth.xml b/app/src/main/res/menu/main_menu_no_auth.xml
new file mode 100644
index 00000000..9036c261
--- /dev/null
+++ b/app/src/main/res/menu/main_menu_no_auth.xml
@@ -0,0 +1,20 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <item android:id="@+id/action_search"
+ android:title="@string/action_search"
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="always|collapseActionView"
+ app:actionViewClass="androidx.appcompat.widget.SearchView" />
+
+ <item android:id="@+id/git_pull"
+ android:title="@string/git_pull"/>
+
+ <item android:id="@+id/refresh"
+ android:title="@string/refresh_list" />
+
+ <item android:id="@+id/user_pref"
+ android:title="@string/action_settings"
+ android:orderInCategory="100" />
+</menu>
diff --git a/app/src/main/res/menu/main_menu_non_git.xml b/app/src/main/res/menu/main_menu_non_git.xml
index dc7d20cc..7745b544 100644
--- a/app/src/main/res/menu/main_menu_non_git.xml
+++ b/app/src/main/res/menu/main_menu_non_git.xml
@@ -1,7 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".pwdstore" >
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search"
android:title="@string/action_search"
@@ -10,11 +9,9 @@
app:actionViewClass="androidx.appcompat.widget.SearchView" />
<item android:id="@+id/refresh"
- android:title="@string/refresh_list"
- android:icon="@drawable/ic_refresh_white_24dp"
- app:showAsAction="never"/>
+ android:title="@string/refresh_list" />
<item android:id="@+id/user_pref"
android:title="@string/action_settings"
- android:orderInCategory="100"/>
+ android:orderInCategory="100" />
</menu>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5d77ad6a..db8491e8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -354,9 +354,10 @@
<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_ssh_key">SSH key</string>
+ <string name="connection_mode_basic_authentication">Password</string>
<string name="connection_mode_openkeychain" translatable="false">OpenKeychain</string>
+ <string name="connection_mode_none">None</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>