Dataset Viewer
Auto-converted to Parquet Duplicate
hash
stringlengths
40
40
date
stringdate
2021-12-09 07:53:20
2025-03-18 18:48:22
author
stringclasses
149 values
commit_message
stringlengths
9
91
is_merge
bool
1 class
git_diff
stringlengths
160
1.03M
type
stringclasses
15 values
masked_commit_message
stringlengths
4
84
2aa3795e501cb7940fb64ba63e9c82faf48c72a6
2024-11-29 19:43:41
Cheng
fix: search conditions affected by pull-to-refresh (#4159)
false
diff --git a/web/src/components/PagedMemoList/PagedMemoList.tsx b/web/src/components/PagedMemoList/PagedMemoList.tsx index 26d257ee1deca..110f34d330899 100644 --- a/web/src/components/PagedMemoList/PagedMemoList.tsx +++ b/web/src/components/PagedMemoList/PagedMemoList.tsx @@ -49,7 +49,7 @@ const PagedMemoList = (props: Props) => { memoList.reset(); setState((state) => ({ ...state, nextPageToken: "" })); fetchMoreMemos(""); - }, []); + }, [props.filter, props.pageSize]); useEffect(() => { refreshList();
fix
search conditions affected by pull-to-refresh (#4159)
98eb57b370095c2cec3d300c554df4574d1a38a3
2024-05-29 05:35:14
Michael
chore: update translation files (#3481)
false
diff --git a/web/src/locales/fr.json b/web/src/locales/fr.json index 775a93d4c996d..84ae1df45978f 100644 --- a/web/src/locales/fr.json +++ b/web/src/locales/fr.json @@ -115,8 +115,7 @@ "private": "Privé", "protected": "Accès aux membres", "public": "Public" - }, - "wrapping": "Enveloppe" + } }, "message": { "archived-successfully": "Archivé avec succès", diff --git a/web/src/locales/ja.json b/web/src/locales/ja.json index 079c9cc2e98bd..6d5661a791fbc 100644 --- a/web/src/locales/ja.json +++ b/web/src/locales/ja.json @@ -115,8 +115,7 @@ "private": "非公開", "protected": "メンバーに表示", "public": "公開メモ" - }, - "wrapping": "ラッピング" + } }, "message": { "archived-successfully": "アーカイブが完了しました", diff --git a/web/src/locales/mr.json b/web/src/locales/mr.json index f12fc28a2bada..061c625899fc6 100644 --- a/web/src/locales/mr.json +++ b/web/src/locales/mr.json @@ -115,8 +115,7 @@ "private": "खाजगी", "protected": "कार्यक्षेत्र", "public": "सार्वजनिक" - }, - "wrapping": "गुंडाळा" + } }, "message": { "archived-successfully": "यशस्वीरित्या संग्रहित केले", diff --git a/web/src/locales/pt-BR.json b/web/src/locales/pt-BR.json index 13b805c899aab..cb310c63cc8bb 100644 --- a/web/src/locales/pt-BR.json +++ b/web/src/locales/pt-BR.json @@ -115,8 +115,7 @@ "private": "Privado (eu)", "protected": "Protegido (membros)", "public": "Público (todos)" - }, - "wrapping": "Quebra" + } }, "message": { "archived-successfully": "Arquivado com êxito", diff --git a/web/src/locales/ru.json b/web/src/locales/ru.json index 3685093a8d8c2..9648d898ecead 100644 --- a/web/src/locales/ru.json +++ b/web/src/locales/ru.json @@ -112,8 +112,7 @@ "private": "Видно только вам", "protected": "Видно только пользователям", "public": "Видно всем" - }, - "wrapping": "Перенос" + } }, "message": { "archived-successfully": "Успешная архивация", diff --git a/web/src/locales/tr.json b/web/src/locales/tr.json index 7dd395a9b2aed..c1db78ea98a50 100644 --- a/web/src/locales/tr.json +++ b/web/src/locales/tr.json @@ -115,8 +115,7 @@ "private": "Sadece sizin için görünür", "protected": "Çalışma Alanı", "public": "Herkese açık" - }, - "wrapping": "Paketleme" + } }, "message": { "archived-successfully": "Başarıyla arşivlendi",
chore
update translation files (#3481)
b5d4b8eae8813cc46c1a1018eca16f60628f3fc3
2023-07-17 21:46:55
Ajay Kumbhare
fix: copy code button toast message (#1979)
false
diff --git a/web/src/labs/marked/parser/CodeBlock.tsx b/web/src/labs/marked/parser/CodeBlock.tsx index 1d522522a9cd5..29c87638ce2b8 100644 --- a/web/src/labs/marked/parser/CodeBlock.tsx +++ b/web/src/labs/marked/parser/CodeBlock.tsx @@ -2,10 +2,12 @@ import copy from "copy-to-clipboard"; import hljs from "highlight.js"; import { toast } from "react-hot-toast"; import { matcher } from "../matcher"; +import { useTranslate } from "@/utils/i18n"; export const CODE_BLOCK_REG = /^```(\S*?)\s([\s\S]*?)```/; const renderer = (rawStr: string) => { + const t = useTranslate(); const matchResult = matcher(rawStr, CODE_BLOCK_REG); if (!matchResult) { return <>{rawStr}</>; @@ -25,7 +27,7 @@ const renderer = (rawStr: string) => { const handleCopyButtonClick = () => { copy(matchResult[2]); - toast.success("Copy succeed"); + toast.success(t("message.succeed-copy-code")); }; return (
fix
copy code button toast message (#1979)
ca213437e92c9976b41ffcea217efb5914a82720
2024-09-21 17:32:47
Steven
feat: implement nesting lists
false
diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index 6d794c4a3b76c..91817b1f731e3 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -300,12 +300,16 @@ paths: type: integer format: int32 - name: pageToken - description: "A page token, received from a previous `ListMemos` call.\r\nProvide this to retrieve the subsequent page." + description: |- + A page token, received from a previous `ListMemos` call. + Provide this to retrieve the subsequent page. in: query required: false type: string - name: filter - description: "Filter is used to filter memos returned in the list.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\"" + description: |- + Filter is used to filter memos returned in the list. + Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false type: string @@ -480,7 +484,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: filter - description: "Filter is used to filter users returned in the list.\r\nFormat: \"username == 'frank'\"" + description: |- + Filter is used to filter users returned in the list. + Format: "username == 'frank'" in: query required: false type: string @@ -641,7 +647,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The resource name of the workspace setting.\r\nFormat: settings/{setting}" + description: |- + The resource name of the workspace setting. + Format: settings/{setting} in: path required: true type: string @@ -663,7 +671,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: setting.name - description: "name is the name of the setting.\r\nFormat: settings/{setting}" + description: |- + name is the name of the setting. + Format: settings/{setting} in: path required: true type: string @@ -699,7 +709,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: identityProvider.name - description: "The name of the identityProvider.\r\nFormat: identityProviders/{id}" + description: |- + The name of the identityProvider. + Format: identityProviders/{id} in: path required: true type: string @@ -737,7 +749,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: inbox.name - description: "The name of the inbox.\r\nFormat: inboxes/{id}" + description: |- + The name of the inbox. + Format: inboxes/{id} in: path required: true type: string @@ -781,7 +795,10 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: memo.name - description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id." + description: |- + The name of the memo. + Format: memos/{id} + id is the system generated id. in: path required: true type: string @@ -799,7 +816,9 @@ paths: $ref: '#/definitions/v1RowStatus' creator: type: string - title: "The name of the creator.\r\nFormat: users/{id}" + title: |- + The name of the creator. + Format: users/{id} createTime: type: string format: date-time @@ -852,7 +871,9 @@ paths: readOnly: true parent: type: string - title: "The name of the parent memo.\r\nFormat: memos/{id}" + title: |- + The name of the parent memo. + Format: memos/{id} readOnly: true snippet: type: string @@ -874,7 +895,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_1 - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -896,7 +919,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_1 - description: "The name of the identityProvider to delete.\r\nFormat: identityProviders/{id}" + description: |- + The name of the identityProvider to delete. + Format: identityProviders/{id} in: path required: true type: string @@ -918,7 +943,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_2 - description: "The name of the identityProvider to get.\r\nFormat: identityProviders/{id}" + description: |- + The name of the identityProvider to get. + Format: identityProviders/{id} in: path required: true type: string @@ -940,7 +967,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_2 - description: "The name of the inbox to delete.\r\nFormat: inboxes/{id}" + description: |- + The name of the inbox to delete. + Format: inboxes/{id} in: path required: true type: string @@ -962,7 +991,10 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_3 - description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." + description: |- + The name of the resource. + Format: resources/{id} + id is the system generated unique identifier. in: path required: true type: string @@ -984,7 +1016,10 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_3 - description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." + description: |- + The name of the resource. + Format: resources/{id} + id is the system generated unique identifier. in: path required: true type: string @@ -1006,7 +1041,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_4 - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1028,7 +1065,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_4 - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1050,7 +1089,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the activity.\r\nFormat: activities/{id}" + description: |- + The name of the activity. + Format: activities/{id} in: path required: true type: string @@ -1072,7 +1113,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1094,7 +1137,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1115,7 +1160,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1143,7 +1190,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1170,7 +1219,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1191,7 +1242,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1218,7 +1271,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to list all properties." + description: |- + The name of the memo. + Format: memos/{id}. Use "memos/-" to list all properties. in: path required: true type: string @@ -1241,7 +1296,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to rebuild all memos." + description: |- + The name of the memo. + Format: memos/{id}. Use "memos/-" to rebuild all memos. in: path required: true type: string @@ -1268,7 +1325,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1289,7 +1348,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1316,7 +1377,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1338,7 +1401,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1365,7 +1430,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1387,7 +1454,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the memo.\r\nFormat: memos/{id}" + description: |- + The name of the memo. + Format: memos/{id} in: path required: true type: string @@ -1414,7 +1483,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1436,13 +1507,17 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to list all tags." + description: |- + The parent, who owns the tags. + Format: memos/{id}. Use "memos/-" to list all tags. in: path required: true type: string pattern: memos/[^/]+ - name: filter - description: "Filter is used to filter memos.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\"" + description: |- + Filter is used to filter memos. + Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false type: string @@ -1464,7 +1539,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to delete all tags." + description: |- + The parent, who owns the tags. + Format: memos/{id}. Use "memos/-" to delete all tags. in: path required: true type: string @@ -1495,7 +1572,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to rename all tags." + description: |- + The parent, who owns the tags. + Format: memos/{id}. Use "memos/-" to rename all tags. in: path required: true type: string @@ -1522,7 +1601,10 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: resource.name - description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." + description: |- + The name of the resource. + Format: resources/{id} + id is the system generated unique identifier. in: path required: true type: string @@ -1554,7 +1636,9 @@ paths: format: int64 memo: type: string - title: "The related memo.\r\nFormat: memos/{id}" + title: |- + The related memo. + Format: memos/{id} tags: - ResourceService /api/v1/{setting.name}: @@ -1572,7 +1656,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: setting.name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1609,7 +1695,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: user.name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1663,7 +1751,9 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the user.\r\nFormat: users/{id}" + description: |- + The name of the user. + Format: users/{id} in: path required: true type: string @@ -1696,7 +1786,10 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." + description: |- + The name of the resource. + Format: resources/{id} + id is the system generated unique identifier. in: path required: true type: string @@ -1714,6 +1807,14 @@ paths: tags: - ResourceService definitions: + ListNodeKind: + type: string + enum: + - KIND_UNSPECIFIED + - ORDERED + - UNORDERED + - DESCRIPTION + default: KIND_UNSPECIFIED MemoServiceRebuildMemoPropertyBody: type: object MemoServiceRenameMemoTagBody: @@ -1883,7 +1984,9 @@ definitions: properties: name: type: string - title: "The name of the identityProvider.\r\nFormat: identityProviders/{id}" + title: |- + The name of the identityProvider. + Format: identityProviders/{id} type: $ref: '#/definitions/apiv1IdentityProviderType' title: @@ -1927,7 +2030,9 @@ definitions: properties: name: type: string - title: "The name of the user.\r\nFormat: users/{id}" + title: |- + The name of the user. + Format: users/{id} locale: type: string description: The preferred locale of the user. @@ -1971,7 +2076,10 @@ definitions: weekStartDayOffset: type: integer format: int32 - description: "week_start_day_offset is the week start day offset from Sunday.\r\n0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday\r\nDefault is Sunday." + description: |- + week_start_day_offset is the week start day offset from Sunday. + 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday + Default is Sunday. disallowChangeUsername: type: boolean description: disallow_change_username disallows changing username. @@ -2008,7 +2116,9 @@ definitions: properties: name: type: string - title: "name is the name of the setting.\r\nFormat: settings/{setting}" + title: |- + name is the name of the setting. + Format: settings/{setting} generalSetting: $ref: '#/definitions/apiv1WorkspaceGeneralSetting' storageSetting: @@ -2023,7 +2133,9 @@ definitions: description: storage_type is the storage type. filepathTemplate: type: string - title: "The template of file path.\r\ne.g. assets/{timestamp}_{filename}" + title: |- + The template of file path. + e.g. assets/{timestamp}_{filename} uploadSizeLimitMb: type: string format: int64 @@ -2182,7 +2294,9 @@ definitions: properties: name: type: string - title: "The name of the activity.\r\nFormat: activities/{id}" + title: |- + The name of the activity. + Format: activities/{id} creatorId: type: integer format: int32 @@ -2313,7 +2427,9 @@ definitions: properties: name: type: string - title: "The name of the inbox.\r\nFormat: inboxes/{id}" + title: |- + The name of the inbox. + Format: inboxes/{id} sender: type: string title: 'Format: users/{id}' @@ -2433,7 +2549,10 @@ definitions: additionalProperties: type: integer format: int32 - description: "tag_amounts is the amount of tags.\r\nkey is the tag name. e.g. \"tag1\".\r\nvalue is the amount of the tag." + description: |- + tag_amounts is the amount of tags. + key is the tag name. e.g. "tag1". + value is the amount of the tag. v1ListMemosResponse: type: object properties: @@ -2444,10 +2563,17 @@ definitions: $ref: '#/definitions/v1Memo' nextPageToken: type: string - description: "A token, which can be sent as `page_token` to retrieve the next page.\r\nIf this field is omitted, there are no subsequent pages." + description: |- + A token, which can be sent as `page_token` to retrieve the next page. + If this field is omitted, there are no subsequent pages. v1ListNode: type: object properties: + kind: + $ref: '#/definitions/ListNodeKind' + indent: + type: integer + format: int32 children: type: array items: @@ -2500,7 +2626,10 @@ definitions: properties: name: type: string - description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id." + description: |- + The name of the memo. + Format: memos/{id} + id is the system generated id. uid: type: string description: The user defined id of the memo. @@ -2508,7 +2637,9 @@ definitions: $ref: '#/definitions/v1RowStatus' creator: type: string - title: "The name of the creator.\r\nFormat: users/{id}" + title: |- + The name of the creator. + Format: users/{id} createTime: type: string format: date-time @@ -2561,7 +2692,9 @@ definitions: readOnly: true parent: type: string - title: "The name of the parent memo.\r\nFormat: memos/{id}" + title: |- + The name of the parent memo. + Format: memos/{id} readOnly: true snippet: type: string @@ -2586,7 +2719,9 @@ definitions: properties: name: type: string - title: "The name of the memo property.\r\nFormat: memos/{id}/properties/{property_id}" + title: |- + The name of the memo property. + Format: memos/{id}/properties/{property_id} property: $ref: '#/definitions/v1MemoProperty' readOnly: true @@ -2599,10 +2734,14 @@ definitions: properties: memo: type: string - title: "The name of memo.\r\nFormat: \"memos/{uid}\"" + title: |- + The name of memo. + Format: "memos/{uid}" relatedMemo: type: string - title: "The name of related memo.\r\nFormat: \"memos/{uid}\"" + title: |- + The name of related memo. + Format: "memos/{uid}" type: $ref: '#/definitions/v1MemoRelationType' v1MemoRelationType: @@ -2762,7 +2901,9 @@ definitions: format: int32 creator: type: string - title: "The name of the creator.\r\nFormat: users/{id}" + title: |- + The name of the creator. + Format: users/{id} contentId: type: string reactionType: @@ -2796,7 +2937,10 @@ definitions: properties: name: type: string - description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." + description: |- + The name of the resource. + Format: resources/{id} + id is the system generated unique identifier. uid: type: string description: The user defined id of the resource. @@ -2818,7 +2962,9 @@ definitions: format: int64 memo: type: string - title: "The related memo.\r\nFormat: memos/{id}" + title: |- + The related memo. + Format: memos/{id} v1RestoreMarkdownNodesRequest: type: object properties: @@ -2940,7 +3086,9 @@ definitions: properties: name: type: string - title: "The name of the user.\r\nFormat: users/{id}" + title: |- + The name of the user. + Format: users/{id} id: type: integer format: int32 @@ -3014,7 +3162,9 @@ definitions: properties: owner: type: string - title: "The name of instance owner.\r\nFormat: \"users/{id}\"" + title: |- + The name of instance owner. + Format: "users/{id}" version: type: string title: version is the current version of instance diff --git a/go.mod b/go.mod index 87ff783fee7bb..7580b8e72331b 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 - github.com/usememos/gomark v0.0.0-20240920000613-9640de1955cd + github.com/usememos/gomark v0.0.0-20240921115339-c9d3461efcd8 golang.org/x/crypto v0.27.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/mod v0.21.0 diff --git a/go.sum b/go.sum index 0ba747f6e2bca..88da3130d19ce 100644 --- a/go.sum +++ b/go.sum @@ -438,8 +438,8 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/usememos/gomark v0.0.0-20240920000613-9640de1955cd h1:tqBJ00an5/MWAu1pIFkyE9TCSIe1JYAhShJlVeveYgs= -github.com/usememos/gomark v0.0.0-20240920000613-9640de1955cd/go.mod h1:7CZRoYFQyyljzplOTeyODFR26O+wr0BbnpTWVLGfKJA= +github.com/usememos/gomark v0.0.0-20240921115339-c9d3461efcd8 h1:kutNP+XD8oiBzoJJER35fbVaphCeRhU1dKDjZ5eKT0M= +github.com/usememos/gomark v0.0.0-20240921115339-c9d3461efcd8/go.mod h1:7CZRoYFQyyljzplOTeyODFR26O+wr0BbnpTWVLGfKJA= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= diff --git a/proto/api/v1/markdown_service.proto b/proto/api/v1/markdown_service.proto index 28eaf27947001..cf29982ab45eb 100644 --- a/proto/api/v1/markdown_service.proto +++ b/proto/api/v1/markdown_service.proto @@ -173,7 +173,15 @@ message BlockquoteNode { } message ListNode { - repeated Node children = 1; + enum Kind { + KIND_UNSPECIFIED = 0; + ORDERED = 1; + UNORDERED = 2; + DESCRIPTION = 3; + } + Kind kind = 1; + int32 indent = 2; + repeated Node children = 3; } message OrderedListItemNode { diff --git a/proto/gen/api/v1/markdown_service.pb.go b/proto/gen/api/v1/markdown_service.pb.go index 24b8ee60935d0..2e532c4fd93ac 100644 --- a/proto/gen/api/v1/markdown_service.pb.go +++ b/proto/gen/api/v1/markdown_service.pb.go @@ -159,6 +159,58 @@ func (NodeType) EnumDescriptor() ([]byte, []int) { return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{0} } +type ListNode_Kind int32 + +const ( + ListNode_KIND_UNSPECIFIED ListNode_Kind = 0 + ListNode_ORDERED ListNode_Kind = 1 + ListNode_UNORDERED ListNode_Kind = 2 + ListNode_DESCRIPTION ListNode_Kind = 3 +) + +// Enum value maps for ListNode_Kind. +var ( + ListNode_Kind_name = map[int32]string{ + 0: "KIND_UNSPECIFIED", + 1: "ORDERED", + 2: "UNORDERED", + 3: "DESCRIPTION", + } + ListNode_Kind_value = map[string]int32{ + "KIND_UNSPECIFIED": 0, + "ORDERED": 1, + "UNORDERED": 2, + "DESCRIPTION": 3, + } +) + +func (x ListNode_Kind) Enum() *ListNode_Kind { + p := new(ListNode_Kind) + *p = x + return p +} + +func (x ListNode_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListNode_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_markdown_service_proto_enumTypes[1].Descriptor() +} + +func (ListNode_Kind) Type() protoreflect.EnumType { + return &file_api_v1_markdown_service_proto_enumTypes[1] +} + +func (x ListNode_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListNode_Kind.Descriptor instead. +func (ListNode_Kind) EnumDescriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{15, 0} +} + type ParseMarkdownRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1342,7 +1394,9 @@ type ListNode struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Children []*Node `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` + Kind ListNode_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=memos.api.v1.ListNode_Kind" json:"kind,omitempty"` + Indent int32 `protobuf:"varint,2,opt,name=indent,proto3" json:"indent,omitempty"` + Children []*Node `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` } func (x *ListNode) Reset() { @@ -1377,6 +1431,20 @@ func (*ListNode) Descriptor() ([]byte, []int) { return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{15} } +func (x *ListNode) GetKind() ListNode_Kind { + if x != nil { + return x.Kind + } + return ListNode_KIND_UNSPECIFIED +} + +func (x *ListNode) GetIndent() int32 { + if x != nil { + return x.Indent + } + return 0 +} + func (x *ListNode) GetChildren() []*Node { if x != nil { return x.Children @@ -2906,203 +2974,212 @@ var file_api_v1_markdown_service_proto_rawDesc = []byte{ 0x6b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3a, 0x0a, 0x08, 0x4c, 0x69, - 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x75, 0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x65, - 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x77, 0x0a, - 0x15, 0x55, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, - 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x4c, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xce, 0x01, 0x0a, 0x08, 0x4c, + 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x4b, 0x69, + 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, + 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, + 0x22, 0x49, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x49, 0x4e, 0x44, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, + 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, + 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x75, 0x0a, 0x13, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, + 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x22, 0x77, 0x0a, 0x15, 0x55, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x29, 0x0a, 0x0d, 0x4d, 0x61, 0x74, 0x68, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x2a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, - 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, - 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x1a, 0x2f, 0x0a, 0x03, 0x52, - 0x6f, 0x77, 0x12, 0x28, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x52, 0x0a, 0x13, - 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x22, 0x24, 0x0a, 0x08, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x08, 0x42, 0x6f, 0x6c, 0x64, 0x4e, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x0a, 0x49, 0x74, - 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x0e, 0x42, 0x6f, - 0x6c, 0x64, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x24, - 0x0a, 0x08, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x30, - 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x22, 0x40, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, 0x61, 0x77, 0x54, 0x65, - 0x78, 0x74, 0x22, 0x23, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x10, + 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x29, 0x0a, 0x0d, + 0x4d, 0x61, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6b, - 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x45, 0x73, 0x63, 0x61, 0x70, 0x69, - 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x24, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x68, 0x4e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, + 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, + 0x1a, 0x2f, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x28, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, + 0x73, 0x22, 0x52, 0x0a, 0x13, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x24, 0x0a, 0x08, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x08, 0x42, + 0x6f, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, + 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, + 0x3e, 0x0a, 0x0a, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x42, 0x0a, 0x0e, 0x42, 0x6f, 0x6c, 0x64, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, 0x08, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x09, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x5f, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x74, 0x54, 0x65, 0x78, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x22, 0x30, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x40, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x69, 0x6e, + 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x61, + 0x77, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x52, 0x61, 0x77, 0x54, 0x65, 0x78, 0x74, 0x22, 0x23, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x11, + 0x53, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x45, + 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x24, 0x0a, 0x08, + 0x4d, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x0d, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, - 0x0d, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, + 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x53, 0x75, 0x70, 0x65, 0x72, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x22, 0x54, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x53, 0x70, 0x6f, 0x69, 0x6c, 0x65, - 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, - 0xba, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x4d, 0x4c, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4d, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x48, 0x54, 0x4d, 0x4c, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, - 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x83, 0x04, 0x0a, - 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x4f, 0x44, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0e, 0x0a, 0x0a, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x52, 0x41, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x02, 0x12, 0x0e, - 0x0a, 0x0a, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x0b, - 0x0a, 0x07, 0x48, 0x45, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x48, - 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x10, 0x05, - 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x10, 0x06, - 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x10, - 0x08, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, - 0x49, 0x53, 0x54, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, - 0x53, 0x4b, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x10, 0x0a, 0x12, 0x0e, - 0x0a, 0x0a, 0x4d, 0x41, 0x54, 0x48, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x0b, 0x12, 0x09, - 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4d, 0x42, - 0x45, 0x44, 0x44, 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x12, - 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x33, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4c, - 0x44, 0x10, 0x34, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x54, 0x41, 0x4c, 0x49, 0x43, 0x10, 0x35, 0x12, - 0x0f, 0x0a, 0x0b, 0x42, 0x4f, 0x4c, 0x44, 0x5f, 0x49, 0x54, 0x41, 0x4c, 0x49, 0x43, 0x10, 0x36, - 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x37, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4d, - 0x41, 0x47, 0x45, 0x10, 0x38, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x39, 0x12, - 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x3a, 0x12, 0x07, - 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x3b, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x52, 0x49, 0x4b, - 0x45, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x10, 0x3c, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x53, - 0x43, 0x41, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, - 0x10, 0x3d, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x41, 0x54, 0x48, 0x10, 0x3e, 0x12, 0x0d, 0x0a, 0x09, - 0x48, 0x49, 0x47, 0x48, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x3f, 0x12, 0x0d, 0x0a, 0x09, 0x53, - 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x10, 0x40, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x55, - 0x50, 0x45, 0x52, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x10, 0x41, 0x12, 0x16, 0x0a, 0x12, 0x52, - 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, - 0x54, 0x10, 0x42, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x50, 0x4f, 0x49, 0x4c, 0x45, 0x52, 0x10, 0x43, - 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x54, 0x4d, 0x4c, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, - 0x10, 0x44, 0x32, 0xc7, 0x04, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, - 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x70, 0x61, - 0x72, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x6d, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x53, 0x75, 0x70, 0x65, + 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x54, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x53, + 0x70, 0x6f, 0x69, 0x6c, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x4d, 0x4c, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x4d, 0x4c, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x2a, 0x83, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x10, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x42, 0x52, 0x45, + 0x41, 0x4b, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x52, 0x41, 0x47, 0x52, 0x41, 0x50, + 0x48, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, + 0x55, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x51, 0x55, + 0x4f, 0x54, 0x45, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, + 0x15, 0x0a, 0x11, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, + 0x49, 0x54, 0x45, 0x4d, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, + 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x49, 0x54, 0x45, 0x4d, 0x10, 0x09, 0x12, + 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x49, 0x54, 0x45, + 0x4d, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x54, 0x48, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0c, 0x12, 0x14, + 0x0a, 0x10, 0x45, 0x4d, 0x42, 0x45, 0x44, 0x44, 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, + 0x4e, 0x54, 0x10, 0x0d, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x33, 0x12, 0x08, + 0x0a, 0x04, 0x42, 0x4f, 0x4c, 0x44, 0x10, 0x34, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x54, 0x41, 0x4c, + 0x49, 0x43, 0x10, 0x35, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x4f, 0x4c, 0x44, 0x5f, 0x49, 0x54, 0x41, + 0x4c, 0x49, 0x43, 0x10, 0x36, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x37, 0x12, + 0x09, 0x0a, 0x05, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x38, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, + 0x4e, 0x4b, 0x10, 0x39, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x4c, 0x49, 0x4e, + 0x4b, 0x10, 0x3a, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x3b, 0x12, 0x11, 0x0a, 0x0d, + 0x53, 0x54, 0x52, 0x49, 0x4b, 0x45, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x10, 0x3c, 0x12, + 0x16, 0x0a, 0x12, 0x45, 0x53, 0x43, 0x41, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x48, 0x41, 0x52, + 0x41, 0x43, 0x54, 0x45, 0x52, 0x10, 0x3d, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x41, 0x54, 0x48, 0x10, + 0x3e, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x49, 0x47, 0x48, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x3f, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x10, 0x40, 0x12, + 0x0f, 0x0a, 0x0b, 0x53, 0x55, 0x50, 0x45, 0x52, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x10, 0x41, + 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x44, 0x5f, 0x43, + 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x42, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x50, 0x4f, 0x49, + 0x4c, 0x45, 0x52, 0x10, 0x43, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x54, 0x4d, 0x4c, 0x5f, 0x45, 0x4c, + 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x44, 0x32, 0xc7, 0x04, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, + 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0d, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x22, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, + 0x22, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, + 0x77, 0x6e, 0x3a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, - 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x9f, 0x01, - 0x0a, 0x16, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x61, 0x72, 0x6b, 0x64, - 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, - 0x79, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x61, - 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x12, - 0x7b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x2f, 0x6c, - 0x69, 0x6e, 0x6b, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xac, 0x01, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x42, 0x14, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, - 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, + 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, + 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, + 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2b, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x69, 0x66, 0x79, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, + 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x69, 0x66, 0x79, 0x12, 0x7b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, + 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, + 0x6f, 0x77, 0x6e, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, + 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3117,114 +3194,116 @@ func file_api_v1_markdown_service_proto_rawDescGZIP() []byte { return file_api_v1_markdown_service_proto_rawDescData } -var file_api_v1_markdown_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_v1_markdown_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_api_v1_markdown_service_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_api_v1_markdown_service_proto_goTypes = []any{ (NodeType)(0), // 0: memos.api.v1.NodeType - (*ParseMarkdownRequest)(nil), // 1: memos.api.v1.ParseMarkdownRequest - (*ParseMarkdownResponse)(nil), // 2: memos.api.v1.ParseMarkdownResponse - (*RestoreMarkdownNodesRequest)(nil), // 3: memos.api.v1.RestoreMarkdownNodesRequest - (*RestoreMarkdownNodesResponse)(nil), // 4: memos.api.v1.RestoreMarkdownNodesResponse - (*StringifyMarkdownNodesRequest)(nil), // 5: memos.api.v1.StringifyMarkdownNodesRequest - (*StringifyMarkdownNodesResponse)(nil), // 6: memos.api.v1.StringifyMarkdownNodesResponse - (*GetLinkMetadataRequest)(nil), // 7: memos.api.v1.GetLinkMetadataRequest - (*LinkMetadata)(nil), // 8: memos.api.v1.LinkMetadata - (*Node)(nil), // 9: memos.api.v1.Node - (*LineBreakNode)(nil), // 10: memos.api.v1.LineBreakNode - (*ParagraphNode)(nil), // 11: memos.api.v1.ParagraphNode - (*CodeBlockNode)(nil), // 12: memos.api.v1.CodeBlockNode - (*HeadingNode)(nil), // 13: memos.api.v1.HeadingNode - (*HorizontalRuleNode)(nil), // 14: memos.api.v1.HorizontalRuleNode - (*BlockquoteNode)(nil), // 15: memos.api.v1.BlockquoteNode - (*ListNode)(nil), // 16: memos.api.v1.ListNode - (*OrderedListItemNode)(nil), // 17: memos.api.v1.OrderedListItemNode - (*UnorderedListItemNode)(nil), // 18: memos.api.v1.UnorderedListItemNode - (*TaskListItemNode)(nil), // 19: memos.api.v1.TaskListItemNode - (*MathBlockNode)(nil), // 20: memos.api.v1.MathBlockNode - (*TableNode)(nil), // 21: memos.api.v1.TableNode - (*EmbeddedContentNode)(nil), // 22: memos.api.v1.EmbeddedContentNode - (*TextNode)(nil), // 23: memos.api.v1.TextNode - (*BoldNode)(nil), // 24: memos.api.v1.BoldNode - (*ItalicNode)(nil), // 25: memos.api.v1.ItalicNode - (*BoldItalicNode)(nil), // 26: memos.api.v1.BoldItalicNode - (*CodeNode)(nil), // 27: memos.api.v1.CodeNode - (*ImageNode)(nil), // 28: memos.api.v1.ImageNode - (*LinkNode)(nil), // 29: memos.api.v1.LinkNode - (*AutoLinkNode)(nil), // 30: memos.api.v1.AutoLinkNode - (*TagNode)(nil), // 31: memos.api.v1.TagNode - (*StrikethroughNode)(nil), // 32: memos.api.v1.StrikethroughNode - (*EscapingCharacterNode)(nil), // 33: memos.api.v1.EscapingCharacterNode - (*MathNode)(nil), // 34: memos.api.v1.MathNode - (*HighlightNode)(nil), // 35: memos.api.v1.HighlightNode - (*SubscriptNode)(nil), // 36: memos.api.v1.SubscriptNode - (*SuperscriptNode)(nil), // 37: memos.api.v1.SuperscriptNode - (*ReferencedContentNode)(nil), // 38: memos.api.v1.ReferencedContentNode - (*SpoilerNode)(nil), // 39: memos.api.v1.SpoilerNode - (*HTMLElementNode)(nil), // 40: memos.api.v1.HTMLElementNode - (*TableNode_Row)(nil), // 41: memos.api.v1.TableNode.Row - nil, // 42: memos.api.v1.HTMLElementNode.AttributesEntry + (ListNode_Kind)(0), // 1: memos.api.v1.ListNode.Kind + (*ParseMarkdownRequest)(nil), // 2: memos.api.v1.ParseMarkdownRequest + (*ParseMarkdownResponse)(nil), // 3: memos.api.v1.ParseMarkdownResponse + (*RestoreMarkdownNodesRequest)(nil), // 4: memos.api.v1.RestoreMarkdownNodesRequest + (*RestoreMarkdownNodesResponse)(nil), // 5: memos.api.v1.RestoreMarkdownNodesResponse + (*StringifyMarkdownNodesRequest)(nil), // 6: memos.api.v1.StringifyMarkdownNodesRequest + (*StringifyMarkdownNodesResponse)(nil), // 7: memos.api.v1.StringifyMarkdownNodesResponse + (*GetLinkMetadataRequest)(nil), // 8: memos.api.v1.GetLinkMetadataRequest + (*LinkMetadata)(nil), // 9: memos.api.v1.LinkMetadata + (*Node)(nil), // 10: memos.api.v1.Node + (*LineBreakNode)(nil), // 11: memos.api.v1.LineBreakNode + (*ParagraphNode)(nil), // 12: memos.api.v1.ParagraphNode + (*CodeBlockNode)(nil), // 13: memos.api.v1.CodeBlockNode + (*HeadingNode)(nil), // 14: memos.api.v1.HeadingNode + (*HorizontalRuleNode)(nil), // 15: memos.api.v1.HorizontalRuleNode + (*BlockquoteNode)(nil), // 16: memos.api.v1.BlockquoteNode + (*ListNode)(nil), // 17: memos.api.v1.ListNode + (*OrderedListItemNode)(nil), // 18: memos.api.v1.OrderedListItemNode + (*UnorderedListItemNode)(nil), // 19: memos.api.v1.UnorderedListItemNode + (*TaskListItemNode)(nil), // 20: memos.api.v1.TaskListItemNode + (*MathBlockNode)(nil), // 21: memos.api.v1.MathBlockNode + (*TableNode)(nil), // 22: memos.api.v1.TableNode + (*EmbeddedContentNode)(nil), // 23: memos.api.v1.EmbeddedContentNode + (*TextNode)(nil), // 24: memos.api.v1.TextNode + (*BoldNode)(nil), // 25: memos.api.v1.BoldNode + (*ItalicNode)(nil), // 26: memos.api.v1.ItalicNode + (*BoldItalicNode)(nil), // 27: memos.api.v1.BoldItalicNode + (*CodeNode)(nil), // 28: memos.api.v1.CodeNode + (*ImageNode)(nil), // 29: memos.api.v1.ImageNode + (*LinkNode)(nil), // 30: memos.api.v1.LinkNode + (*AutoLinkNode)(nil), // 31: memos.api.v1.AutoLinkNode + (*TagNode)(nil), // 32: memos.api.v1.TagNode + (*StrikethroughNode)(nil), // 33: memos.api.v1.StrikethroughNode + (*EscapingCharacterNode)(nil), // 34: memos.api.v1.EscapingCharacterNode + (*MathNode)(nil), // 35: memos.api.v1.MathNode + (*HighlightNode)(nil), // 36: memos.api.v1.HighlightNode + (*SubscriptNode)(nil), // 37: memos.api.v1.SubscriptNode + (*SuperscriptNode)(nil), // 38: memos.api.v1.SuperscriptNode + (*ReferencedContentNode)(nil), // 39: memos.api.v1.ReferencedContentNode + (*SpoilerNode)(nil), // 40: memos.api.v1.SpoilerNode + (*HTMLElementNode)(nil), // 41: memos.api.v1.HTMLElementNode + (*TableNode_Row)(nil), // 42: memos.api.v1.TableNode.Row + nil, // 43: memos.api.v1.HTMLElementNode.AttributesEntry } var file_api_v1_markdown_service_proto_depIdxs = []int32{ - 9, // 0: memos.api.v1.ParseMarkdownResponse.nodes:type_name -> memos.api.v1.Node - 9, // 1: memos.api.v1.RestoreMarkdownNodesRequest.nodes:type_name -> memos.api.v1.Node - 9, // 2: memos.api.v1.StringifyMarkdownNodesRequest.nodes:type_name -> memos.api.v1.Node + 10, // 0: memos.api.v1.ParseMarkdownResponse.nodes:type_name -> memos.api.v1.Node + 10, // 1: memos.api.v1.RestoreMarkdownNodesRequest.nodes:type_name -> memos.api.v1.Node + 10, // 2: memos.api.v1.StringifyMarkdownNodesRequest.nodes:type_name -> memos.api.v1.Node 0, // 3: memos.api.v1.Node.type:type_name -> memos.api.v1.NodeType - 10, // 4: memos.api.v1.Node.line_break_node:type_name -> memos.api.v1.LineBreakNode - 11, // 5: memos.api.v1.Node.paragraph_node:type_name -> memos.api.v1.ParagraphNode - 12, // 6: memos.api.v1.Node.code_block_node:type_name -> memos.api.v1.CodeBlockNode - 13, // 7: memos.api.v1.Node.heading_node:type_name -> memos.api.v1.HeadingNode - 14, // 8: memos.api.v1.Node.horizontal_rule_node:type_name -> memos.api.v1.HorizontalRuleNode - 15, // 9: memos.api.v1.Node.blockquote_node:type_name -> memos.api.v1.BlockquoteNode - 16, // 10: memos.api.v1.Node.list_node:type_name -> memos.api.v1.ListNode - 17, // 11: memos.api.v1.Node.ordered_list_item_node:type_name -> memos.api.v1.OrderedListItemNode - 18, // 12: memos.api.v1.Node.unordered_list_item_node:type_name -> memos.api.v1.UnorderedListItemNode - 19, // 13: memos.api.v1.Node.task_list_item_node:type_name -> memos.api.v1.TaskListItemNode - 20, // 14: memos.api.v1.Node.math_block_node:type_name -> memos.api.v1.MathBlockNode - 21, // 15: memos.api.v1.Node.table_node:type_name -> memos.api.v1.TableNode - 22, // 16: memos.api.v1.Node.embedded_content_node:type_name -> memos.api.v1.EmbeddedContentNode - 23, // 17: memos.api.v1.Node.text_node:type_name -> memos.api.v1.TextNode - 24, // 18: memos.api.v1.Node.bold_node:type_name -> memos.api.v1.BoldNode - 25, // 19: memos.api.v1.Node.italic_node:type_name -> memos.api.v1.ItalicNode - 26, // 20: memos.api.v1.Node.bold_italic_node:type_name -> memos.api.v1.BoldItalicNode - 27, // 21: memos.api.v1.Node.code_node:type_name -> memos.api.v1.CodeNode - 28, // 22: memos.api.v1.Node.image_node:type_name -> memos.api.v1.ImageNode - 29, // 23: memos.api.v1.Node.link_node:type_name -> memos.api.v1.LinkNode - 30, // 24: memos.api.v1.Node.auto_link_node:type_name -> memos.api.v1.AutoLinkNode - 31, // 25: memos.api.v1.Node.tag_node:type_name -> memos.api.v1.TagNode - 32, // 26: memos.api.v1.Node.strikethrough_node:type_name -> memos.api.v1.StrikethroughNode - 33, // 27: memos.api.v1.Node.escaping_character_node:type_name -> memos.api.v1.EscapingCharacterNode - 34, // 28: memos.api.v1.Node.math_node:type_name -> memos.api.v1.MathNode - 35, // 29: memos.api.v1.Node.highlight_node:type_name -> memos.api.v1.HighlightNode - 36, // 30: memos.api.v1.Node.subscript_node:type_name -> memos.api.v1.SubscriptNode - 37, // 31: memos.api.v1.Node.superscript_node:type_name -> memos.api.v1.SuperscriptNode - 38, // 32: memos.api.v1.Node.referenced_content_node:type_name -> memos.api.v1.ReferencedContentNode - 39, // 33: memos.api.v1.Node.spoiler_node:type_name -> memos.api.v1.SpoilerNode - 40, // 34: memos.api.v1.Node.html_element_node:type_name -> memos.api.v1.HTMLElementNode - 9, // 35: memos.api.v1.ParagraphNode.children:type_name -> memos.api.v1.Node - 9, // 36: memos.api.v1.HeadingNode.children:type_name -> memos.api.v1.Node - 9, // 37: memos.api.v1.BlockquoteNode.children:type_name -> memos.api.v1.Node - 9, // 38: memos.api.v1.ListNode.children:type_name -> memos.api.v1.Node - 9, // 39: memos.api.v1.OrderedListItemNode.children:type_name -> memos.api.v1.Node - 9, // 40: memos.api.v1.UnorderedListItemNode.children:type_name -> memos.api.v1.Node - 9, // 41: memos.api.v1.TaskListItemNode.children:type_name -> memos.api.v1.Node - 9, // 42: memos.api.v1.TableNode.header:type_name -> memos.api.v1.Node - 41, // 43: memos.api.v1.TableNode.rows:type_name -> memos.api.v1.TableNode.Row - 9, // 44: memos.api.v1.BoldNode.children:type_name -> memos.api.v1.Node - 42, // 45: memos.api.v1.HTMLElementNode.attributes:type_name -> memos.api.v1.HTMLElementNode.AttributesEntry - 9, // 46: memos.api.v1.TableNode.Row.cells:type_name -> memos.api.v1.Node - 1, // 47: memos.api.v1.MarkdownService.ParseMarkdown:input_type -> memos.api.v1.ParseMarkdownRequest - 3, // 48: memos.api.v1.MarkdownService.RestoreMarkdownNodes:input_type -> memos.api.v1.RestoreMarkdownNodesRequest - 5, // 49: memos.api.v1.MarkdownService.StringifyMarkdownNodes:input_type -> memos.api.v1.StringifyMarkdownNodesRequest - 7, // 50: memos.api.v1.MarkdownService.GetLinkMetadata:input_type -> memos.api.v1.GetLinkMetadataRequest - 2, // 51: memos.api.v1.MarkdownService.ParseMarkdown:output_type -> memos.api.v1.ParseMarkdownResponse - 4, // 52: memos.api.v1.MarkdownService.RestoreMarkdownNodes:output_type -> memos.api.v1.RestoreMarkdownNodesResponse - 6, // 53: memos.api.v1.MarkdownService.StringifyMarkdownNodes:output_type -> memos.api.v1.StringifyMarkdownNodesResponse - 8, // 54: memos.api.v1.MarkdownService.GetLinkMetadata:output_type -> memos.api.v1.LinkMetadata - 51, // [51:55] is the sub-list for method output_type - 47, // [47:51] is the sub-list for method input_type - 47, // [47:47] is the sub-list for extension type_name - 47, // [47:47] is the sub-list for extension extendee - 0, // [0:47] is the sub-list for field type_name + 11, // 4: memos.api.v1.Node.line_break_node:type_name -> memos.api.v1.LineBreakNode + 12, // 5: memos.api.v1.Node.paragraph_node:type_name -> memos.api.v1.ParagraphNode + 13, // 6: memos.api.v1.Node.code_block_node:type_name -> memos.api.v1.CodeBlockNode + 14, // 7: memos.api.v1.Node.heading_node:type_name -> memos.api.v1.HeadingNode + 15, // 8: memos.api.v1.Node.horizontal_rule_node:type_name -> memos.api.v1.HorizontalRuleNode + 16, // 9: memos.api.v1.Node.blockquote_node:type_name -> memos.api.v1.BlockquoteNode + 17, // 10: memos.api.v1.Node.list_node:type_name -> memos.api.v1.ListNode + 18, // 11: memos.api.v1.Node.ordered_list_item_node:type_name -> memos.api.v1.OrderedListItemNode + 19, // 12: memos.api.v1.Node.unordered_list_item_node:type_name -> memos.api.v1.UnorderedListItemNode + 20, // 13: memos.api.v1.Node.task_list_item_node:type_name -> memos.api.v1.TaskListItemNode + 21, // 14: memos.api.v1.Node.math_block_node:type_name -> memos.api.v1.MathBlockNode + 22, // 15: memos.api.v1.Node.table_node:type_name -> memos.api.v1.TableNode + 23, // 16: memos.api.v1.Node.embedded_content_node:type_name -> memos.api.v1.EmbeddedContentNode + 24, // 17: memos.api.v1.Node.text_node:type_name -> memos.api.v1.TextNode + 25, // 18: memos.api.v1.Node.bold_node:type_name -> memos.api.v1.BoldNode + 26, // 19: memos.api.v1.Node.italic_node:type_name -> memos.api.v1.ItalicNode + 27, // 20: memos.api.v1.Node.bold_italic_node:type_name -> memos.api.v1.BoldItalicNode + 28, // 21: memos.api.v1.Node.code_node:type_name -> memos.api.v1.CodeNode + 29, // 22: memos.api.v1.Node.image_node:type_name -> memos.api.v1.ImageNode + 30, // 23: memos.api.v1.Node.link_node:type_name -> memos.api.v1.LinkNode + 31, // 24: memos.api.v1.Node.auto_link_node:type_name -> memos.api.v1.AutoLinkNode + 32, // 25: memos.api.v1.Node.tag_node:type_name -> memos.api.v1.TagNode + 33, // 26: memos.api.v1.Node.strikethrough_node:type_name -> memos.api.v1.StrikethroughNode + 34, // 27: memos.api.v1.Node.escaping_character_node:type_name -> memos.api.v1.EscapingCharacterNode + 35, // 28: memos.api.v1.Node.math_node:type_name -> memos.api.v1.MathNode + 36, // 29: memos.api.v1.Node.highlight_node:type_name -> memos.api.v1.HighlightNode + 37, // 30: memos.api.v1.Node.subscript_node:type_name -> memos.api.v1.SubscriptNode + 38, // 31: memos.api.v1.Node.superscript_node:type_name -> memos.api.v1.SuperscriptNode + 39, // 32: memos.api.v1.Node.referenced_content_node:type_name -> memos.api.v1.ReferencedContentNode + 40, // 33: memos.api.v1.Node.spoiler_node:type_name -> memos.api.v1.SpoilerNode + 41, // 34: memos.api.v1.Node.html_element_node:type_name -> memos.api.v1.HTMLElementNode + 10, // 35: memos.api.v1.ParagraphNode.children:type_name -> memos.api.v1.Node + 10, // 36: memos.api.v1.HeadingNode.children:type_name -> memos.api.v1.Node + 10, // 37: memos.api.v1.BlockquoteNode.children:type_name -> memos.api.v1.Node + 1, // 38: memos.api.v1.ListNode.kind:type_name -> memos.api.v1.ListNode.Kind + 10, // 39: memos.api.v1.ListNode.children:type_name -> memos.api.v1.Node + 10, // 40: memos.api.v1.OrderedListItemNode.children:type_name -> memos.api.v1.Node + 10, // 41: memos.api.v1.UnorderedListItemNode.children:type_name -> memos.api.v1.Node + 10, // 42: memos.api.v1.TaskListItemNode.children:type_name -> memos.api.v1.Node + 10, // 43: memos.api.v1.TableNode.header:type_name -> memos.api.v1.Node + 42, // 44: memos.api.v1.TableNode.rows:type_name -> memos.api.v1.TableNode.Row + 10, // 45: memos.api.v1.BoldNode.children:type_name -> memos.api.v1.Node + 43, // 46: memos.api.v1.HTMLElementNode.attributes:type_name -> memos.api.v1.HTMLElementNode.AttributesEntry + 10, // 47: memos.api.v1.TableNode.Row.cells:type_name -> memos.api.v1.Node + 2, // 48: memos.api.v1.MarkdownService.ParseMarkdown:input_type -> memos.api.v1.ParseMarkdownRequest + 4, // 49: memos.api.v1.MarkdownService.RestoreMarkdownNodes:input_type -> memos.api.v1.RestoreMarkdownNodesRequest + 6, // 50: memos.api.v1.MarkdownService.StringifyMarkdownNodes:input_type -> memos.api.v1.StringifyMarkdownNodesRequest + 8, // 51: memos.api.v1.MarkdownService.GetLinkMetadata:input_type -> memos.api.v1.GetLinkMetadataRequest + 3, // 52: memos.api.v1.MarkdownService.ParseMarkdown:output_type -> memos.api.v1.ParseMarkdownResponse + 5, // 53: memos.api.v1.MarkdownService.RestoreMarkdownNodes:output_type -> memos.api.v1.RestoreMarkdownNodesResponse + 7, // 54: memos.api.v1.MarkdownService.StringifyMarkdownNodes:output_type -> memos.api.v1.StringifyMarkdownNodesResponse + 9, // 55: memos.api.v1.MarkdownService.GetLinkMetadata:output_type -> memos.api.v1.LinkMetadata + 52, // [52:56] is the sub-list for method output_type + 48, // [48:52] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name } func init() { file_api_v1_markdown_service_proto_init() } @@ -3764,7 +3843,7 @@ func file_api_v1_markdown_service_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_markdown_service_proto_rawDesc, - NumEnums: 1, + NumEnums: 2, NumMessages: 42, NumExtensions: 0, NumServices: 1, diff --git a/server/router/api/v1/markdown_service.go b/server/router/api/v1/markdown_service.go index bd1e2ab9ce661..084178aa0d16a 100644 --- a/server/router/api/v1/markdown_service.go +++ b/server/router/api/v1/markdown_service.go @@ -77,7 +77,7 @@ func convertFromASTNode(rawNode ast.Node) *v1pb.Node { node.Node = &v1pb.Node_BlockquoteNode{BlockquoteNode: &v1pb.BlockquoteNode{Children: children}} case *ast.List: children := convertFromASTNodes(n.Children) - node.Node = &v1pb.Node_ListNode{ListNode: &v1pb.ListNode{Children: children}} + node.Node = &v1pb.Node_ListNode{ListNode: &v1pb.ListNode{Kind: convertListKindFromASTNode(n.Kind), Indent: int32(n.Indent), Children: children}} case *ast.OrderedListItem: children := convertFromASTNodes(n.Children) node.Node = &v1pb.Node_OrderedListItemNode{OrderedListItemNode: &v1pb.OrderedListItemNode{Number: n.Number, Indent: int32(n.Indent), Children: children}} @@ -156,6 +156,19 @@ func convertTableFromASTNode(node *ast.Table) *v1pb.TableNode { return table } +func convertListKindFromASTNode(node ast.ListKind) v1pb.ListNode_Kind { + switch node { + case ast.OrderedList: + return v1pb.ListNode_ORDERED + case ast.UnorderedList: + return v1pb.ListNode_UNORDERED + case ast.DescrpitionList: + return v1pb.ListNode_DESCRIPTION + default: + return v1pb.ListNode_KIND_UNSPECIFIED + } +} + func convertToASTNode(node *v1pb.Node) ast.Node { switch n := node.Node.(type) { case *v1pb.Node_LineBreakNode: @@ -175,7 +188,7 @@ func convertToASTNode(node *v1pb.Node) ast.Node { return &ast.Blockquote{Children: children} case *v1pb.Node_ListNode: children := convertToASTNodes(n.ListNode.Children) - return &ast.List{Children: children} + return &ast.List{Kind: convertListKindToASTNode(n.ListNode.Kind), Indent: int(n.ListNode.Indent), Children: children} case *v1pb.Node_OrderedListItemNode: children := convertToASTNodes(n.OrderedListItemNode.Children) return &ast.OrderedListItem{Number: n.OrderedListItemNode.Number, Indent: int(n.OrderedListItemNode.Indent), Children: children} @@ -252,3 +265,17 @@ func convertTableToASTNode(node *v1pb.TableNode) *ast.Table { } return table } + +func convertListKindToASTNode(kind v1pb.ListNode_Kind) ast.ListKind { + switch kind { + case v1pb.ListNode_ORDERED: + return ast.OrderedList + case v1pb.ListNode_UNORDERED: + return ast.UnorderedList + case v1pb.ListNode_DESCRIPTION: + return ast.DescrpitionList + default: + // Default to description list. + return ast.DescrpitionList + } +} diff --git a/web/src/components/MemoContent/List.tsx b/web/src/components/MemoContent/List.tsx index 2c06b239e16df..7e7a9ba2fb5ad 100644 --- a/web/src/components/MemoContent/List.tsx +++ b/web/src/components/MemoContent/List.tsx @@ -1,28 +1,50 @@ -import { Node, NodeType } from "@/types/proto/api/v1/markdown_service"; +import clsx from "clsx"; +import React from "react"; +import { ListNode_Kind, Node, NodeType } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; interface Props { index: string; + kind: ListNode_Kind; + indent: number; children: Node[]; } -const List: React.FC<Props> = ({ children }: Props) => { +const List: React.FC<Props> = ({ kind, indent, children }: Props) => { let prevNode: Node | null = null; let skipNextLineBreakFlag = false; - return ( - <dl> - {children.map((child, index) => { - if (prevNode?.type !== NodeType.LINE_BREAK && child.type === NodeType.LINE_BREAK && skipNextLineBreakFlag) { - skipNextLineBreakFlag = false; - return null; - } + const getListContainer = (kind: ListNode_Kind) => { + switch (kind) { + case ListNode_Kind.ORDERED: + return "ol"; + case ListNode_Kind.UNORDERED: + return "ul"; + case ListNode_Kind.DESCRIPTION: + return "dl"; + default: + return "div"; + } + }; - prevNode = child; - skipNextLineBreakFlag = true; - return <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} />; - })} - </dl> + return React.createElement( + getListContainer(kind), + { + className: clsx( + `list-inside ${kind === ListNode_Kind.ORDERED ? "list-decimal" : kind === ListNode_Kind.UNORDERED ? "list-disc" : "list-none"}`, + indent > 0 ? `pl-${2 * indent}` : "", + ), + }, + children.map((child, index) => { + if (prevNode?.type !== NodeType.LINE_BREAK && child.type === NodeType.LINE_BREAK && skipNextLineBreakFlag) { + skipNextLineBreakFlag = false; + return null; + } + + prevNode = child; + skipNextLineBreakFlag = true; + return <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} />; + }), ); }; diff --git a/web/src/components/MemoContent/OrderedListItem.tsx b/web/src/components/MemoContent/OrderedListItem.tsx index d0d253d3539b6..f6666a35ecebf 100644 --- a/web/src/components/MemoContent/OrderedListItem.tsx +++ b/web/src/components/MemoContent/OrderedListItem.tsx @@ -1,4 +1,3 @@ -import { repeat } from "lodash-es"; import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { BaseProps } from "./types"; @@ -9,24 +8,12 @@ interface Props extends BaseProps { children: Node[]; } -const OrderedListItem: React.FC<Props> = ({ number, indent, children }: Props) => { +const OrderedListItem: React.FC<Props> = ({ children }: Props) => { return ( - <li className="w-full flex flex-row"> - {indent > 0 && ( - <div className="block font-mono shrink-0"> - <span>{repeat(" ", indent)}</span> - </div> - )} - <div className="w-auto grid grid-cols-[24px_1fr] gap-1"> - <div className="w-7 h-6 flex justify-center items-center"> - <span className="opacity-80">{number}.</span> - </div> - <div> - {children.map((child, index) => ( - <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> - ))} - </div> - </div> + <li> + {children.map((child, index) => ( + <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> + ))} </li> ); }; diff --git a/web/src/components/MemoContent/TaskListItem.tsx b/web/src/components/MemoContent/TaskListItem.tsx index 12f44e02b998b..6fbc62553d4f7 100644 --- a/web/src/components/MemoContent/TaskListItem.tsx +++ b/web/src/components/MemoContent/TaskListItem.tsx @@ -1,6 +1,5 @@ import { Checkbox } from "@mui/joy"; import clsx from "clsx"; -import { repeat } from "lodash-es"; import { useContext, useState } from "react"; import { markdownServiceClient } from "@/grpcweb"; import { useMemoStore } from "@/store/v1"; @@ -17,7 +16,7 @@ interface Props { children: Node[]; } -const TaskListItem: React.FC<Props> = ({ node, indent, complete, children }: Props) => { +const TaskListItem: React.FC<Props> = ({ node, complete, children }: Props) => { const context = useContext(RendererContext); const memoStore = useMemoStore(); const [checked] = useState(complete); @@ -39,22 +38,15 @@ const TaskListItem: React.FC<Props> = ({ node, indent, complete, children }: Pro }; return ( - <li className="w-full flex flex-row"> - {indent > 0 && ( - <div className="block font-mono shrink-0"> - <span>{repeat(" ", indent)}</span> - </div> - )} - <div className="w-auto grid grid-cols-[24px_1fr] gap-1"> - <div className="w-7 h-6 flex justify-center items-center"> - <Checkbox size="sm" checked={checked} disabled={context.readonly} onChange={(e) => handleCheckboxChange(e.target.checked)} /> - </div> - <div className={clsx(complete && "line-through opacity-80")}> - {children.map((child, index) => ( - <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> - ))} - </div> - </div> + <li className={clsx("w-full grid grid-cols-[24px_1fr]")}> + <span className="w-6 h-6 flex justify-start items-center"> + <Checkbox size="sm" checked={checked} disabled={context.readonly} onChange={(e) => handleCheckboxChange(e.target.checked)} /> + </span> + <p className={clsx(complete && "line-through opacity-80")}> + {children.map((child, index) => ( + <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> + ))} + </p> </li> ); }; diff --git a/web/src/components/MemoContent/UnorderedListItem.tsx b/web/src/components/MemoContent/UnorderedListItem.tsx index ff033509dd5c5..fed44645fe406 100644 --- a/web/src/components/MemoContent/UnorderedListItem.tsx +++ b/web/src/components/MemoContent/UnorderedListItem.tsx @@ -1,4 +1,3 @@ -import { repeat } from "lodash-es"; import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; @@ -8,24 +7,12 @@ interface Props { children: Node[]; } -const UnorderedListItem: React.FC<Props> = ({ indent, children }: Props) => { +const UnorderedListItem: React.FC<Props> = ({ children }: Props) => { return ( - <li className="w-full flex flex-row"> - {indent > 0 && ( - <div className="block font-mono shrink-0"> - <span>{repeat(" ", indent)}</span> - </div> - )} - <div className="w-auto grid grid-cols-[24px_1fr] gap-1"> - <div className="w-7 h-6 flex justify-center items-center"> - <span className="opacity-80">•</span> - </div> - <div> - {children.map((child, index) => ( - <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> - ))} - </div> - </div> + <li> + {children.map((child, index) => ( + <Renderer key={`${child.type}-${index}`} index={String(index)} node={child} /> + ))} </li> ); }; diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 22007a33b1f9b..eb44ca36c4714 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -443,7 +443,7 @@ const MemoEditor = (props: Props) => { <AddMemoRelationPopover editorRef={editorRef} /> </div> </div> - <Divider className="!mt-2" /> + <Divider className="!mt-2 opacity-40" /> <div className="w-full flex flex-row justify-between items-center py-3 dark:border-t-zinc-500"> <div className="relative flex flex-row justify-start items-center" onFocus={(e) => e.stopPropagation()}> <Select diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index a02af9695a088..f903c825971f6 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -23,8 +23,8 @@ const UserBanner = (props: Props) => { const workspaceSettingStore = useWorkspaceSettingStore(); const workspaceGeneralSetting = workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.GENERAL).generalSetting || WorkspaceGeneralSetting.fromPartial({}); - const title = user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title; - const avatarUrl = user ? user.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl; + const title = (user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title) || "Memos"; + const avatarUrl = (user ? user.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl) || "/logo.webp"; const handleSignOut = async () => { await authServiceClient.signOut({}); diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 4a363fc65160c..3d40ae4b3422f 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -81,20 +81,6 @@ module.exports = { md: "calc(var(--radius) - 2px)", sm: "calc(var(--radius) - 4px)", }, - keyframes: { - "accordion-down": { - from: { height: "0" }, - to: { height: "var(--radix-accordion-content-height)" }, - }, - "accordion-up": { - from: { height: "var(--radix-accordion-content-height)" }, - to: { height: "0" }, - }, - }, - animation: { - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - }, }, }, plugins: [require("tailwindcss-animate")], diff --git a/web/vercel.json b/web/vercel.json deleted file mode 100644 index 1323cdac34c6a..0000000000000 --- a/web/vercel.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rewrites": [ - { - "source": "/(.*)", - "destination": "/index.html" - } - ] -}
feat
implement nesting lists
be25fbe18515edfe9cdcec30c5476a8aab344c32
2024-09-02 06:50:14
Steven
chore: tweak readme
false
diff --git a/README.md b/README.md index 49dd47a03fdd0..e447e0efda4b4 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ Learn more about [other installation methods](https://www.usememos.com/docs/inst Contributions are what make the open-source community such an amazing place to learn, inspire, and create. We greatly appreciate any contributions you make. Thank you for being a part of our community! 🥰 +## Sponsorship + +If you find Memos helpful, please consider sponsoring us. Your support will help us to continue developing and maintaining the project. ❤️ + +| | | | +| --------------------------------------------------- | ------------------------------------------ | ----------------------------------------------------- | +| [yourselfhosted](https://github.com/yourselfhosted) | [Burning_Wipf](https://github.com/KUKARAF) | [👉 Support us](https://github.com/sponsors/usememos) | + ## Star history [![Star History Chart](https://api.star-history.com/svg?repos=usememos/memos&type=Date)](https://star-history.com/#usememos/memos&Date)
chore
tweak readme
af71ac49bbf0048989b3b6c536208d954bd7b10a
2024-05-25 03:13:37
quaintdev
feat(i18n): added marathi(mr) translations (#3449)
false
diff --git a/web/src/i18n.ts b/web/src/i18n.ts index 377edb06245f9..e391ca98f013d 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -15,6 +15,7 @@ export const locales = [ "it", "ja", "ko", + "mr", "nl", "pl", "pt-BR", diff --git a/web/src/locales/mr.json b/web/src/locales/mr.json index 8a56569639c31..f12fc28a2bada 100644 --- a/web/src/locales/mr.json +++ b/web/src/locales/mr.json @@ -59,6 +59,251 @@ "select": "निवडा", "settings": "सेटिंग्ज", "share": "शेअर करा", - "sign-in": "साइन इन करा" + "sign-in": "साइन इन करा", + "sign-in-with": "{{provider}} सह साइन इन करा", + "sign-out": "साइन आउट करा", + "sign-up": "साइन अप करा", + "statistics": "आकडेवारी", + "tags": "टॅग्ज", + "title": "शीर्षक", + "type": "प्रकार", + "unpin": "अनपिन", + "update": "अपडेट करा", + "upload": "अपलोड करा", + "username": "वापरकर्तानाव", + "version": "आवृत्ती", + "visibility": "दृश्यमानता", + "yourself": "स्वतः" + }, + "days": { + "fri": "शुक्र", + "mon": "सोम", + "sat": "शनि", + "sun": "रवि", + "thu": "गुरु", + "tue": "मंगळ", + "wed": "बुध" + }, + "editor": { + "add-your-comment-here": "तुमची टिप्पणी येथे जो़डा", + "any-thoughts": "आपले विचार...", + "save": "जतन" + }, + "inbox": { + "memo-comment": "{{user}} ची तुमच्या {{memo}} वर टिप्पणी आहे.", + "version-update": "नवीन आवृत्ती {{version}} आता उपलब्ध आहे!" + }, + "memo": { + "archived-at": "येथे संग्रहित", + "comment": { + "self": "टिप्पण्या", + "write-a-comment": "टिप्पणी लिहा" + }, + "copy-link": "लिंकची प्रत बनवा", + "count-memos-in-date": "{{date}} ला {{count}} मेमो लिहीलीत", + "delete-confirm": "हा मेमो हटवण्याची तुम्हाला खात्री आहे का? हि क्रिया अपरिवर्तनीय आहे", + "delete-memo": "मेमो हटवा", + "embed": "एम्बेड करा", + "fetch-more": "अधिकसाठी क्लिक करा", + "fetching-data": "माहिती मागवत आहे…", + "no-archived-memos": "कोणतेही संग्रहित मेमो नाहीत.", + "search-placeholder": "मेमोज शोधा", + "show-more": "अधिक दाखवा", + "view-detail": "तपशील दाखवा", + "visibility": { + "disabled": "सार्वजनिक मेमो अक्षम केले आहेत", + "private": "खाजगी", + "protected": "कार्यक्षेत्र", + "public": "सार्वजनिक" + }, + "wrapping": "गुंडाळा" + }, + "message": { + "archived-successfully": "यशस्वीरित्या संग्रहित केले", + "change-memo-created-time": "मेमो तयार केलेली वेळ बदला", + "copied": "प्रत बनवली", + "deleted-successfully": "यशस्वीरित्या हटवले", + "fill-all": "कृपया सर्व फील्ड भरा.", + "maximum-upload-size-is": "कमाल अनुमत अपलोड आकार {{size}} MiB आहे", + "memo-not-found": "मेमो सापडला नाही.", + "new-password-not-match": "नवीन पासवर्ड जुळत नाहीत.", + "no-data": "माहिती आढळली नाही.", + "password-changed": "पासवर्ड बदलला", + "password-not-match": "पासवर्ड जुळत नाही.", + "restored-successfully": "यशस्वीरित्या पुनर्संचयित केले", + "succeed-copy-link": "लिंक यशस्वीरित्या कॉपी केली.", + "update-succeed": "अपडेट यशस्वी झाले", + "user-not-found": "वापरकर्ता सापडला नाही" + }, + "reference": { + "add-references": "संदर्भ जोडा", + "embedded-usage": "एम्बेडेड सामग्री म्हणून वापरा", + "no-memos-found": "कोणतेही मेमो आढळले नाहीत", + "search-placeholder": "सामग्री शोधा" + }, + "resource": { + "clear": "साफ", + "copy-link": "लिंक कॉपी करा", + "create-dialog": { + "external-link": { + "file-name": "फाईलचे नाव", + "file-name-placeholder": "फाईलचे नाव", + "link": "लिंक", + "link-placeholder": "https://the.link.to/your/resource", + "option": "बाह्य लिंक", + "type": "प्रकार", + "type-placeholder": "फाईल प्रकार" + }, + "local-file": { + "choose": "एक फाइल निवडा…", + "option": "स्थानिक फाइल" + }, + "title": "संसाधन तयार करा", + "upload-method": "अपलोड पद्धत" + }, + "delete-resource": "संसाधन हटवा", + "delete-selected-resources": "निवडलेली संसाधने हटवा", + "fetching-data": "डेटा आणत आहे…", + "file-drag-drop-prompt": "फाइल अपलोड करण्यासाठी तुमची फाइल येथे ड्रॅग आणि ड्रॉप करा", + "linked-amount": "लिंक केलेली रक्कम", + "no-files-selected": "कोणत्याही फाइल्स निवडल्या नाहीत", + "no-resources": "संसाधने नाहीत.", + "no-unused-resources": "कोणतीही न वापरलेली संसाधने नाहीत", + "reset-link": "लिंक रीसेट करा", + "reset-link-prompt": "तुम्हाला लिंक रीसेट करण्याची खात्री आहे का? हे सर्व वर्तमान लिंक वापर खंडित करेल. ही क्रिया अपरिवर्तनीय आहे", + "reset-resource-link": "संसाधन लिंक रीसेट करा" + }, + "router": { + "back-to-top": "परत वर जा", + "go-to-home": "घरी जा" + }, + "setting": { + "account-section": { + "change-password": "पासवर्ड बदला", + "email-note": "ऐच्छिक", + "export-memos": "मेमो निर्यात करा", + "nickname-note": "बॅनर मध्ये प्रदर्शित", + "openapi-reset": "OpenAPI की रीसेट करा", + "openapi-sample-post": "{{url}} कडून नमस्कार #मेमो", + "openapi-title": "OpenAPI", + "reset-api": "API रीसेट करा", + "title": "खाते माहिती", + "update-information": "माहिती अपडेट करा", + "username-note": "साइन इन करण्यासाठी वापरले जाते" + }, + "appearance-option": { + "dark": "नेहमी अंधार", + "light": "नेहमी प्रकाश", + "system": "प्रणालीचे अनुसरण करा" + }, + "member": "सदस्य", + "member-list": "सदस्य यादी", + "member-section": { + "archive-member": "संग्रहण सदस्य", + "archive-warning": "तुम्हाला {{username}} संग्रहित करण्याची खात्री आहे?", + "create-a-member": "सदस्य तयार करा", + "delete-member": "सदस्य हटवा", + "delete-warning": "तुम्हाला नक्की {{username}} हटवायचे आहे का? ही क्रिया अपरिवर्तनीय आहे" + }, + "my-account": "माझे खाते", + "preference": "प्राधान्ये", + "preference-section": { + "default-memo-sort-option": "मेमो प्रदर्शन वेळ", + "default-memo-visibility": "डीफॉल्ट मेमो दृश्यमानता", + "theme": "थीम" + }, + "sso": "SSO", + "sso-section": { + "authorization-endpoint": "अधिकृतता एन्डपाॅंइन्ट", + "client-id": "क्लायंट आयडी", + "client-secret": "क्लायंट गुपित", + "confirm-delete": "तुम्हाला \"{{name}}\" SSO कॉन्फिगरेशन हटवण्याची खात्री आहे का? ही क्रिया अपरिवर्तनीय आहे", + "create-sso": "SSO तयार करा", + "custom": "सानुकूल", + "delete-sso": "हटविण्याची पुष्टी करा", + "disabled-password-login-warning": "पासवर्ड-लॉगिन अक्षम केले आहे, ओळख प्रदाते काढताना अधिक काळजी घ्या", + "display-name": "प्रदर्शनासाठी नाव", + "identifier": "ओळखकर्ता", + "identifier-filter": "अभिज्ञापक फिल्टर", + "redirect-url": "URL पुनर्निर्देशित करा", + "scopes": "व्याप्ती", + "sso-created": "SSO {{name}} तयार केले", + "sso-list": "SSO सूची", + "sso-updated": "SSO {{name}} अपडेट केले", + "template": "साचा", + "token-endpoint": "टोकन एंडपॉइंट", + "update-sso": "SSO अपडेट करा", + "user-endpoint": "वापरकर्ता एंडपॉइंट" + }, + "storage": "स्टोरेज", + "storage-section": { + "accesskey": "प्रवेश की", + "accesskey-placeholder": "प्रवेश की / प्रवेश आयडी", + "bucket": "बादली", + "bucket-placeholder": "बादली नाव", + "create-a-service": "सेवा तयार करा", + "create-storage": "स्टोरेज तयार करा", + "current-storage": "वर्तमान ऑब्जेक्ट स्टोरेज", + "delete-storage": "स्टोरेज हटवा", + "endpoint": "एन्डपाॅंईन्ट", + "local-storage-path": "स्थानिक स्टोरेज मार्ग", + "path": "स्टोरेज पथ", + "path-description": "तुम्ही स्थानिक स्टोरेजमधून समान डायनॅमिक व्हेरिएबल्स वापरू शकता, जसे की {filename}", + "path-placeholder": "सानुकूल/पथ", + "presign-placeholder": "पूर्व-स्वाक्षरी URL, पर्यायी", + "region": "प्रदेश", + "region-placeholder": "प्रदेशाचे नाव", + "s3-compatible-url": "S3 सुसंगत URL", + "secretkey": "गुप्त की", + "secretkey-placeholder": "गुप्त की / प्रवेश की", + "storage-services": "स्टोरेज सेवा", + "type-database": "डेटाबेस", + "type-local": "स्थानिक फाइल सिस्टम", + "update-a-service": "सेवा अपडेट करा", + "update-local-path": "स्थानिक स्टोरेज पथ अपडेट करा", + "update-local-path-description": "स्थानिक स्टोरेज पथ हा तुमच्या डेटाबेस फाइलचा सापेक्ष मार्ग आहे", + "update-storage": "स्टोरेज अपडेट करा", + "url-prefix": "URL prefix", + "url-prefix-placeholder": "सानुकूल URL उपसर्ग, पर्यायी", + "url-suffix": "URL प्रत्यय", + "url-suffix-placeholder": "सानुकूल URL प्रत्यय, पर्यायी", + "warning-text": "तुम्हाला स्टोरेज सेवा \"{{name}}\" हटवायची खात्री आहे का? ही क्रिया अपरिवर्तनीय आहे" + }, + "system": "प्रणाली", + "system-section": { + "additional-script": "अतिरिक्त स्क्रिप्ट", + "additional-script-placeholder": "अतिरिक्त JavaScript कोड", + "additional-style": "अतिरिक्त शैली", + "additional-style-placeholder": "अतिरिक्त CSS कोड", + "allow-user-signup": "वापरकर्ता साइनअपला अनुमती द्या", + "customize-server": { + "appearance": "सर्व्हरचे स्वरूप", + "description": "वर्णन", + "icon-url": "चिन्ह URL", + "locale": "सर्व्हर लोकेल", + "title": "सर्व्हर सानुकूलित करा" + }, + "disable-password-login": "पासवर्ड लॉगिन अक्षम करा", + "disable-password-login-final-warning": "तुम्ही काय करत आहात हे तुम्हाला माहीत असल्यास कृपया \"CONFIRM\" टाइप करा.", + "disable-password-login-warning": "हे सर्व वापरकर्त्यांसाठी पासवर्ड लॉगिन अक्षम करेल. तुमचे कॉन्फिगर केलेले ओळख प्रदाते अयशस्वी झाल्यास डेटाबेसमध्ये ही सेटिंग पूर्ववत केल्याशिवाय लॉग इन करणे शक्य नाही. ओळख प्रदाता काढून टाकताना तुम्हाला अधिक सावधगिरी बाळगावी लागेल", + "disable-public-memos": "सार्वजनिक मेमो अक्षम करा", + "display-with-updated-time": "अद्यतनित वेळेसह प्रदर्शित करा", + "enable-password-login": "पासवर्ड लॉगिन सक्षम करा", + "enable-password-login-warning": "हे सर्व वापरकर्त्यांसाठी पासवर्ड लॉगिन सक्षम करेल. जर तुम्ही वापरकर्त्यांना SSO आणि पासवर्ड दोन्ही वापरून लॉग इन करू इच्छित असाल तरच सुरू ठेवा", + "max-upload-size": "कमाल अपलोड आकार (MiB)", + "max-upload-size-hint": "शिफारस केलेले मूल्य 32 MiB आहे.", + "server-name": "सर्व्हरचे नाव" + } + }, + "tag": { + "all-tags": "सर्व टॅग", + "create-tag": "टॅग तयार करा", + "create-tags-guide": "तुम्ही `#tag` इनपुट करून टॅग तयार करू शकता.", + "delete-confirm": "तुम्हाला हा टॅग हटवण्याची खात्री आहे का? सर्व संबंधित मेमो संग्रहित केले जातील.", + "delete-tag": "टॅग हटवा", + "no-tag-found": "कोणताही टॅग आढळला नाही" + }, + "timeline": { + "title": "कालक्रम" } }
feat
added marathi(mr) translations (#3449)
fbdfaf85d9f4ef9b65e447e8706978e3bfa22219
2024-08-26 20:20:46
Steven
chore: update migrator
false
diff --git a/server/version/version_test.go b/server/version/version_test.go index d06d97aa4957e..ce1fde8f30b07 100644 --- a/server/version/version_test.go +++ b/server/version/version_test.go @@ -53,6 +53,11 @@ func TestIsVersionGreaterThan(t *testing.T) { target: "0.8.0", want: true, }, + { + version: "0.23", + target: "0.22", + want: true, + }, { version: "0.8.0", target: "0.10.0", @@ -63,6 +68,11 @@ func TestIsVersionGreaterThan(t *testing.T) { target: "0.9.1", want: false, }, + { + version: "0.22", + target: "0.22", + want: false, + }, } for _, test := range tests { result := IsVersionGreaterThan(test.version, test.target) diff --git a/store/migrator.go b/store/migrator.go index c08bf0db3dcff..b965238f05314 100644 --- a/store/migrator.go +++ b/store/migrator.go @@ -17,6 +17,12 @@ import ( "github.com/usememos/memos/server/version" ) +//go:embed migration +var migrationFS embed.FS + +//go:embed seed +var seedFS embed.FS + const ( // MigrateFileNameSplit is the split character between the patch version and the description in the migration file name. // For example, "1__create_table.sql". @@ -26,12 +32,6 @@ const ( LatestSchemaFileName = "LATEST_SCHEMA.sql" ) -//go:embed migration -var migrationFS embed.FS - -//go:embed seed -var seedFS embed.FS - // Migrate applies the latest schema to the database. func (s *Store) Migrate(ctx context.Context) error { if err := s.preMigrate(ctx); err != nil { @@ -147,6 +147,9 @@ func (s *Store) preMigrate(ctx context.Context) error { return errors.Wrap(err, "failed to upsert migration history") } } + if err := s.normalizedMigrationHistoryList(ctx); err != nil { + return errors.Wrap(err, "failed to normalize migration history list") + } return nil } @@ -237,3 +240,55 @@ func (*Store) execute(ctx context.Context, tx *sql.Tx, stmt string) error { } return nil } + +func (s *Store) normalizedMigrationHistoryList(ctx context.Context) error { + migrationHistoryList, err := s.driver.FindMigrationHistoryList(ctx, &FindMigrationHistory{}) + if err != nil { + return errors.Wrap(err, "failed to find migration history") + } + versions := []string{} + for _, migrationHistory := range migrationHistoryList { + versions = append(versions, migrationHistory.Version) + } + sort.Sort(version.SortVersion(versions)) + latestVersion := versions[len(versions)-1] + latestMinorVersion := version.GetMinorVersion(latestVersion) + // If the latest version is greater than 0.22, return. + // As of 0.22, the migration history is already normalized. + if version.IsVersionGreaterThan(latestMinorVersion, "0.22") { + return nil + } + + schemaVersionMap := map[string]string{} + filePaths, err := fs.Glob(migrationFS, fmt.Sprintf("%s/*/*.sql", s.getMigrationBasePath())) + if err != nil { + return errors.Wrap(err, "failed to read migration files") + } + sort.Strings(filePaths) + for _, filePath := range filePaths { + fileSchemaVersion, err := s.getSchemaVersionOfMigrateScript(filePath) + if err != nil { + return errors.Wrap(err, "failed to get schema version of migrate script") + } + schemaVersionMap[version.GetMinorVersion((fileSchemaVersion))] = fileSchemaVersion + } + + latestSchemaVersion := schemaVersionMap[latestMinorVersion] + if latestSchemaVersion == "" { + return errors.Errorf("latest schema version not found") + } + if version.IsVersionGreaterOrEqualThan(latestVersion, latestSchemaVersion) { + return nil + } + + // Start a transaction to insert the latest schema version to migration_history. + tx, err := s.driver.GetDB().Begin() + if err != nil { + return errors.Wrap(err, "failed to start transaction") + } + defer tx.Rollback() + if err := s.execute(ctx, tx, fmt.Sprintf("INSERT INTO migration_history (version) VALUES ('%s')", latestSchemaVersion)); err != nil { + return errors.Wrap(err, "failed to insert migration history") + } + return tx.Commit() +}
chore
update migrator
ca2557eb7edab5329c61dd66910aea3e92bf0b17
2022-10-04 18:32:07
boojack
fix: tag filter (#266)
false
diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index 6641798ca992c..27c456ed76388 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -33,7 +33,7 @@ const MemoList = () => { if (tagQuery) { const tagsSet = new Set<string>(); - for (const t of Array.from(memo.content.match(TAG_REG) ?? [])) { + for (const t of Array.from(memo.content.match(new RegExp(TAG_REG, "g")) ?? [])) { const tag = t.replace(TAG_REG, "$1").trim(); const items = tag.split("/"); let temp = "";
fix
tag filter (#266)
e016244abac1139d17cdbb8548748de9bce2e516
2023-11-23 20:50:11
Hou Xiaoxuan
fix: remove ACL when set URLPrefix (#2532)
false
diff --git a/plugin/storage/s3/s3.go b/plugin/storage/s3/s3.go index 10b05392a52a5..d7c2a9d35822b 100644 --- a/plugin/storage/s3/s3.go +++ b/plugin/storage/s3/s3.go @@ -64,13 +64,17 @@ func NewClient(ctx context.Context, config *Config) (*Client, error) { func (client *Client) UploadFile(ctx context.Context, filename string, fileType string, src io.Reader) (string, error) { uploader := manager.NewUploader(client.Client) - uploadOutput, err := uploader.Upload(ctx, &awss3.PutObjectInput{ + // set ACL according to if user set prefix + obj := awss3.PutObjectInput{ Bucket: aws.String(client.Config.Bucket), Key: aws.String(filename), Body: src, ContentType: aws.String(fileType), - ACL: types.ObjectCannedACL(*aws.String("public-read")), - }) + } + if client.Config.URLPrefix == "" { + obj.ACL = types.ObjectCannedACL(*aws.String("public-read")) + } + uploadOutput, err := uploader.Upload(ctx, &obj) if err != nil { return "", err }
fix
remove ACL when set URLPrefix (#2532)
032509ddba1e30b9e25ad5ab23394928f96c6413
2023-07-16 09:21:30
CorrectRoadH
feat: save message to memo (#1940)
false
diff --git a/web/src/components/MemoChat/ChatMessage.tsx b/web/src/components/MemoChat/ChatMessage.tsx index 1c78fea646734..5e1993701a06d 100644 --- a/web/src/components/MemoChat/ChatMessage.tsx +++ b/web/src/components/MemoChat/ChatMessage.tsx @@ -1,6 +1,10 @@ import { Message } from "@/store/zustand/message"; import { marked } from "@/labs/marked"; import Icon from "@/components/Icon"; +import Dropdown from "../kit/Dropdown"; +import { useMemoStore } from "@/store/module"; +import toast from "react-hot-toast"; +import { useTranslate } from "@/utils/i18n"; interface MessageProps { index: number; @@ -8,6 +12,19 @@ interface MessageProps { } const ChatMessage = ({ index, message }: MessageProps) => { + const memoStore = useMemoStore(); + const t = useTranslate(); + + const handleSaveAsMemos = async () => { + await memoStore.createMemo({ + content: message.content, + visibility: "PRIVATE", + resourceIdList: [], + relationList: [], + }); + toast.success(t("memo-chat.save-as-memo-success")); + }; + return ( <div key={index} className="w-full flex flex-col justify-start items-start space-y-2"> {message.role === "user" ? ( @@ -22,6 +39,18 @@ const ChatMessage = ({ index, message }: MessageProps) => { <div className="memo-content-wrapper !w-auto flex flex-col justify-start items-start shadow rounded-lg rounded-tl-none px-3 py-2 bg-white dark:bg-zinc-800"> <div className="memo-content-text">{marked(message.content)}</div> </div> + <Dropdown + actions={ + <> + <button + className="w-full m-auto text-left text-sm whitespace-nowrap leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600" + onClick={() => handleSaveAsMemos()} + > + {t("memo-chat.save-as-memo")} + </button> + </> + } + /> </div> )} </div> diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 3f7fb2bfe9d38..8cb9f71aa2005 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -391,6 +391,8 @@ }, "memo-chat": { "title": "Memo Chat", + "save-as-memo": "Save as memo", + "save-as-memo-success": "Saved as memo successfully.", "not-enabled": "You have not set up your OpenAI API key.", "go-to-settings": "Go to settings", "placeholder": "Ask anything…", diff --git a/web/src/locales/zh-Hans.json b/web/src/locales/zh-Hans.json index 320a8dc3675b1..8e82633a9204e 100644 --- a/web/src/locales/zh-Hans.json +++ b/web/src/locales/zh-Hans.json @@ -98,6 +98,8 @@ }, "memo-chat": { "go-to-settings": "前往设置", + "save-as-memo": "保存为 Memo", + "save-as-memo-success": "保存为 Memo 成功", "not-enabled": "您尚未设置 OpenAI API 密钥。", "placeholder": "随便问", "title": "问 AI",
feat
save message to memo (#1940)
61cf4512b0d6123330aa443ebec59eb1322cde77
2022-02-05 10:47:43
email
fix: delete response json
false
diff --git a/server/memo.go b/server/memo.go index b433fa14aee67..b54aa7f1d7a3d 100644 --- a/server/memo.go +++ b/server/memo.go @@ -125,8 +125,7 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to delete memo ID: %v", memoId)).SetInternal(err) } - c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8) - c.Response().WriteHeader(http.StatusOK) + c.JSON(http.StatusOK, true) return nil }) diff --git a/server/resource.go b/server/resource.go index 38b91d2cfe737..3672c42a98ec9 100644 --- a/server/resource.go +++ b/server/resource.go @@ -89,6 +89,8 @@ func (s *Server) registerResourceRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to delete resource").SetInternal(err) } + c.JSON(http.StatusOK, true) + return nil }) } diff --git a/server/shortcut.go b/server/shortcut.go index 47b709784c718..27bfe16b52f28 100644 --- a/server/shortcut.go +++ b/server/shortcut.go @@ -108,6 +108,8 @@ func (s *Server) registerShortcutRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to delete shortcut").SetInternal(err) } + c.JSON(http.StatusOK, true) + return nil }) } diff --git a/store/shortcut.go b/store/shortcut.go index 3fbb939e00cba..a2f391f50e976 100644 --- a/store/shortcut.go +++ b/store/shortcut.go @@ -203,14 +203,14 @@ func findShortcutList(db *DB, find *api.ShortcutFind) ([]*api.Shortcut, error) { } func deleteShortcut(db *DB, delete *api.ShortcutDelete) error { - result, err := db.Db.Exec(`DELETE FROM saved_query WHERE id = ?`, delete.Id) + result, err := db.Db.Exec(`DELETE FROM shortcut WHERE id = ?`, delete.Id) if err != nil { return FormatError(err) } rows, _ := result.RowsAffected() if rows == 0 { - return &common.Error{Code: common.NotFound, Err: fmt.Errorf("memo ID not found: %d", delete.Id)} + return &common.Error{Code: common.NotFound, Err: fmt.Errorf("shortcut ID not found: %d", delete.Id)} } return nil
fix
delete response json
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
5