Compare commits
5 Commits
fe078f9fb8
..
3.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eb3b4e18d | |||
| 235b07763b | |||
| 68eb4e3be4 | |||
| a29fb6d0f5 | |||
| c52dbcd716 |
Generated
-6
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="SqlDialectMappings">
|
|
||||||
<file url="PROJECT" dialect="SQLite" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# [LICENSE](LICENSE)
|
# [LICENSE](LICENSE)
|
||||||
|
|
||||||
# [Versiohistoria](CHANGELOG.md)
|
# [Versiohistoria](src/main/resources/CHANGELOG.md)
|
||||||
|
|
||||||
# Kuvaus
|
# Kuvaus
|
||||||
Pienen kotiateriapalvelun käyttöön rakennettu ohjelma sisältäen seuraavat ominaisuudet
|
Pienen kotiateriapalvelun käyttöön rakennettu ohjelma sisältäen seuraavat ominaisuudet
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>fi.lpam.ruokamanageri</groupId>
|
<groupId>fi.lpam.ruokamanageri</groupId>
|
||||||
<artifactId>Ruokamanageri</artifactId>
|
<artifactId>Ruokamanageri</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.1.0</version>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>25</maven.compiler.source>
|
<maven.compiler.source>25</maven.compiler.source>
|
||||||
@@ -63,6 +63,11 @@
|
|||||||
<version>3.53.1.0</version>
|
<version>3.53.1.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>one.jpro.platform</groupId>
|
||||||
|
<artifactId>jpro-mdfx</artifactId>
|
||||||
|
<version>0.6.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ import fi.lpam.gui.Asiakashallinta;
|
|||||||
import fi.lpam.gui.Kierroshallinta;
|
import fi.lpam.gui.Kierroshallinta;
|
||||||
import fi.lpam.gui.KuljetusRaportit;
|
import fi.lpam.gui.KuljetusRaportit;
|
||||||
import fi.lpam.gui.KuljetusListat;
|
import fi.lpam.gui.KuljetusListat;
|
||||||
|
import fi.lpam.gui.elementit.MuutosIlmoitus;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.geometry.Side;
|
import javafx.geometry.Side;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.control.Alert;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import javafx.scene.control.TabPane;
|
import javafx.scene.control.TabPane;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
@@ -63,5 +65,7 @@ public class App extends Application {
|
|||||||
primaryStage.setMaximized(true);
|
primaryStage.setMaximized(true);
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
primaryStage.getIcons().add(new Image(Objects.requireNonNull(Main.class.getClassLoader().getResourceAsStream("kuljetusruokalaatikko.jpg"))));
|
primaryStage.getIcons().add(new Image(Objects.requireNonNull(Main.class.getClassLoader().getResourceAsStream("kuljetusruokalaatikko.jpg"))));
|
||||||
|
|
||||||
|
if (!Main.properties.getProperty("version").equals(Main.properties.getProperty("viimeisinVersio"))) new MuutosIlmoitus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,17 @@
|
|||||||
package fi.lpam;
|
package fi.lpam;
|
||||||
|
|
||||||
import java.io.IOException;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static boolean dev;
|
public static boolean dev;
|
||||||
public static Properties properties;
|
public static Properties properties;
|
||||||
|
|
||||||
|
public static final File asetustiedosto = Path.of(SystemUtils.getUserHome().getAbsolutePath(), "OneDrive", "Kuljetusruokasovellus", "asetukset.properties").toFile();
|
||||||
|
|
||||||
static void main(String[] args) {
|
static void main(String[] args) {
|
||||||
//noinspection RedundantIfStatement
|
//noinspection RedundantIfStatement
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
@@ -16,8 +21,10 @@ public class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
properties = new Properties();
|
Properties defaults = new Properties();
|
||||||
properties.load(Main.class.getClassLoader().getResourceAsStream("app.properties"));
|
defaults.load(Main.class.getClassLoader().getResourceAsStream("defaults.properties"));
|
||||||
|
properties = new Properties(defaults);
|
||||||
|
properties.load(new FileInputStream(asetustiedosto));
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
//noinspection CallToPrintStackTrace
|
//noinspection CallToPrintStackTrace
|
||||||
@@ -25,5 +32,12 @@ public class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
App.main();
|
App.main();
|
||||||
|
|
||||||
|
try (OutputStream os = new FileOutputStream(asetustiedosto)) {
|
||||||
|
properties.store(os, "");
|
||||||
|
} catch (IOException e) {
|
||||||
|
//noinspection CallToPrintStackTrace
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,23 +6,23 @@ import fi.lpam.Main;
|
|||||||
import org.apache.commons.lang3.SystemUtils;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class Tietokanta {
|
public class Tietokanta {
|
||||||
private static String osoite;
|
private static String osoite;
|
||||||
private static String dbPath = SystemUtils.getUserHome().getAbsolutePath() + "\\OneDrive\\Kuljetusruokasovellus\\tietokanta.db";
|
private static File tietokantatiedosto = Path.of(SystemUtils.getUserHome().getAbsolutePath(), "OneDrive", "Kuljetusruokasovellus", "tietokanta.db").toFile();
|
||||||
|
|
||||||
public Tietokanta(boolean dev) {
|
public Tietokanta(boolean dev) {
|
||||||
if (dev) dbPath = "testikanta.db";
|
if (dev) tietokantatiedosto = new File("testikanta.db");
|
||||||
File file = new File(dbPath);
|
|
||||||
try {
|
try {
|
||||||
boolean _ = file.getParentFile().mkdirs();
|
boolean _ = tietokantatiedosto.getParentFile().mkdirs();
|
||||||
boolean _ = file.createNewFile();
|
boolean _ = tietokantatiedosto.createNewFile();
|
||||||
}
|
}
|
||||||
catch (Exception _) {}
|
catch (Exception _) {}
|
||||||
|
|
||||||
osoite = "jdbc:sqlite:" + file.getAbsolutePath();
|
osoite = "jdbc:sqlite:" + tietokantatiedosto.getAbsolutePath();
|
||||||
|
|
||||||
|
|
||||||
try (Connection conn = haeYhteys()) {
|
try (Connection conn = haeYhteys()) {
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package fi.lpam.gui.elementit;
|
||||||
|
|
||||||
|
import fi.lpam.Main;
|
||||||
|
import javafx.geometry.Pos;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.layout.*;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import one.jpro.platform.mdfx.MarkdownView;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class MuutosIlmoitus extends Stage {
|
||||||
|
public MuutosIlmoitus() {
|
||||||
|
super();
|
||||||
|
VBox root = new VBox();
|
||||||
|
root.setBorder(TabPohja.oletusBorder);
|
||||||
|
root.setPadding(TabPohja.oletusInsets);
|
||||||
|
root.setAlignment(Pos.CENTER);
|
||||||
|
root.setSpacing(10);
|
||||||
|
|
||||||
|
String md;
|
||||||
|
try (InputStreamReader isr = new InputStreamReader(Objects.requireNonNull(Main.class.getClassLoader().getResourceAsStream("CHANGELOG.md")))) {
|
||||||
|
md = isr.readAllAsString();
|
||||||
|
int toinenMerkintä = md.indexOf("# ", 1);
|
||||||
|
int kolmasMerkintä = md.indexOf("# ", toinenMerkintä + 1);
|
||||||
|
int endIndex = md.indexOf("# ", kolmasMerkintä + 1);
|
||||||
|
md = md.substring(0, endIndex);
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
md = "# Virhe versiolokin haussa";
|
||||||
|
}
|
||||||
|
|
||||||
|
MarkdownView markdownView = new MarkdownView(md);
|
||||||
|
root.getChildren().add(markdownView);
|
||||||
|
|
||||||
|
Button ok = new Button("OK");
|
||||||
|
ok.setFont(TabPohja.buttonFont);
|
||||||
|
ok.setOnAction(e -> this.close());
|
||||||
|
root.getChildren().add(ok);
|
||||||
|
|
||||||
|
Scene scene = new Scene(root);
|
||||||
|
this.setScene(scene);
|
||||||
|
this.setTitle("Uusi versio, katso muutokset alta!");
|
||||||
|
this.setResizable(false);
|
||||||
|
this.show();
|
||||||
|
|
||||||
|
Main.properties.setProperty("viimeisinVersio", Main.properties.getProperty("version"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ module fi.lpam.ruokamanageri {
|
|||||||
requires java.desktop;
|
requires java.desktop;
|
||||||
requires org.apache.pdfbox;
|
requires org.apache.pdfbox;
|
||||||
requires org.apache.commons.lang3;
|
requires org.apache.commons.lang3;
|
||||||
|
requires one.jpro.platform.mdfx;
|
||||||
|
|
||||||
opens fi.lpam.dataluokat to javafx.base;
|
opens fi.lpam.dataluokat to javafx.base;
|
||||||
exports fi.lpam;
|
exports fi.lpam;
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
# 3.1.0
|
||||||
|
- Muutosloki näkyy käynnistäessä uutta versiota ensimmäistä kertaa
|
||||||
|
- Ohjelman taustariippuvuuksia päivitetty
|
||||||
|
- Yleistä huoltoa
|
||||||
|
|
||||||
# 3.0.1
|
# 3.0.1
|
||||||
- Kierroshallinnan muokkaus tukemaan paremmin useampaa kierrosta
|
- Kierroshallinnan muokkaus tukemaan paremmin useampaa kierrosta
|
||||||
- Kosmeettisia viilauksia muuallekin
|
- Kosmeettisia viilauksia muuallekin
|
||||||
@@ -1 +0,0 @@
|
|||||||
version=${project.version}
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
version=${project.version}
|
||||||
|
viimeisinVersio=0.0.0
|
||||||
Reference in New Issue
Block a user