Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "0.0.75"
versionName = "0.0.8"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.PreviewLightDark
import com.baidaidai.rootless_store.R

Expand All @@ -21,7 +22,7 @@ object executeScreenNecessaryComponents {
scrollBehavior: TopAppBarScrollBehavior
){
MediumFlexibleTopAppBar(
title = { Text("Executing Plugin") },
title = { Text(stringResource(R.string.execute_screen_top_app_bar_title)) },
scrollBehavior = scrollBehavior,
actions = {
ExecuteScreenStopButton()
Expand All @@ -40,7 +41,7 @@ object executeScreenNecessaryComponents {
) {
Icon(
painter = painterResource(R.drawable.material_symbols_ios_share),
contentDescription = "Share"
contentDescription = stringResource(R.string.execute_screen_top_app_bar_share_content_description)
)
}
}
Expand All @@ -52,7 +53,7 @@ object executeScreenNecessaryComponents {
) {
Icon(
painter = painterResource(R.drawable.material_symbols_disabled),
contentDescription = "Stop"
contentDescription = stringResource(R.string.execute_screen_top_app_bar_stop_content_description)
)
}
}
Expand All @@ -64,7 +65,7 @@ object executeScreenNecessaryComponents {
) {
Icon(
painter = painterResource(R.drawable.material_symbols_arrow_back),
contentDescription = "Back"
contentDescription = stringResource(R.string.execute_screen_top_app_bar_back_content_description)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
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 androidx.core.content.ContextCompat.startActivity
import com.baidaidai.rootless_store.R
Expand Down Expand Up @@ -61,7 +62,7 @@ fun HowToDevelopRootlessStorePlugin(){
){
Icon(
painter = painterResource(R.drawable.outline_construction_24),
contentDescription = "Develop Icon",
contentDescription = stringResource(R.string.home_screen_how_to_develop_rootless_store_plugin_icon_content_description),
modifier = Modifier
.clip(CircleShape)
.background(color = MaterialTheme.colorScheme.secondaryFixed)
Expand All @@ -75,11 +76,11 @@ fun HowToDevelopRootlessStorePlugin(){
)
Column{
Text(
text = "Learn Rootless Store",
text = stringResource(R.string.home_screen_how_to_develop_rootless_store_plugin_headline),
style = MaterialTheme.typography.titleMedium
)
Text(
text = "Learn how to develop RootlessStore plugins",
text = stringResource(R.string.home_screen_how_to_develop_rootless_store_plugin_supporting),
style = MaterialTheme.typography.labelSmall
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.baidaidai.rootless_store.R
import com.baidaidai.rootless_store.core.i18n.icuString

@Composable
fun RootLessStoreVersionCheckerContainer(){
Expand Down Expand Up @@ -47,7 +48,7 @@ fun RootLessStoreVersionCheckerContainer(){
){
Icon(
painter = painterResource(R.drawable.terminal_24px),
contentDescription = "Terminal Icon",
contentDescription = stringResource(R.string.home_screen_version_checker_container_icon_content_description),
modifier = Modifier
.size(30.dp)
)
Expand All @@ -57,11 +58,14 @@ fun RootLessStoreVersionCheckerContainer(){
)
Column{
Text(
text = "RootLessStore is Running",
text = stringResource(R.string.home_screen_version_checker_container_headline),
style = MaterialTheme.typography.titleMedium
)
Text(
text = "Version: $versionNumber",
text = icuString(
R.string.home_screen_version_checker_container_supporting,
mapOf("version" to versionNumber)
),
style = MaterialTheme.typography.titleSmall
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.scale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.baidaidai.rootless_store.R
import com.baidaidai.rootless_store.domain.status.model.RootlessStoreHosterStatus
Expand Down Expand Up @@ -63,7 +64,7 @@ fun RootlessStoreHosterStatusBoard(
) {
Icon(
painter = painterResource(R.drawable.monitor_heart_24px),
contentDescription = "Hoster Status",
contentDescription = stringResource(R.string.home_screen_hoster_status_board_icon_content_description),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier
.size(24.dp)
Expand All @@ -73,7 +74,7 @@ fun RootlessStoreHosterStatusBoard(
.width(10.dp)
)
Text(
text = "Hoster Status",
text = stringResource(R.string.home_screen_hoster_status_board_title),
style = MaterialTheme.typography.titleMedium
)
}
Expand Down Expand Up @@ -115,12 +116,12 @@ fun RootlessStoreHosterStatusBoard(
horizontalArrangement = Arrangement.SpaceAround
) {
HosterStatusCircularProgressRow(
label = "Memory",
label = stringResource(R.string.home_screen_hoster_status_board_memory_label),
currentValue = hosterStatus.memoryStatus.usedMemory,
maxValue = hosterStatus.memoryStatus.totalMemory
)
HosterStatusCircularProgressRow(
label = "Storage",
label = stringResource(R.string.home_screen_hoster_status_board_storage_label),
currentValue = hosterStatus.storageStatus.usedStorage,
maxValue = hosterStatus.storageStatus.totalStorage
)
Expand All @@ -140,30 +141,42 @@ fun RootlessStoreHosterStatusBoard(
modifier = Modifier
.padding(horizontal = 30.dp, vertical = 20.dp)
) {
HosterStatusRow("Version", "${hosterStatus.osAndAPIVersion?.androidVersion} (${hosterStatus.osAndAPIVersion?.apiVersion})")
HosterStatusRow(
stringResource(R.string.home_screen_hoster_status_board_version_label),
"${hosterStatus.osAndAPIVersion?.androidVersion} (${hosterStatus.osAndAPIVersion?.apiVersion})"
)
Spacer(
modifier = Modifier
.height(8.dp)
)
HosterStatusRow("Kernel", hosterStatus.kernelVersion ?: "null")
HosterStatusRow(
stringResource(R.string.home_screen_hoster_status_board_kernel_label),
hosterStatus.kernelVersion ?: "null"
)
Spacer(
modifier = Modifier
.height(8.dp)
)
HosterStatusRow("SELinux", hosterStatus.selinuxStatus.toString())
HosterStatusRow(
stringResource(R.string.home_screen_hoster_status_board_selinux_label),
hosterStatus.selinuxStatus.toString()
)
Spacer(
modifier = Modifier
.height(8.dp)
)
HosterStatusRow(
"Plugins",
stringResource(R.string.home_screen_hoster_status_board_plugins_label),
"${hosterStatus.pluginStatus.enabledCount}/${hosterStatus.pluginStatus.totalCount}"
)
Spacer(
modifier = Modifier
.height(8.dp)
)
HosterStatusRow("Temp", hosterStatus.tempStatus?.toString() ?: "null")
HosterStatusRow(
stringResource(R.string.home_screen_hoster_status_board_temp_label),
hosterStatus.tempStatus?.toString() ?: "null"
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.PreviewLightDark
import androidx.compose.ui.unit.dp
import com.baidaidai.rootless_store.R
import com.baidaidai.rootless_store.core.i18n.icuString
import com.baidaidai.rootless_store.domain.plugin.manifest.PluginManifestRoom

@Composable
Expand All @@ -49,7 +51,7 @@ fun PluginInfoContainerLocal(
) {
Icon(
painter = painterResource(R.drawable.outline_close_24),
contentDescription = "delete button",
contentDescription = stringResource(R.string.plugin_screen_info_container_local_delete_button_content_description),
modifier = Modifier
.fillMaxSize()
)
Expand Down Expand Up @@ -78,7 +80,7 @@ fun PluginInfoContainerLocal(
){
Icon(
painter = painterResource(R.drawable.outline_extension_24),
contentDescription = "Plugin Icon",
contentDescription = stringResource(R.string.plugin_screen_info_container_local_icon_content_description),
modifier = Modifier
.size(24.dp)
)
Expand All @@ -95,7 +97,10 @@ fun PluginInfoContainerLocal(
style = MaterialTheme.typography.titleMedium
)
Text(
text = "Version: ${pluginManifest.installedVersion}",
text = icuString(
R.string.plugin_screen_info_container_local_version,
mapOf("version" to pluginManifest.installedVersion)
),
style = MaterialTheme.typography.labelMedium
)
}
Expand All @@ -119,11 +124,20 @@ fun PluginInfoContainerLocal(
modifier = Modifier
.padding(24.dp)
) {
PluginInfoRow(label = "Author", value = pluginManifest.author)
PluginInfoRow(label = "Source", value = pluginManifest.source.toString())
PluginInfoRow(label = "State", value = pluginManifest.state.toString())
PluginInfoRow(
label = "Required",
label = stringResource(R.string.plugin_screen_info_container_local_author_label),
value = pluginManifest.author
)
PluginInfoRow(
label = stringResource(R.string.plugin_screen_info_container_local_source_label),
value = pluginManifest.source.toString()
)
PluginInfoRow(
label = stringResource(R.string.plugin_screen_info_container_local_state_label),
value = pluginManifest.state.toString()
)
PluginInfoRow(
label = stringResource(R.string.plugin_screen_info_container_local_required_label),
value = pluginManifest.requiredEnvironment.toString()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import com.baidaidai.rootless_store.R
import com.baidaidai.rootless_store.core.i18n.icuString

object PluginScreenNecessaryComponents {
@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class)
Expand All @@ -24,16 +26,21 @@ object PluginScreenNecessaryComponents {
){
LargeFlexibleTopAppBar(
title = {
Text("Plugin")
Text(stringResource(R.string.plugin_screen_top_app_bar_title))
},
subtitle = {
Text(text = "Instead $pluginInfoCount plugin")
Text(
text = icuString(
R.string.plugin_screen_top_app_bar_subtitle,
mapOf("pluginCount" to pluginInfoCount)
)
)
},
navigationIcon = {
TextButton(
onClick = textButtonOnClick
) {
Text("Edit")
Text(stringResource(R.string.plugin_screen_top_app_bar_edit_button))
}
},
actions = {
Expand All @@ -42,7 +49,7 @@ object PluginScreenNecessaryComponents {
) {
Icon(
painter = painterResource(R.drawable.material_symbols_filter_list),
contentDescription = "Filter"
contentDescription = stringResource(R.string.plugin_screen_top_app_bar_filter_content_description)
)
}
},
Expand All @@ -59,7 +66,7 @@ object PluginScreenNecessaryComponents {
) {
Icon(
painter = painterResource(R.drawable.outline_box_add_24),
contentDescription = "Install"
contentDescription = stringResource(R.string.plugin_screen_floating_button_install_content_description)
)
}
}
Expand Down
Loading
Loading