Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for flavors #13

Merged
merged 7 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
46 changes: 44 additions & 2 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ plugins {
alias(libs.plugins.ktlint)
}

val flavor: String by project
aanorbel marked this conversation as resolved.
Show resolved Hide resolved

val appConfig =
mapOf(
"dw" to
AppConfig(
appId = "org.dw.probe",
appName = "News Media Scan",
srcRoot = "src/dwMain/kotlin",
resRoot = "src/dwMain/resources",
),
"ooni" to
AppConfig(
appId = "org.ooni.probe",
appName = "OONI Probe",
srcRoot = "src/ooniMain/kotlin",
resRoot = "src/ooniMain/resources",
),
)

val config = appConfig[flavor] ?: appConfig["ooni"]!!

println("The current build flavor is set to $flavor with app id set to ${config.appId}.")

kotlin {
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
Expand Down Expand Up @@ -55,8 +79,11 @@ kotlin {
implementation(compose.components.uiToolingPreview)
implementation(libs.kotlin.serialization)
implementation(libs.bundles.tooling)
}

getByName("commonMain") {
kotlin.srcDir(config.srcRoot)
}
}
all {
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
Expand All @@ -72,16 +99,24 @@ kotlin {
}
}

compose.resources {
customDirectory(
sourceSetName = "commonMain",
directoryProvider = provider { layout.projectDirectory.dir(config.resRoot) },
)
}

android {
namespace = "org.ooni.probe"
compileSdk = libs.versions.android.compileSdk.get().toInt()

defaultConfig {
applicationId = "org.ooni.probe"
applicationId = config.appId
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
resValue("string", "app_name", config.appName)
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
}
packaging {
resources {
Expand Down Expand Up @@ -121,3 +156,10 @@ ktlint {
}
additionalEditorconfig.put("ktlint_function_naming_ignore_when_annotated_with", "Composable")
}

data class AppConfig(
val appId: String,
val appName: String,
val srcRoot: String,
val resRoot: String,
)
3 changes: 1 addition & 2 deletions composeApp/src/androidMain/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<resources>
<string name="app_name">OONI Probe</string>
</resources>
</resources>
2 changes: 2 additions & 0 deletions composeApp/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<resources>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we able to have string resources here as well? Or is the file totally overriden by the ooni and dw variants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do so right now. I tested locally but it fails on the ci.

</resources>
4 changes: 2 additions & 2 deletions composeApp/src/commonMain/kotlin/org/ooni/probe/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
import co.touchlab.kermit.Logger
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.ooni.probe.di.Dependencies
import org.ooni.probe.ui.Theme
import org.ooni.probe.ui.AppTheme
import org.ooni.probe.ui.main.MainScreen

@Composable
Expand All @@ -19,7 +19,7 @@ fun App(dependencies: Dependencies) {
logAppStart(dependencies)
}

Theme {
AppTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background,
Expand Down
15 changes: 1 addition & 14 deletions composeApp/src/commonMain/kotlin/org/ooni/probe/ui/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

private val primaryColor = Color(0xff0588cb)
private val primaryLightColor = primaryColor.copy(alpha = 0.75f)
private val secondaryColor = Color(0xff5db8fe)
private val secondaryLightColor = secondaryColor.copy(alpha = 0.75f)
private val primaryTextColor = Color(0xffffffff)
private val secondaryTextColor = Color(0xff000000)
private val surfaceDark = Color(0xFF161616)
private val surfaceLight = Color(0xFFFFFFFF)
private val backgroundLightColor = Color(0xffF1F0F5)
private val backgroundDarkColor = Color(0xff010100)
private val errorColor = Color(0xFFFF8989)
private val onErrorColor = Color(0xFF000000)

private val LightColors =
lightColorScheme(
primary = primaryColor,
Expand Down Expand Up @@ -64,7 +51,7 @@ private val DarkColors =
)

@Composable
internal fun Theme(
fun AppTheme(
useDarkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit,
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,62 @@
package org.ooni.probe.ui.main

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import ooniprobe.composeapp.generated.resources.Res
import ooniprobe.composeapp.generated.resources.app_name
import ooniprobe.composeapp.generated.resources.logo
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MainScreen(viewModel: MainViewModel) {
val state by viewModel.state.collectAsState()
Scaffold(
topBar = {
TopAppBar(
title = {
Text(stringResource(Res.string.app_name))
},
)
},
) { contentPadding ->

Column {
Button(
onClick = { viewModel.onEvent(MainViewModel.Event.StartClick) },
enabled = !state.isRunning,
Column(
modifier = Modifier.padding(contentPadding),
verticalArrangement = Arrangement.Center,
) {
Text("Run Test")
}
Button(
onClick = { viewModel.onEvent(MainViewModel.Event.StartClick) },
enabled = !state.isRunning,
) {
Text("Run Test")
}

Text(
text = state.log,
modifier =
Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState()),
)
Image(
painterResource(Res.drawable.logo),
contentDescription = "OONI Probe Logo",
modifier = Modifier.align(Alignment.CenterHorizontally),
)
Text(
text = state.log,
modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()),
)
}
}
}
3 changes: 3 additions & 0 deletions composeApp/src/dwMain/kotlin/Config.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
object Config {
const val ENVIRONMENT: String = "News Media Scan"
}
16 changes: 16 additions & 0 deletions composeApp/src/dwMain/kotlin/org/ooni/probe/ui/Colors.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.ooni.probe.ui

import androidx.compose.ui.graphics.Color

val primaryColor = Color(0xffD32625)
val primaryLightColor = primaryColor.copy(alpha = 0.75f)
val secondaryColor = Color(0xff5db8fe)
val secondaryLightColor = secondaryColor.copy(alpha = 0.75f)
val primaryTextColor = Color(0xffffffff)
val secondaryTextColor = Color(0xff000000)
val surfaceDark = Color(0xFF161616)
val surfaceLight = Color(0xFFFFFFFF)
val backgroundLightColor = Color(0xffF1F0F5)
val backgroundDarkColor = Color(0xff010100)
val errorColor = Color(0xFFFF8989)
val onErrorColor = Color(0xFF000000)
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
69 changes: 69 additions & 0 deletions composeApp/src/dwMain/resources/drawable/logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="119dp"
android:height="119dp"
android:viewportWidth="119"
android:viewportHeight="119">
<path
android:pathData="M0.09,69.3h101.48v34.65h-101.48z"
android:fillColor="#ffffff"/>
<path
android:pathData="M20.29,92.61C20.29,92.14 20.22,91.71 20.07,91.34C19.93,90.96 19.68,90.61 19.31,90.31C18.95,89.99 18.43,89.69 17.77,89.4C17.11,89.09 16.27,88.78 15.23,88.45C14.08,88.09 13.01,87.68 12.02,87.23C11.02,86.78 10.15,86.25 9.39,85.66C8.65,85.06 8.07,84.37 7.65,83.59C7.23,82.8 7.02,81.89 7.02,80.85C7.02,79.84 7.24,78.91 7.67,78.08C8.11,77.24 8.73,76.53 9.53,75.93C10.33,75.32 11.27,74.85 12.35,74.52C13.45,74.2 14.65,74.03 15.97,74.03C17.8,74.03 19.38,74.37 20.71,75.03C22.05,75.7 23.09,76.6 23.83,77.74C24.56,78.88 24.93,80.16 24.93,81.58H20.29C20.29,80.81 20.13,80.14 19.8,79.55C19.48,78.96 19,78.5 18.34,78.16C17.7,77.82 16.89,77.65 15.91,77.65C14.96,77.65 14.17,77.79 13.54,78.08C12.92,78.36 12.45,78.74 12.13,79.23C11.83,79.71 11.68,80.25 11.68,80.85C11.68,81.3 11.78,81.71 12,82.07C12.21,82.42 12.53,82.75 12.96,83.07C13.39,83.37 13.92,83.66 14.55,83.93C15.2,84.19 15.94,84.45 16.79,84.71C18.14,85.12 19.32,85.57 20.34,86.06C21.37,86.56 22.22,87.12 22.89,87.76C23.58,88.39 24.1,89.1 24.43,89.89C24.78,90.68 24.96,91.57 24.96,92.58C24.96,93.64 24.75,94.59 24.33,95.42C23.92,96.25 23.32,96.97 22.54,97.55C21.76,98.14 20.82,98.58 19.73,98.89C18.65,99.19 17.44,99.35 16.09,99.35C14.9,99.35 13.71,99.19 12.54,98.87C11.38,98.54 10.32,98.06 9.38,97.42C8.43,96.76 7.67,95.94 7.11,94.95C6.54,93.94 6.26,92.77 6.26,91.43H10.93C10.93,92.21 11.06,92.87 11.3,93.42C11.56,93.96 11.92,94.41 12.39,94.76C12.86,95.1 13.41,95.35 14.05,95.5C14.68,95.66 15.36,95.74 16.09,95.74C17.04,95.74 17.82,95.61 18.43,95.35C19.05,95.08 19.51,94.71 19.82,94.24C20.13,93.76 20.29,93.22 20.29,92.61Z"
android:fillColor="#D32625"/>
<path
android:pathData="M42.96,90.9H47.62C47.49,92.55 47.03,94.01 46.24,95.28C45.45,96.55 44.35,97.54 42.94,98.26C41.53,98.98 39.83,99.35 37.82,99.35C36.27,99.35 34.88,99.07 33.64,98.53C32.41,97.98 31.35,97.2 30.47,96.18C29.61,95.15 28.94,93.93 28.48,92.49C28.02,91.05 27.78,89.43 27.78,87.64V85.76C27.78,83.96 28.02,82.35 28.5,80.9C28.97,79.46 29.65,78.23 30.53,77.21C31.42,76.19 32.48,75.4 33.72,74.85C34.98,74.29 36.37,74.02 37.92,74.02C39.93,74.02 41.63,74.39 43.01,75.13C44.4,75.87 45.48,76.88 46.24,78.16C47.01,79.45 47.47,80.93 47.63,82.59H42.98C42.89,81.56 42.66,80.68 42.3,79.96C41.95,79.23 41.42,78.69 40.71,78.31C40.01,77.93 39.08,77.74 37.92,77.74C37.02,77.74 36.22,77.91 35.53,78.25C34.86,78.58 34.29,79.09 33.84,79.77C33.39,80.43 33.05,81.27 32.83,82.27C32.6,83.27 32.49,84.42 32.49,85.72V87.64C32.49,88.89 32.59,90.01 32.79,91C33,92 33.31,92.84 33.74,93.52C34.17,94.21 34.72,94.74 35.4,95.1C36.08,95.46 36.88,95.64 37.82,95.64C38.96,95.64 39.88,95.46 40.59,95.1C41.31,94.74 41.86,94.21 42.23,93.51C42.62,92.81 42.86,91.94 42.96,90.9Z"
android:fillColor="#D32625"/>
<path
android:pathData="M61.02,78.11L53.99,99.01H49.07L58.27,74.37H61.42L61.02,78.11ZM66.89,99.01L59.83,78.11L59.41,74.37H62.57L71.83,99.01H66.89ZM66.57,89.85V93.52H53.35V89.85H66.57Z"
android:fillColor="#D32625"/>
<path
android:pathData="M94.16,74.37V99.01H89.49L79.02,81.92V99.01H74.37V74.37H79.02L89.53,91.48V74.37H94.16Z"
android:fillColor="#D32625"/>
<path
android:pathData="M0.09,34.65h118.81v34.65h-118.81z"
android:fillColor="#ffffff"/>
<path
android:pathData="M9.43,39.72H13.45L20.19,58.26L26.9,39.72H30.95L21.79,64.35H18.56L9.43,39.72ZM7.4,39.72H11.34L12.05,56.76V64.35H7.4V39.72ZM29.02,39.72H32.98V64.35H28.33V56.76L29.02,39.72Z"
android:fillColor="#D32625"/>
<path
android:pathData="M54.04,60.7V64.35H40.95V60.7H54.04ZM42.37,39.72V64.35H37.72V39.72H42.37ZM52.34,49.89V53.46H40.95V49.89H52.34ZM53.99,39.72V43.39H40.95V39.72H53.99Z"
android:fillColor="#D32625"/>
<path
android:pathData="M64.64,64.35H59.32L59.36,60.7H64.64C66.07,60.7 67.27,60.38 68.24,59.75C69.21,59.11 69.94,58.19 70.44,56.99C70.94,55.79 71.18,54.34 71.18,52.66V51.39C71.18,50.1 71.04,48.95 70.76,47.96C70.48,46.97 70.06,46.13 69.51,45.45C68.97,44.78 68.3,44.26 67.5,43.92C66.7,43.57 65.78,43.39 64.74,43.39H59.22V39.72H64.74C66.39,39.72 67.89,40 69.24,40.55C70.6,41.1 71.78,41.9 72.78,42.93C73.78,43.96 74.55,45.19 75.08,46.62C75.62,48.05 75.89,49.66 75.89,51.43V52.66C75.89,54.42 75.62,56.02 75.08,57.47C74.55,58.9 73.78,60.13 72.78,61.16C71.78,62.18 70.6,62.97 69.22,63.53C67.85,64.08 66.32,64.35 64.64,64.35ZM61.93,39.72V64.35H57.28V39.72H61.93Z"
android:fillColor="#D32625"/>
<path
android:pathData="M84.81,39.72V64.35H80.15V39.72H84.81Z"
android:fillColor="#D32625"/>
<path
android:pathData="M99.93,43.46L92.91,64.35H87.99L97.19,39.72H100.34L99.93,43.46ZM105.8,64.35L98.75,43.46L98.32,39.72H101.49L110.74,64.35H105.8ZM105.48,55.2V58.87H92.27V55.2H105.48Z"
android:fillColor="#D32625"/>
<path
android:pathData="M0.09,0h101.48v34.65h-101.48z"
android:fillColor="#ffffff"/>
<path
android:pathData="M27.19,5.07V29.7H22.52L12.05,12.61V29.7H7.4V5.07H12.05L22.56,22.17V5.07H27.19Z"
android:fillColor="#D32625"/>
<path
android:pathData="M48.26,26.05V29.7H35.16V26.05H48.26ZM36.58,5.07V29.7H31.93V5.07H36.58ZM46.55,15.24V18.81H35.16V15.24H46.55ZM48.21,5.07V8.74H35.16V5.07H48.21Z"
android:fillColor="#D32625"/>
<path
android:pathData="M57.55,24.98L62.45,5.07H65.11L65.28,9.26L60.03,29.7H57.23L57.55,24.98ZM54.45,5.07L58.48,24.91V29.7H55.42L49.83,5.07H54.45ZM70.37,24.83L74.33,5.07H78.97L73.38,29.7H70.32L70.37,24.83ZM66.38,5.07L71.29,25.05L71.57,29.7H68.77L63.54,9.25L63.74,5.07H66.38Z"
android:fillColor="#D32625"/>
<path
android:pathData="M94.81,23.31C94.81,22.83 94.73,22.41 94.59,22.04C94.45,21.65 94.2,21.31 93.82,21.01C93.46,20.69 92.95,20.38 92.28,20.09C91.63,19.79 90.78,19.47 89.75,19.14C88.6,18.78 87.52,18.38 86.53,17.93C85.54,17.47 84.66,16.95 83.91,16.35C83.16,15.75 82.58,15.07 82.17,14.29C81.75,13.5 81.54,12.58 81.54,11.55C81.54,10.53 81.75,9.61 82.18,8.77C82.62,7.94 83.24,7.22 84.04,6.62C84.85,6.01 85.79,5.55 86.87,5.22C87.96,4.89 89.17,4.73 90.49,4.73C92.32,4.73 93.9,5.06 95.23,5.73C96.57,6.39 97.61,7.29 98.34,8.43C99.07,9.57 99.44,10.85 99.44,12.27H94.81C94.81,11.51 94.64,10.83 94.31,10.24C94,9.66 93.51,9.19 92.86,8.86C92.22,8.52 91.4,8.35 90.42,8.35C89.48,8.35 88.69,8.49 88.05,8.77C87.43,9.05 86.97,9.44 86.65,9.92C86.35,10.41 86.19,10.95 86.19,11.55C86.19,12 86.3,12.4 86.51,12.77C86.73,13.11 87.05,13.45 87.48,13.76C87.91,14.07 88.44,14.36 89.07,14.63C89.71,14.89 90.46,15.15 91.3,15.4C92.66,15.81 93.84,16.26 94.86,16.76C95.88,17.25 96.73,17.82 97.41,18.45C98.1,19.08 98.61,19.79 98.95,20.58C99.3,21.37 99.48,22.27 99.48,23.27C99.48,24.33 99.27,25.28 98.85,26.12C98.43,26.95 97.83,27.66 97.06,28.25C96.28,28.83 95.34,29.28 94.25,29.58C93.16,29.89 91.95,30.04 90.61,30.04C89.41,30.04 88.23,29.88 87.06,29.57C85.89,29.24 84.84,28.75 83.89,28.11C82.94,27.46 82.19,26.63 81.62,25.64C81.06,24.64 80.78,23.46 80.78,22.12H85.45C85.45,22.9 85.57,23.57 85.82,24.12C86.08,24.66 86.44,25.11 86.9,25.46C87.38,25.79 87.93,26.04 88.56,26.2C89.19,26.36 89.88,26.44 90.61,26.44C91.56,26.44 92.33,26.31 92.94,26.05C93.56,25.78 94.03,25.4 94.33,24.93C94.65,24.46 94.81,23.92 94.81,23.31Z"
android:fillColor="#D32625"/>
<path
android:pathData="M54.56,100.75l58.26,-4.44l1.37,17.93l-58.26,4.44z"
android:fillColor="#000000"/>
<path
android:pathData="M65.2,102.88L66.96,102.74L67.61,111.34L67.56,112.94L65.97,113.06L65.2,102.88ZM72.07,108.91L72.08,109.05C72.12,109.59 72.09,110.08 72.01,110.54C71.93,110.99 71.78,111.39 71.57,111.74C71.36,112.08 71.09,112.35 70.76,112.56C70.43,112.76 70.03,112.88 69.56,112.92C69.12,112.95 68.73,112.89 68.39,112.75C68.05,112.6 67.76,112.38 67.52,112.08C67.27,111.78 67.07,111.42 66.9,111C66.74,110.58 66.6,110.11 66.5,109.6L66.47,109.23C66.5,108.7 66.56,108.22 66.66,107.79C66.76,107.35 66.91,106.96 67.1,106.63C67.3,106.29 67.55,106.02 67.86,105.83C68.17,105.63 68.55,105.51 68.98,105.48C69.45,105.45 69.87,105.5 70.23,105.66C70.6,105.81 70.91,106.04 71.16,106.35C71.42,106.65 71.63,107.03 71.78,107.46C71.93,107.89 72.02,108.38 72.07,108.91ZM70.32,109.19L70.31,109.05C70.29,108.74 70.24,108.46 70.17,108.19C70.1,107.92 70,107.69 69.88,107.49C69.75,107.29 69.59,107.14 69.39,107.03C69.19,106.93 68.95,106.88 68.66,106.91C68.39,106.93 68.15,106.99 67.97,107.1C67.78,107.21 67.63,107.35 67.52,107.52C67.41,107.69 67.33,107.89 67.27,108.12C67.22,108.35 67.2,108.59 67.19,108.85L67.27,109.88C67.33,110.22 67.43,110.52 67.56,110.78C67.7,111.04 67.88,111.25 68.12,111.39C68.36,111.53 68.66,111.59 69.03,111.56C69.31,111.54 69.54,111.46 69.72,111.34C69.9,111.21 70.04,111.04 70.14,110.83C70.23,110.61 70.29,110.36 70.31,110.09C70.34,109.81 70.34,109.51 70.32,109.19Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M75.58,111.53L77.01,105L78.89,104.86L76.64,113.34C76.59,113.52 76.52,113.72 76.43,113.93C76.34,114.15 76.22,114.36 76.06,114.56C75.9,114.76 75.7,114.93 75.45,115.07C75.2,115.21 74.89,115.29 74.53,115.32C74.37,115.33 74.23,115.33 74.1,115.32C73.97,115.31 73.84,115.29 73.7,115.26L73.6,113.95C73.65,113.95 73.7,113.95 73.76,113.94C73.82,113.94 73.87,113.94 73.92,113.94C74.17,113.92 74.38,113.87 74.54,113.8C74.71,113.73 74.84,113.62 74.93,113.48C75.02,113.35 75.1,113.17 75.15,112.96L75.58,111.53ZM74.14,105.22L76.17,110.38L76.6,112.21L75.41,112.52L72.26,105.37L74.14,105.22Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M86.68,111.48L84.6,111.64L84.5,110.21L86.57,110.05C87.13,110.01 87.6,109.85 87.96,109.57C88.32,109.29 88.58,108.91 88.74,108.42C88.89,107.94 88.95,107.36 88.9,106.71L88.86,106.21C88.82,105.7 88.73,105.25 88.59,104.88C88.45,104.49 88.26,104.18 88.03,103.93C87.79,103.68 87.52,103.5 87.19,103.39C86.87,103.28 86.5,103.23 86.1,103.26L83.94,103.43L83.83,101.99L85.99,101.83C86.63,101.78 87.23,101.84 87.77,102.02C88.33,102.19 88.81,102.47 89.23,102.85C89.66,103.22 89.99,103.68 90.24,104.22C90.5,104.77 90.65,105.39 90.7,106.08L90.74,106.57C90.79,107.25 90.74,107.89 90.57,108.47C90.4,109.05 90.14,109.55 89.78,109.99C89.42,110.42 88.98,110.76 88.45,111.02C87.93,111.28 87.34,111.43 86.68,111.48ZM84.89,101.91L85.62,111.56L83.8,111.7L83.06,102.05L84.89,101.91Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M94.87,109L96.2,101.05L97.24,100.97L97.43,102.61L95.99,110.77L94.89,110.86L94.87,109ZM93.07,101.29L95.24,108.94L95.38,110.82L94.18,110.91L91.26,101.43L93.07,101.29ZM99.89,108.56L100.86,100.69L102.67,100.56L101.22,110.37L100.02,110.46L99.89,108.56ZM97.74,100.93L100.26,108.61L100.51,110.43L99.41,110.51L96.75,102.65L96.71,101.01L97.74,100.93Z"
android:fillColor="#ffffff"/>
</vector>
4 changes: 4 additions & 0 deletions composeApp/src/dwMain/resources/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">News Media Scan</string>
<string name="name_name">News x</string>
</resources>
3 changes: 3 additions & 0 deletions composeApp/src/ooniMain/kotlin/Config.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
object Config {
const val ENVIRONMENT: String = "OONI Probe"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear why we need this constant.

}
16 changes: 16 additions & 0 deletions composeApp/src/ooniMain/kotlin/org/ooni/probe/ui/Colors.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.ooni.probe.ui

import androidx.compose.ui.graphics.Color

val primaryColor = Color(0xff0588cb)
val primaryLightColor = primaryColor.copy(alpha = 0.75f)
val secondaryColor = Color(0xff5db8fe)
val secondaryLightColor = secondaryColor.copy(alpha = 0.75f)
val primaryTextColor = Color(0xffffffff)
val secondaryTextColor = Color(0xff000000)
val surfaceDark = Color(0xFF161616)
val surfaceLight = Color(0xFFFFFFFF)
val backgroundLightColor = Color(0xffF1F0F5)
val backgroundDarkColor = Color(0xff010100)
val errorColor = Color(0xFFFF8989)
val onErrorColor = Color(0xFF000000)
Loading
Loading