From 0ecf66a48426bfc4da3ef097a77237be4c287f15 Mon Sep 17 00:00:00 2001 From: "Darryl L. Pierce" Date: Fri, 8 Dec 2023 16:37:55 -0500 Subject: [PATCH] Added placeholder footer items for future pages [#1] * Removed unused classes from the codebase. * Removed the desktop and shared IOS directories. --- composeApp/build.gradle.kts | 36 ++-------- .../{KoinAndroid.kt => KoinCommon.android.kt} | 0 .../comixedproject/variant/MainActivity.kt | 43 +---------- .../variant/MainActivityScreen.kt | 15 ++++ .../variant/ui/AnimatedSwipeDismiss.kt | 71 ------------------- .../comixedproject/variant/ui/BottomItem.kt | 5 ++ .../variant/ui/main/AppDrawer.kt | 66 ----------------- .../variant/ui/main/AppDrawerHeader.kt | 63 ---------------- .../variant/ui/main/ScreenNavigationButton.kt | 11 ++- .../variant/ui/server/EditServer.kt | 2 +- .../variant/ui/server/ServerList.kt | 2 +- .../variant/ui/server/ServerListEntry.kt | 2 +- composeApp/src/desktopMain/kotlin/main.kt | 34 --------- .../variant/data/IdGenerator.kt | 25 ------- .../comixedproject/variant/platformModule.kt | 24 ------- .../variant/viewmodel/BaseViewModel.kt | 3 - .../variant/data/IdGenerator.kt | 25 ------- .../comixedproject/variant/platformModule.kt | 24 ------- .../variant/viewmodel/BaseViewModel.kt | 3 - .../comixedproject/variant/KoinCommon.ios.kt} | 14 ++-- .../variant/data/IdGenerator.kt | 25 ------- .../comixedproject/variant/platformModule.kt | 24 ------- .../variant/viewmodel/BaseViewModel.kt | 3 - .../variant/data/IdGenerator.kt | 25 ------- .../comixedproject/variant/platformModule.kt | 24 ------- .../variant/viewmodel/BaseViewModel.kt | 3 - gradle/libs.versions.toml | 4 ++ 27 files changed, 52 insertions(+), 524 deletions(-) rename composeApp/src/androidMain/kotlin/org/comixedproject/variant/{KoinAndroid.kt => KoinCommon.android.kt} (100%) delete mode 100644 composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/AnimatedSwipeDismiss.kt delete mode 100644 composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawer.kt delete mode 100644 composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawerHeader.kt delete mode 100644 composeApp/src/desktopMain/kotlin/main.kt delete mode 100644 composeApp/src/desktopMain/kotlin/org/comixedproject/variant/data/IdGenerator.kt delete mode 100644 composeApp/src/desktopMain/kotlin/org/comixedproject/variant/platformModule.kt delete mode 100644 composeApp/src/desktopMain/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt delete mode 100644 composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt delete mode 100644 composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/platformModule.kt delete mode 100644 composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt rename composeApp/src/{androidMain/kotlin/org/comixedproject/variant/Types.kt => iosMain/kotlin/org/comixedproject/variant/KoinCommon.ios.kt} (73%) delete mode 100644 composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt delete mode 100644 composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/platformModule.kt delete mode 100644 composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt delete mode 100644 composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt delete mode 100644 composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/platformModule.kt delete mode 100644 composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index c41527f..2dcb5bd 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -4,7 +4,6 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.androidApplication) - alias(libs.plugins.jetbrainsCompose) id("app.cash.sqldelight") } @@ -24,45 +23,34 @@ kotlin { } } - jvm("desktop") - listOf( iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> iosTarget.binaries.framework { - baseName = "ComposeApp" + baseName = "Shared" isStatic = true } } sourceSets { - val desktopMain by getting - androidMain.dependencies { implementation(libs.compose.ui) implementation(libs.compose.ui.tooling.preview) - implementation(libs.androidx.activity.compose) + implementation(libs.compose.material) + implementation(libs.androidx.compose.material3) + implementation(libs.compose.icons.extended) implementation(libs.koin.android) implementation(libs.koin.androidx.compose) implementation(libs.sqldelight.driver.android) implementation(libs.navigation.compose) implementation(libs.koin.androidx.compose) } - desktopMain.dependencies { - implementation(compose.desktop.currentOs) - implementation(libs.koin.core) - implementation(libs.sqldelight.driver.sqlite) + iosMain.dependencies { + implementation(libs.sqldelight.driver.native) } commonMain.dependencies { - implementation(compose.runtime) - implementation(compose.foundation) - implementation(compose.material) - implementation(compose.material3) - implementation(compose.materialIconsExtended) - @OptIn(ExperimentalComposeLibrary::class) - implementation(compose.components.resources) implementation(libs.napier) implementation(libs.datetime) implementation(libs.koin.core) @@ -115,18 +103,6 @@ android { } } -compose.desktop { - application { - mainClass = "MainKt" - - nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "org.comixedproject.variant" - packageVersion = "1.0.0" - } - } -} - sqldelight { databases { create("VariantDb") { diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/KoinAndroid.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/KoinCommon.android.kt similarity index 100% rename from composeApp/src/androidMain/kotlin/org/comixedproject/variant/KoinAndroid.kt rename to composeApp/src/androidMain/kotlin/org/comixedproject/variant/KoinCommon.android.kt diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivity.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivity.kt index ce4aca3..e4cbdbc 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivity.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivity.kt @@ -22,19 +22,9 @@ import android.annotation.SuppressLint import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import androidx.compose.material.Scaffold -import androidx.compose.material.ScaffoldState -import androidx.compose.material.rememberScaffoldState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.rememberCoroutineScope -import androidx.navigation.NavGraph.Companion.findStartDestination -import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import io.github.aakira.napier.DebugAntilog import io.github.aakira.napier.Napier -import kotlinx.coroutines.launch -import org.comixedproject.variant.ui.Screen -import org.comixedproject.variant.ui.main.AppDrawer /** * MainActivity is the main entry point into the application on Android. @@ -49,39 +39,12 @@ class MainActivity : ComponentActivity() { Napier.base(DebugAntilog()) setContent { VariantTheme { - val coroutineScope = rememberCoroutineScope() - val scaffoldState: ScaffoldState = rememberScaffoldState() val navController = rememberNavController() - val navBackStackEntry by navController.currentBackStackEntryAsState() - Scaffold( - scaffoldState = scaffoldState, - drawerContent = { - AppDrawer( - currentScreen = Screen.fromRoute( - navBackStackEntry?.destination?.route - ), - onScreenSelected = { screen -> - navController.navigate(screen.route) { - popUpTo(navController.graph.findStartDestination().id) { - saveState = true - } - launchSingleTop = true - restoreState = true - } - coroutineScope.launch { - scaffoldState.drawerState.close() - } - } - ) - }, - content = { - MainActivityScreen( - navController = navController - ) - } + MainActivityScreen( + navController = navController ) } } } -} \ No newline at end of file +} diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivityScreen.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivityScreen.kt index 7dad871..288a737 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivityScreen.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/MainActivityScreen.kt @@ -20,9 +20,11 @@ package org.comixedproject.variant import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable +import androidx.compose.ui.tooling.preview.Preview import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable +import androidx.navigation.compose.rememberNavController import org.comixedproject.variant.model.serverTemplate import org.comixedproject.variant.ui.Screen import org.comixedproject.variant.ui.server.EditServer @@ -30,6 +32,11 @@ import org.comixedproject.variant.ui.server.ServerList import org.comixedproject.variant.viewmodel.MainViewModel import org.koin.androidx.compose.getViewModel +/** + * The main activity screen for the application. + * + * @author Darryl L. Pierce + */ @OptIn(ExperimentalMaterial3Api::class) @Composable fun MainActivityScreen( @@ -72,4 +79,12 @@ fun MainActivityScreen( }, onCancel = { navController.navigate(Screen.ServerList.route) }) } } +} + +@Preview +@Composable +fun MainActivityScreenPreview() { + VariantTheme { + MainActivityScreen(rememberNavController()) + } } \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/AnimatedSwipeDismiss.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/AnimatedSwipeDismiss.kt deleted file mode 100644 index ceae994..0000000 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/AnimatedSwipeDismiss.kt +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.ui - -import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.EnterTransition -import androidx.compose.animation.ExitTransition -import androidx.compose.animation.core.tween -import androidx.compose.animation.expandVertically -import androidx.compose.animation.shrinkVertically -import androidx.compose.material3.DismissDirection -import androidx.compose.material3.DismissValue -import androidx.compose.material3.SwipeToDismiss -import androidx.compose.material3.rememberDismissState -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier - -@Composable -fun AnimatedSwipeDismiss( - modifier: Modifier = Modifier, - item: T, - background: @Composable (dismissedValue: DismissValue) -> Unit, - content: @Composable (dismissedValue: DismissValue) -> Unit, - directions: Set = setOf(DismissDirection.EndToStart), - enter: EnterTransition = expandVertically(), - exit: ExitTransition = shrinkVertically( - animationSpec = tween( - durationMillis = 500, - ) - ), - onDismiss: (T) -> Unit -) { - val dismissState = rememberDismissState(confirmValueChange = { dismissValue -> - if (dismissValue == DismissValue.DismissedToStart) { - onDismiss(item) - } - true - }) - val isDismissed = dismissState.isDismissed(DismissDirection.EndToStart) - - AnimatedVisibility( - modifier = modifier, - visible = !isDismissed, - enter = enter, - exit = exit - ) { - SwipeToDismiss( - modifier = modifier, - state = dismissState, - directions = directions, - background = { background(dismissState.currentValue) }, - dismissContent = { content(dismissState.currentValue) } - ) - } -} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/BottomItem.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/BottomItem.kt index e67308e..f93eee9 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/BottomItem.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/BottomItem.kt @@ -25,6 +25,11 @@ import androidx.compose.material.icons.filled.Settings import androidx.compose.ui.graphics.vector.ImageVector import org.comixedproject.variant.R +/** + * BottomItem represents a single item displayed at the bottom of the application screen. + * + * @author Darryl L. Pierce + */ data class BottomItem( val route: String, val icon: ImageVector, diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawer.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawer.kt deleted file mode 100644 index 7b61f71..0000000 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawer.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.ui.main - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.MaterialTheme -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.LibraryBooks -import androidx.compose.material.icons.filled.List -import androidx.compose.material3.Divider -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import org.comixedproject.variant.R -import org.comixedproject.variant.VariantTheme -import org.comixedproject.variant.ui.Screen - -@Composable -fun AppDrawer(currentScreen: Screen, onScreenSelected: (Screen) -> Unit) { - Column(modifier = Modifier.fillMaxSize()) { - AppDrawerHeader() - - Divider(color = MaterialTheme.colors.onSurface.copy(alpha = .2f)) - - ScreenNavigationButton( - icon = Icons.Filled.List, - label = stringResource(id = R.string.server_list), - isSelected = currentScreen == Screen.ServerList, - onClick = { - onScreenSelected.invoke(Screen.ServerList) - }) - ScreenNavigationButton( - icon = Icons.Filled.LibraryBooks, - label = stringResource(id = R.string.comic_book_list), - isSelected = currentScreen == Screen.ServerList, - onClick = { - onScreenSelected.invoke(Screen.ServerList) - }) - } -} - -@Preview -@Composable -fun AppDrawerPreview() { - VariantTheme { - AppDrawer(currentScreen = Screen.ServerList, onScreenSelected = {}) - } -} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawerHeader.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawerHeader.kt deleted file mode 100644 index b1d41d2..0000000 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/AppDrawerHeader.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.ui.main - -import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Menu -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.ColorFilter -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import org.comixedproject.variant.R -import org.comixedproject.variant.VariantTheme - -@Composable -fun AppDrawerHeader() { - Row(modifier = Modifier.fillMaxWidth()) { - Image( - imageVector = Icons.Filled.Menu, - contentDescription = stringResource(id = R.string.main_menu_label), - colorFilter = ColorFilter - .tint(MaterialTheme.colors.onSurface), - modifier = Modifier.padding(16.dp) - ) - Text( - text = stringResource(id = R.string.app_name), - modifier = Modifier - .align(alignment = Alignment.CenterVertically) - ) - } -} - -@Preview -@Composable -fun AppDrawerHeaderPreview() { - VariantTheme { - AppDrawerHeader() - } -} \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/ScreenNavigationButton.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/ScreenNavigationButton.kt index b9a0359..beaa5ff 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/ScreenNavigationButton.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/main/ScreenNavigationButton.kt @@ -26,11 +26,11 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Home import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Home import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -40,6 +40,11 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.comixedproject.variant.VariantTheme +/** + * Displays a button used for navigating to different screens in the application. + * + * @author Darryl L. Pierce + */ @Composable fun ScreenNavigationButton( icon: ImageVector, @@ -121,4 +126,4 @@ fun ScreenNavigationButtonUnselectedPreview() { isSelected = false, onClick = { }) } -} \ No newline at end of file +} diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/EditServer.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/EditServer.kt index eea53ef..d8ea49c 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/EditServer.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/EditServer.kt @@ -58,7 +58,7 @@ import org.comixedproject.variant.data.IdGenerator import org.comixedproject.variant.model.Server /** - * EditServerDialog manages a dialog for editing an OPDS server. + * Allows the user to edit an OPDS server. * * @author Darryl L. Pierce */ diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerList.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerList.kt index 4965b9a..a46fd1e 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerList.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerList.kt @@ -42,7 +42,7 @@ import org.comixedproject.variant.model.Server import org.comixedproject.variant.ui.bottomNavigationItems /** - * ServerList displays the list of servers. It displays a button to add a new entry. + * Displays the list of serversm, and a button to add a new entry. * * @author Darryl L. Pierce */ diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerListEntry.kt b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerListEntry.kt index 926944c..d2b74b7 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerListEntry.kt +++ b/composeApp/src/androidMain/kotlin/org/comixedproject/variant/ui/server/ServerListEntry.kt @@ -49,7 +49,7 @@ import org.comixedproject.variant.data.IdGenerator import org.comixedproject.variant.model.Server /** - * ServerListEntry displays a single server in the list of servers. + * Displays a single server in the list of servers. * * @author Darryl L. Pierce */ diff --git a/composeApp/src/desktopMain/kotlin/main.kt b/composeApp/src/desktopMain/kotlin/main.kt deleted file mode 100644 index 2da4d35..0000000 --- a/composeApp/src/desktopMain/kotlin/main.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -import androidx.compose.desktop.ui.tooling.preview.Preview -import androidx.compose.runtime.Composable -import androidx.compose.ui.window.Window -import androidx.compose.ui.window.application - -fun main() = application { - Window(onCloseRequest = ::exitApplication) { - App() - } -} - -@Preview -@Composable -fun AppDesktopPreview() { - App() -} \ No newline at end of file diff --git a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/data/IdGenerator.kt b/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/data/IdGenerator.kt deleted file mode 100644 index 4104677..0000000 --- a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/data/IdGenerator.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.data - -actual class IdGenerator actual constructor() { - actual fun toString(): String { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/platformModule.kt b/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/platformModule.kt deleted file mode 100644 index 34e807a..0000000 --- a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/platformModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant - -import org.koin.core.module.Module - -actual val platformModule: Module - get() = TODO("Not yet implemented") \ No newline at end of file diff --git a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt b/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt deleted file mode 100644 index 3d90b8c..0000000 --- a/composeApp/src/desktopMain/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.comixedproject.variant.viewmodel - -actual abstract class BaseViewModel actual constructor() \ No newline at end of file diff --git a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt b/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt deleted file mode 100644 index 4104677..0000000 --- a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.data - -actual class IdGenerator actual constructor() { - actual fun toString(): String { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/platformModule.kt b/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/platformModule.kt deleted file mode 100644 index 34e807a..0000000 --- a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/platformModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant - -import org.koin.core.module.Module - -actual val platformModule: Module - get() = TODO("Not yet implemented") \ No newline at end of file diff --git a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt b/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt deleted file mode 100644 index 3d90b8c..0000000 --- a/composeApp/src/iosArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.comixedproject.variant.viewmodel - -actual abstract class BaseViewModel actual constructor() \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/Types.kt b/composeApp/src/iosMain/kotlin/org/comixedproject/variant/KoinCommon.ios.kt similarity index 73% rename from composeApp/src/androidMain/kotlin/org/comixedproject/variant/Types.kt rename to composeApp/src/iosMain/kotlin/org/comixedproject/variant/KoinCommon.ios.kt index 5eceb24..bb73af2 100644 --- a/composeApp/src/androidMain/kotlin/org/comixedproject/variant/Types.kt +++ b/composeApp/src/iosMain/kotlin/org/comixedproject/variant/KoinCommon.ios.kt @@ -18,11 +18,13 @@ package org.comixedproject.variant -import androidx.compose.runtime.Composable +import app.cash.sqldelight.db.SqlDriver +import app.cash.sqldelight.driver.native.NativeSqliteDriver +import org.comixedproject.variant.db.ServerDb +import org.koin.dsl.module -typealias composeFun = @Composable () -> Unit -typealias topBarFun = @Composable (Int) -> Unit - -@Composable -fun EmptyComposable() { +actual val platformModule = module { + single { + NativeSqliteDriver(ServerDb.Schema, "OrganizeDb") + } } \ No newline at end of file diff --git a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt b/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt deleted file mode 100644 index 4104677..0000000 --- a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.data - -actual class IdGenerator actual constructor() { - actual fun toString(): String { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/platformModule.kt b/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/platformModule.kt deleted file mode 100644 index 34e807a..0000000 --- a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/platformModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant - -import org.koin.core.module.Module - -actual val platformModule: Module - get() = TODO("Not yet implemented") \ No newline at end of file diff --git a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt b/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt deleted file mode 100644 index 3d90b8c..0000000 --- a/composeApp/src/iosSimulatorArm64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.comixedproject.variant.viewmodel - -actual abstract class BaseViewModel actual constructor() \ No newline at end of file diff --git a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt b/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt deleted file mode 100644 index 4104677..0000000 --- a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/data/IdGenerator.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant.data - -actual class IdGenerator actual constructor() { - actual fun toString(): String { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/platformModule.kt b/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/platformModule.kt deleted file mode 100644 index 34e807a..0000000 --- a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/platformModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Variant - A digital comic book reading application for iPad, Android, and desktops. - * Copyright (C) 2023, The ComiXed Project - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package org.comixedproject.variant - -import org.koin.core.module.Module - -actual val platformModule: Module - get() = TODO("Not yet implemented") \ No newline at end of file diff --git a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt b/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt deleted file mode 100644 index 3d90b8c..0000000 --- a/composeApp/src/iosX64Main/kotlin/org/comixedproject/variant/viewmodel/BaseViewModel.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.comixedproject.variant.viewmodel - -actual abstract class BaseViewModel actual constructor() \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bf9039b..61f0883 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,6 +10,7 @@ androidx-activityCompose = "1.8.0" androidx-core-ktx = "1.12.0" androidx-appcompat = "1.6.1" androidx-material = "1.10.0" +androidx-material3 = "1.1.2" androidx-constraintlayout = "2.1.4" androidx-test-junit = "1.1.5" androidx-espresso-core = "3.5.1" @@ -29,6 +30,9 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" } compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" } compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } +compose-material-icons = { module = "androidx.compose.material:material-icons-core", version = "compose"} +compose-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" } +androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "androidx-material3" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" } androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }