Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2025-10-05 23:26:22 +02:00
3 changed files with 37 additions and 28 deletions

View File

@@ -3,6 +3,7 @@ package de.srsoftware.umbrella.backend;
import static de.srsoftware.umbrella.core.Constants.*;
import static de.srsoftware.umbrella.core.Util.mapLogLevel;
import static java.lang.System.Logger.Level.ERROR;
import static java.lang.System.Logger.Level.INFO;
import com.sun.net.httpserver.HttpServer;
@@ -59,29 +60,32 @@ public class Application {
config.get("umbrella.plantuml").map(Object::toString).map(File::new).filter(File::exists).ifPresent(Util::setPlantUmlJar);
var server = HttpServer.create(new InetSocketAddress(port), 0);
new Translations().bindPath("/api/translations").on(server);
new MessageSystem(config);
new UserModule(config).bindPath("/api/user").on(server);
new TagModule(config).bindPath("/api/tags").on(server);
new BookmarkApi(config).bindPath("/api/bookmark").on(server);
new CompanyModule(config).bindPath("/api/company").on(server);
new CompanyLegacy(config).bindPath("/legacy/company").on(server);
new DocumentApi(config).bindPath("/api/document").on(server);
new ItemApi(config).bindPath("/api/items").on(server);
new UserLegacy(config).bindPath("/legacy/user").on(server);
new NotesLegacy(config).bindPath("/legacy/notes").on(server);
new MarkdownApi().bindPath("/api/markdown").on(server);
new NoteModule(config).bindPath("/api/notes").on(server);
new ProjectModule(config).bindPath("/api/project").on(server);
new ProjectLegacy(config).bindPath("/legacy/project").on(server);
new TaskModule(config).bindPath("/api/task").on(server);
new TaskLegacy().bindPath("/legacy/task").on(server);
new TimeModule(config).bindPath("/api/time").on(server);
new WebHandler().bindPath("/").on(server);
new WikiModule(config).bindPath("/api/wiki").on(server);
new FileModule(config).bindPath("/api/files").on(server);
try {
new Translations().bindPath("/api/translations").on(server);
new MessageSystem(config);
new UserModule(config).bindPath("/api/user").on(server);
new TagModule(config).bindPath("/api/tags").on(server);
new BookmarkApi(config).bindPath("/api/bookmark").on(server);
new CompanyModule(config).bindPath("/api/company").on(server);
new CompanyLegacy(config).bindPath("/legacy/company").on(server);
new DocumentApi(config).bindPath("/api/document").on(server);
new ItemApi(config).bindPath("/api/items").on(server);
new UserLegacy(config).bindPath("/legacy/user").on(server);
new NotesLegacy(config).bindPath("/legacy/notes").on(server);
new MarkdownApi().bindPath("/api/markdown").on(server);
new NoteModule(config).bindPath("/api/notes").on(server);
new ProjectModule(config).bindPath("/api/project").on(server);
new ProjectLegacy(config).bindPath("/legacy/project").on(server);
new TaskModule(config).bindPath("/api/task").on(server);
new TaskLegacy().bindPath("/legacy/task").on(server);
new TimeModule(config).bindPath("/api/time").on(server);
new WebHandler().bindPath("/").on(server);
new WikiModule(config).bindPath("/api/wiki").on(server);
new FileModule(config).bindPath("/api/files").on(server);
} catch (Exception e) {
LOG.log(ERROR,"Startup failed",e);
System.exit(-1);
}
server.setExecutor(Executors.newFixedThreadPool(threads));
server.start();
LOG.log(INFO,"Started web server at port {0}",port);

View File

@@ -154,6 +154,14 @@
loadTasks();
}
function showFiles(e){
window.open(`/files/project/${id}`, '_blank').focus();
}
function showTimes(e){
window.open(`/time?project=${id}`, '_blank').focus();
}
onMount(loadProject);
</script>
@@ -183,9 +191,9 @@
{/if}
<div>{t('context')}</div>
<div>
<button>{t('files')}</button>
<button onclick={showFiles}>{t('files')}</button>
<button>{t('models')}</button>
<button>{t('times')}</button>
<button onclick={showTimes}>{t('times')}</button>
</div>
{#if showSettings}
<div>{t('extended_settings')}</div>

View File

@@ -34,13 +34,10 @@ import java.util.*;
public class SqliteDB extends BaseDb implements LoginServiceDb, UserDb {
private static final System.Logger LOG = System.getLogger(SqliteDB.class.getSimpleName());
private static final int INITIAL_DB_VERSION = 4;
public SqliteDB(Connection conn){
super(conn);
}
private void createLoginServiceTables() {
var createTable = """
CREATE TABLE IF NOT EXISTS {0} (