diff --git a/web/src/components/Settings/MyAccountSection.tsx b/web/src/components/Settings/MyAccountSection.tsx index b9bace93..efed1aeb 100644 --- a/web/src/components/Settings/MyAccountSection.tsx +++ b/web/src/components/Settings/MyAccountSection.tsx @@ -19,7 +19,7 @@ interface Props {} const MyAccountSection: React.FC = () => { const user = useAppSelector((state) => state.user.user as User); const [username, setUsername] = useState(user.name); - const openAPIRoute = `${window.location.origin}/h/${user.openId}/memo`; + const openAPIRoute = `${window.location.origin}/api/memo?openId=${user.openId}`; const handleUsernameChanged = (e: React.ChangeEvent) => { const nextUsername = e.target.value as string; @@ -100,7 +100,7 @@ const MyAccountSection: React.FC = () => {

Usage guide:

-
{`POST ${openAPIRoute}\nContent-type: application/json\n{\n  "content": "Hello, #memos ${window.location.origin}"\n}`}
+
{`POST ${openAPIRoute}\nContent-type: application/json\n{\n  "content": "Hello #memos from ${window.location.origin}"\n}`}
diff --git a/web/src/less/editor.less b/web/src/less/editor.less index 79e170d1..9f8b1b31 100644 --- a/web/src/less/editor.less +++ b/web/src/less/editor.less @@ -29,7 +29,7 @@ @apply flex flex-row justify-start items-center; > .action-btn { - @apply flex flex-row justify-start items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer opacity-60 hover:opacity-80 hover:bg-gray-300 hover:shadow; + @apply flex flex-row justify-start items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer opacity-60 hover:opacity-90 hover:bg-gray-300 hover:shadow; > .icon-img { @apply w-5 h-auto; @@ -49,7 +49,7 @@ } > .tag-list { - @apply hidden flex-col justify-start items-start absolute top-6 left-0 p-1 z-10 rounded w-32 max-h-52 overflow-auto bg-black; + @apply hidden flex-col justify-start items-start absolute top-6 left-0 mt-1 p-1 z-10 rounded w-32 max-h-52 overflow-auto bg-black; > span { @apply w-full text-white cursor-pointer rounded text-sm leading-6 px-2 hover:bg-gray-700; diff --git a/web/src/less/setting-dialog.less b/web/src/less/setting-dialog.less index 0361f5df..91262817 100644 --- a/web/src/less/setting-dialog.less +++ b/web/src/less/setting-dialog.less @@ -4,7 +4,7 @@ @apply px-4; > .dialog-container { - @apply w-176 max-w-full mb-8 p-0; + @apply w-180 max-w-full mb-8 p-0; > .dialog-content-container { .flex(column, flex-start, flex-start); @@ -38,7 +38,7 @@ } > .icon-text { - @apply text-base mr-1; + @apply text-base mr-2; } } } diff --git a/web/src/store/modules/memo.ts b/web/src/store/modules/memo.ts index 1e480825..278e52b3 100644 --- a/web/src/store/modules/memo.ts +++ b/web/src/store/modules/memo.ts @@ -15,13 +15,7 @@ const memoSlice = createSlice({ setMemos: (state, action: PayloadAction) => { return { ...state, - memos: action.payload, - }; - }, - setTags: (state, action: PayloadAction) => { - return { - ...state, - tags: action.payload, + memos: action.payload.filter((m) => m.rowStatus === "NORMAL").sort((a, b) => b.createdTs - a.createdTs), }; }, createMemo: (state, action: PayloadAction) => { @@ -33,16 +27,24 @@ const memoSlice = createSlice({ patchMemo: (state, action: PayloadAction>) => { return { ...state, - memos: state.memos.map((m) => { - if (m.id === action.payload.id) { - return { - ...m, - ...action.payload, - }; - } else { - return m; - } - }), + memos: state.memos + .map((memo) => { + if (memo.id === action.payload.id) { + return { + ...memo, + ...action.payload, + }; + } else { + return memo; + } + }) + .filter((memo) => memo.rowStatus === "NORMAL"), + }; + }, + setTags: (state, action: PayloadAction) => { + return { + ...state, + tags: action.payload, }; }, }, diff --git a/web/tailwind.config.js b/web/tailwind.config.js index abec876a..87c1a9c6 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -16,18 +16,12 @@ module.exports = { spacing: { 112: "28rem", 128: "32rem", - 168: "42rem", - 176: "44rem", - 200: "50rem", + 180: "45rem", }, zIndex: { 100: "100", 1000: "1000", }, - gridTemplateRows: { - 7: "repeat(7, minmax(0, 1fr))", - }, }, }, - plugins: [], };