wip: feat: add about page
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2025 Gleb Zaharov. License: GPLv3 (see LICENSE).
|
||||
|
||||
package ru.sweetbread.unn.ui.composes
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
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.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import ru.sweetbread.unn.R
|
||||
import splitties.resources.appStr
|
||||
|
||||
@Composable
|
||||
fun About() {
|
||||
Column(Modifier.fillMaxSize()) {
|
||||
Text(
|
||||
appStr(R.string.developer),
|
||||
style = MaterialTheme.typography.headlineMedium
|
||||
)
|
||||
Column(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.background(
|
||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
.padding(16.dp)
|
||||
) {
|
||||
Text("meow")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import androidx.compose.material.icons.filled.AccountBox
|
||||
import androidx.compose.material.icons.filled.DateRange
|
||||
import androidx.compose.material.icons.filled.Home
|
||||
import androidx.compose.material.icons.filled.Menu
|
||||
import androidx.compose.material.icons.outlined.Info
|
||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||
import androidx.compose.material3.DrawerValue
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
@@ -60,6 +61,7 @@ import kotlinx.coroutines.launch
|
||||
import ru.sweetbread.unn.R
|
||||
import ru.sweetbread.unn.api.ME
|
||||
import ru.sweetbread.unn.api.portalURL
|
||||
import ru.sweetbread.unn.ui.composes.About
|
||||
import ru.sweetbread.unn.ui.composes.Blogposts
|
||||
import ru.sweetbread.unn.ui.composes.Schedule
|
||||
import ru.sweetbread.unn.ui.theme.UNNTheme
|
||||
@@ -178,6 +180,9 @@ class MainActivity : ComponentActivity() {
|
||||
composable("journal/schedule") {
|
||||
Schedule()
|
||||
}
|
||||
composable("about") {
|
||||
About()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,7 +224,8 @@ class MainActivity : ComponentActivity() {
|
||||
TextButton(
|
||||
{},
|
||||
Modifier.fillMaxWidth(),
|
||||
shape = RectangleShape
|
||||
shape = RectangleShape,
|
||||
enabled = false
|
||||
) {
|
||||
Text(
|
||||
appStr(R.string.record_book),
|
||||
@@ -231,7 +237,8 @@ class MainActivity : ComponentActivity() {
|
||||
TextButton(
|
||||
{},
|
||||
Modifier.fillMaxWidth(),
|
||||
shape = RectangleShape
|
||||
shape = RectangleShape,
|
||||
enabled = false
|
||||
) {
|
||||
Text(
|
||||
appStr(R.string.documents),
|
||||
@@ -243,7 +250,8 @@ class MainActivity : ComponentActivity() {
|
||||
TextButton(
|
||||
{},
|
||||
Modifier.fillMaxWidth(),
|
||||
shape = RectangleShape
|
||||
shape = RectangleShape,
|
||||
enabled = false
|
||||
) {
|
||||
Text(
|
||||
appStr(R.string.materials),
|
||||
@@ -256,10 +264,15 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
HorizontalDivider()
|
||||
TextButton(
|
||||
{},
|
||||
{navController.navigate("about")},
|
||||
Modifier.fillMaxWidth(),
|
||||
shape = RectangleShape
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Info,
|
||||
contentDescription = "Info",
|
||||
modifier = Modifier.padding(horizontal = 4.dp)
|
||||
)
|
||||
Text(appStr(R.string.about_app))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<string name="about_app">About app</string>
|
||||
<string name="documents">Documents</string>
|
||||
<string name="materials">Materials</string>
|
||||
<string name="developer">Developer</string>
|
||||
<string-array name="short_weekdays">
|
||||
<item>Mn</item>
|
||||
<item>Tu</item>
|
||||
|
||||
Reference in New Issue
Block a user