mirror of
https://github.com/usememos/memos.git
synced 2025-01-03 20:07:45 +03:00
fix: convert raw memo
This commit is contained in:
parent
b0d3b5c76e
commit
13684488ef
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user