gui work
This commit is contained in:
@@ -3,6 +3,7 @@ package de.srsoftware.widerhall.data;
|
|||||||
import de.srsoftware.widerhall.Util;
|
import de.srsoftware.widerhall.Util;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.stringtemplate.v4.ST;
|
||||||
|
|
||||||
import javax.xml.crypto.Data;
|
import javax.xml.crypto.Data;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -87,15 +88,17 @@ public class ListMember {
|
|||||||
var words = new ArrayList<String>();
|
var words = new ArrayList<String>();
|
||||||
if ((state & STATE_OWNER) > 0) words.add("owner");
|
if ((state & STATE_OWNER) > 0) words.add("owner");
|
||||||
if ((state & STATE_SUBSCRIBER) > 0) words.add("subscriber");
|
if ((state & STATE_SUBSCRIBER) > 0) words.add("subscriber");
|
||||||
|
if ((state & STATE_AWAITING_CONFIRMATION) > 0) words.add("awaiting confirmation");
|
||||||
return String.join(", ",words);
|
return String.join(", ",words);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ListMember save() throws SQLException {
|
private ListMember save() throws SQLException {
|
||||||
Database.open().insertInto(TABLE_NAME)
|
var vals = new HashMap<String,Object>();
|
||||||
.values(Map.of(LIST_EMAIL,listEmail,
|
vals.put(LIST_EMAIL,listEmail);
|
||||||
USER_EMAIL,userEmail,
|
vals.put(USER_EMAIL,userEmail);
|
||||||
STATE,state))
|
vals.put(STATE,state);
|
||||||
.run();
|
if (token != null) vals.put(TOKEN,token);
|
||||||
|
Database.open().insertInto(TABLE_NAME).values(vals).run();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,13 @@ h1 {
|
|||||||
.user{
|
.user{
|
||||||
background: lime;
|
background: lime;
|
||||||
float: right;
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
text-align: right;
|
||||||
|
margin: 5px;
|
||||||
}
|
}
|
||||||
3
static/templates/footer.st
Normal file
3
static/templates/footer.st
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="footer">
|
||||||
|
Widerhall Mail Distributor. Get the sources at <a target="_blank" href="https://git.srsoftware.de/StephanRichter/Widerhall">git.srsoftware.de</a>
|
||||||
|
</div>
|
||||||
@@ -12,5 +12,6 @@
|
|||||||
«messages()»
|
«messages()»
|
||||||
<h1>Widerhall Index page</h1>
|
<h1>Widerhall Index page</h1>
|
||||||
«listlist()»
|
«listlist()»
|
||||||
|
«footer()»
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user