feat: Labels-Feature vollständig entfernen (PROJ-9)
Backend: - internal/labelstore/ gelöscht (Store, Schema, CRUD) - internal/api/label_handlers.go gelöscht (alle Label-Routen) - internal/api/server.go: labels-Feld + SetLabels() entfernt - internal/api/search_handlers.go: label_id-Filter + Enrichment entfernt - internal/index/index.go: LabelID aus SearchRequest entfernt - internal/imapserver/server.go: labels-Feld + labelbasierte Mailboxen entfernt - cmd/archivmail/main.go: labelstore-Init + SetLabels() entfernt - cmd/archivmail/version.go: labelstore-Modul entfernt, index-Kommentar korrigiert Frontend: - LabelList.tsx, LabelPicker.tsx, LabelsTab.tsx gelöscht - src/lib/api/system.ts: MailLabel/LabelRule-Typen + alle Label-Funktionen entfernt - src/lib/api/index.ts: Label-Exports entfernt - src/app/search/page.tsx: LabelList + selectedLabelId State entfernt - src/app/mail/[id]/page.tsx: LabelPicker + Labels-State entfernt - src/app/admin/page.tsx: LabelsTab + alle Label-Handler/State entfernt Docs: - features/PROJ-9: Status auf Removed gesetzt - features/INDEX.md: PROJ-9 auf Removed gesetzt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4d1bdb6e8b
commit
fdb25cb16a
@@ -121,24 +121,6 @@ export interface SecurityAuditResult {
|
||||
run_at: string;
|
||||
}
|
||||
|
||||
export interface MailLabel {
|
||||
id: number;
|
||||
name: string;
|
||||
color: string;
|
||||
owner_id?: number;
|
||||
tenant_id: number;
|
||||
is_global: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface LabelRule {
|
||||
id: number;
|
||||
condition_field: "from_domain" | "source" | "subject_contains";
|
||||
condition_value: string;
|
||||
label_id: number;
|
||||
tenant_id: number;
|
||||
}
|
||||
|
||||
export interface CertInfo {
|
||||
exists: boolean;
|
||||
subject?: string;
|
||||
@@ -227,81 +209,6 @@ export async function fixSecurityIssue(action: string): Promise<{ message: strin
|
||||
});
|
||||
}
|
||||
|
||||
// ── Labels ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getLabels(): Promise<MailLabel[]> {
|
||||
return request<MailLabel[]>("/api/labels");
|
||||
}
|
||||
|
||||
export async function createLabel(name: string, color: string): Promise<MailLabel> {
|
||||
return request<MailLabel>("/api/labels", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ name, color }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateLabel(id: number, name: string, color: string): Promise<void> {
|
||||
return request<void>(`/api/labels/${id}`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify({ name, color }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function deleteLabel(id: number): Promise<void> {
|
||||
return request<void>(`/api/labels/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export async function assignLabel(emailId: string, labelId: number): Promise<void> {
|
||||
return request<void>(`/api/mails/${emailId}/labels`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ label_id: labelId }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function removeLabelFromEmail(emailId: string, labelId: number): Promise<void> {
|
||||
return request<void>(`/api/mails/${emailId}/labels/${labelId}`, {
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
|
||||
export async function getMailLabelIds(emailId: string): Promise<number[]> {
|
||||
return request<number[]>(`/api/mails/${emailId}/labels`);
|
||||
}
|
||||
|
||||
export async function createAdminLabel(name: string, color: string): Promise<MailLabel> {
|
||||
return request<MailLabel>("/api/admin/labels", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ name, color }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAdminLabels(): Promise<MailLabel[]> {
|
||||
return request<MailLabel[]>("/api/admin/labels");
|
||||
}
|
||||
|
||||
export async function deleteAdminLabel(id: number): Promise<void> {
|
||||
return request<void>(`/api/admin/labels/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export async function getLabelRules(): Promise<LabelRule[]> {
|
||||
return request<LabelRule[]>("/api/admin/label-rules");
|
||||
}
|
||||
|
||||
export async function createLabelRule(
|
||||
condition_field: string,
|
||||
condition_value: string,
|
||||
label_id: number
|
||||
): Promise<LabelRule> {
|
||||
return request<LabelRule>("/api/admin/label-rules", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ condition_field, condition_value, label_id }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function deleteLabelRule(id: number): Promise<void> {
|
||||
return request<void>(`/api/admin/label-rules/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
// ── Certificates ──────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getCertInfo(): Promise<CertInfo> {
|
||||
|
||||
Reference in New Issue
Block a user