Skip to content

Commit 343bebe

Browse files
committed
Beta screen iteration
1 parent aa635f1 commit 343bebe

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ dependencies {
104104

105105
implementation(libs.compottie)
106106
implementation(libs.kaml)
107+
implementation(libs.markdown)
108+
implementation(libs.markdownJVM)
107109
}
108110

109111
tasks.compileJava{

app/src/processing/app/ui/WelcomeToBeta.kt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.compose.foundation.background
77
import androidx.compose.foundation.layout.*
88
import androidx.compose.material.MaterialTheme
99
import androidx.compose.material.MaterialTheme.colors
10+
import androidx.compose.material.MaterialTheme.typography
1011
import androidx.compose.material.Surface
1112
import androidx.compose.material.Text
1213
import androidx.compose.runtime.*
@@ -29,6 +30,13 @@ import androidx.compose.ui.window.WindowPosition
2930
import androidx.compose.ui.window.application
3031
import androidx.compose.ui.window.rememberWindowState
3132
import com.formdev.flatlaf.util.SystemInfo
33+
import com.mikepenz.markdown.compose.Markdown
34+
import com.mikepenz.markdown.m2.markdownColor
35+
import com.mikepenz.markdown.m2.markdownTypography
36+
import com.mikepenz.markdown.model.MarkdownColors
37+
import com.mikepenz.markdown.model.MarkdownTypography
38+
import processing.app.Base.getRevision
39+
import processing.app.Base.getVersionName
3240
import processing.app.ui.theme.LocalLocale
3341
import processing.app.ui.theme.LocalTheme
3442
import processing.app.ui.theme.Locale
@@ -112,8 +120,17 @@ class WelcomeToBeta {
112120
text = locale["beta.title"],
113121
style = MaterialTheme.typography.subtitle1,
114122
)
115-
Text(
116-
text = locale["beta.message"]
123+
val text = locale["beta.message"]
124+
.replace('$' + "version", getVersionName())
125+
.replace('$' + "revision", getRevision().toString())
126+
Markdown(
127+
text,
128+
colors = markdownColor(
129+
text = colors.onSurface,
130+
linkText = colors.primary,
131+
),
132+
typography = markdownTypography(text = typography.body1),
133+
modifier = Modifier.background(Color.Transparent)
117134
)
118135
Row {
119136
Spacer(modifier = Modifier.weight(1f))

build/shared/lib/languages/PDE.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,9 @@ update_check.updates_available.contributions = There are updates available for s
617617
# ---------------------------------------
618618
# Beta
619619
beta.window.title = Welcome to Beta
620-
beta.title = Welcome to the Processing Beta
621-
beta.message = Thank you for trying out the new version of Processing. We're very grateful!\n\nPlease report any bugs on the forums.
622-
beta.button = Got it!
620+
beta.title = Thanks for testing this Processing Beta!
621+
beta.message = This preview release lets us gather feedback and fix issues before the final version. Some features may not work as expected. If you encounter problems, [please post on the forum](https://discourse.processing.org) or [open a GitHub issue](https://github.com/processing/processing4/issues). \n\n [What's new in this release?](https://github.com/processing/processing4/releases/tag/processing-$revision-$version)
622+
beta.button = Ok
623623

624624
# ---------------------------------------
625625
# Color Chooser

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ netbeansSwing = { module = "org.netbeans.api:org-netbeans-swing-outline", versio
2121
ant = { module = "org.apache.ant:ant", version = "1.10.14" }
2222
lsp4j = { module = "org.eclipse.lsp4j:org.eclipse.lsp4j", version = "0.22.0" }
2323
jsoup = { module = "org.jsoup:jsoup", version = "1.17.2" }
24+
markdown = { module = "com.mikepenz:multiplatform-markdown-renderer-m2", version = "0.31.0" }
25+
markdownJVM = { module = "com.mikepenz:multiplatform-markdown-renderer-jvm", version = "0.31.0" }
2426

2527
[plugins]
2628
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }

0 commit comments

Comments
 (0)