mirror of
https://github.com/revanced/revanced-manager-compose-old.git
synced 2025-05-16 15:27:07 +02:00
feat: add FAB in contributors screen
This commit is contained in:
parent
546c46d01b
commit
ebe238caaa
@ -1,8 +1,6 @@
|
||||
package app.revanced.manager.ui.screen.subscreens
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
@ -11,29 +9,31 @@ import androidx.compose.material.icons.filled.ArrowBack
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import app.revanced.manager.R
|
||||
import app.revanced.manager.ui.component.ContributorsCard
|
||||
import app.revanced.manager.ui.navigation.AppDestination
|
||||
import app.revanced.manager.ui.viewmodel.ContributorsViewModel
|
||||
import app.revanced.manager.util.ghOrganization
|
||||
import app.revanced.manager.util.openUrl
|
||||
import com.xinto.taxi.BackstackNavigator
|
||||
import org.koin.androidx.compose.getViewModel
|
||||
|
||||
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
|
||||
@Composable
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
fun ContributorsSubscreen(
|
||||
navigator: BackstackNavigator<AppDestination>,
|
||||
vm: ContributorsViewModel = getViewModel()
|
||||
) {
|
||||
val ctx = LocalContext.current.applicationContext
|
||||
Scaffold(
|
||||
topBar = {
|
||||
MediumTopAppBar(
|
||||
title = {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_contributors_title),
|
||||
style = MaterialTheme.typography.headlineLarge
|
||||
text = stringResource(R.string.screen_contributors_title)
|
||||
)
|
||||
},
|
||||
navigationIcon = {
|
||||
@ -45,12 +45,16 @@ fun ContributorsSubscreen(
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
FloatingActionButton(onClick = { ctx.openUrl(ghOrganization) }) {
|
||||
Icon(painterResource(id = R.drawable.ic_github), contentDescription = null)
|
||||
}
|
||||
}
|
||||
) {
|
||||
) { paddingValues ->
|
||||
Column(
|
||||
Modifier
|
||||
.padding(it)
|
||||
.height(1400.dp)
|
||||
.padding(paddingValues)
|
||||
.verticalScroll(rememberScrollState())
|
||||
) {
|
||||
ContributorsCard(
|
||||
|
Loading…
x
Reference in New Issue
Block a user