Skip to content

Commit

Permalink
Show info: wait before work app store can be used
Browse files Browse the repository at this point in the history
  • Loading branch information
fynngodau committed Oct 21, 2024
1 parent b2cec33 commit 52559d4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ package org.microg.vending.ui.components

import androidx.annotation.StringRes
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.Warning
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -59,11 +62,30 @@ internal fun EnterpriseList(appStates: Map<EnterpriseApp, AppState>, install: (a
.fillMaxSize()
.padding(24.dp)
) {
Column(Modifier.align(Alignment.Center)) {
Column(Modifier.align(Alignment.Center), verticalArrangement = Arrangement.spacedBy(32.dp)) {
Text(
stringResource(R.string.vending_overview_enterprise_no_apps_available),
textAlign = TextAlign.Center
)

Row(
Modifier
.clip(shape = RoundedCornerShape(16.dp))
.background(MaterialTheme.colorScheme.primaryContainer),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
Icons.Default.Info,
contentDescription = null,
Modifier.padding(start = 16.dp, top = 16.dp, bottom = 16.dp, end = 16.dp),
MaterialTheme.colorScheme.onPrimaryContainer
)
Text(
stringResource(R.string.vending_overview_enterprise_no_apps_available_wait),
Modifier.padding(top = 16.dp, bottom = 16.dp, end = 16.dp),
MaterialTheme.colorScheme.onPrimaryContainer
)
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion vending-app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<string name="vending_overview_enterprise_row_mandatory_missing_hint">Your device is missing mandatory apps chosen by your administrator.</string>
<string name="vending_overview_enterprise_row_offered">Available apps</string>
<string name="vending_overview_enterprise_row_offered_hint">These are all the apps made available by your enterprise.</string>
<string name="vending_overview_enterprise_no_apps_available">No apps have been made available by your administrator</string>
<string name="vending_overview_enterprise_no_apps_available">No apps have been made available by your administrator.</string>
<string name="vending_overview_enterprise_no_apps_available_wait">It may take a few hours after setting up your work profile before apps are ready to download.</string>
<string name="vending_overview_row_update_available">Update available</string>
<string name="vending_overview_row_installed">Installed apps</string>
<string name="vending_overview_row_action_install">Install</string>
Expand Down

0 comments on commit 52559d4

Please sign in to comment.