diff --git a/frontend/package.json b/frontend/package.json
index e4ad600..c506c0d 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "homehub-frontend",
"private": true,
- "version": "0.5.4",
+ "version": "0.5.5",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/frontend/src/pages/NotesPage.tsx b/frontend/src/pages/NotesPage.tsx
index 5bce26b..9a58d51 100644
--- a/frontend/src/pages/NotesPage.tsx
+++ b/frontend/src/pages/NotesPage.tsx
@@ -17,10 +17,102 @@ const inputStyle: React.CSSProperties = {
fontSize: 13,
}
+const actionBtnStyle: React.CSSProperties = {
+ padding: '5px 10px',
+ borderRadius: 6,
+ border: '1px solid var(--bg-5)',
+ background: 'var(--bg-4)',
+ color: 'var(--ink-3)',
+ cursor: 'pointer',
+ fontSize: 13,
+ minHeight: 32,
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+}
+
function formatDate(iso: string) {
return new Date(iso).toLocaleDateString('fr-FR', { day: '2-digit', month: 'short', year: 'numeric' })
}
+// Formate le texte inline : **gras**, *italique*, `code`
+function inlineFmt(text: string): React.ReactNode {
+ const parts = text.split(/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/)
+ return (
+ <>
+ {parts.map((p, i) => {
+ if (p.startsWith('**') && p.endsWith('**')) return {p.slice(2, -2)}
+ if (p.startsWith('*') && p.endsWith('*')) return {p.slice(1, -1)}
+ if (p.startsWith('`') && p.endsWith('`')) return {p.slice(1, -1)}
+ return p || null
+ })}
+ >
+ )
+}
+
+// Renderer pseudo-markdown ligne par ligne
+function renderMarkdown(text: string): React.ReactNode {
+ const lines = text.split('\n')
+ const nodes: React.ReactNode[] = []
+ let i = 0
+ while (i < lines.length) {
+ const line = lines[i]
+ if (line.startsWith('```')) {
+ const lang = line.slice(3).trim()
+ const code: string[] = []
+ i++
+ while (i < lines.length && !lines[i].startsWith('```')) { code.push(lines[i]); i++ }
+ nodes.push(
+
+ {lang && {lang}}
+ {code.join('\n')}
+
+ )
+ } else if (line.startsWith('# ')) {
+ nodes.push(- {error} -
+{error}
)} - {/* Modal création */} {showForm && (Chargement…
+ {loading &&Chargement…
} + + {!loading && notes.length === 0 && ( +Aucune note
)} - {/* Mobile — liste chronologique */}Aucune note
- )} -Aucune note
- )} -