mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
remote license page
This commit is contained in:
@ -59,7 +59,6 @@ class MainActivity : ComponentActivity() {
|
||||
promViewModel = promViewModel
|
||||
)
|
||||
}
|
||||
composable("license") { LicensePage(navController = navController) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,7 @@ package com.birdthedeveloper.prometheus.android.exporter.compose
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.ButtonDefaults
|
||||
import androidx.compose.material.Icon
|
||||
import androidx.compose.material.IconButton
|
||||
import androidx.compose.material.Text
|
||||
@ -16,7 +13,7 @@ import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowBack
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavHostController
|
||||
|
||||
@ -41,44 +38,8 @@ fun SettingsPage(
|
||||
}
|
||||
)
|
||||
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
Button(
|
||||
onClick = { navController.navigate("license") },
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
colors = ButtonDefaults.buttonColors(backgroundColor = Color.Gray)
|
||||
) {
|
||||
Text(text = "License")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LicensePage(
|
||||
navController: NavHostController,
|
||||
) {
|
||||
Column(
|
||||
Modifier.fillMaxSize()
|
||||
) {
|
||||
TopAppBar(
|
||||
title = {
|
||||
Text(text = "License")
|
||||
},
|
||||
navigationIcon = {
|
||||
IconButton(onClick = { navController.navigateUp() }) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.ArrowBack,
|
||||
contentDescription = "Back",
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
Text(
|
||||
//TODO license
|
||||
modifier = Modifier.padding(all = 8.dp),
|
||||
text = "License todo"
|
||||
)
|
||||
Text( modifier = Modifier.padding(all = 20.dp),
|
||||
text = "This application is licensed under the Apache 2.0 license.", textAlign = TextAlign.Center,)
|
||||
Text(modifier = Modifier.padding(all = 20.dp),text = "Author: Martin Ptacek, 2023", textAlign = TextAlign.Center,)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user