diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3410faa..65075a9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ + + = MutableStateFlow(DashboardUiState(false, _user, null)) diff --git a/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Help.kt b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Help.kt new file mode 100644 index 0000000..7b44d5c --- /dev/null +++ b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Help.kt @@ -0,0 +1,53 @@ +package eu.m724.vastapp.activity.dashboard.screen + +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import android.os.Parcelable +import android.view.ViewGroup +import android.webkit.WebResourceRequest +import android.webkit.WebView +import android.webkit.WebViewClient +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.Button +import androidx.compose.material3.Card +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.State +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.Saver +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.unit.sp +import androidx.compose.ui.viewinterop.AndroidView +import androidx.core.content.ContextCompat.startActivity +import androidx.lifecycle.ViewModel +import eu.m724.vastapp.activity.dashboard.DashboardViewModel + +@Composable +fun HelpScreen(dashboardViewModel: DashboardViewModel) { // TODO make this a webview + val context = LocalContext.current + + Column( + modifier = Modifier.fillMaxSize(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + Button(onClick = { + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")) + context.startActivity(browserIntent) + }) { + Text(text = "https://vast.ai/docs") + } + Text(text = "(this will be a webview)", fontSize = 12.sp) + } +} \ No newline at end of file