-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/trunk' into merge/24.1-rc-3-to-t…
…runk
- Loading branch information
Showing
39 changed files
with
516 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
# built application files | ||
*.apk | ||
*.ap_ | ||
*.aab | ||
|
||
# files for the dex VM | ||
*.dex | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-63.1 MB
WordPress/jetpackJalapeno/release/org.wordpress.android-jetpack-jalapeno-release.aab
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
WordPress/src/main/java/org/wordpress/android/ui/sitemonitor/SiteMonitorParentActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package org.wordpress.android.ui.sitemonitor | ||
|
||
import android.annotation.SuppressLint | ||
import android.os.Bundle | ||
import androidx.activity.compose.setContent | ||
import androidx.activity.viewModels | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Scaffold | ||
import androidx.compose.material.TabRow | ||
import androidx.compose.material.Text | ||
import androidx.compose.material3.Tab | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import org.wordpress.android.R | ||
import org.wordpress.android.WordPress | ||
import org.wordpress.android.fluxc.model.SiteModel | ||
import org.wordpress.android.ui.compose.components.MainTopAppBar | ||
import org.wordpress.android.ui.compose.components.NavigationIcons | ||
import org.wordpress.android.ui.compose.theme.AppTheme | ||
import org.wordpress.android.util.extensions.getSerializableExtraCompat | ||
|
||
@AndroidEntryPoint | ||
class SiteMonitorParentActivity: AppCompatActivity() { | ||
val viewModel:SiteMonitorParentViewModel by viewModels() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
AppTheme { | ||
viewModel.start(getSite()) | ||
SiteMonitorScreen() | ||
} | ||
} | ||
} | ||
|
||
private fun getSite(): SiteModel { | ||
return requireNotNull(intent.getSerializableExtraCompat(WordPress.SITE)) as SiteModel | ||
} | ||
|
||
@Composable | ||
@SuppressLint("UnusedMaterialScaffoldPaddingParameter") | ||
fun SiteMonitorScreen(modifier: Modifier = Modifier) { | ||
Scaffold( | ||
topBar = { | ||
MainTopAppBar( | ||
title = stringResource(id = R.string.site_monitoring), | ||
navigationIcon = NavigationIcons.BackIcon, | ||
onNavigationIconClick = onBackPressedDispatcher::onBackPressed, | ||
) | ||
}, | ||
content = { | ||
TabScreen(modifier = modifier) | ||
} | ||
) | ||
} | ||
|
||
@Composable | ||
@SuppressLint("UnusedMaterialScaffoldPaddingParameter") | ||
fun TabScreen(modifier: Modifier = Modifier) { | ||
var tabIndex by remember { mutableStateOf(0) } | ||
|
||
val tabs = listOf( | ||
R.string.site_monitoring_tab_title_metrics, | ||
R.string.site_monitoring_tab_title_php_logs, | ||
R.string.site_monitoring_tab_title_web_server_logs | ||
) | ||
|
||
Column(modifier = modifier.fillMaxWidth()) { | ||
TabRow( | ||
selectedTabIndex = tabIndex, | ||
backgroundColor = MaterialTheme.colors.surface, | ||
contentColor = MaterialTheme.colors.onSurface, | ||
) { | ||
tabs.forEachIndexed { index, title -> | ||
Tab(text = { Text(stringResource(id = title)) }, | ||
selected = tabIndex == index, | ||
onClick = { tabIndex = index } | ||
) | ||
} | ||
} | ||
when (tabIndex) { | ||
0 -> SiteMonitoringWebView() | ||
1 -> SiteMonitoringWebView() | ||
2 -> SiteMonitoringWebView() | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
fun SiteMonitoringWebView(){ | ||
Text(text = "SiteMonitoringWebView") | ||
} | ||
} |
Oops, something went wrong.