Compare commits
15 Commits
feature/ta
...
feature/ma
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f07a04c43 | |||
| ece5a1ae85 | |||
| e48bac4ce2 | |||
| d0866ab73f | |||
| a13b4f40d4 | |||
| 008501357f | |||
| ce62675fa5 | |||
| 586899bdc8 | |||
| ee7cf20202 | |||
| 9a27a501a8 | |||
| f83257eb59 | |||
| 4f1b786ae9 | |||
| 1686fc81b2 | |||
| f20fa69cf4 | |||
| 0f902e3efa |
@@ -12,6 +12,7 @@ import de.srsoftware.tools.ColorLogger;
|
||||
import de.srsoftware.umbrella.bookmarks.BookmarkApi;
|
||||
import de.srsoftware.umbrella.company.CompanyModule;
|
||||
import de.srsoftware.umbrella.contact.ContactModule;
|
||||
import de.srsoftware.umbrella.core.SettingsService;
|
||||
import de.srsoftware.umbrella.core.Util;
|
||||
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.documents.DocumentApi;
|
||||
@@ -88,6 +89,7 @@ public class Application {
|
||||
new WebHandler().bindPath("/").on(server);
|
||||
new WikiModule(config).bindPath("/api/wiki").on(server);
|
||||
new FileModule(config).bindPath("/api/files").on(server);
|
||||
new SettingsService(config).bindPath("/api/settings").on(server);
|
||||
} catch (Exception e) {
|
||||
LOG.log(ERROR,"Startup failed",e);
|
||||
System.exit(-1);
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core;
|
||||
|
||||
import static de.srsoftware.umbrella.core.ModuleRegistry.userService;
|
||||
import static de.srsoftware.umbrella.core.constants.Constants.CLASS;
|
||||
import static de.srsoftware.umbrella.core.constants.Field.*;
|
||||
import static de.srsoftware.umbrella.core.constants.Path.MENU;
|
||||
import static de.srsoftware.umbrella.core.constants.Text.*;
|
||||
import static de.srsoftware.umbrella.core.constants.Text.USERS;
|
||||
import static java.text.MessageFormat.format;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import de.srsoftware.configuration.Configuration;
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import de.srsoftware.tools.Path;
|
||||
import de.srsoftware.tools.SessionToken;
|
||||
import de.srsoftware.umbrella.core.constants.Module;
|
||||
import de.srsoftware.umbrella.core.constants.Text;
|
||||
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.model.Token;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class SettingsService extends BaseHandler {
|
||||
|
||||
private final Configuration config;
|
||||
|
||||
public SettingsService(Configuration config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
addCors(ex);
|
||||
try {
|
||||
Optional<Token> token = SessionToken.from(ex).map(Token::of);
|
||||
var user = userService().loadUser(token);
|
||||
if (user.isEmpty()) return unauthorized(ex);
|
||||
var head = path.pop();
|
||||
return switch (head) {
|
||||
case MENU -> getMenuSettings(user.get(), ex);
|
||||
case null, default -> super.doGet(path, ex);
|
||||
};
|
||||
} catch (UmbrellaException e) {
|
||||
return send(ex, e);
|
||||
}
|
||||
}
|
||||
|
||||
private record MenuEntry(int pos, String module, String clazz, String title) implements Mappable {
|
||||
public static MenuEntry of(int pos, String module){
|
||||
return new MenuEntry(pos, module, module, module);
|
||||
}
|
||||
|
||||
public static MenuEntry of(int pos, String module, String title){
|
||||
return new MenuEntry(pos,module,module,title);
|
||||
}
|
||||
public static MenuEntry of(int pos, String module, String clazz, String title){
|
||||
return new MenuEntry(pos,module,clazz,title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return Map.of(MODULE,module,CLASS,clazz,TITLE,title);
|
||||
}
|
||||
}
|
||||
private boolean getMenuSettings(UmbrellaUser user, HttpExchange ex) throws IOException {
|
||||
Optional<JSONObject> modules = config.get("umbrella.modules");
|
||||
if (modules.isEmpty()) throw UmbrellaException.missingConfig("umbrella.modules");
|
||||
|
||||
var entries = new ArrayList<MenuEntry>();
|
||||
entries.add(MenuEntry.of(1, Module.USER, USERS));
|
||||
entries.add(MenuEntry.of(2, Module.COMPANY, COMPANIES));
|
||||
entries.add(MenuEntry.of(3, Module.PROJECT,Text.PROJECTS));
|
||||
entries.add(MenuEntry.of(4,Module.TASK,Text.TASKS));
|
||||
entries.add(MenuEntry.of(5,Module.TAGS));
|
||||
entries.add(MenuEntry.of(6,Module.DOCUMENT,"doc",Text.DOCUMENTS));
|
||||
entries.add(MenuEntry.of(7,Module.BOOKMARK,"mark",BOOKMARKS));
|
||||
entries.add(MenuEntry.of(8,Module.NOTES,"note",Text.NOTES));
|
||||
entries.add(MenuEntry.of(9,Module.FILES,"file", FILES));
|
||||
entries.add(MenuEntry.of(10,Module.TIME, Text.TIMETRACKING));
|
||||
entries.add(MenuEntry.of(11,Module.WIKI));
|
||||
entries.add(MenuEntry.of(12,Module.CONTACT, CONTACTS));
|
||||
entries.add(MenuEntry.of(13,Module.STOCK));
|
||||
entries.add(MenuEntry.of(14,Module.MESSAGE, MESSAGES));
|
||||
entries.add(MenuEntry.of(15,Module.POLL,Text.POLLS));
|
||||
|
||||
for (var i=0; i<entries.size(); i++){
|
||||
var entry = entries.get(i);
|
||||
var key = format("umbrella.modules.{0}.menuIndex",entry.module);
|
||||
Optional<Integer> val = config.get(key);
|
||||
if (val.isEmpty()) {
|
||||
key = format("umbrella.modules.{0}.menu_index",entry.module);
|
||||
val = config.get(key);
|
||||
}
|
||||
if (val.isPresent()) {
|
||||
var index = val.get();
|
||||
if (index<0) {
|
||||
entries.remove(i);
|
||||
i--;
|
||||
continue;
|
||||
} else {
|
||||
entry = MenuEntry.of(index,entry.module,entry.clazz,entry.title);
|
||||
entries.set(i,entry);
|
||||
}
|
||||
}
|
||||
key = format("umbrella.modules.{0}.baseUrl",entry.module);
|
||||
Optional<String> baseUrl = config.get(key);
|
||||
if (baseUrl.isPresent()) {
|
||||
entry = MenuEntry.of(entry.pos,baseUrl.get(), entry.clazz,entry.title);
|
||||
entries.set(i,entry);
|
||||
}
|
||||
}
|
||||
var list = entries.stream().sorted((a,b) -> a.pos - b.pos)
|
||||
.map(MenuEntry::toMap).toList();
|
||||
return sendContent(ex,list);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,10 @@ public class Constants {
|
||||
// prevent instantiation
|
||||
}
|
||||
|
||||
public static final String COUNT = "COUNT(*)";
|
||||
public static final String CLASS = "class";
|
||||
public static final String CONFIG_SESSION_DURATION = "umbrella.session.duration";
|
||||
public static final String COUNT = "COUNT(*)";
|
||||
|
||||
public static final String FALLBACK_LANG = "de";
|
||||
public static final String HOME = "home";
|
||||
public static final String JSONARRAY = "json array";
|
||||
@@ -20,8 +23,10 @@ public class Constants {
|
||||
public static final String KEEP_ALIVE = "keep-alive";
|
||||
public static final String NO_CACHE = "no-cache";
|
||||
public static final String NONE = "none";
|
||||
public static final String TABLE_SETTINGS = "settings";
|
||||
|
||||
public static final String TABLE_SETTINGS = "settings";
|
||||
public static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
public static final String UMBRELLA = "Umbrella";
|
||||
public static final String UTF8 = UTF_8.displayName();
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ public class Field {
|
||||
public static final String LOGIN = "login";
|
||||
|
||||
public static final String MEMBERS = "members";
|
||||
public static final String MENU_INDEX = "menu_index";
|
||||
public static final String MESSAGE_ID = "message_id";
|
||||
public static final String MIME = "mime";
|
||||
public static final String MODULE = "module";
|
||||
|
||||
@@ -4,8 +4,17 @@ package de.srsoftware.umbrella.core.constants;
|
||||
public class Module {
|
||||
public static final String BOOKMARK = "bookmark";
|
||||
public static final String COMPANY = "company";
|
||||
public static final String CONTACT = "contact";
|
||||
public static final String DOCUMENT = "document";
|
||||
public static final String FILES = "files";
|
||||
public static final String MESSAGE = "message";
|
||||
public static final String NOTES = "notes";
|
||||
public static final String POLL = "poll";
|
||||
public static final String PROJECT = "project";
|
||||
public static final String STOCK = "stock";
|
||||
public static final String TAGS = "tags";
|
||||
public static final String TASK = "task";
|
||||
public static final String TIME = "time";
|
||||
public static final String USER = "user";
|
||||
public static final String WIKI = "wiki";
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ public class Path {
|
||||
|
||||
public static final String ADD = "add";
|
||||
public static final String AVAILABLE = "available";
|
||||
public static final String CSS = "css";
|
||||
public static final String COMMON_TEMPLATES = "common_templates";
|
||||
public static final String COMPANY = "company";
|
||||
public static final String CONNECTED = "connected";
|
||||
public static final String CSS = "css";
|
||||
public static final String COMMON_TEMPLATES = "common_templates";
|
||||
public static final String COMPANY = "company";
|
||||
public static final String CONNECTED = "connected";
|
||||
|
||||
public static final String ITEM = "item";
|
||||
|
||||
@@ -22,6 +22,9 @@ public class Path {
|
||||
public static final String LOGIN = "login";
|
||||
|
||||
public static final String LOGOUT = "logout";
|
||||
|
||||
public static final String MENU = "menu";
|
||||
|
||||
public static final String PAGE = "page";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String PROJECT = "project";
|
||||
|
||||
@@ -5,8 +5,9 @@ package de.srsoftware.umbrella.core.constants;
|
||||
* This is a collection of messages that appear throughout the project
|
||||
*/
|
||||
public class Text {
|
||||
public static final String BOOKMARK = "bookmark";
|
||||
public static final String BOOLEAN = "Boolean";
|
||||
public static final String BOOKMARK = "bookmark";
|
||||
public static final String BOOKMARKS = "bookmarks";
|
||||
public static final String BOOLEAN = "Boolean";
|
||||
|
||||
public static final String COMPANIES = "companies";
|
||||
public static final String COMPANY = "company";
|
||||
@@ -24,6 +25,8 @@ public class Text {
|
||||
|
||||
public static final String EMAILS_FOR_RECEIVER = "emails for {email}";
|
||||
|
||||
public static final String FILES = "files";
|
||||
|
||||
public static final String INVALID_DB_CODE = "Encountered invalid dbCode: {code}";
|
||||
public static final String ITEM = "item";
|
||||
public static final String ITEMS = "items";
|
||||
@@ -34,13 +37,16 @@ public class Text {
|
||||
public static final String LONG = "Long";
|
||||
|
||||
public static final String MESSAGE = "message";
|
||||
public static final String MESSAGES = "messages";
|
||||
|
||||
public static final String NOTE = "note";
|
||||
public static final String NOTES = "notes";
|
||||
public static final String NOTE_WITH_ID = "note ({id})";
|
||||
public static final String NUMBER = "number";
|
||||
|
||||
public static final String PATH = "path";
|
||||
public static final String PROJECT = "project";
|
||||
public static final String POLLS = "polls";
|
||||
public static final String PROJECTS = "projects";
|
||||
public static final String PROJECT_WITH_ID = "project ({id})";
|
||||
public static final String PROPERTIES = "properties";
|
||||
public static final String PROPERTY = "property";
|
||||
@@ -52,18 +58,21 @@ public class Text {
|
||||
public static final String SERVICE_WITH_ID = "service ({id})";
|
||||
public static final String SESSION = "session";
|
||||
public static final String SETTINGS = "settings";
|
||||
public static final String STOCK = "stock";
|
||||
public static final String STRING = "string";
|
||||
|
||||
public static final String TABLE_WITH_NAME = "table {name}";
|
||||
public static final String TAGS = "tags";
|
||||
public static final String TASK = "task";
|
||||
public static final String TASKS = "tasks";
|
||||
public static final String TIMETRACKING = "timetracking";
|
||||
public static final String TIME_WITH_ID = "time ({id})";
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String UNIT = "unit";
|
||||
public static final String USER_WITH_ID = "user ({id})";
|
||||
|
||||
public static final String WIKI = "wiki";
|
||||
public static final String WIKI_PAGE = "wiki page";
|
||||
public static final String WIKI_PAGES = "wiki pages";
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
onclick = evt => {},
|
||||
onSet = newVal => {return true;},
|
||||
simple = false,
|
||||
store_id = null,
|
||||
type = 'div',
|
||||
value = $bindable({source:null,rendered:null})
|
||||
} = $props();
|
||||
@@ -15,6 +16,7 @@
|
||||
let editing = $state(false);
|
||||
let editValue = $state({source:value.source,rendered:value.rendered});
|
||||
let start = 0;
|
||||
let stored_source = $state(store_id ? localStorage.getItem(store_id) : null);
|
||||
let timer = null;
|
||||
|
||||
async function applyEdit(){
|
||||
@@ -27,6 +29,7 @@
|
||||
}
|
||||
|
||||
function doSave(){
|
||||
if (store_id) localStorage.removeItem(store_id);
|
||||
if (simple){
|
||||
onSet(editValue.source);
|
||||
} else applyEdit();
|
||||
@@ -50,6 +53,7 @@
|
||||
body : editValue.source
|
||||
});
|
||||
editValue.rendered = await resp.text();
|
||||
if (store_id) localStorage.setItem(store_id,editValue.source);
|
||||
}
|
||||
|
||||
function typed(ev){
|
||||
@@ -100,13 +104,37 @@
|
||||
measured(evt, evt.timeStamp - start);
|
||||
}
|
||||
|
||||
function restore(ev){
|
||||
editValue.source = stored_source;
|
||||
stored_source = null;
|
||||
render();
|
||||
}
|
||||
|
||||
activeField.subscribe((val) => resetEdit());
|
||||
if (simple) startEdit();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.markdown{
|
||||
position: relative;
|
||||
}
|
||||
#restore_markdown{
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
top: -10px;
|
||||
background: orange;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="markdown {editing?'editing':''}">
|
||||
{#if editing}
|
||||
<span class="hint">{@html t('markdown_supported')}</span>
|
||||
{#if stored_source}
|
||||
<span id="restore_markdown" onclick={restore} class="hint">{t('unsaved_content')}</span>
|
||||
{/if}
|
||||
<textarea bind:value={editValue.source} onkeyup={typed} autofocus={!simple}></textarea>
|
||||
<div class="preview">{@html target(editValue.rendered)}</div>
|
||||
{#if !simple}
|
||||
@@ -118,4 +146,4 @@
|
||||
{:else}
|
||||
<svelte:element this={type} {onclick} {oncontextmenu} class={{editable}} title={t('right_click_to_edit')} >{@html target(value.rendered)}</svelte:element>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,27 +2,25 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { useTinyRouter } from 'svelte-tiny-router';
|
||||
|
||||
import { logout, user } from '../user.svelte.js';
|
||||
import { t } from '../translations.svelte.js';
|
||||
import { api, get } from '../urls.svelte';
|
||||
import { error } from '../warn.svelte';
|
||||
import { logout, user } from '../user.svelte';
|
||||
import { t } from '../translations.svelte';
|
||||
|
||||
import TimeRecorder from './TimeRecorder.svelte';
|
||||
|
||||
let key = $state(null);
|
||||
const router = useTinyRouter();
|
||||
const modules = $state([]);
|
||||
let modules = $state(null);
|
||||
let expand = $state(false);
|
||||
|
||||
async function fetchModules(){
|
||||
const url = `${location.protocol}//${location.host.replace('5173','8080')}/legacy/user/modules`;
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
const arr = await resp.json();
|
||||
for (let entry of arr) {
|
||||
let name = t('module.'+entry.module);
|
||||
if (name) modules.push({name:name,url:entry.url});
|
||||
}
|
||||
let url = api('settings/menu');
|
||||
const res = await get(url);
|
||||
if (res.ok){
|
||||
modules = await res.json();
|
||||
} else {
|
||||
console.log('error');
|
||||
error(res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +28,11 @@ function onclick(e){
|
||||
e.preventDefault();
|
||||
expand = false;
|
||||
let href = e.target.getAttribute('href');
|
||||
if (href) router.navigate(href);
|
||||
if (href) {
|
||||
if (href.includes('://')) {
|
||||
window.location.href = href;
|
||||
} else router.navigate(href);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -55,27 +57,13 @@ onMount(fetchModules);
|
||||
<input type="text" bind:value={key} />
|
||||
<button type="submit">{t('search')}</button>
|
||||
</form>
|
||||
<button class="symbol" onclick={e => expand = !expand}></button>
|
||||
<a href="/user" {onclick} class="user">{t('users')}</a>
|
||||
<a href="/company" {onclick} class="company">{t('companies')}</a>
|
||||
<a href="/project" {onclick} class="project">{t('projects')}</a>
|
||||
<a href="/task" {onclick} class="task">{t('tasks')}</a>
|
||||
<a href="/tags" {onclick} class="tags">{t('tags')}</a>
|
||||
<a href="/document" {onclick} class="doc">{t('documents')}</a>
|
||||
<a href="/bookmark" {onclick} class="mark">{t('bookmarks')}</a>
|
||||
<a href="/notes" {onclick} class="note">{t('notes')}</a>
|
||||
<a href="/files" {onclick} class="file">{t('files')}</a>
|
||||
<a href="/time" {onclick} class="time">{t('timetracking')}</a>
|
||||
<a href="/wiki" {onclick} class="wiki">{t('wiki')}</a>
|
||||
<a href="/contact" {onclick} class="contact">{t('contacts')}</a>
|
||||
<a href="/stock" {onclick} class="stock">{t('stock')}</a>
|
||||
<a href="/message" {onclick} class="message">{t('messages')}</a>
|
||||
<button class="symbol" onclick={e => expand = !expand}> </button>
|
||||
{#each modules as module,i}
|
||||
<a href={module.module} {onclick} class={module.class}>{@html t(module.title)}</a>
|
||||
{/each}
|
||||
{#if user.id == 2}
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('tutorial')}</a>
|
||||
{/if}
|
||||
{#each modules as module,i}
|
||||
{#if module.name.trim()}<a href={module.url}>{module.name}</a>{/if}
|
||||
{/each}
|
||||
{#if user.name }
|
||||
<a class="logout" onclick={logout}>{t('logout_user',{user:user.name})}</a>
|
||||
{/if}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</script>
|
||||
|
||||
<fieldset>
|
||||
<legend>{t('messages')} <button onclick={showSettings}>{t('settings')}</button></legend>
|
||||
<legend>{@html t('messages')} <button onclick={showSettings}>{t('settings')}</button></legend>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import Card from './KanbanCard.svelte';
|
||||
import LineEditor from '../../Components/LineEditor.svelte';
|
||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||
import TaskForm from '../task/Add.svelte';
|
||||
|
||||
let eventSource = null;
|
||||
let connectionStatus = 'disconnected';
|
||||
@@ -26,7 +27,7 @@
|
||||
let users = [];
|
||||
let columns = $derived(project.allowed_states?Object.keys(project.allowed_states).length+1:1);
|
||||
let info = $state(null);
|
||||
|
||||
let task_form = $state(false);
|
||||
let stateList = {};
|
||||
$effect(() => updateUrl(filter_input));
|
||||
|
||||
@@ -120,7 +121,9 @@
|
||||
if (method != 'delete') processTask(json.task);
|
||||
|
||||
// show notification
|
||||
if (json.user.id != user.id) {
|
||||
if (json.user.id == user.id) {
|
||||
if (method == 'create') task_form = false; // task has been created by current user
|
||||
} else {
|
||||
let term = "user_updated_entity";
|
||||
if (method == 'create') term = "user_created_entity";
|
||||
if (method == 'delete') term = "user_deleted_entity";
|
||||
@@ -249,6 +252,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function show_task_form(project_id,assignee,state_id){
|
||||
task_form = {project_id,assignee,state_id};
|
||||
}
|
||||
|
||||
function updateUrl(){
|
||||
let url = window.location.origin + window.location.pathname;
|
||||
@@ -267,6 +273,12 @@
|
||||
</svelte:head>
|
||||
|
||||
{#if project}
|
||||
{#if task_form}
|
||||
<div class="overlay">
|
||||
<TaskForm assignee={task_form.assignee} on_abort={ev => {task_form = false;}} project_id={task_form.project_id} state_id={task_form.state_id} />
|
||||
</div>
|
||||
{/if} <!-- task form -->
|
||||
|
||||
<h1 onclick={ev => router.navigate(`/project/${project.id}/view`)}>{project.name}</h1>
|
||||
{/if}
|
||||
{#if info}
|
||||
@@ -300,8 +312,8 @@
|
||||
<Card onclick={e => openTask(task.id)} ondragstart={ev => dragged=task} {task} tag_colors={project.tag_colors} />
|
||||
{/if}
|
||||
{/each}
|
||||
<div class="add_task">
|
||||
<LineEditor value={t('add_object',{object:t('task')})} editable={true} onSet={(name) => create(name,u.id,state)}/>
|
||||
<div class="add_task" onclick={ev => show_task_form(project.id,u.id,+state)}>
|
||||
{t('add_object',{object:t('task')})}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
@@ -310,4 +322,4 @@
|
||||
<div class="archive {highlight.archive?'hover':''}" ondragover={hover_archive} ondragleave={e => delete highlight.archive} ondrop={do_archive} >
|
||||
{t('hide')}
|
||||
</div>
|
||||
{/if}
|
||||
{/if} <!-- project -->
|
||||
@@ -2,7 +2,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { useTinyRouter } from 'svelte-tiny-router';
|
||||
|
||||
import { api } from '../../urls.svelte.js';
|
||||
import { api, get } from '../../urls.svelte.js';
|
||||
import { error, yikes } from '../../warn.svelte';
|
||||
import { t } from '../../translations.svelte.js';
|
||||
import { user } from '../../user.svelte.js';
|
||||
@@ -11,15 +11,16 @@
|
||||
import PermissionEditor from '../../Components/PermissionEditor.svelte';
|
||||
import Tags from '../tags/TagList.svelte';
|
||||
|
||||
let { project_id = null, parent_task_id } = $props();
|
||||
let { assignee = null, on_abort = null, project_id = null, parent_task_id = null, state_id = null } = $props();
|
||||
let project = $state(null);
|
||||
let extendedSettings = $state(false);
|
||||
let parent_task = $state(null);
|
||||
let task = $state({
|
||||
name : '',
|
||||
description : { source : '', rendered : '' },
|
||||
description : { source:'',rendered:''},
|
||||
due_date : null,
|
||||
est_time : null,
|
||||
members : {},
|
||||
no_index : false,
|
||||
show_closed : false,
|
||||
start_date : null,
|
||||
@@ -41,32 +42,43 @@
|
||||
/// TODO: ?
|
||||
}
|
||||
|
||||
async function getCandidates(text){
|
||||
const origin = parent_task ? parent_task.members : project.members;
|
||||
const candidates = Object.values(origin)
|
||||
.filter(member => member.user.name.toLowerCase().includes(text.toLowerCase()))
|
||||
.map(member => [member.user.id,member.user.name]);
|
||||
return Object.fromEntries(candidates);
|
||||
}
|
||||
|
||||
async function load(){
|
||||
if (parent_task_id) await loadParent();
|
||||
if (project_id) loadProject();
|
||||
if (state_id) task.status = { code : +state_id };
|
||||
loadTags();
|
||||
}
|
||||
|
||||
async function loadParent(){
|
||||
const url = api(`task/${parent_task_id}`);
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
const resp = await get(url);
|
||||
if (resp.ok){
|
||||
parent_task = await resp.json();
|
||||
task.parent_task_id = +parent_task_id;
|
||||
project_id = parent_task.project_id;
|
||||
project_id = +parent_task.project_id;
|
||||
yikes();
|
||||
project = null; // TODO
|
||||
} else {
|
||||
error(resp);
|
||||
}
|
||||
} else error(resp);
|
||||
}
|
||||
|
||||
async function loadProject(){
|
||||
const url = api(`project/${project_id}`);
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
const resp = await get(url);
|
||||
if (resp.ok){
|
||||
project = await resp.json();
|
||||
task.project_id = +project_id;
|
||||
if (assignee && project.members[assignee]){
|
||||
task.members[assignee] = project.members[assignee];
|
||||
task.members[assignee].permission = { name : "ASSIGNEE", code : 3 }
|
||||
}
|
||||
yikes();
|
||||
} else {
|
||||
error(resp);
|
||||
@@ -78,21 +90,12 @@
|
||||
if (project_id) url = api(`tags/project/${project_id}`);
|
||||
if (parent_task_id) url = api(`tags/task/${parent_task_id}`);
|
||||
if (url) {
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
const resp = await get(url);
|
||||
if (resp.ok) task.tags = await resp.json();
|
||||
}
|
||||
}
|
||||
|
||||
async function getCandidates(text){
|
||||
const origin = parent_task ? parent_task.members : project.members;
|
||||
const candidates = Object.values(origin)
|
||||
.filter(member => member.user.name.toLowerCase().includes(text.toLowerCase()))
|
||||
.map(member => [member.user.id,member.user.name]);
|
||||
return Object.fromEntries(candidates);
|
||||
}
|
||||
|
||||
|
||||
function onkeydown(e){
|
||||
function onkeydown(e){
|
||||
if (e.ctrlKey && e.keyCode === 83) {
|
||||
e.preventDefault();
|
||||
saveTask();
|
||||
@@ -107,10 +110,13 @@
|
||||
body : JSON.stringify(task)
|
||||
});
|
||||
if (resp.ok) {
|
||||
task = await resp.json();
|
||||
if (task.parent_task_id){
|
||||
router.navigate(`/task/${task.parent_task_id}/view`);
|
||||
} else router.navigate(`/task/${task.id}/view`);
|
||||
localStorage.removeItem(`task/${task.id}/description`);
|
||||
if (!assignee) { // if assignee is set, this form was opened within an external context. hence we don`t want to navigate somewhere else!
|
||||
task = await resp.json();
|
||||
if (task.parent_task_id){
|
||||
router.navigate(`/task/${task.parent_task_id}/view`);
|
||||
} else router.navigate(`/task/${task.id}/view`);
|
||||
}
|
||||
yikes();
|
||||
} else {
|
||||
error(resp);
|
||||
@@ -130,119 +136,76 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{t('add_object',{object:t('task')})}</legend>
|
||||
<table {onkeydown}>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{t('name')}
|
||||
</th>
|
||||
<td>
|
||||
<input bind:value={task.name} autofocus>
|
||||
</td>
|
||||
</tr>
|
||||
{#if project}
|
||||
<tr>
|
||||
<th>
|
||||
{t('project')}
|
||||
</th>
|
||||
<td>
|
||||
{project.name}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{#if parent_task}
|
||||
<tr>
|
||||
<th>
|
||||
{t('parent_task')}
|
||||
</th>
|
||||
<td>
|
||||
{parent_task.name}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<div class="task grid2">
|
||||
<div>{t('name')}</div>
|
||||
<div>
|
||||
<input bind:value={task.name} autofocus>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
{t('description')}
|
||||
</th>
|
||||
<td>
|
||||
<MarkdownEditor bind:value={task.description} simple={true} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('tags')}
|
||||
</th>
|
||||
<td>
|
||||
<Tags module="task" bind:tags={task.tags} />
|
||||
</td>
|
||||
</tr>
|
||||
{#if extendedSettings}
|
||||
<tr>
|
||||
<th>
|
||||
{t('members')}
|
||||
</th>
|
||||
<td>
|
||||
<PermissionEditor members={task.members} {addMember} {getCandidates} {dropMember} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('estimated_time')}
|
||||
</th>
|
||||
<td>
|
||||
<input type="number" bind:value={task.est_time} /> {t('hours')}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('start_date')}
|
||||
</th>
|
||||
<td>
|
||||
<input type="date" bind:value={task.start_date} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('due_date')}
|
||||
</th>
|
||||
<td>
|
||||
<input type="date" bind:value={task.due_date} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('subtasks')}
|
||||
</th>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" bind:checked={task.show_closed} >
|
||||
{t('display_closed_tasks')}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{t('index_page')}
|
||||
</th>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" bind:checked={task.no_index} >
|
||||
{t('hide_on_index_page')}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{:else}
|
||||
<tr>
|
||||
<th>
|
||||
{t('extended_settings')}
|
||||
</th>
|
||||
<td>
|
||||
<button onclick={toggleSettings}>{t('show')}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
{#if project}
|
||||
<div>{t('project')}</div>
|
||||
<a href="/project/{project.id}/view">{project.name}</a>
|
||||
{/if}
|
||||
|
||||
{#if parent_task}
|
||||
<div>{t('parent_task')}</div>
|
||||
<div>{parent_task.name}</div>
|
||||
{/if}
|
||||
|
||||
<div>{t('description')}</div>
|
||||
<div>
|
||||
<MarkdownEditor bind:value={task.description} simple={true} store_id="task/add_to/{project_id}"/>
|
||||
</div>
|
||||
<div>{t('tags')}</div>
|
||||
<div>
|
||||
<Tags module="task" bind:tags={task.tags} />
|
||||
</div>
|
||||
|
||||
{#if extendedSettings}
|
||||
<div>{t('members')}</div>
|
||||
<div>
|
||||
<PermissionEditor members={task.members} {addMember} {dropMember} {getCandidates} />
|
||||
</div>
|
||||
|
||||
<div>{t('estimated_time')}</div>
|
||||
<div>
|
||||
<input type="number" bind:value={task.est_time} /> {t('hours')}
|
||||
</div>
|
||||
|
||||
<div>{t('start_date')}</div>
|
||||
<div>
|
||||
<input type="date" bind:value={task.start_date} />
|
||||
</div>
|
||||
|
||||
<div>{t('due_date')}</div>
|
||||
<div>
|
||||
<input type="date" bind:value={task.due_date} />
|
||||
</div>
|
||||
|
||||
<div>{t('subtasks')}</div>
|
||||
<div>
|
||||
<label>
|
||||
<input type="checkbox" bind:checked={task.show_closed} >
|
||||
{t('display_closed_tasks')}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{t('index_page')}
|
||||
</div>
|
||||
<label>
|
||||
<input type="checkbox" bind:checked={task.no_index} >
|
||||
{t('hide_on_index_page')}
|
||||
</label>
|
||||
{:else}
|
||||
<div>{t('extended_settings')}</div>
|
||||
<div>
|
||||
<button onclick={toggleSettings}>{t('show')}</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<button onclick={saveTask}>{t('save_object',{object:t('task')})}</button>
|
||||
</fieldset>
|
||||
{#if on_abort}
|
||||
<button onclick={on_abort}>{t('abort')}</button>
|
||||
{/if}
|
||||
</fieldset>
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
function onclick(evt) {
|
||||
ignore(evt);
|
||||
let task = getTask(evt);
|
||||
if (task.status == 20) { // open
|
||||
update(task,10);
|
||||
if (task.status <= 20) { // open
|
||||
update(task,60);
|
||||
} else update(task,20);
|
||||
return false;
|
||||
}
|
||||
@@ -153,7 +153,7 @@
|
||||
<legend>{t('state_complete')}</legend>
|
||||
{#if sorted}
|
||||
{#each sorted as task}
|
||||
{#if task.status < 20 && match(task)}
|
||||
{#if task.status > 20 && match(task)}
|
||||
<div href={`/task/${task.id}/view`} title={task.description.source} task_id={task.id} {onclick} {oncontextmenu} {ontouchstart} {ontouchend} onmousedown={ontouchstart} onmouseup={ontouchend} >
|
||||
{task.name}
|
||||
</div>
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
</div>
|
||||
{#if task.description}
|
||||
<div>{t('description')}</div>
|
||||
<MarkdownEditor bind:value={task.description} editable={true} onSet={val => update({description:val})} />
|
||||
<MarkdownEditor store_id="task/{task.id}/description" bind:value={task.description} editable={true} onSet={val => update({description:val})} />
|
||||
{/if}
|
||||
{#if !showSettings && task.start_date}
|
||||
<div>{t('start_date')}</div>
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
<div>{t('members')}</div>
|
||||
<div>
|
||||
<PermissionEditor members={task.members} {updatePermission} {addMember} {dropMember} {getCandidates} />
|
||||
<PermissionEditor members={task.members} {addMember} {dropMember} {getCandidates} {updatePermission} />
|
||||
</div>
|
||||
<div>{t('start_date')}</div>
|
||||
<div>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
});
|
||||
if (res.ok){
|
||||
yikes();
|
||||
localStorage.removeItem('wiki/new/content');
|
||||
router.navigate(`/wiki/${title}/view`);
|
||||
} else {
|
||||
error(res);
|
||||
@@ -60,7 +61,7 @@
|
||||
</label>
|
||||
<label>
|
||||
{t('content')}
|
||||
<Markdown bind:value={content} simple={true} />
|
||||
<Markdown bind:value={content} simple={true} store_id="wiki/new/content" />
|
||||
<button type="submit">{t('save')}</button>
|
||||
</label>
|
||||
</form>
|
||||
@@ -39,6 +39,6 @@
|
||||
|
||||
<h2>{lastLetter = page.charAt(0).toUpperCase()||page.charAt(0).toUpperCase()}</h2>
|
||||
{/if}
|
||||
<a class="wikilink" href={`/wiki/${page}/view`} {onclick} >{page}</a>
|
||||
<a class="wikilink" href={`/wiki/${encodeURIComponent(page)}/view`} {onclick} >{page}</a>
|
||||
{/each}
|
||||
{/if}
|
||||
@@ -188,7 +188,7 @@
|
||||
</table>
|
||||
{/if}
|
||||
{/if}
|
||||
<MarkdownEditor {editable} value={page.content} onSet={s => patch({content:s})} />
|
||||
<MarkdownEditor {editable} value={page.content} onSet={s => patch({content:s})} store_id="wiki/{page.id}/description" />
|
||||
<TagList module="wiki" id={page.id} user_list={Object.keys(page.members).map(id => +id)} />
|
||||
<div class="notes">
|
||||
<h3>{t('notes')}</h3>
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
"member": "Mitarbeiter",
|
||||
"members": "Mitarbeiter",
|
||||
"message": "Nachricht",
|
||||
"messages": "Benachrichtigungen",
|
||||
"messages": "Be­nach­rich­ti­gung­en",
|
||||
"miscellaneous_settings": "sonstige Einstellungen",
|
||||
"missing_new_item_id": "Alter Artikel-ID ({0}) wurde keine neue ID zugeordnet!",
|
||||
"mismatch": "ungleich",
|
||||
@@ -399,6 +399,7 @@
|
||||
"unit_price": "Preis/Einheit",
|
||||
"unknown_item_location": "Artikel {0} von {1} {2} ist verknüpft mit unbekanntem Lagerort {3}!",
|
||||
"unlink": "Trennen",
|
||||
"unsaved_content": "Hier klicken, um ungespeicherte Änderungen zu laden",
|
||||
"update": "aktualisieren",
|
||||
"UPDATE_USERS" : "Nutzer aktualisieren",
|
||||
"upload_file": "Datei hochladen",
|
||||
|
||||
@@ -399,6 +399,7 @@
|
||||
"unit_price": "price/unit",
|
||||
"unknown_item_location": "Item {0} of {1} {2} refers to location {3}, which is unknown!",
|
||||
"unlink": "unlink",
|
||||
"unsaved_content": "Click here to load unsaved changes",
|
||||
"update": "update",
|
||||
"UPDATE_USERS" : "update users",
|
||||
"upload_file": "upload file",
|
||||
|
||||
@@ -9,6 +9,7 @@ import static de.srsoftware.umbrella.core.ModuleRegistry.postBox;
|
||||
import static de.srsoftware.umbrella.core.ResponseCode.*;
|
||||
import static de.srsoftware.umbrella.core.ResponseCode.HTTP_SERVER_ERROR;
|
||||
import static de.srsoftware.umbrella.core.Util.*;
|
||||
import static de.srsoftware.umbrella.core.constants.Constants.CONFIG_SESSION_DURATION;
|
||||
import static de.srsoftware.umbrella.core.constants.Field.*;
|
||||
import static de.srsoftware.umbrella.core.constants.Field.PASSWORD;
|
||||
import static de.srsoftware.umbrella.core.constants.Field.REDIRECT;
|
||||
@@ -88,9 +89,14 @@ public class UserModule extends BaseHandler implements UserService {
|
||||
public UserModule(Configuration config) throws UmbrellaException {
|
||||
super();
|
||||
var dbFile = config.get(CONFIG_DATABASE).orElseThrow(() -> missingConfig(CONFIG_DATABASE));
|
||||
var sqlite = new SqliteDB(connect(dbFile));
|
||||
|
||||
// may be splitted in separate db files later
|
||||
logins = new SqliteDB(connect(dbFile));
|
||||
users = new SqliteDB(connect(dbFile));
|
||||
logins = sqlite;
|
||||
users = sqlite;
|
||||
|
||||
Optional<Number> sessionDuration = config.get(CONFIG_SESSION_DURATION);
|
||||
sessionDuration.ifPresent(users::setSessionDuration);
|
||||
ModuleRegistry.add(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,4 +41,6 @@ public interface UserDb {
|
||||
UmbrellaUser save(DbUser user) throws UmbrellaException;
|
||||
|
||||
Map<Long,DbUser> search(String key);
|
||||
|
||||
UserDb setSessionDuration(Number minutes);
|
||||
}
|
||||
|
||||
@@ -35,12 +35,14 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
public class SqliteDB extends BaseDb implements LoginServiceDb, UserDb {
|
||||
private static final System.Logger LOG = System.getLogger(SqliteDB.class.getSimpleName());
|
||||
private static Duration sessionDuration = DEFAULT_SESSION_DURATION;
|
||||
|
||||
public SqliteDB(Connection conn){
|
||||
super(conn);
|
||||
@@ -481,8 +483,15 @@ CREATE TABLE IF NOT EXISTS {0} (
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDb setSessionDuration(Number minutes) {
|
||||
LOG.log(INFO,"Session duration set to {} minutes",minutes);
|
||||
sessionDuration = Duration.ofMinutes(minutes.longValue());
|
||||
return this;
|
||||
}
|
||||
|
||||
public Instant then(){
|
||||
return LocalDateTime.now().plus(DEFAULT_SESSION_DURATION).toInstant(UTC);
|
||||
return LocalDateTime.now().plus(sessionDuration).toInstant(UTC);
|
||||
}
|
||||
|
||||
private ForeignLogin toForeignLogin(ResultSet rs) throws SQLException {
|
||||
|
||||
@@ -74,6 +74,10 @@ tr:hover .taglist .tag button {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.code{
|
||||
color: orangered;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: red;
|
||||
color: black;
|
||||
|
||||
@@ -45,7 +45,7 @@ fieldset[tabindex="0"]{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset[tabindex="0"]:focus-within{
|
||||
fieldset[tabindex="0"]:hover{
|
||||
max-height: unset;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,26 @@ td, tr{
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 14px;
|
||||
z-index: 200;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
padding: 40px 10px 10px;
|
||||
background: rgba(0,0,0,0.9);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.warn {
|
||||
padding: 5px;
|
||||
border-radius: 6px;
|
||||
@@ -122,16 +142,6 @@ td, tr{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.settings {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.project.list td:not(.actions){
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ tr:hover .taglist .tag button {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.code{
|
||||
color: chocolate;
|
||||
}
|
||||
|
||||
.em {
|
||||
background: rgba(255, 215, 0, 0.09);
|
||||
}
|
||||
|
||||
@@ -183,6 +183,17 @@ td, tr{
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
padding: 40px 10px 10px;
|
||||
background: rgba(0,0,0,0.9);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.warn {
|
||||
padding: 5px;
|
||||
border-radius: 6px;
|
||||
@@ -214,16 +225,6 @@ td, tr{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.settings {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.project.list td:not(.actions){
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@ tr:hover .taglist .tag button {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.code{
|
||||
color: black;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: red;
|
||||
color: black;
|
||||
|
||||
@@ -91,6 +91,26 @@ td, tr{
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 14px;
|
||||
z-index: 200;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
padding: 40px 10px 10px;
|
||||
background: rgba(255,255,255,0.9);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.warn {
|
||||
padding: 5px;
|
||||
border-radius: 6px;
|
||||
@@ -122,16 +142,6 @@ td, tr{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.settings {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.project.list td:not(.actions){
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -235,6 +245,7 @@ textarea{
|
||||
.message.settings label{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.message.settings td{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user