Merge branch 'main' into lang_de

This commit is contained in:
2022-04-21 23:04:39 +02:00
6 changed files with 42 additions and 4 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM alpine:3.15
MAINTAINER Stephan Richter <s.richter@srsoftware.de>
RUN apk add --no-cache --update bash git maven openjdk17
# get the sources
RUN git clone https://git.srsoftware.de/StephanRichter/Widerhall.git
WORKDIR Widerhall
# compile
RUN mvn --no-transfer-progress clean test compile assembly:single
RUN ln -s target/*.jar widerhall.jar
# configure
RUN mkdir /data
RUN echo '{"locations":{"database":"/data/widerhall.sqlite3","configuration":"/data/widerhall.config.json","archive":"/data/archive","base":"/Widerhall"}}' > config/config.json
# get JQUERY
RUN wget https://code.jquery.com/jquery-3.6.0.min.js -O static/jquery-3.6.0.min.js
CMD java -jar widerhall.jar

17
pom.xml
View File

@@ -6,17 +6,32 @@
<groupId>org.example</groupId> <groupId>org.example</groupId>
<artifactId>Widerhall</artifactId> <artifactId>Widerhall</artifactId>
<version>0.2.3</version> <version>0.2.8</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration> <configuration>
<source>16</source> <source>16</source>
<target>16</target> <target>16</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<mainClass>de.srsoftware.widerhall.Application</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@@ -33,6 +33,7 @@ public class Configuration {
public Configuration load(File file) { public Configuration load(File file) {
this.file = file; this.file = file;
if (file.exists()) try { if (file.exists()) try {
LOG.info("Loading configuration from {}",file);
var newVals = (JSONObject) new JSONParser().parse(Files.readString(file.toPath())); var newVals = (JSONObject) new JSONParser().parse(Files.readString(file.toPath()));
data.putAll(newVals); data.putAll(newVals);
} catch (ParseException | IOException e){ } catch (ParseException | IOException e){

View File

@@ -54,4 +54,4 @@ public class DatabaseTest extends TestCase {
assertEquals("UPDATE Test SET x = 5",Database.open().update("Test").set("x",5).compile().toString()); assertEquals("UPDATE Test SET x = 5",Database.open().update("Test").set("x",5).compile().toString());
assertEquals("UPDATE Test SET x = 5, y = 6",Database.open().update("Test").set("x",5).set("y",6).compile().toString()); assertEquals("UPDATE Test SET x = 5, y = 6",Database.open().update("Test").set("x",5).set("y",6).compile().toString());
} }
} }

View File

@@ -3,7 +3,8 @@ label {
margin: 5px 0; margin: 5px 0;
} }
#login form { #login form,
#register form{
width: 450px; width: 450px;
margin: 0 auto; margin: 0 auto;
} }

View File

@@ -6,7 +6,7 @@
<script src="js"></script> <script src="js"></script>
<link rel="stylesheet" href="css" /> <link rel="stylesheet" href="css" />
</head> </head>
<body> <body id="register">
«navigation()» «navigation()»
«userinfo()» «userinfo()»
<h1>Widerhall Nutzer-Registrierung</h1> <h1>Widerhall Nutzer-Registrierung</h1>