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

Create Schedule screen (part 1) #248

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ captures
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings
android-build

shared/store.json
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ compose-android = "1.7.6"
compose-multiplatform = "1.8.0-alpha02"
compose-hot-reload = "1.0.0-dev.32.1"

coroutines = "1.10.1"
coil = "3.0.3"
exposed = "0.55.0"
h2 = "2.2.224"
Expand All @@ -30,6 +31,7 @@ logbackClassic = "1.5.6"
markdown = "0.29.0"
postgresql = "42.7.3"
androidx-navigation = "2.8.0-alpha12"
doistx-normalize = "1.0.5"

[libraries]

Expand Down Expand Up @@ -87,8 +89,10 @@ ktor-server-status-pages = { module = "io.ktor:ktor-server-status-pages", versio
ktor-server-swagger = { module = "io.ktor:ktor-server-swagger", version.ref = "ktor" }

# utility
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logbackClassic" }
doistx-normalize = { module = "com.doist.x:normalize", version.ref = "doistx-normalize" }

# images
android-svg = { module = "com.caverock:androidsvg-aar", version.ref = "android-svg" }
Expand Down
49 changes: 35 additions & 14 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ plugins {
kotlin {
androidTarget {
compilerOptions {
freeCompilerArgs.addAll("-P", "plugin:org.jetbrains.kotlin.parcelize:additionalAnnotation=org.jetbrains.kotlinconf.ui.components.zoomable.internal.AndroidParcelize")
freeCompilerArgs.addAll(
"-P",
"plugin:org.jetbrains.kotlin.parcelize:additionalAnnotation=org.jetbrains.kotlinconf.ui.components.zoomable.internal.AndroidParcelize"
)
}
}

Expand Down Expand Up @@ -82,23 +85,41 @@ kotlin {
implementation(kotlin("test"))
}

androidMain.dependencies {
implementation(libs.android.svg)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.work.runtime)
implementation(libs.androidx.preference)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.ktor.client.okhttp)
val nonWebMain by creating {
dependsOn(commonMain.get())
dependencies {
// TODO move this to commonMain once Wasm version is available
implementation(libs.doistx.normalize)
}
}

iosMain.dependencies {
implementation(libs.ktor.client.darwin)
androidMain {
dependsOn(nonWebMain)
dependencies {
implementation(libs.android.svg)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.work.runtime)
implementation(libs.androidx.preference)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.ktor.client.okhttp)
}
}

jvmMain.dependencies {
implementation(libs.ktor.client.okhttp)
implementation(compose.desktop.currentOs)
implementation(libs.android.svg)
iosMain {
dependsOn(nonWebMain)
dependencies {
implementation(libs.ktor.client.darwin)
}
}

jvmMain {
dependsOn(nonWebMain)
dependencies {
implementation(libs.ktor.client.okhttp)
implementation(compose.desktop.currentOs)
implementation(libs.android.svg)
implementation(libs.kotlinx.coroutines.swing)
}
}

val webMain by creating {
Expand Down
3 changes: 3 additions & 0 deletions shared/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ We will process your data in accordance with the App Privacy Policy. You can adj
<string name="settings_theme_light">Light</string>
<string name="settings_theme_dark">Dark</string>

<string name="schedule_action_filter_bookmarked">Filter bookmarked</string>
<string name="schedule_action_search">Search</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.jetbrains.kotlinconf

import io.ktor.util.date.GMTDate
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.StringResource
import org.jetbrains.kotlinconf.utils.time

data class Agenda(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ fun MainScreen(
)
}
composable<ScheduleScreen> {
Schedule(
service.agenda.collectAsState().value,
onBack = { rootNavController.popBackStack() },
ScheduleScreen(
service = service,
onSession = { rootNavController.navigate(TalkDetailsScreen(it)) },
)
}
Expand Down

This file was deleted.

Loading