mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 11:22:12 +00:00
Add: Placeholders for Prefs Pages
This commit is contained in:
parent
3a67085da1
commit
760ed87acf
@ -0,0 +1,9 @@
|
||||
package com.machiav3lli.fdroid.ui.compose.utils
|
||||
|
||||
import androidx.compose.ui.Modifier
|
||||
|
||||
inline fun Modifier.addIf(
|
||||
condition: Boolean,
|
||||
crossinline factory: Modifier.() -> Modifier
|
||||
): Modifier =
|
||||
if (condition) factory() else this
|
@ -0,0 +1,69 @@
|
||||
package com.machiav3lli.fdroid.ui.pages
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.machiav3lli.fdroid.R
|
||||
import com.machiav3lli.fdroid.ui.compose.components.prefs.PreferenceGroup
|
||||
import com.machiav3lli.fdroid.ui.dialog.BaseDialog
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun PrefsOtherPage() {
|
||||
val context = LocalContext.current
|
||||
val openDialog = remember { mutableStateOf(false) }
|
||||
var dialogPref by remember { mutableStateOf<Any?>(null) }
|
||||
val onPrefDialog = { pref: Any ->
|
||||
dialogPref = pref
|
||||
openDialog.value = true
|
||||
}
|
||||
//val proxyPrefs = listOf()
|
||||
//val infoPrefs = listOf()
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) { paddingValues ->
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(horizontal = 8.dp),
|
||||
contentPadding = paddingValues,
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
item {
|
||||
PreferenceGroup(
|
||||
heading = stringResource(id = R.string.proxy)
|
||||
) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
item {
|
||||
PreferenceGroup(
|
||||
heading = stringResource(id = R.string.credits)
|
||||
) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (openDialog.value) {
|
||||
BaseDialog(openDialogCustom = openDialog) {
|
||||
when (dialogPref) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.machiav3lli.fdroid.ui.pages
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.machiav3lli.fdroid.R
|
||||
import com.machiav3lli.fdroid.ui.compose.components.prefs.PreferenceGroup
|
||||
import com.machiav3lli.fdroid.ui.dialog.BaseDialog
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun PrefsPersonalPage() {
|
||||
val context = LocalContext.current
|
||||
val openDialog = remember { mutableStateOf(false) }
|
||||
var dialogPref by remember { mutableStateOf<Any?>(null) }
|
||||
val onPrefDialog = { pref: Any ->
|
||||
dialogPref = pref
|
||||
openDialog.value = true
|
||||
}
|
||||
//val personalPrefs = listOf()
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) { paddingValues ->
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(horizontal = 8.dp),
|
||||
contentPadding = paddingValues,
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
item {
|
||||
PreferenceGroup(
|
||||
heading = stringResource(id = R.string.prefs_personalization)
|
||||
) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (openDialog.value) {
|
||||
BaseDialog(openDialogCustom = openDialog) {
|
||||
when (dialogPref) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.machiav3lli.fdroid.ui.pages
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.machiav3lli.fdroid.R
|
||||
import com.machiav3lli.fdroid.ui.compose.components.prefs.PreferenceGroup
|
||||
import com.machiav3lli.fdroid.ui.dialog.BaseDialog
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun PrefsUpdatesPage() {
|
||||
val context = LocalContext.current
|
||||
val openDialog = remember { mutableStateOf(false) }
|
||||
var dialogPref by remember { mutableStateOf<Any?>(null) }
|
||||
val onPrefDialog = { pref: Any ->
|
||||
dialogPref = pref
|
||||
openDialog.value = true
|
||||
}
|
||||
//val syncPrefs = listOf()
|
||||
//val downloadPrefs = listOf()
|
||||
//val installationPrefs = listOf()
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) { paddingValues ->
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(horizontal = 8.dp),
|
||||
contentPadding = paddingValues,
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
item {
|
||||
PreferenceGroup(
|
||||
heading = stringResource(id = R.string.updates)
|
||||
) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
item {
|
||||
PreferenceGroup(
|
||||
heading = stringResource(id = R.string.install_types)
|
||||
) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (openDialog.value) {
|
||||
BaseDialog(openDialogCustom = openDialog) {
|
||||
when (dialogPref) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user