From 589b104671098646ecf3d46b2ea84f210786fbef Mon Sep 17 00:00:00 2001 From: boojack Date: Sun, 16 Jul 2023 13:48:10 +0800 Subject: [PATCH] chore: upgrade version to `v0.14.0` (#1970) * chore: upgrade version * chore: update * chore: update --- docs/api/memo.md | 2 +- server/version/version.go | 4 ++-- web/src/components/Empty.tsx | 2 +- web/src/components/MemoEditor/index.tsx | 9 ++----- web/src/components/MemoList.tsx | 2 +- web/src/pages/Auth.tsx | 32 +++++++++++++++---------- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/docs/api/memo.md b/docs/api/memo.md index b54d22f0..448ef489 100644 --- a/docs/api/memo.md +++ b/docs/api/memo.md @@ -13,7 +13,7 @@ POST /api/v1/memo "content": "Memo content", "visibility": "PUBLIC", "resourceIdList": [123, 456], - "relationList": [{ "relatedMemoId": 789, "type": "LINK" }] + "relationList": [{ "relatedMemoId": 789, "type": "REFERENCE" }] } ``` diff --git a/server/version/version.go b/server/version/version.go index b83b3a62..9d85b23e 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -9,10 +9,10 @@ import ( // Version is the service current released version. // Semantic versioning: https://semver.org/ -var Version = "0.13.2" +var Version = "0.14.0" // DevVersion is the service current development version. -var DevVersion = "0.13.2" +var DevVersion = "0.14.0" func GetCurrentVersion(mode string) string { if mode == "dev" || mode == "demo" { diff --git a/web/src/components/Empty.tsx b/web/src/components/Empty.tsx index 30e5b611..9a299f73 100644 --- a/web/src/components/Empty.tsx +++ b/web/src/components/Empty.tsx @@ -1,7 +1,7 @@ const Empty = () => { return (
- +
); }; diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 74bfbb86..ac87996e 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -7,8 +7,7 @@ import { getMatchedNodes } from "@/labs/marked"; import { upsertMemoResource } from "@/helpers/api"; import { TAB_SPACE_WIDTH, UNKNOWN_ID } from "@/helpers/consts"; import { useFilterStore, useGlobalStore, useMemoStore, useResourceStore, useTagStore, useUserStore } from "@/store/module"; -import storage from "@/helpers/storage"; -import { clearContentQueryParam, getContentQueryParam } from "@/helpers/utils"; +import { clearContentQueryParam } from "@/helpers/utils"; import Icon from "../Icon"; import Editor, { EditorRefActions } from "./Editor"; import showCreateResourceDialog from "../CreateResourceDialog"; @@ -21,10 +20,6 @@ import "@/less/memo-editor.less"; const listItemSymbolList = ["- [ ] ", "- [x] ", "- [X] ", "* ", "- "]; const emptyOlReg = /^(\d+)\. $/; -const getInitialContent = (): string => { - return getContentQueryParam() ?? storage.get(["editorContentCache"]).editorContentCache ?? ""; -}; - interface Props { className?: string; memoId?: MemoId; @@ -377,7 +372,7 @@ const MemoEditor = (props: Props) => { const editorConfig = useMemo( () => ({ className: `memo-editor`, - initialContent: getInitialContent(), + initialContent: "", placeholder: t("editor.placeholder"), fullscreen: state.fullscreen, onContentChange: handleContentChange, diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index 04b4261d..97f5d01e 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -164,7 +164,7 @@ const MemoList = () => {

{isComplete ? ( sortedMemos.length === 0 && ( -

+

{t("message.no-data")}

diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx index 8425bfd0..022f362d 100644 --- a/web/src/pages/Auth.tsx +++ b/web/src/pages/Auth.tsx @@ -158,19 +158,32 @@ const Auth = () => {
{actionBtnLoadingState.isLoading && } - {systemStatus?.allowSignUp && ( + {!systemStatus.host ? ( + + ) : ( <> - + / + + )} + - / )} -
+ {!systemStatus.host && ( +

+ {t("auth.host-tip")} +

+ )} {identityProviderList.length > 0 && ( <> {t("common.or")} @@ -190,11 +203,6 @@ const Auth = () => { )} - {!systemStatus?.host && ( -

- {t("auth.host-tip")} -

- )}