Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: convert raw memo
email13684488ef57
diff --git a/web/src/less/memo-content.less b/web/src/less/memo-content.lessindex 71e9d0e93..cddf47a40 100644--- a/web/src/less/memo-content.less+++ b/web/src/less/memo-content.less@@ -2,70 +2,26 @@.memo-content-text {.flex(column, flex-start, flex-start);- width: 100%;- word-wrap: break-word;- word-break: break-word;- white-space: pre-wrap;+ @apply w-full whitespace-pre-wrap break-words;> p {- display: inline-block;- width: 100%;- height: auto;- margin-bottom: 4px;- font-size: 15px;- line-height: 24px;- min-height: 24px;- white-space: pre-wrap;+ @apply inline-block w-full h-auto mb-1 text-base leading-6 whitespace-pre-wrap;}.tag-span {- display: inline-block;- width: auto;- padding: 0 6px;- line-height: 24px;- font-size: 13px;- border: none;- border-radius: 4px;- color: @text-blue;- background-color: @bg-light-blue;- cursor: pointer;- vertical-align: bottom;-- &:hover {- background-color: @text-blue;- color: white;- }+ @apply inline-block w-auto px-2 text-sm leading-6 border-none rounded mr-1 cursor-pointer text-blue-600 bg-blue-50 hover:text-white hover:bg-blue-600;}.memo-link-text {- display: inline-block;- color: @text-blue;- font-weight: bold;- border-bottom: none;- text-decoration: none;- cursor: pointer;-- &:hover {- opacity: 0.8;- }+ @apply inline-block text-blue-600 cursor-pointer font-bold border-none no-underline hover:opacity-80;}.counter-block,.todo-block {- display: inline-block;- text-align: center;- width: 1.4rem;- @apply font-mono;+ @apply inline-block text-center w-6 font-mono;}pre {- width: 100%;- margin: 4px 0;- padding: 8px 12px;- border-radius: 4px;- font-size: 15px;- line-height: 1.5;- background-color: #f6f5f4;- white-space: pre-wrap;+ @apply w-full mt-1 py-2 px-3 rounded text-sm bg-gray-100 whitespace-pre-wrap;}}diff --git a/web/src/services/memoService.ts b/web/src/services/memoService.tsindex 578db3b3e..b0e73ab80 100644--- a/web/src/services/memoService.ts+++ b/web/src/services/memoService.ts@@ -17,9 +17,7 @@ class MemoService {}const data = await api.getMyMemos();- const memos: Model.Memo[] = data.map((m) => {- return this.convertResponseModelMemo(m);- });+ const memos: Model.Memo[] = data.map((m) => this.convertResponseModelMemo(m));appStore.dispatch({type: "SET_MEMOS",payload: {@@ -138,6 +136,7 @@ class MemoService {private convertResponseModelMemo(memo: Model.Memo): Model.Memo {return {...memo,+ id: String(memo.id),createdAt: utils.getDataStringWithTs(memo.createdTs),updatedAt: utils.getDataStringWithTs(memo.updatedTs),};