diff --git a/README.md b/README.md index 33d491a..0658916 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OSDA +# KRemoteAccess Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer) diff --git a/build.gradle.kts b/build.gradle.kts index 6613caa..c6c7d3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,8 +5,8 @@ plugins { id("com.github.johnrengelman.shadow") version "8.1.1" } -group = "org.bm00" -version = "1.0-SNAPSHOT" +group = "xyz.limepot" +version = "0.1.0" repositories { mavenCentral() @@ -34,14 +34,14 @@ tasks { named("shadowJar") { mergeServiceFiles() manifest { - attributes(mapOf("Main-Class" to "org.bm00.DataAccessor.MainKt")) + attributes(mapOf("Main-Class" to "org.bm00.kRemoteAccess.MainKt")) } } } val jar by tasks.getting(Jar::class) { manifest { - attributes["Main-Class"] = "org.bm00.DataAccessor.MainKt" + attributes["Main-Class"] = "org.bm00.kRemoteAccess.MainKt" } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 2513c55..96b161c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" } -rootProject.name = "org-data-accessor" +rootProject.name = "KRemoteAccess" diff --git a/src/main/kotlin/org/bm00/dataAccessor/Application.kt b/src/main/kotlin/xyz/limepot/kRemoteAccess/Application.kt similarity index 93% rename from src/main/kotlin/org/bm00/dataAccessor/Application.kt rename to src/main/kotlin/xyz/limepot/kRemoteAccess/Application.kt index 52a0f9f..c800e84 100644 --- a/src/main/kotlin/org/bm00/dataAccessor/Application.kt +++ b/src/main/kotlin/xyz/limepot/kRemoteAccess/Application.kt @@ -1,7 +1,7 @@ -package org.bm00.dataAccessor +package xyz.limepot.kRemoteAccess import jexer.TApplication -import org.bm00.dataAccessor.windows.WelcomeWindow +import xyz.limepot.kRemoteAccess.jexerWindow.WelcomeWindow import java.util.* //// OS CHECKER //// diff --git a/src/main/kotlin/org/bm00/dataAccessor/Config.kt b/src/main/kotlin/xyz/limepot/kRemoteAccess/Config.kt similarity index 98% rename from src/main/kotlin/org/bm00/dataAccessor/Config.kt rename to src/main/kotlin/xyz/limepot/kRemoteAccess/Config.kt index 75a8262..f605be1 100644 --- a/src/main/kotlin/org/bm00/dataAccessor/Config.kt +++ b/src/main/kotlin/xyz/limepot/kRemoteAccess/Config.kt @@ -1,4 +1,4 @@ -package org.bm00.dataAccessor +package xyz.limepot.kRemoteAccess import dev.dirs.ProjectDirectories import java.io.File diff --git a/src/main/kotlin/org/bm00/dataAccessor/windows/LoginWindow.kt b/src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/LoginWindow.kt similarity index 97% rename from src/main/kotlin/org/bm00/dataAccessor/windows/LoginWindow.kt rename to src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/LoginWindow.kt index 4c64d58..f1e3c71 100644 --- a/src/main/kotlin/org/bm00/dataAccessor/windows/LoginWindow.kt +++ b/src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/LoginWindow.kt @@ -1,10 +1,10 @@ -package org.bm00.dataAccessor.windows +package xyz.limepot.kRemoteAccess.jexerWindow import jexer.TAction import jexer.TApplication import jexer.TWindow import jexer.layout.StretchLayoutManager -import org.bm00.dataAccessor.osName +import xyz.limepot.kRemoteAccess.osName import java.util.* //// OS CHECKER //// @@ -142,8 +142,8 @@ class LoginWindow private constructor(parent: TApplication, flags: Int) : height - 2 ) - var sharedCheck = addCheckBox( CENTERED + 4, CENTERED + 5, "Shared Folder?",false) //TODO: Login to shared folder?... hmmm + //var sharedCheck = addCheckBox( CENTERED + 4, CENTERED + 5, "Shared Folder?",false) // Initiates login process after determining OS addButton("Login", CENTERED + 9, CENTERED + 8, diff --git a/src/main/kotlin/org/bm00/dataAccessor/windows/WelcomeWindow.kt b/src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/WelcomeWindow.kt similarity index 77% rename from src/main/kotlin/org/bm00/dataAccessor/windows/WelcomeWindow.kt rename to src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/WelcomeWindow.kt index 611e06c..b29d108 100644 --- a/src/main/kotlin/org/bm00/dataAccessor/windows/WelcomeWindow.kt +++ b/src/main/kotlin/xyz/limepot/kRemoteAccess/jexerWindow/WelcomeWindow.kt @@ -1,4 +1,4 @@ -package org.bm00.dataAccessor.windows +package xyz.limepot.kRemoteAccess.jexerWindow import jexer.TAction import jexer.TApplication @@ -6,16 +6,14 @@ import jexer.TWindow import jexer.layout.StretchLayoutManager class WelcomeWindow private constructor(parent: TApplication, flags: Int) : - TWindow(parent, "O.S.D.A.", 0, 0, 46, 10, flags) { + TWindow(parent, "KRemoteAccess", 0, 0, 46, 8, flags) { constructor(parent: TApplication) : this(parent, CENTERED) init { layoutManager = StretchLayoutManager( width - 2, height - 2 ) - addLabel("Welcome to", CENTERED + 13, CENTERED - 4) - addLabel("The ORG-NAME-WIP Secure Data Accessor", CENTERED, CENTERED - 3) - addButton("Options", CENTERED + 13, CENTERED, + addButton("Options", CENTERED + 13, CENTERED - 2, object : TAction() { override fun DO() { TODO("Create an options screen to open") @@ -24,10 +22,10 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) : ) // Close program, after detecting OS and unmounting the filesystem if necessary. - addButton("Exit...", CENTERED + 28, CENTERED, + addButton("Exit...", CENTERED + 28, CENTERED - 2, object : TAction() { override fun DO() { - if (org.bm00.dataAccessor.osName == "LINUX") { + if (xyz.limepot.kRemoteAccess.osName == "LINUX") { ProcessBuilder("umount", "/tmp/osda_mount") .redirectOutput(ProcessBuilder.Redirect.INHERIT) .redirectError(ProcessBuilder.Redirect.INHERIT) @@ -35,7 +33,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) : .waitFor() System.exit(0) } - else if (org.bm00.dataAccessor.osName == "WINDOWS") { + else if (xyz.limepot.kRemoteAccess.osName == "WINDOWS") { ProcessBuilder("net", "use", "O:", "/delete") .redirectOutput(ProcessBuilder.Redirect.INHERIT) .redirectError(ProcessBuilder.Redirect.INHERIT) @@ -50,7 +48,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) : } ) - addButton("About", CENTERED + 14, CENTERED + 2, + addButton("About", CENTERED + 14, CENTERED, object : TAction() { override fun DO() { TODO("About page") @@ -60,7 +58,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) : //Keep in mind, whatever button/element is created last is always the one pre-selected on launch. // But every other element must be in order from top->bottom because weird. - addButton("Login", CENTERED, CENTERED, + addButton("Login", CENTERED, CENTERED -2, object : TAction() { override fun DO() { LoginWindow(parent) diff --git a/src/main/kotlin/org/bm00/dataAccessor/main.kt b/src/main/kotlin/xyz/limepot/kRemoteAccess/main.kt similarity index 80% rename from src/main/kotlin/org/bm00/dataAccessor/main.kt rename to src/main/kotlin/xyz/limepot/kRemoteAccess/main.kt index 5259a00..94eb3ab 100644 --- a/src/main/kotlin/org/bm00/dataAccessor/main.kt +++ b/src/main/kotlin/xyz/limepot/kRemoteAccess/main.kt @@ -1,4 +1,4 @@ -package org.bm00.dataAccessor +package xyz.limepot.kRemoteAccess import java.util.*