feat(workspace): image blocks via /bild (M2)
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m18s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m18s
- /bild (only in an empty bullet) turns the bullet into an inline picker: file, camera on phones, drag & drop, paste, or an https link the server copies. Esc/✕ restores the empty bullet; nothing is synced before the upload succeeded. - Photos are shrunk to 2048 px and stored as WebP (JPEG fallback); the re-encoding drops EXIF data such as the location. - Image block: loaded with the login as blob URL, click opens full screen, optional caption kept in the block content (). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
177fa49363
commit
e8fa14a4cb
8 files changed
+476
-4
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { mediaContent, parseMediaContent } from '../media';
|
||||
|
||||
describe('media content format', () => {
|
||||
it('round-trips captions, also with brackets and backslashes', () => {
|
||||
for (const caption of ['', 'Urlaub 2026', 'Plan [Entwurf]', 'C:\\Fotos\\x', 'zwei\nZeilen']) {
|
||||
const content = mediaContent('image', 'med_0123abcd', caption);
|
||||
expect(content.startsWith('');
|
||||
});
|
||||
|
||||
it('ignores anything that is not a media reference', () => {
|
||||
expect(parseMediaContent('')).toBeNull();
|
||||
expect(parseMediaContent('Text ')).toBeNull();
|
||||
expect(parseMediaContent('')).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user