feat: improve settings screen
Signed-off-by: Infi <wingit@geist.ga>
This commit is contained in:
parent
ccd9433773
commit
822ec031cc
|
|
@ -4,13 +4,15 @@ import android.widget.Toast
|
|||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Build
|
||||
import androidx.compose.material.icons.filled.Close
|
||||
import androidx.compose.material.icons.filled.Info
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.material3.Divider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -43,7 +45,14 @@ fun SettingsScreen(
|
|||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(10.dp)
|
||||
.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.settings_category_general),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.padding(bottom = 10.dp, start = 10.dp)
|
||||
)
|
||||
|
||||
SheetClickable(
|
||||
icon = { modifier ->
|
||||
Icon(
|
||||
|
|
@ -64,6 +73,12 @@ fun SettingsScreen(
|
|||
navController.navigate("settings/appearance")
|
||||
}
|
||||
|
||||
Text(
|
||||
text = stringResource(id = R.string.settings_category_miscellaneous),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.padding(bottom = 10.dp, start = 10.dp, top = 20.dp)
|
||||
)
|
||||
|
||||
SheetClickable(
|
||||
icon = { modifier ->
|
||||
Icon(
|
||||
|
|
@ -98,7 +113,14 @@ fun SettingsScreen(
|
|||
}
|
||||
}
|
||||
|
||||
Divider()
|
||||
Text(
|
||||
text = stringResource(
|
||||
id = R.string.settings_category_last,
|
||||
BuildConfig.VERSION_NAME
|
||||
),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.padding(bottom = 10.dp, start = 10.dp, top = 20.dp)
|
||||
)
|
||||
|
||||
SheetClickable(
|
||||
icon = { modifier ->
|
||||
|
|
@ -109,7 +131,10 @@ fun SettingsScreen(
|
|||
)
|
||||
},
|
||||
label = { textStyle ->
|
||||
Text(text = stringResource(id = R.string.settings_feedback), style = textStyle)
|
||||
Text(
|
||||
text = stringResource(id = R.string.settings_feedback),
|
||||
style = textStyle
|
||||
)
|
||||
},
|
||||
modifier = Modifier.testTag("settings_view_feedback")
|
||||
) {
|
||||
|
|
@ -129,7 +154,12 @@ fun SettingsScreen(
|
|||
},
|
||||
modifier = Modifier.testTag("settings_view_logout")
|
||||
) {
|
||||
Toast.makeText(navController.context, "Not implemented yet", Toast.LENGTH_SHORT)
|
||||
Toast
|
||||
.makeText(
|
||||
navController.context,
|
||||
"Not implemented yet",
|
||||
Toast.LENGTH_SHORT
|
||||
)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@
|
|||
<string name="spark_sidebar_settings_tutorial_description_2">Then long tap your profile picture to open the settings.</string>
|
||||
<string name="spark_sidebar_settings_tutorial_acknowledge">Got it</string>
|
||||
|
||||
<string name="settings_category_general">General</string>
|
||||
<string name="settings_category_miscellaneous">Miscellaneous</string>
|
||||
<string name="settings_category_last" translatable="false">Revolt v%1$s</string>
|
||||
|
||||
<string name="settings_appearance">Appearance</string>
|
||||
<string name="settings_appearance_theme">Theme</string>
|
||||
<string name="settings_appearance_theme_none">System</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue