Merge pull request #1293 from nextcloud/feature/1058/simplifySettings

Simplify settings
This commit is contained in:
Andy Scherzinger 2021-05-26 15:08:41 +02:00 committed by GitHub
commit df16dfaa9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 111 additions and 30 deletions

View file

@ -194,6 +194,7 @@ public class ProfileController extends BaseController {
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
Log.e(TAG, "Error loading editable user profile from server", e);
edit = false;
}
@ -365,6 +366,7 @@ public class ProfileController extends BaseController {
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
Log.e(TAG, "Error loading editable user profile from server", e);
edit = false;
}

View file

@ -561,7 +561,7 @@ public class SettingsController extends BaseController {
if (currentUser.getDisplayName() != null) {
displayNameTextView.setText(currentUser.getDisplayName());
}
DisplayUtils.loadAvatarImage(currentUser, avatarImageView, false);
profileQueryDisposable = ncApi.getUserProfile(credentials,

View file

@ -0,0 +1,27 @@
<!--
@author Google LLC
Copyright (C) 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#61FFFFFF"
android:fillType="nonZero"
android:pathData="M12,20.64C9,20.64 6.348,19.104 4.8,16.8C4.836,14.4 9.6,13.08 12,13.08C14.4,13.08 19.164,14.4 19.2,16.8C17.652,19.104 15,20.64 12,20.64M12,3.6C13.9752,3.6 15.6,5.2248 15.6,7.2C15.6,9.1752 13.9752,10.8 12,10.8C10.0248,10.8 8.4,9.1752 8.4,7.2C8.4,5.2248 10.0248,3.6 12,3.6M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.364 18.6,0 12,0Z" />
</vector>

View file

@ -0,0 +1,27 @@
<!--
@author Google LLC
Copyright (C) 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="96dp"
android:height="96dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#61FFFFFF"
android:fillType="nonZero"
android:pathData="M12,20.64C9,20.64 6.348,19.104 4.8,16.8C4.836,14.4 9.6,13.08 12,13.08C14.4,13.08 19.164,14.4 19.2,16.8C17.652,19.104 15,20.64 12,20.64M12,3.6C13.9752,3.6 15.6,5.2248 15.6,7.2C15.6,9.1752 13.9752,10.8 12,10.8C10.0248,10.8 8.4,9.1752 8.4,7.2C8.4,5.2248 10.0248,3.6 12,3.6M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.364 18.6,0 12,0Z" />
</vector>

View file

@ -21,7 +21,7 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF666666"
android:fillColor="#61000000"
android:fillType="nonZero"
android:pathData="M12,20.64C9,20.64 6.348,19.104 4.8,16.8C4.836,14.4 9.6,13.08 12,13.08C14.4,13.08 19.164,14.4 19.2,16.8C17.652,19.104 15,20.64 12,20.64M12,3.6C13.9752,3.6 15.6,5.2248 15.6,7.2C15.6,9.1752 13.9752,10.8 12,10.8C10.0248,10.8 8.4,9.1752 8.4,7.2C8.4,5.2248 10.0248,3.6 12,3.6M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.364 18.6,0 12,0Z" />
</vector>

View file

@ -0,0 +1,27 @@
<!--
@author Google LLC
Copyright (C) 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="96dp"
android:height="96dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#61000000"
android:fillType="nonZero"
android:pathData="M12,20.64C9,20.64 6.348,19.104 4.8,16.8C4.836,14.4 9.6,13.08 12,13.08C14.4,13.08 19.164,14.4 19.2,16.8C17.652,19.104 15,20.64 12,20.64M12,3.6C13.9752,3.6 15.6,5.2248 15.6,7.2C15.6,9.1752 13.9752,10.8 12,10.8C10.0248,10.8 8.4,9.1752 8.4,7.2C8.4,5.2248 10.0248,3.6 12,3.6M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.364 18.6,0 12,0Z" />
</vector>

View file

@ -23,6 +23,7 @@
<com.yarolegovich.mp.MaterialPreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:apc="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/settings_screen"
android:layout_width="match_parent"
@ -118,29 +119,17 @@
android:layout_width="@dimen/avatar_size_big"
android:layout_height="@dimen/avatar_size_big"
android:layout_centerHorizontal="true"
android:src="@drawable/account_circle_96dp"
android:transitionName="userAvatar.transitionTag"
apc:roundAsCircle="true"
tools:src="@tools:sample/avatars[0]" />
<com.yarolegovich.mp.MaterialStandardPreference
android:id="@+id/settings_reauthorize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/server_age_warning_text_card"
apc:mp_title="@string/nc_settings_reauthorize" />
<com.yarolegovich.mp.MaterialStandardPreference
android:id="@+id/settings_client_cert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/settings_reauthorize"
apc:mp_title="@string/nc_client_cert_setup" />
fresco:failureImage="@drawable/account_circle_96dp"
fresco:placeholderImage="@drawable/account_circle_96dp" />
<com.yarolegovich.mp.MaterialStandardPreference
android:id="@+id/settings_remove_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/settings_client_cert"
android:layout_below="@id/server_age_warning_text_card"
apc:mp_title="@string/nc_settings_remove_account" />
</RelativeLayout>
@ -279,7 +268,19 @@
android:animateLayoutChanges="true"
apc:cardBackgroundColor="@color/bg_default"
apc:cardElevation="0dp"
apc:mpc_title="@string/nc_settings_proxy_title">
apc:mpc_title="@string/nc_settings_advanced_title">
<com.yarolegovich.mp.MaterialStandardPreference
android:id="@+id/settings_reauthorize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
apc:mp_title="@string/nc_settings_reauthorize" />
<com.yarolegovich.mp.MaterialStandardPreference
android:id="@+id/settings_client_cert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
apc:mp_title="@string/nc_client_cert_setup" />
<com.yarolegovich.mp.MaterialChoicePreference
android:id="@+id/settings_proxy_choice"
@ -313,7 +314,7 @@
android:layout_height="wrap_content"
apc:mp_key="@string/nc_settings_proxy_username_key"
apc:mp_show_value="onRight"
apc:mp_title="@string/nc_username" />
apc:mp_title="@string/nc_settings_proxy_username_title" />
<com.yarolegovich.mp.MaterialEditTextPreference
android:id="@+id/settings_proxy_password_edit"
@ -321,7 +322,7 @@
android:layout_height="wrap_content"
apc:mp_key="@string/nc_settings_proxy_password_key"
apc:mp_show_value="onRight"
apc:mp_title="@string/nc_password" />
apc:mp_title="@string/nc_settings_proxy_password_title" />
<com.yarolegovich.mp.MaterialSwitchPreference
android:id="@+id/settings_proxy_use_credentials"

View file

@ -66,25 +66,25 @@
<string name="nc_certificate_error">Your SSL setup prevented connection</string>
<!-- Settings -->
<string name="nc_settings_proxy_title">Proxy</string>
<string name="nc_settings_advanced_title">Advanced</string>
<string name="nc_settings_proxy_type_key" translatable="false">proxy_type</string>
<string name="nc_settings_proxy_type_title">Proxy type</string>
<string name="nc_settings_proxy_host_key" translatable="false">proxy_host</string>
<string name="nc_settings_proxy_host_title">Proxy host</string>
<string name="nc_settings_proxy_port_key" translatable="false">proxy_port</string>
<string name="nc_settings_proxy_port_title">Proxy port</string>
<string name="nc_settings_proxy_username_title">Proxy username</string>
<string name="nc_settings_proxy_username_key" translatable="false">proxy_username</string>
<string name="nc_settings_proxy_password_title">Proxy password</string>
<string name="nc_settings_proxy_password_key" translatable="false">proxy_password</string>
<string name="nc_settings_use_credentials_title">Use credentials</string>
<string name="nc_settings_use_credentials_title">Proxy requires credentials</string>
<string name="nc_settings_use_credentials_key" translatable="false">proxy_credentials</string>
<string name="nc_settings_switch_account">Switch between accounts</string>
<string name="nc_settings_reauthorize">Reauthorize</string>
<string name="nc_settings_reauthorize">Reauthorize account</string>
<string name="nc_client_cert_setup">Set up client certificate</string>
<string name="nc_client_cert_change">Change client certificate</string>
<string name="nc_settings_remove">Remove</string>
<string name="nc_settings_remove_confirmation">Please confirm your intent to remove the current account.</string>
<string name="nc_settings_remove_account">Remove account</string>
<string name="nc_settings_add_account">Add a new account</string>
<string name="nc_settings_server_eol_title">Unsupported server</string>
<string name="nc_settings_server_eol">The server version is too old and not supported by this version of the Android app</string>
<string name="nc_settings_server_almost_eol">The server version is very old and will not be supported in the next release!</string>
@ -150,7 +150,6 @@
<string name="nc_cancel">Cancel</string>
<string name="nc_no_proxy">No proxy</string>
<string name="nc_username">Username</string>
<string name="nc_password">Password</string>
<string name="nc_conversation_link">Conversation link</string>
<string name="nc_new_password">New password</string>
@ -347,13 +346,11 @@
<string name="nc_not_defined_error">Unknown error</string>
<string name="nc_unauthorized_error">Unauthorized</string>
<string name="nc_general_settings">General</string>
<string name="nc_allow_guests">Allow guests</string>
<string name="nc_last_moderator_title">Could not leave conversation</string>
<string name="nc_last_moderator">You need to promote a new moderator before you can leave %1$s.</string>
<!-- Chat -->
<string name="nc_99_plus">99+</string>
<string name="nc_copy_message">Copy</string>
<string name="nc_reply">Reply</string>
<string name="nc_reply_privately">Reply privately</string>

View file

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 3 errors and 336 warnings</span>
<span class="mdl-layout-title">Lint Report: 3 errors and 332 warnings</span>