Refactor, Rename, Cleanup
This commit is contained in:
parent
8cc0dc57b6
commit
5c9f29eaaa
8 changed files with 21 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
||||||
# OSDA
|
# KRemoteAccess
|
||||||
Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer)
|
Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ plugins {
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "org.bm00"
|
group = "xyz.limepot"
|
||||||
version = "1.0-SNAPSHOT"
|
version = "0.1.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -34,14 +34,14 @@ tasks {
|
||||||
named<ShadowJar>("shadowJar") {
|
named<ShadowJar>("shadowJar") {
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
manifest {
|
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) {
|
val jar by tasks.getting(Jar::class) {
|
||||||
manifest {
|
manifest {
|
||||||
attributes["Main-Class"] = "org.bm00.DataAccessor.MainKt"
|
attributes["Main-Class"] = "org.bm00.kRemoteAccess.MainKt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
||||||
}
|
}
|
||||||
rootProject.name = "org-data-accessor"
|
rootProject.name = "KRemoteAccess"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.bm00.dataAccessor
|
package xyz.limepot.kRemoteAccess
|
||||||
|
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
import org.bm00.dataAccessor.windows.WelcomeWindow
|
import xyz.limepot.kRemoteAccess.jexerWindow.WelcomeWindow
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
//// OS CHECKER ////
|
//// OS CHECKER ////
|
|
@ -1,4 +1,4 @@
|
||||||
package org.bm00.dataAccessor
|
package xyz.limepot.kRemoteAccess
|
||||||
|
|
||||||
import dev.dirs.ProjectDirectories
|
import dev.dirs.ProjectDirectories
|
||||||
import java.io.File
|
import java.io.File
|
|
@ -1,10 +1,10 @@
|
||||||
package org.bm00.dataAccessor.windows
|
package xyz.limepot.kRemoteAccess.jexerWindow
|
||||||
|
|
||||||
import jexer.TAction
|
import jexer.TAction
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
import jexer.TWindow
|
import jexer.TWindow
|
||||||
import jexer.layout.StretchLayoutManager
|
import jexer.layout.StretchLayoutManager
|
||||||
import org.bm00.dataAccessor.osName
|
import xyz.limepot.kRemoteAccess.osName
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
//// OS CHECKER ////
|
//// OS CHECKER ////
|
||||||
|
@ -142,8 +142,8 @@ class LoginWindow private constructor(parent: TApplication, flags: Int) :
|
||||||
height - 2
|
height - 2
|
||||||
)
|
)
|
||||||
|
|
||||||
var sharedCheck = addCheckBox( CENTERED + 4, CENTERED + 5, "Shared Folder?",false)
|
|
||||||
//TODO: Login to shared folder?... hmmm
|
//TODO: Login to shared folder?... hmmm
|
||||||
|
//var sharedCheck = addCheckBox( CENTERED + 4, CENTERED + 5, "Shared Folder?",false)
|
||||||
|
|
||||||
// Initiates login process after determining OS
|
// Initiates login process after determining OS
|
||||||
addButton("Login", CENTERED + 9, CENTERED + 8,
|
addButton("Login", CENTERED + 9, CENTERED + 8,
|
|
@ -1,4 +1,4 @@
|
||||||
package org.bm00.dataAccessor.windows
|
package xyz.limepot.kRemoteAccess.jexerWindow
|
||||||
|
|
||||||
import jexer.TAction
|
import jexer.TAction
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
|
@ -6,16 +6,14 @@ import jexer.TWindow
|
||||||
import jexer.layout.StretchLayoutManager
|
import jexer.layout.StretchLayoutManager
|
||||||
|
|
||||||
class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
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)
|
constructor(parent: TApplication) : this(parent, CENTERED)
|
||||||
init {
|
init {
|
||||||
layoutManager = StretchLayoutManager(
|
layoutManager = StretchLayoutManager(
|
||||||
width - 2,
|
width - 2,
|
||||||
height - 2
|
height - 2
|
||||||
)
|
)
|
||||||
addLabel("Welcome to", CENTERED + 13, CENTERED - 4)
|
addButton("Options", CENTERED + 13, CENTERED - 2,
|
||||||
addLabel("The ORG-NAME-WIP Secure Data Accessor", CENTERED, CENTERED - 3)
|
|
||||||
addButton("Options", CENTERED + 13, CENTERED,
|
|
||||||
object : TAction() {
|
object : TAction() {
|
||||||
override fun DO() {
|
override fun DO() {
|
||||||
TODO("Create an options screen to open")
|
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.
|
// Close program, after detecting OS and unmounting the filesystem if necessary.
|
||||||
addButton("Exit...", CENTERED + 28, CENTERED,
|
addButton("Exit...", CENTERED + 28, CENTERED - 2,
|
||||||
object : TAction() {
|
object : TAction() {
|
||||||
override fun DO() {
|
override fun DO() {
|
||||||
if (org.bm00.dataAccessor.osName == "LINUX") {
|
if (xyz.limepot.kRemoteAccess.osName == "LINUX") {
|
||||||
ProcessBuilder("umount", "/tmp/osda_mount")
|
ProcessBuilder("umount", "/tmp/osda_mount")
|
||||||
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
||||||
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
||||||
|
@ -35,7 +33,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
||||||
.waitFor()
|
.waitFor()
|
||||||
System.exit(0)
|
System.exit(0)
|
||||||
}
|
}
|
||||||
else if (org.bm00.dataAccessor.osName == "WINDOWS") {
|
else if (xyz.limepot.kRemoteAccess.osName == "WINDOWS") {
|
||||||
ProcessBuilder("net", "use", "O:", "/delete")
|
ProcessBuilder("net", "use", "O:", "/delete")
|
||||||
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
||||||
.redirectError(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() {
|
object : TAction() {
|
||||||
override fun DO() {
|
override fun DO() {
|
||||||
TODO("About page")
|
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.
|
//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.
|
// But every other element must be in order from top->bottom because weird.
|
||||||
addButton("Login", CENTERED, CENTERED,
|
addButton("Login", CENTERED, CENTERED -2,
|
||||||
object : TAction() {
|
object : TAction() {
|
||||||
override fun DO() {
|
override fun DO() {
|
||||||
LoginWindow(parent)
|
LoginWindow(parent)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.bm00.dataAccessor
|
package xyz.limepot.kRemoteAccess
|
||||||
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
Loading…
Reference in a new issue