-
Notifications
You must be signed in to change notification settings - Fork 0
Social federation #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pr-8
Are you sure you want to change the base?
Conversation
…d document sync, and note sharing UI.
| import { Compartment } from "@codemirror/state"; | ||
| // ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // ... |
| $effect(() => { | ||
| if (editorView) { | ||
| editorView.dispatch({ | ||
| effects: extensionCompartment.reconfigure(extensions), | ||
| }); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work
| // ... existing imports ... | ||
| interface Props { | ||
| manager: LoroNoteManager | undefined; | ||
| notesList?: NoteOrFolder[]; | ||
| user: User | undefined; | ||
| handleOpenInHomeserver: (input: string | null) => void; | ||
| noteId: string; | ||
| noteTitle: string; | ||
| } | ||
| let { | ||
| manager, | ||
| notesList = [], | ||
| user, | ||
| handleOpenInHomeserver, | ||
| noteId, | ||
| noteTitle, | ||
| }: Props = $props(); | ||
| // ... (existing code) ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // ... existing imports ... | |
| interface Props { | |
| manager: LoroNoteManager | undefined; | |
| notesList?: NoteOrFolder[]; | |
| user: User | undefined; | |
| handleOpenInHomeserver: (input: string | null) => void; | |
| noteId: string; | |
| noteTitle: string; | |
| } | |
| let { | |
| manager, | |
| notesList = [], | |
| user, | |
| handleOpenInHomeserver, | |
| noteId, | |
| noteTitle, | |
| }: Props = $props(); | |
| // ... (existing code) ... |
| interface Props { | ||
| manager: LoroNoteManager | undefined; | ||
| notesList?: NoteOrFolder[]; | ||
| user: User | undefined; | ||
| } | ||
| let { manager, notesList = [], user }: Props = $props(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| interface Props { | |
| manager: LoroNoteManager | undefined; | |
| notesList?: NoteOrFolder[]; | |
| user: User | undefined; | |
| } | |
| let { manager, notesList = [], user }: Props = $props(); | |
| interface Props { | |
| manager: LoroNoteManager | undefined; | |
| notesList?: NoteOrFolder[]; | |
| user: User | undefined; | |
| handleOpenInHomeserver: (input: string | null) => void; | |
| noteId: string; | |
| noteTitle: string; | |
| } | |
| let { | |
| manager, | |
| notesList = [], | |
| user, | |
| handleOpenInHomeserver, | |
| noteId, | |
| noteTitle, | |
| }: Props = $props(); |
| $effect(() => { | ||
| if (manager !== undefined && user !== undefined) { | ||
| const ephemeral = new EphemeralStore(); | ||
| const undoManager = new UndoManager(manager.doc, {}); | ||
| loroExtensions = LoroExtensions( | ||
| manager.doc, | ||
| { | ||
| ephemeral, | ||
| user: { name: user.username, colorClassName: "bg-primary" }, | ||
| }, | ||
| undoManager, | ||
| LoroNoteManager.getTextFromDoc, | ||
| ); | ||
| return () => { | ||
| ephemeral.destroy(); | ||
| }; | ||
| } else { | ||
| loroExtensions = []; | ||
| return; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really need an effect tho?
src/lib/components/Sidebar.svelte
Outdated
| } | ||
| import ConfirmationModal from "./ConfirmationModal.svelte"; | ||
| // ... (Props definition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you kidding me?
| const redirectTo = url.searchParams.get("redirectTo") || "/"; | ||
| // Validate redirectTo to prevent open redirect attacks | ||
| const safeRedirect = redirectTo.startsWith("/") ? redirectTo : "/"; | ||
| throw redirect(302, safeRedirect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| throw redirect(302, safeRedirect); | |
| redirect(302, safeRedirect); |
| import { Database } from "bun:sqlite"; // or better, just use drizzle or direct sqlite driver if available | ||
| // Actually, I can rely on the app's db module if I run with vite-node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { Database } from "bun:sqlite"; // or better, just use drizzle or direct sqlite driver if available | |
| // Actually, I can rely on the app's db module if I run with vite-node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need all these? If yes, move them to scripts/.
| import { ed25519, x25519 } from "@noble/curves/ed25519.js"; | ||
| import { xchacha20poly1305 } from "@noble/ciphers/chacha.js"; | ||
| import { encodeBase64, decodeBase64 } from "@oslojs/encoding"; | ||
| import { hkdf } from "@noble/hashes/hkdf.js"; | ||
| import { sha256 } from "@noble/hashes/sha2.js"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use HPKE (#6)
…and display status in UI, enhancing SSE stream robustness for local and federated documents.
… and enhanced crypto utilities.
No description provided.