mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat(UI): Reorganize Settings (#1137)
- Accounts Section & Remove "account" from title. - Security Section for Biometric that is hidden on TV. - Move "send logs" to "Action" section.
This commit is contained in:
parent
4c061edd7c
commit
30d223cfe3
4 changed files with 53 additions and 36 deletions
|
@ -299,6 +299,9 @@ class SettingsAccount : PreferenceFragmentCompat(), BiometricAuthenticator.Biome
|
|||
hideKeyboard()
|
||||
setPreferencesFromResource(R.xml.settings_account, rootKey)
|
||||
|
||||
//Hides the security category on TV as it's only Biometric for now
|
||||
getPref(R.string.pref_category_security_key)?.hideOn(TV or EMULATOR)
|
||||
|
||||
getPref(R.string.biometric_key)?.hideOn(TV or EMULATOR)?.setOnPreferenceClickListener {
|
||||
val ctx = context ?: return@setOnPreferenceClickListener false
|
||||
|
||||
|
@ -328,8 +331,7 @@ class SettingsAccount : PreferenceFragmentCompat(), BiometricAuthenticator.Biome
|
|||
|
||||
for ((key, api) in syncApis) {
|
||||
getPref(key)?.apply {
|
||||
title =
|
||||
getString(R.string.login_format).format(api.name, getString(R.string.account))
|
||||
title = api.name
|
||||
setOnPreferenceClickListener {
|
||||
val info = api.loginInfo()
|
||||
if (info != null) {
|
||||
|
|
|
@ -441,6 +441,9 @@
|
|||
<string name="pref_category_android_tv_key" translatable="false" >pref_category_android_tv_key</string>
|
||||
<string name="pref_category_gestures">Gestures</string>
|
||||
<string name="pref_category_gestures_key" translatable="false">pref_category_gestures_key</string>
|
||||
<string name="pref_category_security">Security</string>
|
||||
<string name="pref_category_security_key" translatable="false">pref_category_security_key</string>
|
||||
<string name="pref_category_accounts">Accounts</string>
|
||||
<string name="pref_category_player_features">Player features</string>
|
||||
<string name="pref_category_subtitles">Subtitles</string>
|
||||
<string name="pref_category_player_layout">Layout</string>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_category_accounts">
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/mal_logo"
|
||||
|
@ -27,6 +31,12 @@
|
|||
android:key="@string/skip_startup_account_select_key"
|
||||
android:title="@string/skip_startup_account_select_pref" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_category_security"
|
||||
app:key="@string/pref_category_security_key">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/biometric_key"
|
||||
android:defaultValue="false"
|
||||
|
@ -34,4 +44,6 @@
|
|||
android:icon="@drawable/ic_fingerprint"
|
||||
android:title="@string/biometric_setting" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
|
@ -1,13 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_baseline_bug_report_24"
|
||||
android:key="acra.disable"
|
||||
android:summaryOff="@string/bug_report_settings_off"
|
||||
android:summaryOn="@string/bug_report_settings_on"
|
||||
android:title="@string/pref_disable_acra" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_category_app_updates">
|
||||
|
@ -80,5 +73,12 @@
|
|||
android:icon="@drawable/ic_baseline_construction_24"
|
||||
android:title="@string/redo_setup_process"
|
||||
app:key="@string/redo_setup_key" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_baseline_bug_report_24"
|
||||
android:key="acra.disable"
|
||||
android:summaryOff="@string/bug_report_settings_off"
|
||||
android:summaryOn="@string/bug_report_settings_on"
|
||||
android:title="@string/pref_disable_acra" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
|
Loading…
Reference in a new issue