From 3684460694f814988dcbf438e6ef13f396d5cec6 Mon Sep 17 00:00:00 2001 From: HPL-JesusCastro Date: Sat, 23 May 2026 01:41:25 +0800 Subject: [PATCH] named volume --- docker-compose.yml | 5 ++++- frontend/src/components/RichTextEditor.tsx | 2 +- frontend/src/index.css | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 99e70b0..7f3642e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,12 @@ services: ports: - "3000:3000" volumes: - - ./data:/app/data + - letters_data:/app/data environment: - APP_PASSWORD=${APP_PASSWORD} - JWT_SECRET=${JWT_SECRET} - DB_PATH=/app/data/letters.db restart: unless-stopped + +volumes: + letters_data: diff --git a/frontend/src/components/RichTextEditor.tsx b/frontend/src/components/RichTextEditor.tsx index bbf728c..196099d 100644 --- a/frontend/src/components/RichTextEditor.tsx +++ b/frontend/src/components/RichTextEditor.tsx @@ -110,7 +110,7 @@ export default function RichTextEditor({ content, onChange, placeholder }: Props float: left; height: 0; } - .tiptap img { max-width: 100%; border-radius: 8px; margin: 8px 0; } + .tiptap img { max-width: 75%; border-radius: 8px; margin: 12px auto; display: block; } .tiptap blockquote { border-left: 3px solid var(--accent); padding-left: 16px; diff --git a/frontend/src/index.css b/frontend/src/index.css index 5bb3ad4..45ae837 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -229,7 +229,7 @@ button { .letter-body p { margin-bottom: 1em; } .letter-body p:empty::after, .letter-body p:has(br:only-child)::after { content: "\00a0"; } -.letter-body img { max-width: 100%; border-radius: 8px; margin: 8px 0; } +.letter-body img { max-width: 75%; border-radius: 8px; margin: 12px auto; display: block; } .letter-body blockquote { border-left: 3px solid var(--accent); padding-left: 16px;