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} {#if metaOpen}
<div class="border-t border-[#444] px-5 pb-5 pt-3"> <div class="border-t border-[#444] px-5 pb-5 pt-3">
{#if isProject} {#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"> <div class="mb-2.5 flex flex-col">
<label class="mb-1 text-sm text-[#aaa]">Status:</label> <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]" <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]" <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)} /> value={meta.owner} onchange={(e) => updateMeta('owner', e.currentTarget.value)} />
</div> </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"> <div class="mb-2.5 flex flex-col">
<label class="mb-1 text-sm text-[#aaa]">Notizen:</label> <label class="mb-1 text-sm text-[#aaa]">Notizen:</label>
<EditableMarkdown <EditableMarkdown

View File

@ -33,9 +33,9 @@
? [ ? [
...(isDailyLog ...(isDailyLog
? [] ? []
: [{ id: "agenda", label: "Agenda / Eingabe" }]), : [{ id: "agenda", label: "Agenda" }]),
{ id: "journal", label: "Journal / Historie" }, { id: "journal", label: "Journal" },
{ id: "persons", label: "Personen (All)" }, { id: "persons", label: "Personen" },
...(isDailyLog ...(isDailyLog
? [] ? []
: [{ id: "snoozed", label: "Verschoben" }]), : [{ id: "snoozed", label: "Verschoben" }]),
@ -46,7 +46,7 @@
: [ : [
{ {
id: "dashboard", id: "dashboard",
label: `Dashboard: ${context.name.replace(/^(Project |Person |Firma )/, "")}`, label: context.name.replace(/^(Project |Person |Firma )/, ""),
}, },
...(isCompany ...(isCompany
? [{ id: "company-persons", label: "Personen" }] ? [{ id: "company-persons", label: "Personen" }]
@ -58,15 +58,12 @@
); );
</script> </script>
<div <div class="mb-4 mt-2 flex items-end gap-0 overflow-x-auto border-b border-[#3a3a3a] scrollbar-hide">
class="mb-5 mt-2.5 flex items-center gap-2.5 overflow-x-auto scrollbar-hide"
>
{#each tabs as tab} {#each tabs as tab}
<button <button
class="rounded border-none px-4 py-2 transition-colors {activeView === class="flex-shrink-0 px-3.5 py-2 text-sm font-medium transition-colors border-b-2 -mb-px {activeView === tab.id
tab.id ? 'border-accent text-white'
? 'bg-[#444] text-white border-b-2 border-accent' : 'border-transparent text-[#888] hover:text-[#bbb] cursor-pointer'}"
: 'bg-[#333] text-[#aaa] cursor-pointer hover:bg-[#3a3a3a]'}"
onclick={() => onviewchange(tab.id)} onclick={() => onviewchange(tab.id)}
> >
{tab.label} {tab.label}
@ -74,13 +71,11 @@
{/each} {/each}
{#if isMeeting && activeView === "agenda" && ontogglecompact} {#if isMeeting && activeView === "agenda" && ontogglecompact}
<div class="ml-auto"> <button
<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"
class="rounded border border-[#555] bg-transparent px-2.5 py-1 text-sm text-[#ccc] hover:bg-[#333]" onclick={ontogglecompact}
onclick={ontogglecompact} >
> {compact ? "Aufklappen" : "Einklappen"}
{compact ? "Alle aufklappen" : "Alle einklappen"} </button>
</button>
</div>
{/if} {/if}
</div> </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 idx = siblings.findIndex(c => c.id === id);
const swapIdx = direction === 'up' ? idx - 1 : idx + 1; const swapIdx = direction === 'up' ? idx - 1 : idx + 1;
if (swapIdx < 0 || swapIdx >= siblings.length) return; 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(); const ts = now();
await db.contexts.update(id, { sortOrder: other.sortOrder, updatedAt: ts, version: ctx.version + 1 }); for (let i = 0; i < siblings.length; i++) {
await db.contexts.update(other.id, { sortOrder: ctx.sortOrder, updatedAt: ts, version: other.version + 1 }); 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> { 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 idx = siblings.findIndex(n => n.id === id);
const swapIdx = direction === 'up' ? idx - 1 : idx + 1; const swapIdx = direction === 'up' ? idx - 1 : idx + 1;
if (swapIdx < 0 || swapIdx >= siblings.length) return; if (swapIdx < 0 || swapIdx >= siblings.length) return;
const other = siblings[swapIdx]; [siblings[idx], siblings[swapIdx]] = [siblings[swapIdx], siblings[idx]];
const ts = now(); const ts = now();
await db.notebooks.update(id, { sortOrder: other.sortOrder, updatedAt: ts, version: nb.version + 1 }); for (let i = 0; i < siblings.length; i++) {
await db.notebooks.update(other.id, { sortOrder: nb.sortOrder, updatedAt: ts, version: other.version + 1 }); 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> { export async function softDeleteNotebook(id: string): Promise<void> {

View File

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