diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 464022c..58b405a 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -83,11 +83,11 @@ kotlin { } android { - namespace = "ch.parano.myice" + namespace = "ch.parano.myicek" compileSdk = 36 defaultConfig { - applicationId = "ch.parano.myice" + applicationId = "ch.parano.myicek" minSdk = 24 targetSdk = 35 versionCode = 1 @@ -118,10 +118,10 @@ android { compose.desktop { application { - mainClass = "ch.parano.myice.MainKt" + mainClass = "ch.parano.myicek.MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "myice" + packageName = "myicek" packageVersion = "1.0.0" } } diff --git a/composeApp/src/androidMain/kotlin/ch/parano/myice/MainActivity.kt b/composeApp/src/androidMain/kotlin/ch/parano/myicek/MainActivity.kt similarity index 94% rename from composeApp/src/androidMain/kotlin/ch/parano/myice/MainActivity.kt rename to composeApp/src/androidMain/kotlin/ch/parano/myicek/MainActivity.kt index cb15a0e..0b6f823 100644 --- a/composeApp/src/androidMain/kotlin/ch/parano/myice/MainActivity.kt +++ b/composeApp/src/androidMain/kotlin/ch/parano/myicek/MainActivity.kt @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice +package ch.parano.myicek import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge -import ch.parano.myice.auth.AndroidOAuthClient +import ch.parano.myicek.auth.AndroidOAuthClient class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/composeApp/src/androidMain/kotlin/ch/parano/myice/OAuthCallbackActivity.kt b/composeApp/src/androidMain/kotlin/ch/parano/myicek/OAuthCallbackActivity.kt similarity index 94% rename from composeApp/src/androidMain/kotlin/ch/parano/myice/OAuthCallbackActivity.kt rename to composeApp/src/androidMain/kotlin/ch/parano/myicek/OAuthCallbackActivity.kt index 2bb939a..8729259 100644 --- a/composeApp/src/androidMain/kotlin/ch/parano/myice/OAuthCallbackActivity.kt +++ b/composeApp/src/androidMain/kotlin/ch/parano/myicek/OAuthCallbackActivity.kt @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice +package ch.parano.myicek import android.app.Activity import android.net.Uri import android.os.Bundle -import ch.parano.myice.auth.OAuthCallbackHolder +import ch.parano.myicek.auth.OAuthCallbackHolder class OAuthCallbackActivity : Activity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/composeApp/src/androidMain/kotlin/ch/parano/myice/auth/AndroidOAuthClient.kt b/composeApp/src/androidMain/kotlin/ch/parano/myicek/auth/AndroidOAuthClient.kt similarity index 98% rename from composeApp/src/androidMain/kotlin/ch/parano/myice/auth/AndroidOAuthClient.kt rename to composeApp/src/androidMain/kotlin/ch/parano/myicek/auth/AndroidOAuthClient.kt index 7d1fc29..c3f0103 100644 --- a/composeApp/src/androidMain/kotlin/ch/parano/myice/auth/AndroidOAuthClient.kt +++ b/composeApp/src/androidMain/kotlin/ch/parano/myicek/auth/AndroidOAuthClient.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth import android.content.Context import android.content.Intent diff --git a/composeApp/src/androidMain/kotlin/ch/parano/myice/network/ApiEngine.android.kt b/composeApp/src/androidMain/kotlin/ch/parano/myicek/network/ApiEngine.android.kt similarity index 96% rename from composeApp/src/androidMain/kotlin/ch/parano/myice/network/ApiEngine.android.kt rename to composeApp/src/androidMain/kotlin/ch/parano/myicek/network/ApiEngine.android.kt index a63eb9e..1a9fb71 100644 --- a/composeApp/src/androidMain/kotlin/ch/parano/myice/network/ApiEngine.android.kt +++ b/composeApp/src/androidMain/kotlin/ch/parano/myicek/network/ApiEngine.android.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network import io.ktor.client.engine.HttpClientEngineConfig import io.ktor.client.engine.HttpClientEngineFactory diff --git a/composeApp/src/androidMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.android.kt b/composeApp/src/androidMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.android.kt similarity index 97% rename from composeApp/src/androidMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.android.kt rename to composeApp/src/androidMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.android.kt index 2da4622..205bcf8 100644 --- a/composeApp/src/androidMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.android.kt +++ b/composeApp/src/androidMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.android.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui +package ch.parano.myicek.ui import androidx.activity.compose.BackHandler import androidx.compose.runtime.Composable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/App.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/App.kt similarity index 84% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/App.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/App.kt index 078f567..bf94c2b 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/App.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/App.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice +package ch.parano.myicek import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -24,19 +24,19 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import ch.parano.myice.auth.AuthSettings -import ch.parano.myice.auth.OAuthClient -import ch.parano.myice.cache.ScheduleCache -import ch.parano.myice.network.ApiService -import ch.parano.myice.network.createHttpClient -import ch.parano.myice.ui.screens.EventDetailScreen -import ch.parano.myice.ui.screens.LoginScreen -import ch.parano.myice.ui.screens.ScheduleScreen -import ch.parano.myice.ui.theme.MyIceTheme -import ch.parano.myice.viewmodel.AuthState -import ch.parano.myice.viewmodel.AuthViewModel -import ch.parano.myice.viewmodel.EventDetailViewModel -import ch.parano.myice.viewmodel.ScheduleViewModel +import ch.parano.myicek.auth.AuthSettings +import ch.parano.myicek.auth.OAuthClient +import ch.parano.myicek.cache.ScheduleCache +import ch.parano.myicek.network.ApiService +import ch.parano.myicek.network.createHttpClient +import ch.parano.myicek.ui.screens.EventDetailScreen +import ch.parano.myicek.ui.screens.LoginScreen +import ch.parano.myicek.ui.screens.ScheduleScreen +import ch.parano.myicek.ui.theme.MyIceTheme +import ch.parano.myicek.viewmodel.AuthState +import ch.parano.myicek.viewmodel.AuthViewModel +import ch.parano.myicek.viewmodel.EventDetailViewModel +import ch.parano.myicek.viewmodel.ScheduleViewModel import com.russhwolf.settings.Settings sealed class Screen { diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/AuthSettings.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/AuthSettings.kt similarity index 95% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/auth/AuthSettings.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/AuthSettings.kt index c7e9110..b356f22 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/AuthSettings.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/AuthSettings.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth -import ch.parano.myice.network.AuthTokenHolder +import ch.parano.myicek.network.AuthTokenHolder import com.russhwolf.settings.Settings class AuthSettings(private val settings: Settings) { diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/OAuthClient.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/OAuthClient.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/auth/OAuthClient.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/OAuthClient.kt index 5b4ab40..a02d280 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/OAuthClient.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/OAuthClient.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth interface OAuthClient { fun redirectUri(): String diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/TokenParser.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/TokenParser.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/auth/TokenParser.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/TokenParser.kt index 976fe68..b88fa77 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/auth/TokenParser.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/auth/TokenParser.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth internal fun parseAccessTokenFromFragment(fragment: String): String? { val params = fragment.split("&").associate { pair -> diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/cache/ScheduleCache.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/cache/ScheduleCache.kt similarity index 98% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/cache/ScheduleCache.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/cache/ScheduleCache.kt index 8e011af..2fc15b6 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/cache/ScheduleCache.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/cache/ScheduleCache.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.cache +package ch.parano.myicek.cache -import ch.parano.myice.models.Event +import ch.parano.myicek.models.Event import com.russhwolf.settings.Settings import kotlin.time.Clock import kotlin.time.ExperimentalTime diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/filter/EventFilter.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/EventFilter.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/filter/EventFilter.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/EventFilter.kt index ba02d62..29fee2c 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/filter/EventFilter.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/EventFilter.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.filter +package ch.parano.myicek.filter -import ch.parano.myice.models.Event +import ch.parano.myicek.models.Event fun extractSubgroup(name: String): String { val parts = name.split(" - ") diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/filter/TypeFilter.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/TypeFilter.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/filter/TypeFilter.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/TypeFilter.kt index 4e3b069..53f9935 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/filter/TypeFilter.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/filter/TypeFilter.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.filter +package ch.parano.myicek.filter enum class TypeFilter { ALL, GAMES, PRACTICES; diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Account.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Account.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/Account.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Account.kt index b02eb90..09bfe7c 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Account.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Account.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Convocation.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Convocation.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/Convocation.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Convocation.kt index 9f48904..4353bb3 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Convocation.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Convocation.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Event.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Event.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/Event.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Event.kt index 8d323cd..02852b7 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Event.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Event.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/EventDetail.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/EventDetail.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/EventDetail.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/EventDetail.kt index f9660fd..4cf8c5e 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/EventDetail.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/EventDetail.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/FlexibleStringSerializer.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/FlexibleStringSerializer.kt similarity index 98% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/FlexibleStringSerializer.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/FlexibleStringSerializer.kt index c36e570..ad313db 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/FlexibleStringSerializer.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/FlexibleStringSerializer.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.KSerializer import kotlinx.serialization.SerializationException diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Player.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Player.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/Player.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Player.kt index 02fabde..5842ec8 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Player.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Player.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Staff.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Staff.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/Staff.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Staff.kt index 69b6616..e26b0a7 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/Staff.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/Staff.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/UserInfo.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/UserInfo.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/models/UserInfo.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/models/UserInfo.kt index 475bf49..19e9a9b 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/models/UserInfo.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/models/UserInfo.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiConfig.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiConfig.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiConfig.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiConfig.kt index 08969c0..7d9805f 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiConfig.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiConfig.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network object ApiConfig { const val baseUrl = "https://myice.parano.ch" diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiEngine.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiEngine.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiEngine.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiEngine.kt index 350447a..70a2551 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiEngine.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiEngine.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network import io.ktor.client.HttpClient import io.ktor.client.engine.HttpClientEngineConfig diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiService.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiService.kt similarity index 91% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiService.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiService.kt index 5c859ed..8e535fe 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/ApiService.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/ApiService.kt @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network -import ch.parano.myice.models.Account -import ch.parano.myice.models.Event -import ch.parano.myice.models.EventDetail -import ch.parano.myice.models.UserInfo +import ch.parano.myicek.models.Account +import ch.parano.myicek.models.Event +import ch.parano.myicek.models.EventDetail +import ch.parano.myicek.models.UserInfo import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.request.get diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/AuthTokenHolder.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/AuthTokenHolder.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/network/AuthTokenHolder.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/network/AuthTokenHolder.kt index efa4f58..ee63d0c 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/network/AuthTokenHolder.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/network/AuthTokenHolder.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network object AuthTokenHolder { var token: String? = null diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.kt index 08366e4..ba6af4d 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui +package ch.parano.myicek.ui import androidx.compose.runtime.Composable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/EventCard.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/EventCard.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/EventCard.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/EventCard.kt index 9b472e8..4dc26ce 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/EventCard.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/EventCard.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.components +package ch.parano.myicek.ui.components import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -33,8 +33,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import ch.parano.myice.models.Event -import ch.parano.myice.util.formatEventDateTime +import ch.parano.myicek.models.Event +import ch.parano.myicek.util.formatEventDateTime @Composable fun EventCard( diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/FilterDropdown.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/FilterDropdown.kt similarity index 98% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/FilterDropdown.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/FilterDropdown.kt index 7c505e3..7117c05 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/FilterDropdown.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/FilterDropdown.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.components +package ch.parano.myicek.ui.components import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.material3.DropdownMenuItem diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/LoadingIndicator.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/LoadingIndicator.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/LoadingIndicator.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/LoadingIndicator.kt index 99c62f1..f4bba94 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/components/LoadingIndicator.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/components/LoadingIndicator.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.components +package ch.parano.myicek.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/EventDetailScreen.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/EventDetailScreen.kt similarity index 97% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/EventDetailScreen.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/EventDetailScreen.kt index a6b928f..a32f6fc 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/EventDetailScreen.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/EventDetailScreen.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.screens +package ch.parano.myicek.ui.screens import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -45,11 +45,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp -import ch.parano.myice.ui.PlatformBackHandler -import ch.parano.myice.ui.components.LoadingIndicator -import ch.parano.myice.util.formatEventDate -import ch.parano.myice.util.formatEventTimeRange -import ch.parano.myice.viewmodel.EventDetailViewModel +import ch.parano.myicek.ui.PlatformBackHandler +import ch.parano.myicek.ui.components.LoadingIndicator +import ch.parano.myicek.util.formatEventDate +import ch.parano.myicek.util.formatEventTimeRange +import ch.parano.myicek.viewmodel.EventDetailViewModel @OptIn(ExperimentalMaterial3Api::class) @Composable diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/LoginScreen.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/LoginScreen.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/LoginScreen.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/LoginScreen.kt index 4aecdca..b911986 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/LoginScreen.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/LoginScreen.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.screens +package ch.parano.myicek.ui.screens import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -39,8 +39,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp -import ch.parano.myice.viewmodel.AuthViewModel -import ch.parano.myice.viewmodel.AuthState +import ch.parano.myicek.viewmodel.AuthViewModel +import ch.parano.myicek.viewmodel.AuthState @Composable fun LoginScreen( diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/ScheduleScreen.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/ScheduleScreen.kt similarity index 90% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/ScheduleScreen.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/ScheduleScreen.kt index 763ba28..5969c34 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/screens/ScheduleScreen.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/screens/ScheduleScreen.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.screens +package ch.parano.myicek.ui.screens import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.expandVertically @@ -31,7 +31,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material3.Card -import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -53,12 +53,12 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height -import ch.parano.myice.filter.TypeFilter -import ch.parano.myice.ui.components.EventCard -import ch.parano.myice.ui.components.FilterDropdown -import ch.parano.myice.ui.components.LoadingIndicator -import ch.parano.myice.viewmodel.AuthViewModel -import ch.parano.myice.viewmodel.ScheduleViewModel +import ch.parano.myicek.filter.TypeFilter +import ch.parano.myicek.ui.components.EventCard +import ch.parano.myicek.ui.components.FilterDropdown +import ch.parano.myicek.ui.components.LoadingIndicator +import ch.parano.myicek.viewmodel.AuthViewModel +import ch.parano.myicek.viewmodel.ScheduleViewModel @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -82,7 +82,7 @@ fun ScheduleScreen( TopAppBar( title = { Text("MyIceK") }, actions = { - val email = (authState as? ch.parano.myice.viewmodel.AuthState.Authenticated)?.email + val email = (authState as? ch.parano.myicek.viewmodel.AuthState.Authenticated)?.email if (email != null) { Text( text = email, @@ -201,7 +201,9 @@ fun ScheduleScreen( } } } - Box( + PullToRefreshBox( + isRefreshing = scheduleState.isRefreshing, + onRefresh = { scheduleViewModel.refreshSchedule() }, modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center, ) { @@ -259,23 +261,6 @@ fun ScheduleScreen( } } } - if (scheduleState.isRefreshing) { - Box( - modifier = Modifier.fillMaxSize(), - contentAlignment = Alignment.Center, - ) { - Card { - Column( - modifier = Modifier.padding(32.dp), - horizontalAlignment = Alignment.CenterHorizontally, - ) { - CircularProgressIndicator() - Spacer(modifier = Modifier.height(16.dp)) - Text("Chargement...", fontWeight = FontWeight.Medium) - } - } - } - } } } } diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/theme/Theme.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/theme/Theme.kt similarity index 98% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/ui/theme/Theme.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/theme/Theme.kt index 3e1ac67..9b04d69 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/ui/theme/Theme.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/ui/theme/Theme.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui.theme +package ch.parano.myicek.ui.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/util/EventDateTimeFormatter.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/util/EventDateTimeFormatter.kt similarity index 90% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/util/EventDateTimeFormatter.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/util/EventDateTimeFormatter.kt index 9b7e5e6..d11f935 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/util/EventDateTimeFormatter.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/util/EventDateTimeFormatter.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.util +package ch.parano.myicek.util import kotlinx.datetime.LocalDateTime @@ -24,6 +24,10 @@ private val FRENCH_MONTHS = listOf( "juillet", "août", "septembre", "octobre", "novembre", "décembre", ) +private val FRENCH_DAYS = listOf( + "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche", +) + private fun parseOrNull(iso: String): LocalDateTime? = runCatching { LocalDateTime.parse(iso.replace(' ', 'T')) }.getOrNull() @@ -32,7 +36,7 @@ private fun LocalDateTime.dateStr(): String = "${year.toString().padStart(4, '0')}-${monthNumber.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}" private fun LocalDateTime.dateStrLong(): String = - "$day ${FRENCH_MONTHS[monthNumber - 1]} $year" + "${FRENCH_DAYS[date.dayOfWeek.ordinal]} $day ${FRENCH_MONTHS[monthNumber - 1]} $year" private fun LocalDateTime.timeStr(): String = if (minute == 0) "${hour}h" else "${hour}h${minute.toString().padStart(2, '0')}" diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/AuthViewModel.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/AuthViewModel.kt similarity index 92% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/AuthViewModel.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/AuthViewModel.kt index 6f4e50b..ee5d61a 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/AuthViewModel.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/AuthViewModel.kt @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.viewmodel +package ch.parano.myicek.viewmodel -import ch.parano.myice.auth.AuthSettings -import ch.parano.myice.auth.OAuthClient -import ch.parano.myice.network.ApiConfig -import ch.parano.myice.network.ApiService -import ch.parano.myice.network.AuthTokenHolder +import ch.parano.myicek.auth.AuthSettings +import ch.parano.myicek.auth.OAuthClient +import ch.parano.myicek.network.ApiConfig +import ch.parano.myicek.network.ApiService +import ch.parano.myicek.network.AuthTokenHolder import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import kotlinx.coroutines.flow.MutableStateFlow diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/EventDetailViewModel.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/EventDetailViewModel.kt similarity index 94% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/EventDetailViewModel.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/EventDetailViewModel.kt index bb8675d..8b45208 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/EventDetailViewModel.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/EventDetailViewModel.kt @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.viewmodel +package ch.parano.myicek.viewmodel -import ch.parano.myice.models.EventDetail -import ch.parano.myice.network.ApiService +import ch.parano.myicek.models.EventDetail +import ch.parano.myicek.network.ApiService import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import kotlinx.coroutines.flow.MutableStateFlow diff --git a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/ScheduleViewModel.kt b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModel.kt similarity index 93% rename from composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/ScheduleViewModel.kt rename to composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModel.kt index b89587d..169045f 100644 --- a/composeApp/src/commonMain/kotlin/ch/parano/myice/viewmodel/ScheduleViewModel.kt +++ b/composeApp/src/commonMain/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModel.kt @@ -15,17 +15,17 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.viewmodel +package ch.parano.myicek.viewmodel -import ch.parano.myice.auth.AuthSettings -import ch.parano.myice.cache.ScheduleCache -import ch.parano.myice.filter.TypeFilter -import ch.parano.myice.filter.distinctAgegroups -import ch.parano.myice.filter.distinctSubgroups -import ch.parano.myice.filter.filterEvents -import ch.parano.myice.models.Account -import ch.parano.myice.models.Event -import ch.parano.myice.network.ApiService +import ch.parano.myicek.auth.AuthSettings +import ch.parano.myicek.cache.ScheduleCache +import ch.parano.myicek.filter.TypeFilter +import ch.parano.myicek.filter.distinctAgegroups +import ch.parano.myicek.filter.distinctSubgroups +import ch.parano.myicek.filter.filterEvents +import ch.parano.myicek.models.Account +import ch.parano.myicek.models.Event +import ch.parano.myicek.network.ApiService import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import kotlinx.coroutines.flow.MutableStateFlow diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/cache/ScheduleCacheTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/cache/ScheduleCacheTest.kt similarity index 98% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/cache/ScheduleCacheTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/cache/ScheduleCacheTest.kt index afe8504..55ddf64 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/cache/ScheduleCacheTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/cache/ScheduleCacheTest.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.cache +package ch.parano.myicek.cache -import ch.parano.myice.models.Event +import ch.parano.myicek.models.Event import com.russhwolf.settings.MapSettings import com.russhwolf.settings.Settings import kotlin.test.Test diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/filter/EventFilterTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/filter/EventFilterTest.kt similarity index 98% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/filter/EventFilterTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/filter/EventFilterTest.kt index c4f82dd..847522b 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/filter/EventFilterTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/filter/EventFilterTest.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.filter +package ch.parano.myicek.filter -import ch.parano.myice.models.Event +import ch.parano.myicek.models.Event import kotlin.test.Test import kotlin.test.assertEquals diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/models/ModelSerializationTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/models/ModelSerializationTest.kt similarity index 99% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/models/ModelSerializationTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/models/ModelSerializationTest.kt index 2abea81..7e94ee8 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/models/ModelSerializationTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/models/ModelSerializationTest.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.models +package ch.parano.myicek.models import kotlinx.serialization.json.Json import kotlin.test.Test diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/network/ApiServiceTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/network/ApiServiceTest.kt similarity index 98% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/network/ApiServiceTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/network/ApiServiceTest.kt index 9fd3e30..82bd6f4 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/network/ApiServiceTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/network/ApiServiceTest.kt @@ -15,9 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network -import ch.parano.myice.models.EventDetail +import ch.parano.myicek.models.EventDetail import io.ktor.client.HttpClient import io.ktor.client.engine.mock.MockEngine import io.ktor.client.engine.mock.respond diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/util/EventDateTimeFormatterTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/util/EventDateTimeFormatterTest.kt similarity index 82% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/util/EventDateTimeFormatterTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/util/EventDateTimeFormatterTest.kt index f0d86f9..5a8fe2b 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/util/EventDateTimeFormatterTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/util/EventDateTimeFormatterTest.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.util +package ch.parano.myicek.util import kotlin.test.Test import kotlin.test.assertEquals @@ -28,7 +28,7 @@ class EventDateTimeFormatterTest { start = "2024-11-10T14:00:00", end = "2024-11-10T16:15:00", ) - assertEquals("10 novembre 2024 de 14h à 16h15", formatted) + assertEquals("Dimanche 10 novembre 2024 de 14h à 16h15", formatted) } @Test @@ -37,7 +37,7 @@ class EventDateTimeFormatterTest { start = "2026-08-09 10:00:00", end = "2026-08-09 12:00:00", ) - assertEquals("9 août 2026 de 10h à 12h", formatted) + assertEquals("Dimanche 9 août 2026 de 10h à 12h", formatted) } @Test @@ -46,7 +46,7 @@ class EventDateTimeFormatterTest { start = "2024-11-10T20:00:00", end = "2024-11-11T01:30:00", ) - assertEquals("10 novembre 2024 de 20h à 1h30 (11 novembre 2024)", formatted) + assertEquals("Dimanche 10 novembre 2024 de 20h à 1h30 (Lundi 11 novembre 2024)", formatted) } @Test @@ -66,4 +66,10 @@ class EventDateTimeFormatterTest { val formatted = formatEventDateTime(start = "s", end = "e") assertEquals("s - e", formatted) } + + @Test + fun formatsEventDateWithDayOfWeek() { + val formatted = formatEventDate("2026-08-09T10:00:00") + assertEquals("Dimanche 9 août 2026", formatted) + } } diff --git a/composeApp/src/commonTest/kotlin/ch/parano/myice/viewmodel/ScheduleViewModelTest.kt b/composeApp/src/commonTest/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModelTest.kt similarity index 97% rename from composeApp/src/commonTest/kotlin/ch/parano/myice/viewmodel/ScheduleViewModelTest.kt rename to composeApp/src/commonTest/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModelTest.kt index 7a40c8a..b39daef 100644 --- a/composeApp/src/commonTest/kotlin/ch/parano/myice/viewmodel/ScheduleViewModelTest.kt +++ b/composeApp/src/commonTest/kotlin/ch/parano/myicek/viewmodel/ScheduleViewModelTest.kt @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.viewmodel +package ch.parano.myicek.viewmodel -import ch.parano.myice.cache.ScheduleCache -import ch.parano.myice.filter.TypeFilter -import ch.parano.myice.models.Account -import ch.parano.myice.models.Event -import ch.parano.myice.network.ApiService +import ch.parano.myicek.cache.ScheduleCache +import ch.parano.myicek.filter.TypeFilter +import ch.parano.myicek.models.Account +import ch.parano.myicek.models.Event +import ch.parano.myicek.network.ApiService import com.russhwolf.settings.MapSettings import io.ktor.client.HttpClient import io.ktor.client.engine.mock.MockEngine diff --git a/composeApp/src/desktopMain/kotlin/ch/parano/myice/Main.kt b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/Main.kt similarity index 93% rename from composeApp/src/desktopMain/kotlin/ch/parano/myice/Main.kt rename to composeApp/src/desktopMain/kotlin/ch/parano/myicek/Main.kt index 25e61fb..286b6d3 100644 --- a/composeApp/src/desktopMain/kotlin/ch/parano/myice/Main.kt +++ b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/Main.kt @@ -15,11 +15,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice +package ch.parano.myicek import androidx.compose.ui.window.Window import androidx.compose.ui.window.application -import ch.parano.myice.auth.DesktopOAuthClient +import ch.parano.myicek.auth.DesktopOAuthClient fun main() = application { Window(onCloseRequest = ::exitApplication, title = "MyIceK") { diff --git a/composeApp/src/desktopMain/kotlin/ch/parano/myice/auth/DesktopOAuthClient.kt b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/auth/DesktopOAuthClient.kt similarity index 99% rename from composeApp/src/desktopMain/kotlin/ch/parano/myice/auth/DesktopOAuthClient.kt rename to composeApp/src/desktopMain/kotlin/ch/parano/myicek/auth/DesktopOAuthClient.kt index 1c1f4bd..4d9337a 100644 --- a/composeApp/src/desktopMain/kotlin/ch/parano/myice/auth/DesktopOAuthClient.kt +++ b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/auth/DesktopOAuthClient.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.TimeoutCancellationException diff --git a/composeApp/src/desktopMain/kotlin/ch/parano/myice/network/ApiEngine.desktop.kt b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/network/ApiEngine.desktop.kt similarity index 96% rename from composeApp/src/desktopMain/kotlin/ch/parano/myice/network/ApiEngine.desktop.kt rename to composeApp/src/desktopMain/kotlin/ch/parano/myicek/network/ApiEngine.desktop.kt index a63eb9e..1a9fb71 100644 --- a/composeApp/src/desktopMain/kotlin/ch/parano/myice/network/ApiEngine.desktop.kt +++ b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/network/ApiEngine.desktop.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network import io.ktor.client.engine.HttpClientEngineConfig import io.ktor.client.engine.HttpClientEngineFactory diff --git a/composeApp/src/desktopMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.desktop.kt b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.desktop.kt similarity index 97% rename from composeApp/src/desktopMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.desktop.kt rename to composeApp/src/desktopMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.desktop.kt index 2dd7981..0a5f316 100644 --- a/composeApp/src/desktopMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.desktop.kt +++ b/composeApp/src/desktopMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.desktop.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui +package ch.parano.myicek.ui import androidx.compose.runtime.Composable diff --git a/composeApp/src/iosMain/kotlin/ch/parano/myice/MainViewController.kt b/composeApp/src/iosMain/kotlin/ch/parano/myicek/MainViewController.kt similarity index 93% rename from composeApp/src/iosMain/kotlin/ch/parano/myice/MainViewController.kt rename to composeApp/src/iosMain/kotlin/ch/parano/myicek/MainViewController.kt index 4415164..e000673 100644 --- a/composeApp/src/iosMain/kotlin/ch/parano/myice/MainViewController.kt +++ b/composeApp/src/iosMain/kotlin/ch/parano/myicek/MainViewController.kt @@ -15,10 +15,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice +package ch.parano.myicek import androidx.compose.ui.window.ComposeUIViewController -import ch.parano.myice.auth.IosOAuthClient +import ch.parano.myicek.auth.IosOAuthClient fun MainViewController() = ComposeUIViewController { App(oauthClient = IosOAuthClient()) diff --git a/composeApp/src/iosMain/kotlin/ch/parano/myice/auth/IosOAuthClient.kt b/composeApp/src/iosMain/kotlin/ch/parano/myicek/auth/IosOAuthClient.kt similarity index 99% rename from composeApp/src/iosMain/kotlin/ch/parano/myice/auth/IosOAuthClient.kt rename to composeApp/src/iosMain/kotlin/ch/parano/myicek/auth/IosOAuthClient.kt index e8478a6..bc368af 100644 --- a/composeApp/src/iosMain/kotlin/ch/parano/myice/auth/IosOAuthClient.kt +++ b/composeApp/src/iosMain/kotlin/ch/parano/myicek/auth/IosOAuthClient.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.auth +package ch.parano.myicek.auth import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.coroutines.TimeoutCancellationException diff --git a/composeApp/src/iosMain/kotlin/ch/parano/myice/network/ApiEngine.ios.kt b/composeApp/src/iosMain/kotlin/ch/parano/myicek/network/ApiEngine.ios.kt similarity index 96% rename from composeApp/src/iosMain/kotlin/ch/parano/myice/network/ApiEngine.ios.kt rename to composeApp/src/iosMain/kotlin/ch/parano/myicek/network/ApiEngine.ios.kt index ec93e42..c37d1f8 100644 --- a/composeApp/src/iosMain/kotlin/ch/parano/myice/network/ApiEngine.ios.kt +++ b/composeApp/src/iosMain/kotlin/ch/parano/myicek/network/ApiEngine.ios.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.network +package ch.parano.myicek.network import io.ktor.client.engine.HttpClientEngineConfig import io.ktor.client.engine.HttpClientEngineFactory diff --git a/composeApp/src/iosMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.ios.kt b/composeApp/src/iosMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.ios.kt similarity index 97% rename from composeApp/src/iosMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.ios.kt rename to composeApp/src/iosMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.ios.kt index 2dd7981..0a5f316 100644 --- a/composeApp/src/iosMain/kotlin/ch/parano/myice/ui/PlatformBackHandler.ios.kt +++ b/composeApp/src/iosMain/kotlin/ch/parano/myicek/ui/PlatformBackHandler.ios.kt @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package ch.parano.myice.ui +package ch.parano.myicek.ui import androidx.compose.runtime.Composable diff --git a/iosApp/iosApp/Info.plist b/iosApp/iosApp/Info.plist index 666db79..e01242f 100644 --- a/iosApp/iosApp/Info.plist +++ b/iosApp/iosApp/Info.plist @@ -61,7 +61,7 @@ CFBundleURLName - ch.parano.myice + ch.parano.myicek CFBundleURLSchemes myice