diff --git a/build.gradle.kts b/build.gradle.kts index 9d3bd2a..fc09385 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { // __KOTLIN_COMPOSE_VERSION__ kotlin("jvm") version "1.5.21" + kotlin("kapt") version "1.5.21" // __LATEST_COMPOSE_RELEASE_VERSION__ id("org.jetbrains.compose") version "1.0.0-alpha3" } @@ -18,10 +19,14 @@ repositories { maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") } } + + dependencies { implementation(compose.desktop.currentOs) implementation("org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r") implementation("org.apache.sshd:sshd-core:2.7.0") + implementation("com.google.dagger:dagger:2.38.1") + kapt("com.google.dagger:dagger-compiler:2.38.1") } tasks.withType() { @@ -30,6 +35,7 @@ tasks.withType() { kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" } + compose.desktop { application { mainClass = "MainKt" diff --git a/gradle.properties b/gradle.properties index 29e08e8..34f7a15 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,3 @@ -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +# Workaround for sometimes happening this issue https://youtrack.jetbrains.com/issue/KT-40750 +kapt.use.worker.api=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..e708b1c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 index 744e882..4f906e0 --- a/gradlew +++ b/gradlew @@ -72,7 +72,7 @@ case "`uname`" in Darwin* ) darwin=true ;; - MSYS* | MINGW* ) + MINGW* ) msys=true ;; NONSTOP* ) diff --git a/gradlew.bat b/gradlew.bat old mode 100755 new mode 100644 diff --git a/src/main/kotlin/GPreferences.kt b/src/main/kotlin/app/GPreferences.kt similarity index 97% rename from src/main/kotlin/GPreferences.kt rename to src/main/kotlin/app/GPreferences.kt index c452c34..2c53019 100644 --- a/src/main/kotlin/GPreferences.kt +++ b/src/main/kotlin/app/GPreferences.kt @@ -1,3 +1,5 @@ +package app + import java.util.prefs.Preferences private const val PREFERENCES_NAME = "GitnuroConfig" diff --git a/src/main/kotlin/credentials/CredentialsStateManager.kt b/src/main/kotlin/app/credentials/CredentialsStateManager.kt similarity index 97% rename from src/main/kotlin/credentials/CredentialsStateManager.kt rename to src/main/kotlin/app/credentials/CredentialsStateManager.kt index 597240c..f651962 100644 --- a/src/main/kotlin/credentials/CredentialsStateManager.kt +++ b/src/main/kotlin/app/credentials/CredentialsStateManager.kt @@ -1,4 +1,4 @@ -package credentials +package app.credentials import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow diff --git a/src/main/kotlin/credentials/GProcess.kt b/src/main/kotlin/app/credentials/GProcess.kt similarity index 98% rename from src/main/kotlin/credentials/GProcess.kt rename to src/main/kotlin/app/credentials/GProcess.kt index 671cc68..f573ac7 100644 --- a/src/main/kotlin/credentials/GProcess.kt +++ b/src/main/kotlin/app/credentials/GProcess.kt @@ -1,4 +1,4 @@ -package credentials +package app.credentials import org.apache.sshd.client.channel.ChannelExec import org.apache.sshd.client.session.ClientSession diff --git a/src/main/kotlin/credentials/GRemoteSession.kt b/src/main/kotlin/app/credentials/GRemoteSession.kt similarity index 92% rename from src/main/kotlin/credentials/GRemoteSession.kt rename to src/main/kotlin/app/credentials/GRemoteSession.kt index 3fd1f0d..84d8490 100644 --- a/src/main/kotlin/credentials/GRemoteSession.kt +++ b/src/main/kotlin/app/credentials/GRemoteSession.kt @@ -1,11 +1,9 @@ -package credentials +package app.credentials import org.apache.sshd.client.SshClient import org.apache.sshd.client.future.ConnectFuture import org.eclipse.jgit.transport.RemoteSession import org.eclipse.jgit.transport.URIish -import java.io.PipedInputStream -import java.io.PipedOutputStream private const val DEFAULT_SSH_PORT = 22 diff --git a/src/main/kotlin/credentials/GSessionManager.kt b/src/main/kotlin/app/credentials/GSessionManager.kt similarity index 97% rename from src/main/kotlin/credentials/GSessionManager.kt rename to src/main/kotlin/app/credentials/GSessionManager.kt index fa66a25..9e73088 100644 --- a/src/main/kotlin/credentials/GSessionManager.kt +++ b/src/main/kotlin/app/credentials/GSessionManager.kt @@ -1,4 +1,4 @@ -package credentials +package app.credentials import org.eclipse.jgit.transport.CredentialsProvider import org.eclipse.jgit.transport.RemoteSession diff --git a/src/main/kotlin/credentials/HttpCredentialsProvider.kt b/src/main/kotlin/app/credentials/HttpCredentialsProvider.kt similarity index 98% rename from src/main/kotlin/credentials/HttpCredentialsProvider.kt rename to src/main/kotlin/app/credentials/HttpCredentialsProvider.kt index 00076a1..58bd23e 100644 --- a/src/main/kotlin/credentials/HttpCredentialsProvider.kt +++ b/src/main/kotlin/app/credentials/HttpCredentialsProvider.kt @@ -1,4 +1,4 @@ -package credentials +package app.credentials import org.eclipse.jgit.transport.CredentialItem import org.eclipse.jgit.transport.CredentialsProvider diff --git a/src/main/kotlin/app/di/AppComponent.kt b/src/main/kotlin/app/di/AppComponent.kt new file mode 100644 index 0000000..0c26efd --- /dev/null +++ b/src/main/kotlin/app/di/AppComponent.kt @@ -0,0 +1,7 @@ +package app.di + +import dagger.Component + +@Component +interface AppComponent { +} \ No newline at end of file diff --git a/src/main/kotlin/extensions/DateExtensions.kt b/src/main/kotlin/app/extensions/DateExtensions.kt similarity index 97% rename from src/main/kotlin/extensions/DateExtensions.kt rename to src/main/kotlin/app/extensions/DateExtensions.kt index f4708e9..b5066bc 100644 --- a/src/main/kotlin/extensions/DateExtensions.kt +++ b/src/main/kotlin/app/extensions/DateExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import java.text.DateFormat import java.time.LocalDate diff --git a/src/main/kotlin/extensions/DiffEntryExtensions.kt b/src/main/kotlin/app/extensions/DiffEntryExtensions.kt similarity index 95% rename from src/main/kotlin/extensions/DiffEntryExtensions.kt rename to src/main/kotlin/app/extensions/DiffEntryExtensions.kt index 2d96389..76d0023 100644 --- a/src/main/kotlin/extensions/DiffEntryExtensions.kt +++ b/src/main/kotlin/app/extensions/DiffEntryExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import androidx.compose.material.MaterialTheme import androidx.compose.material.icons.Icons @@ -10,8 +10,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import org.eclipse.jgit.diff.DiffEntry -import theme.addFile -import theme.modifyFile +import app.theme.addFile +import app.theme.modifyFile val DiffEntry.filePath: String get() { diff --git a/src/main/kotlin/extensions/InputStreamExtensions.kt b/src/main/kotlin/app/extensions/InputStreamExtensions.kt similarity index 93% rename from src/main/kotlin/extensions/InputStreamExtensions.kt rename to src/main/kotlin/app/extensions/InputStreamExtensions.kt index 9619ba3..9ee5b57 100644 --- a/src/main/kotlin/extensions/InputStreamExtensions.kt +++ b/src/main/kotlin/app/extensions/InputStreamExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import java.io.ByteArrayOutputStream import java.io.InputStream diff --git a/src/main/kotlin/extensions/RefExtensions.kt b/src/main/kotlin/app/extensions/RefExtensions.kt similarity index 84% rename from src/main/kotlin/extensions/RefExtensions.kt rename to src/main/kotlin/app/extensions/RefExtensions.kt index 37a5235..8beb850 100644 --- a/src/main/kotlin/extensions/RefExtensions.kt +++ b/src/main/kotlin/app/extensions/RefExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import org.eclipse.jgit.lib.Ref diff --git a/src/main/kotlin/extensions/StatusExtensions.kt b/src/main/kotlin/app/extensions/StatusExtensions.kt similarity index 84% rename from src/main/kotlin/extensions/StatusExtensions.kt rename to src/main/kotlin/app/extensions/StatusExtensions.kt index 8a8d8a4..091de42 100644 --- a/src/main/kotlin/extensions/StatusExtensions.kt +++ b/src/main/kotlin/app/extensions/StatusExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import org.eclipse.jgit.api.Status diff --git a/src/main/kotlin/extensions/StringExtensions.kt b/src/main/kotlin/app/extensions/StringExtensions.kt similarity index 90% rename from src/main/kotlin/extensions/StringExtensions.kt rename to src/main/kotlin/app/extensions/StringExtensions.kt index 97744db..75eb57f 100644 --- a/src/main/kotlin/extensions/StringExtensions.kt +++ b/src/main/kotlin/app/extensions/StringExtensions.kt @@ -1,4 +1,4 @@ -package extensions +package app.extensions import java.math.BigInteger import java.security.MessageDigest diff --git a/src/main/kotlin/git/BranchesManager.kt b/src/main/kotlin/app/git/BranchesManager.kt similarity index 98% rename from src/main/kotlin/git/BranchesManager.kt rename to src/main/kotlin/app/git/BranchesManager.kt index 81808d7..94458fb 100644 --- a/src/main/kotlin/git/BranchesManager.kt +++ b/src/main/kotlin/app/git/BranchesManager.kt @@ -1,4 +1,4 @@ -package git +package app.git import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow diff --git a/src/main/kotlin/git/CloneManager.kt b/src/main/kotlin/app/git/CloneManager.kt similarity index 93% rename from src/main/kotlin/git/CloneManager.kt rename to src/main/kotlin/app/git/CloneManager.kt index e1d2c26..86e2e05 100644 --- a/src/main/kotlin/git/CloneManager.kt +++ b/src/main/kotlin/app/git/CloneManager.kt @@ -1,10 +1,8 @@ -package git +package app.git -import credentials.GRemoteSession -import credentials.GSessionManager +import app.credentials.GSessionManager import org.eclipse.jgit.api.Git import org.eclipse.jgit.transport.* -import org.eclipse.jgit.util.FS import java.io.File import java.io.IOException diff --git a/src/main/kotlin/git/DiffEntryType.kt b/src/main/kotlin/app/git/DiffEntryType.kt similarity index 95% rename from src/main/kotlin/git/DiffEntryType.kt rename to src/main/kotlin/app/git/DiffEntryType.kt index 82b25cf..581fd97 100644 --- a/src/main/kotlin/git/DiffEntryType.kt +++ b/src/main/kotlin/app/git/DiffEntryType.kt @@ -1,4 +1,4 @@ -package git +package app.git import org.eclipse.jgit.diff.DiffEntry diff --git a/src/main/kotlin/git/DiffManager.kt b/src/main/kotlin/app/git/DiffManager.kt similarity index 97% rename from src/main/kotlin/git/DiffManager.kt rename to src/main/kotlin/app/git/DiffManager.kt index eb2410b..8a79562 100644 --- a/src/main/kotlin/git/DiffManager.kt +++ b/src/main/kotlin/app/git/DiffManager.kt @@ -1,4 +1,4 @@ -package git +package app.git import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -39,7 +39,7 @@ class DiffManager { // TODO This is just a workaround, try to find properly which lines have to be displayed by using a custom diff return@withContext diff.split("\n", "\r\n").filterNot { - it.startsWith("diff --git") + it.startsWith("diff --app.git") } } diff --git a/src/main/kotlin/git/GitManager.kt b/src/main/kotlin/app/git/GitManager.kt similarity index 96% rename from src/main/kotlin/git/GitManager.kt rename to src/main/kotlin/app/git/GitManager.kt index a7cf4c7..32dbd7b 100644 --- a/src/main/kotlin/git/GitManager.kt +++ b/src/main/kotlin/app/git/GitManager.kt @@ -1,7 +1,7 @@ -package git +package app.git -import credentials.CredentialsState -import credentials.CredentialsStateManager +import app.credentials.CredentialsState +import app.credentials.CredentialsStateManager import kotlinx.coroutines.* import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow @@ -83,10 +83,10 @@ class GitManager { } fun openRepository(directory: File) { - val gitDirectory = if (directory.name == ".git") { + val gitDirectory = if (directory.name == ".app.git") { directory } else { - val gitDir = File(directory, ".git") + val gitDir = File(directory, ".app.git") if (gitDir.exists() && gitDir.isDirectory) { gitDir } else diff --git a/src/main/kotlin/git/LogManager.kt b/src/main/kotlin/app/git/LogManager.kt similarity index 98% rename from src/main/kotlin/git/LogManager.kt rename to src/main/kotlin/app/git/LogManager.kt index a7ed6ce..0da3483 100644 --- a/src/main/kotlin/git/LogManager.kt +++ b/src/main/kotlin/app/git/LogManager.kt @@ -1,4 +1,4 @@ -package git +package app.git import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ensureActive diff --git a/src/main/kotlin/git/RemoteOperationsManager.kt b/src/main/kotlin/app/git/RemoteOperationsManager.kt similarity index 97% rename from src/main/kotlin/git/RemoteOperationsManager.kt rename to src/main/kotlin/app/git/RemoteOperationsManager.kt index 4e3f7c3..2ff5fdb 100644 --- a/src/main/kotlin/git/RemoteOperationsManager.kt +++ b/src/main/kotlin/app/git/RemoteOperationsManager.kt @@ -1,6 +1,6 @@ -package git +package app.git -import credentials.* +import app.credentials.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.eclipse.jgit.api.Git diff --git a/src/main/kotlin/git/StashManager.kt b/src/main/kotlin/app/git/StashManager.kt similarity index 88% rename from src/main/kotlin/git/StashManager.kt rename to src/main/kotlin/app/git/StashManager.kt index c7be368..326fc3a 100644 --- a/src/main/kotlin/git/StashManager.kt +++ b/src/main/kotlin/app/git/StashManager.kt @@ -1,4 +1,4 @@ -package git +package app.git import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow @@ -6,8 +6,6 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.withContext import org.eclipse.jgit.api.Git import org.eclipse.jgit.revwalk.RevCommit -import java.text.DateFormat -import java.util.* class StashManager { private val _stashStatus = MutableStateFlow(StashStatus.Loaded(listOf())) @@ -24,14 +22,14 @@ class StashManager { } suspend fun popStash(git: Git) = withContext(Dispatchers.IO) { -// val firstStash = git.stashList().call().firstOrNull() ?: return@withContext +// val firstStash = app.git.stashList().call().firstOrNull() ?: return@withContext git .stashApply() // .setStashRef(firstStash.) .call() -// git.stashDrop() +// app.git.stashDrop() // .setStashRef(firstStash.) loadStashList(git) diff --git a/src/main/kotlin/git/StatusManager.kt b/src/main/kotlin/app/git/StatusManager.kt similarity index 96% rename from src/main/kotlin/git/StatusManager.kt rename to src/main/kotlin/app/git/StatusManager.kt index 51d934e..cf22091 100644 --- a/src/main/kotlin/git/StatusManager.kt +++ b/src/main/kotlin/app/git/StatusManager.kt @@ -1,7 +1,7 @@ -package git +package app.git -import extensions.filePath -import extensions.hasUntrackedChanges +import app.extensions.filePath +import app.extensions.hasUntrackedChanges import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ensureActive import kotlinx.coroutines.flow.MutableStateFlow diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/app/main.kt similarity index 95% rename from src/main/kotlin/main.kt rename to src/main/kotlin/app/main.kt index b54414a..559edf4 100644 --- a/src/main/kotlin/main.kt +++ b/src/main/kotlin/app/main.kt @@ -11,13 +11,13 @@ import androidx.compose.ui.draw.alpha import androidx.compose.ui.unit.dp import androidx.compose.ui.window.* import androidx.compose.ui.zIndex -import git.GitManager -import git.RepositorySelectionStatus -import theme.* -import ui.RepositoryOpenPage -import ui.WelcomePage -import ui.components.RepositoriesTabPanel -import ui.components.TabInformation +import app.git.GitManager +import app.git.RepositorySelectionStatus +import app.theme.* +import app.ui.RepositoryOpenPage +import app.ui.WelcomePage +import app.ui.components.RepositoriesTabPanel +import app.ui.components.TabInformation @OptIn(ExperimentalComposeUiApi::class) fun main() = application { diff --git a/src/main/kotlin/theme/Color.kt b/src/main/kotlin/app/theme/Color.kt similarity index 97% rename from src/main/kotlin/theme/Color.kt rename to src/main/kotlin/app/theme/Color.kt index 617b777..03387b3 100644 --- a/src/main/kotlin/theme/Color.kt +++ b/src/main/kotlin/app/theme/Color.kt @@ -1,4 +1,4 @@ -package theme +package app.theme import androidx.compose.ui.graphics.Color diff --git a/src/main/kotlin/theme/Theme.kt b/src/main/kotlin/app/theme/Theme.kt similarity index 98% rename from src/main/kotlin/theme/Theme.kt rename to src/main/kotlin/app/theme/Theme.kt index 13811cd..81b1489 100644 --- a/src/main/kotlin/theme/Theme.kt +++ b/src/main/kotlin/app/theme/Theme.kt @@ -1,4 +1,4 @@ -package theme +package app.theme import androidx.compose.material.* import androidx.compose.runtime.Composable diff --git a/src/main/kotlin/ui/Branches.kt b/src/main/kotlin/app/ui/Branches.kt similarity index 95% rename from src/main/kotlin/ui/Branches.kt rename to src/main/kotlin/app/ui/Branches.kt index 45af0e1..afb303f 100644 --- a/src/main/kotlin/ui/Branches.kt +++ b/src/main/kotlin/app/ui/Branches.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -18,11 +18,11 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import ui.components.ScrollableLazyColumn -import extensions.simpleName -import git.GitManager +import app.ui.components.ScrollableLazyColumn +import app.extensions.simpleName +import app.git.GitManager import org.eclipse.jgit.lib.Ref -import theme.headerBackground +import app.theme.headerBackground @Composable fun Branches(gitManager: GitManager) { diff --git a/src/main/kotlin/ui/CommitChanges.kt b/src/main/kotlin/app/ui/CommitChanges.kt similarity index 97% rename from src/main/kotlin/ui/CommitChanges.kt rename to src/main/kotlin/app/ui/CommitChanges.kt index db9972e..1789e95 100644 --- a/src/main/kotlin/ui/CommitChanges.kt +++ b/src/main/kotlin/app/ui/CommitChanges.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.* import androidx.compose.foundation.layout.* @@ -17,20 +17,20 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import extensions.* +import app.extensions.* import kotlinx.coroutines.* import org.eclipse.jgit.diff.DiffEntry import org.eclipse.jgit.revwalk.RevCommit import org.jetbrains.skija.Image.makeFromEncoded -import theme.headerBackground -import theme.primaryTextColor -import theme.secondaryTextColor +import app.theme.headerBackground +import app.theme.primaryTextColor +import app.theme.secondaryTextColor import java.net.HttpURLConnection import java.net.URL import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue -import ui.components.ScrollableLazyColumn -import git.GitManager +import app.ui.components.ScrollableLazyColumn +import app.git.GitManager @Composable fun CommitChanges( diff --git a/src/main/kotlin/ui/Diff.kt b/src/main/kotlin/app/ui/Diff.kt similarity index 95% rename from src/main/kotlin/ui/Diff.kt rename to src/main/kotlin/app/ui/Diff.kt index 22cb7a6..d401029 100644 --- a/src/main/kotlin/ui/Diff.kt +++ b/src/main/kotlin/app/ui/Diff.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column @@ -20,10 +20,10 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import ui.components.ScrollableLazyColumn -import git.DiffEntryType -import git.GitManager -import theme.primaryTextColor +import app.ui.components.ScrollableLazyColumn +import app.git.DiffEntryType +import app.git.GitManager +import app.theme.primaryTextColor @Composable fun Diff(gitManager: GitManager, diffEntryType: DiffEntryType, onCloseDiffView: () -> Unit) { diff --git a/src/main/kotlin/ui/GMenu.kt b/src/main/kotlin/app/ui/GMenu.kt similarity index 98% rename from src/main/kotlin/ui/GMenu.kt rename to src/main/kotlin/app/ui/GMenu.kt index 53b1b0c..5657af4 100644 --- a/src/main/kotlin/ui/GMenu.kt +++ b/src/main/kotlin/app/ui/GMenu.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.Image import androidx.compose.foundation.layout.* @@ -19,7 +19,7 @@ import androidx.compose.ui.input.pointer.pointerMoveFilter import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import theme.primaryTextColor +import app.theme.primaryTextColor @Composable fun GMenu( diff --git a/src/main/kotlin/ui/Log.kt b/src/main/kotlin/app/ui/Log.kt similarity index 95% rename from src/main/kotlin/ui/Log.kt rename to src/main/kotlin/app/ui/Log.kt index 9daa7e9..f3ad9a8 100644 --- a/src/main/kotlin/ui/Log.kt +++ b/src/main/kotlin/app/ui/Log.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -15,13 +15,13 @@ import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import ui.components.ScrollableLazyColumn -import extensions.toSmartSystemString -import git.GitManager -import git.LogStatus +import app.ui.components.ScrollableLazyColumn +import app.extensions.toSmartSystemString +import app.git.GitManager +import app.git.LogStatus import org.eclipse.jgit.revwalk.RevCommit -import theme.primaryTextColor -import theme.secondaryTextColor +import app.theme.primaryTextColor +import app.theme.secondaryTextColor @Composable fun Log( diff --git a/src/main/kotlin/ui/RepositoryOpen.kt b/src/main/kotlin/app/ui/RepositoryOpen.kt similarity index 96% rename from src/main/kotlin/ui/RepositoryOpen.kt rename to src/main/kotlin/app/ui/RepositoryOpen.kt index c8cd2d7..654ab4e 100644 --- a/src/main/kotlin/ui/RepositoryOpen.kt +++ b/src/main/kotlin/app/ui/RepositoryOpen.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.animation.Crossfade import androidx.compose.foundation.layout.* @@ -11,10 +11,9 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.window.Dialog -import credentials.CredentialsState -import git.DiffEntryType -import git.GitManager -import git.RepositorySelectionStatus +import app.credentials.CredentialsState +import app.git.DiffEntryType +import app.git.GitManager import openRepositoryDialog import org.eclipse.jgit.revwalk.RevCommit @@ -52,7 +51,7 @@ fun RepositoryOpenPage(gitManager: GitManager) { horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, ) { - Text("Introduce your remote server credentials") + Text("Introduce your remote server app.credentials") OutlinedTextField( value = userField, diff --git a/src/main/kotlin/ui/Stashes.kt b/src/main/kotlin/app/ui/Stashes.kt similarity index 95% rename from src/main/kotlin/ui/Stashes.kt rename to src/main/kotlin/app/ui/Stashes.kt index 62a9adf..8c09444 100644 --- a/src/main/kotlin/ui/Stashes.kt +++ b/src/main/kotlin/app/ui/Stashes.kt @@ -1,4 +1,4 @@ -package ui +package app.ui import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -15,11 +15,11 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import ui.components.ScrollableLazyColumn -import git.GitManager -import git.StashStatus +import app.ui.components.ScrollableLazyColumn +import app.git.GitManager +import app.git.StashStatus import org.eclipse.jgit.revwalk.RevCommit -import theme.headerBackground +import app.theme.headerBackground @Composable fun Stashes(gitManager: GitManager) { diff --git a/src/main/kotlin/SystemDialogs.kt b/src/main/kotlin/app/ui/SystemDialogs.kt similarity index 94% rename from src/main/kotlin/SystemDialogs.kt rename to src/main/kotlin/app/ui/SystemDialogs.kt index fcd2b11..94728f1 100644 --- a/src/main/kotlin/SystemDialogs.kt +++ b/src/main/kotlin/app/ui/SystemDialogs.kt @@ -1,4 +1,4 @@ -import git.GitManager +import app.git.GitManager import javax.swing.JFileChooser fun openRepositoryDialog(gitManager: GitManager) { diff --git a/src/main/kotlin/ui/UncommitedChanges.kt b/src/main/kotlin/app/ui/UncommitedChanges.kt similarity index 97% rename from src/main/kotlin/ui/UncommitedChanges.kt rename to src/main/kotlin/app/ui/UncommitedChanges.kt index 7b1a037..6e97296 100644 --- a/src/main/kotlin/ui/UncommitedChanges.kt +++ b/src/main/kotlin/app/ui/UncommitedChanges.kt @@ -1,6 +1,6 @@ @file:Suppress("UNUSED_PARAMETER") -package ui +package app.ui import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.ExperimentalAnimationApi @@ -24,14 +24,14 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import ui.components.ScrollableLazyColumn -import extensions.filePath -import extensions.icon -import extensions.iconColor -import git.GitManager -import git.StageStatus +import app.ui.components.ScrollableLazyColumn +import app.extensions.filePath +import app.extensions.icon +import app.extensions.iconColor +import app.git.GitManager +import app.git.StageStatus import org.eclipse.jgit.diff.DiffEntry -import theme.headerBackground +import app.theme.headerBackground @OptIn(ExperimentalAnimationApi::class) @Composable diff --git a/src/main/kotlin/ui/WelcomePage.kt b/src/main/kotlin/app/ui/WelcomePage.kt similarity index 91% rename from src/main/kotlin/ui/WelcomePage.kt rename to src/main/kotlin/app/ui/WelcomePage.kt index 8f0e440..5854b8d 100644 --- a/src/main/kotlin/ui/WelcomePage.kt +++ b/src/main/kotlin/app/ui/WelcomePage.kt @@ -1,18 +1,15 @@ -package ui +package app.ui import androidx.compose.foundation.Image -import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.material.* import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp -import git.GitManager +import app.git.GitManager import openRepositoryDialog diff --git a/src/main/kotlin/ui/components/RepositoriesTabPanel.kt b/src/main/kotlin/app/ui/components/RepositoriesTabPanel.kt similarity index 98% rename from src/main/kotlin/ui/components/RepositoriesTabPanel.kt rename to src/main/kotlin/app/ui/components/RepositoriesTabPanel.kt index 5e34ca5..20b0d1e 100644 --- a/src/main/kotlin/ui/components/RepositoriesTabPanel.kt +++ b/src/main/kotlin/app/ui/components/RepositoriesTabPanel.kt @@ -1,4 +1,4 @@ -package ui.components +package app.ui.components import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -14,7 +14,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import theme.primaryLight +import app.theme.primaryLight @Composable diff --git a/src/main/kotlin/ui/components/ScrollableLazyColumn.kt b/src/main/kotlin/app/ui/components/ScrollableLazyColumn.kt similarity index 97% rename from src/main/kotlin/ui/components/ScrollableLazyColumn.kt rename to src/main/kotlin/app/ui/components/ScrollableLazyColumn.kt index f279873..ca71590 100644 --- a/src/main/kotlin/ui/components/ScrollableLazyColumn.kt +++ b/src/main/kotlin/app/ui/components/ScrollableLazyColumn.kt @@ -1,4 +1,4 @@ -package ui.components +package app.ui.components import androidx.compose.foundation.VerticalScrollbar import androidx.compose.foundation.layout.Box