Korrigiere IMAP-Ordner, MIME-Ansicht und die gemeinsamen Leser, damit große Postfächer, Notizen und verspätete Quellenantworten zuverlässig bleiben.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
34c4084a7c
commit
c29bd29f34
29 files changed
+2562
-410
No files matched your search
@@ -1,11 +1,17 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { api, documentToText, downloadFile, fetchExternal, markDirty, textToDocument } from "../api.js";
|
||||
import { MarkdownView } from "../markdown.jsx";
|
||||
import { stageFor } from "../sources/registry.jsx";
|
||||
import "../sources/builtin-views.jsx";
|
||||
import { NoteEditor } from "../notes.jsx";
|
||||
import { moduleFor } from "../sources/registry-core.js";
|
||||
import { Modal } from "./Modal.jsx";
|
||||
|
||||
function RegisteredNote(props) {
|
||||
const Stage = stageFor("note");
|
||||
return Stage ? <Stage {...props} /> : null;
|
||||
}
|
||||
|
||||
export function ErrorNote({ error }) {
|
||||
if (!error) return null;
|
||||
return <p className="error">{error}</p>;
|
||||
@@ -190,25 +196,7 @@ function Binding({ binding, context, canEdit, isOwner, onChange }) {
|
||||
</div>
|
||||
</header>
|
||||
<DateLine dates={dates} />
|
||||
{element.kind === "note" ? (
|
||||
editingNote && binding.rights.edit ? (
|
||||
<form onSubmit={saveNote} className="stack">
|
||||
<NoteEditor value={text} onChange={(value) => { setText(value); markDirty(true); }} />
|
||||
<p className="muted">Diese Änderung betrifft den gemeinsamen Inhalt der Notiz.</p>
|
||||
{notice ? <p className="notice">{notice}</p> : null}
|
||||
<div className="row">
|
||||
<button type="submit">Text speichern</button>
|
||||
<button type="button" className="quiet" onClick={() => { setText(documentToText(element.document)); setEditingNote(false); markDirty(false); }}>Abbrechen</button>
|
||||
</div>
|
||||
</form>
|
||||
) : (
|
||||
<div className="stack">
|
||||
{text.trim() ? <MarkdownView text={text} /> : <p className="muted">Die Notiz ist leer.</p>}
|
||||
{notice ? <p className="notice">{notice}</p> : null}
|
||||
{binding.rights.edit ? <button type="button" onClick={() => setEditingNote(true)}>Bearbeiten</button> : <p className="muted">In diesem Kontext nur lesbar.</p>}
|
||||
</div>
|
||||
)
|
||||
) : null}
|
||||
{element.kind === "note" ? <RegisteredNote element={element} context={context} binding={binding} onReload={onChange} /> : null}
|
||||
{element.kind === "file" && element.file ? (
|
||||
element.file.status === "active" ? (
|
||||
<button type="button" onClick={() => downloadFile(element.id, context, element.file.filename)}>
|
||||
|
||||
Reference in new issue
Block a user