This commit is contained in:
beo3000 2026-02-23 09:52:55 +01:00
parent d63c75e551
commit 15fb01e2b1
5 changed files with 27 additions and 33 deletions

View File

@ -1 +1 @@
1.1.11
1.1.13

View File

@ -330,7 +330,7 @@
{#if metaOpen}
<div class="border-t border-[#444] px-5 pb-5 pt-3">
{#if isProject}
{@const meta = (context.meta ?? { status: '', owner: '', links: '' }) as ProjectMeta}
{@const meta = (context.meta ?? { status: '', owner: '' }) as ProjectMeta}
<div class="mb-2.5 flex flex-col">
<label class="mb-1 text-sm text-[#aaa]">Status:</label>
<input class="rounded border border-[#555] bg-[#111] px-2.5 py-1.5 text-[#ddd]"
@ -341,11 +341,6 @@
<input class="rounded border border-[#555] bg-[#111] px-2.5 py-1.5 text-[#ddd]"
value={meta.owner} onchange={(e) => updateMeta('owner', e.currentTarget.value)} />
</div>
<div class="mb-2.5 flex flex-col">
<label class="mb-1 text-sm text-[#aaa]">Links:</label>
<input class="rounded border border-[#555] bg-[#111] px-2.5 py-1.5 text-[#ddd]"
value={meta.links} onchange={(e) => updateMeta('links', e.currentTarget.value)} />
</div>
<div class="mb-2.5 flex flex-col">
<label class="mb-1 text-sm text-[#aaa]">Notizen:</label>
<EditableMarkdown

View File

@ -33,9 +33,9 @@
? [
...(isDailyLog
? []
: [{ id: "agenda", label: "Agenda / Eingabe" }]),
{ id: "journal", label: "Journal / Historie" },
{ id: "persons", label: "Personen (All)" },
: [{ id: "agenda", label: "Agenda" }]),
{ id: "journal", label: "Journal" },
{ id: "persons", label: "Personen" },
...(isDailyLog
? []
: [{ id: "snoozed", label: "Verschoben" }]),
@ -46,7 +46,7 @@
: [
{
id: "dashboard",
label: `Dashboard: ${context.name.replace(/^(Project |Person |Firma )/, "")}`,
label: context.name.replace(/^(Project |Person |Firma )/, ""),
},
...(isCompany
? [{ id: "company-persons", label: "Personen" }]
@ -58,15 +58,12 @@
);
</script>
<div
class="mb-5 mt-2.5 flex items-center gap-2.5 overflow-x-auto scrollbar-hide"
>
<div class="mb-4 mt-2 flex items-end gap-0 overflow-x-auto border-b border-[#3a3a3a] scrollbar-hide">
{#each tabs as tab}
<button
class="rounded border-none px-4 py-2 transition-colors {activeView ===
tab.id
? 'bg-[#444] text-white border-b-2 border-accent'
: 'bg-[#333] text-[#aaa] cursor-pointer hover:bg-[#3a3a3a]'}"
class="flex-shrink-0 px-3.5 py-2 text-sm font-medium transition-colors border-b-2 -mb-px {activeView === tab.id
? 'border-accent text-white'
: 'border-transparent text-[#888] hover:text-[#bbb] cursor-pointer'}"
onclick={() => onviewchange(tab.id)}
>
{tab.label}
@ -74,13 +71,11 @@
{/each}
{#if isMeeting && activeView === "agenda" && ontogglecompact}
<div class="ml-auto">
<button
class="rounded border border-[#555] bg-transparent px-2.5 py-1 text-sm text-[#ccc] hover:bg-[#333]"
onclick={ontogglecompact}
>
{compact ? "Alle aufklappen" : "Alle einklappen"}
</button>
</div>
<button
class="ml-auto flex-shrink-0 px-2.5 py-1.5 mb-0.5 text-xs text-[#777] hover:text-[#aaa] border border-[#444] rounded transition-colors"
onclick={ontogglecompact}
>
{compact ? "Aufklappen" : "Einklappen"}
</button>
{/if}
</div>

View File

@ -75,10 +75,13 @@ export async function reorderContext(id: string, direction: 'up' | 'down'): Prom
const idx = siblings.findIndex(c => c.id === id);
const swapIdx = direction === 'up' ? idx - 1 : idx + 1;
if (swapIdx < 0 || swapIdx >= siblings.length) return;
const other = siblings[swapIdx];
// Swap positions in the array, then write clean sequential sortOrder values
[siblings[idx], siblings[swapIdx]] = [siblings[swapIdx], siblings[idx]];
const ts = now();
await db.contexts.update(id, { sortOrder: other.sortOrder, updatedAt: ts, version: ctx.version + 1 });
await db.contexts.update(other.id, { sortOrder: ctx.sortOrder, updatedAt: ts, version: other.version + 1 });
for (let i = 0; i < siblings.length; i++) {
const s = siblings[i];
await db.contexts.update(s.id, { sortOrder: i, updatedAt: ts, version: s.version + 1 });
}
}
export async function findContextByMentionName(name: string, type: 'person' | 'project' | 'company'): Promise<AgendaContext | undefined> {
@ -502,10 +505,12 @@ export async function reorderNotebook(id: string, direction: 'up' | 'down'): Pro
const idx = siblings.findIndex(n => n.id === id);
const swapIdx = direction === 'up' ? idx - 1 : idx + 1;
if (swapIdx < 0 || swapIdx >= siblings.length) return;
const other = siblings[swapIdx];
[siblings[idx], siblings[swapIdx]] = [siblings[swapIdx], siblings[idx]];
const ts = now();
await db.notebooks.update(id, { sortOrder: other.sortOrder, updatedAt: ts, version: nb.version + 1 });
await db.notebooks.update(other.id, { sortOrder: nb.sortOrder, updatedAt: ts, version: other.version + 1 });
for (let i = 0; i < siblings.length; i++) {
const s = siblings[i];
await db.notebooks.update(s.id, { sortOrder: i, updatedAt: ts, version: s.version + 1 });
}
}
export async function softDeleteNotebook(id: string): Promise<void> {

View File

@ -22,7 +22,6 @@ export interface AgendaContext extends SyncEntity {
export interface ProjectMeta {
status: string;
owner: string;
links: string;
notes?: string;
}