diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff2ae26 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.idea* +*.iml +project/target +target +lib +out +.DS_Store +.gitconfig +.vscode +.bloop +.metals diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..f4a5aed --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1 @@ +version = "2.4.2" diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..533765f --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,7 @@ +# Changes # + +## Versions + +### 0.1.0-SNAPSHOT + +* initial Version \ No newline at end of file diff --git a/README.md b/README.md index 243604d..3735cc9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # Chatto-Desktop-ScalaFX -WIP desktop client for Chatto reimplemented in ScalaFX and Sapphire Framework \ No newline at end of file +WIP desktop client for Chatto reimplemented in ScalaFX and Sapphire Framework + +## Based on Sapphire + +A JavaFX Application Framework for Scala User. [https://sfxcode.github.io/sapphire-core](https://sfxcode.github.io/sapphire-core) diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..4bec638 --- /dev/null +++ b/build.sbt @@ -0,0 +1,84 @@ +name := "chatto-sapphire" + +organization := "wow.doge" + +scalaVersion := "2.13.1" + +mainClass := Some("wow.doge.chatto.Application") + +resolvers += "sfxcode-maven" at "https://bintray.com/sfxcode/maven/" +resolvers += "javafx-markdown-renderer" at "https://sandec.bintray.com/repo" + +libraryDependencies += "org.specs2" %% "specs2-core" % "4.7.1" % Test + +val JavaFXVersion = "11.0.2" + +val osName = System.getProperty("os.name") match { + case n if n.startsWith("Linux") => "linux" + case n if n.startsWith("Mac") => "mac" + case n if n.startsWith("Windows") => "win" + case _ => throw new Exception("Unknown platform!") +} + +fork := true + +libraryDependencies ++= Seq( + "base", + "controls", + "fxml", + "graphics", + "media", + "swing", + "web" +).map(m => "org.openjfx" % s"javafx-$m" % JavaFXVersion classifier osName) + +libraryDependencies += "com.sfxcode.sapphire" %% "sapphire-core" % "1.7.3" + +libraryDependencies += "com.sfxcode.sapphire" %% "sapphire-extension" % "1.0.6" + +libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3" + +libraryDependencies ++= Seq( + "org.scalafx" %% "scalafx" % "12.0.2-R18", + "org.scalafx" %% "scalafx-extras" % "0.3.4", + "com.softwaremill.sttp.client" %% "json4s" % "2.1.1", + "org.json4s" %% "json4s-native" % "3.6.7", + "org.scala-lang.modules" %% "scala-async" % "0.10.0", + "org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided, + // "org.kordamp.ikonli" %% "ikonli-javafx" % "11.4.0", + // "org.kordamp.ikonli" %% "ikonli-fontawesome-pack" % "11.4.0", + // "org.kordamp.ikonli" %% "ikonli-fontawesome5-pack" % "11.4.0", + "org.jsoup" % "jsoup" % "1.13.1", + "com.sandec" % "mdfx" % "0.1.6", + "com.softwaremill.sttp.client" %% "async-http-client-backend-future" % "2.1.1", + "com.softwaremill.quicklens" %% "quicklens" % "1.5.0" +) +libraryDependencies += "org.asynchttpclient" % "async-http-client" % "2.12.1" +libraryDependencies += "com.softwaremill.macwire" %% "macros" % "2.3.3" +scalacOptions ++= Seq("-Ymacro-annotations", "-deprecation") + +libraryDependencies += "org.scalafx" %% "scalafxml-core-sfx8" % "0.5" +// https://mvnrepository.com/artifact/com.jfoenix/jfoenix +libraryDependencies += "com.jfoenix" % "jfoenix" % "9.0.9" +// https://mvnrepository.com/artifact/org.kordamp.bootstrapfx/bootstrapfx-core +libraryDependencies += "org.kordamp.bootstrapfx" % "bootstrapfx-core" % "0.2.4" + +enablePlugins(BuildInfoPlugin) + +buildInfoPackage := "wow.doge.chatto" + +buildInfoOptions += BuildInfoOption.BuildTime + +enablePlugins(JavaFxPlugin) + +javaFxMainClass := "wow.doge.chatto.Application" + +javaFxJvmargs := Seq("-Xms512m", "-Xmx1024m", "-XX:ReservedCodeCacheSize=128m") + +javaFxTitle := "chatto-sapphire" + +javaFxCategory := "Aplication" + +javaFxNativeBundles := "image" + +javaFxVerbose := true diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..a919a9b --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.3.8 diff --git a/project/metals.sbt b/project/metals.sbt new file mode 100644 index 0000000..e36d9e9 --- /dev/null +++ b/project/metals.sbt @@ -0,0 +1,4 @@ +// DO NOT EDIT! This file is auto-generated. +// This file enables sbt-bloop to create bloop config files. + +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.0-RC1-229-b7c15aa9") diff --git a/project/plugin.sbt b/project/plugin.sbt new file mode 100644 index 0000000..56e0685 --- /dev/null +++ b/project/plugin.sbt @@ -0,0 +1,6 @@ +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.0") + +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") + +addSbtPlugin("com.quadstingray" % "sbt-javafx" % "1.5.2") + diff --git a/src/main/resources/META-INF/beans.xml b/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf new file mode 100644 index 0000000..98fce76 --- /dev/null +++ b/src/main/resources/application.conf @@ -0,0 +1,8 @@ +sapphire.core.fxml.basePath="/fxml/" +application.name = "Application" +project.name = "chatto-sapphire" +project.version = "0.1.0-SNAPSHOT" +stage.default { + height = 600 + width = 800 +} \ No newline at end of file diff --git a/src/main/resources/bundles/application.properties b/src/main/resources/bundles/application.properties new file mode 100644 index 0000000..d527374 --- /dev/null +++ b/src/main/resources/bundles/application.properties @@ -0,0 +1 @@ +navigation.toggle=Toggle Workspace \ No newline at end of file diff --git a/src/main/resources/bundles/application_de.properties b/src/main/resources/bundles/application_de.properties new file mode 100644 index 0000000..dee264b --- /dev/null +++ b/src/main/resources/bundles/application_de.properties @@ -0,0 +1 @@ +navigation.toggle=Bereich wechseln \ No newline at end of file diff --git a/src/main/resources/fxml/Chat.fxml b/src/main/resources/fxml/Chat.fxml new file mode 100644 index 0000000..7b2beb4 --- /dev/null +++ b/src/main/resources/fxml/Chat.fxml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +