Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/set username dialog #3784

Merged
merged 10 commits into from
Sep 4, 2023
36 changes: 36 additions & 0 deletions lang/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"0Azlrb": {
"defaultMessage": "Manage"
},
"0CyECR": {
"defaultMessage": "Matters ID has been set up. More account info can be found in Settings",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"0JLcHr": {
"defaultMessage": "Caution: The following content may include age-restricted or explicit content, violence, gore, etc. Some may experience discomfort and psychological distress.",
"description": "src/views/ArticleDetail/Wall/Sensitive/index.tsx"
Expand All @@ -59,6 +63,10 @@
"defaultMessage": "Failed",
"description": "src/components/Transaction/State/index.tsx"
},
"1QrwIl": {
"defaultMessage": "Take a look",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"1Z1M77": {
"defaultMessage": "No data yet",
"description": "src/views/Me/History/index.tsx"
Expand All @@ -71,6 +79,10 @@
"defaultMessage": "mentioned you in a comment at {commentArticle}",
"description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
},
"202PEj": {
"defaultMessage": "Confirm Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"20bImY": {
"defaultMessage": "Discussion"
},
Expand Down Expand Up @@ -397,6 +409,10 @@
"defaultMessage": "Collection is deleted",
"description": "src/components/CollectionDigest/DropdownActions/DeleteCollection/Dialog.tsx"
},
"FxrSCh": {
"defaultMessage": "This ID cannot be modified. Are you sure you want to use {id} as your Matters ID?",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"GHxtae": {
"defaultMessage": "Wallet",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
Expand Down Expand Up @@ -459,6 +475,10 @@
"defaultMessage": "View",
"description": "src/components/Dialogs/CollectionSelectDialog/index.tsx"
},
"IPqNCS": {
"defaultMessage": "Confirm use",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"Ihwz5K": {
"defaultMessage": "Unpinned from profile"
},
Expand Down Expand Up @@ -540,6 +560,10 @@
"defaultMessage": "Wallet address will be part of your digital identity and shown in your profile page.",
"description": "src/components/Forms/WalletAuthForm/Select.tsx"
},
"LwFJTy": {
"defaultMessage": "Matters ID is your unique identifier, and cannot be modified once set.",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"MDNaxs": {
"defaultMessage": "followers",
"description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx"
Expand Down Expand Up @@ -987,10 +1011,18 @@
"kc79d3": {
"defaultMessage": "Topics"
},
"kf5NAv": {
"defaultMessage": "English letters, numbers, and underscores",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"kkZioy": {
"defaultMessage": "Remove",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
},
"l0/EvT": {
"defaultMessage": "Last step: Set Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"lIir/P": {
"defaultMessage": "I see"
},
Expand Down Expand Up @@ -1223,6 +1255,10 @@
"wbcwKd": {
"defaultMessage": "View All"
},
"x7O1/5": {
"defaultMessage": "This ID has been taken, please try another one",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"xMaFCO": {
"defaultMessage": "Articles",
"description": "src/views/Me/History/HistoryTabs.tsx"
Expand Down
36 changes: 36 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"0Azlrb": {
"defaultMessage": "Manage"
},
"0CyECR": {
"defaultMessage": "Matters ID has been set up. More account info can be found in Settings",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"0JLcHr": {
"defaultMessage": "Caution: The following content may include age-restricted or explicit content, violence, gore, etc. Some may experience discomfort and psychological distress.",
"description": "src/views/ArticleDetail/Wall/Sensitive/index.tsx"
Expand All @@ -60,6 +64,10 @@
"defaultMessage": "Failed",
"description": "src/components/Transaction/State/index.tsx"
},
"1QrwIl": {
"defaultMessage": "Take a look",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"1Z1M77": {
"defaultMessage": "No data yet",
"description": "src/views/Me/History/index.tsx"
Expand All @@ -72,6 +80,10 @@
"defaultMessage": "mentioned you in a comment at {commentArticle}",
"description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx"
},
"202PEj": {
"defaultMessage": "Confirm Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"20bImY": {
"defaultMessage": "Discussion"
},
Expand Down Expand Up @@ -400,6 +412,10 @@
"defaultMessage": "Collection is deleted",
"description": "src/components/CollectionDigest/DropdownActions/DeleteCollection/Dialog.tsx"
},
"FxrSCh": {
"defaultMessage": "This ID cannot be modified. Are you sure you want to use {id} as your Matters ID?",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"GHxtae": {
"defaultMessage": "Wallet",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
Expand Down Expand Up @@ -462,6 +478,10 @@
"defaultMessage": "View",
"description": "src/components/Dialogs/CollectionSelectDialog/index.tsx"
},
"IPqNCS": {
"defaultMessage": "Confirm use",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"Ihwz5K": {
"defaultMessage": "Unpinned from profile"
},
Expand Down Expand Up @@ -543,6 +563,10 @@
"defaultMessage": "Wallet address will be part of your digital identity and shown in your profile page.",
"description": "src/components/Forms/WalletAuthForm/Select.tsx"
},
"LwFJTy": {
"defaultMessage": "Matters ID is your unique identifier, and cannot be modified once set.",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"MDNaxs": {
"description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx",
"defaultMessage": "followers"
Expand Down Expand Up @@ -993,10 +1017,18 @@
"kc79d3": {
"defaultMessage": "Topics"
},
"kf5NAv": {
"defaultMessage": "English letters, numbers, and underscores",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"kkZioy": {
"defaultMessage": "Remove",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
},
"l0/EvT": {
"defaultMessage": "Last step: Set Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"lIir/P": {
"description": "",
"defaultMessage": "I see"
Expand Down Expand Up @@ -1233,6 +1265,10 @@
"wbcwKd": {
"defaultMessage": "View All"
},
"x7O1/5": {
"defaultMessage": "This ID has been taken, please try another one",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"xMaFCO": {
"defaultMessage": "Articles",
"description": "src/views/Me/History/HistoryTabs.tsx"
Expand Down
36 changes: 36 additions & 0 deletions lang/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"0Azlrb": {
"defaultMessage": "管理"
},
"0CyECR": {
"defaultMessage": "Matters ID 已设置,更多帐号相关设置可前往设置页修改",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"0JLcHr": {
"defaultMessage": "内容可能包含色情、暴力、血腥等限制级内容,部分用户可能不适合观看,或引起不适、心理负担,请谨慎判断是否阅读。",
"description": "src/views/ArticleDetail/Wall/Sensitive/index.tsx"
Expand All @@ -59,6 +63,10 @@
"defaultMessage": "失败",
"description": "src/components/Transaction/State/index.tsx"
},
"1QrwIl": {
"defaultMessage": "去看看",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"1Z1M77": {
"defaultMessage": "尚无阅读记录",
"description": "src/views/Me/History/index.tsx"
Expand All @@ -71,6 +79,10 @@
"description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx",
"defaultMessage": "在 {commentArticle} 评论提到了你"
},
"202PEj": {
"defaultMessage": "确认 Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"20bImY": {
"defaultMessage": "众聊"
},
Expand Down Expand Up @@ -398,6 +410,10 @@
"defaultMessage": "选集已刪除",
"description": "src/components/CollectionDigest/DropdownActions/DeleteCollection/Dialog.tsx"
},
"FxrSCh": {
"defaultMessage": "ID 设置后无法修改,确认使用 {id} 作为 Matters ID 吗?",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"GHxtae": {
"defaultMessage": "数字钱包",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
Expand Down Expand Up @@ -460,6 +476,10 @@
"defaultMessage": "查看",
"description": "src/components/Dialogs/CollectionSelectDialog/index.tsx"
},
"IPqNCS": {
"defaultMessage": "确认使用",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"Ihwz5K": {
"defaultMessage": "代表作已取消"
},
Expand Down Expand Up @@ -541,6 +561,10 @@
"defaultMessage": "钱包地址将作为身份识别之一在个人页公开显示。",
"description": "src/components/Forms/WalletAuthForm/Select.tsx"
},
"LwFJTy": {
"defaultMessage": "Matters ID 为用户唯一标识,设置后无法修改。",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"MDNaxs": {
"defaultMessage": "人",
"description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx"
Expand Down Expand Up @@ -988,10 +1012,18 @@
"kc79d3": {
"defaultMessage": "找你想看的"
},
"kf5NAv": {
"defaultMessage": "可使用英文、数字及下划线",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"kkZioy": {
"defaultMessage": "确认移出",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
},
"l0/EvT": {
"defaultMessage": "最后一步:设置 Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"lIir/P": {
"defaultMessage": "我知道了"
},
Expand Down Expand Up @@ -1224,6 +1256,10 @@
"wbcwKd": {
"defaultMessage": "查看全部"
},
"x7O1/5": {
"defaultMessage": "ID 已被使用,请修改后再试",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"xMaFCO": {
"defaultMessage": "阅读",
"description": "src/views/Me/History/HistoryTabs.tsx"
Expand Down
36 changes: 36 additions & 0 deletions lang/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"0Azlrb": {
"defaultMessage": "管理"
},
"0CyECR": {
"defaultMessage": "Matters ID 已設置,更多帳號相關設置可前往設定頁修改",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"0JLcHr": {
"defaultMessage": "內容可能包含色情、暴力、血腥等限制級內容,部分用戶可能不適合觀看,或引起不適、心理負擔,請謹慎判斷是否閱讀。",
"description": "src/views/ArticleDetail/Wall/Sensitive/index.tsx"
Expand All @@ -59,6 +63,10 @@
"defaultMessage": "失敗",
"description": "src/components/Transaction/State/index.tsx"
},
"1QrwIl": {
"defaultMessage": "去看看",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"1Z1M77": {
"defaultMessage": "尚無閱讀紀錄",
"description": "src/views/Me/History/index.tsx"
Expand All @@ -71,6 +79,10 @@
"description": "src/components/Notice/CommentNotice/CommentMentionedYouNotice.tsx",
"defaultMessage": "在 {commentArticle} 評論提到了你"
},
"202PEj": {
"defaultMessage": "確認 Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"20bImY": {
"defaultMessage": "眾聊"
},
Expand Down Expand Up @@ -398,6 +410,10 @@
"defaultMessage": "選集已刪除",
"description": "src/components/CollectionDigest/DropdownActions/DeleteCollection/Dialog.tsx"
},
"FxrSCh": {
"defaultMessage": "ID 設置後無法修改,確認使用 {id} 作為 Matters ID 嗎?",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"GHxtae": {
"defaultMessage": "數字錢包",
"description": "src/components/Forms/SelectAuthMethodForm/AuthTabs.tsx"
Expand Down Expand Up @@ -460,6 +476,10 @@
"defaultMessage": "查看",
"description": "src/components/Dialogs/CollectionSelectDialog/index.tsx"
},
"IPqNCS": {
"defaultMessage": "確認使用",
"description": "src/components/Dialogs/SetUserNameDialog/ConfirmStep.tsx"
},
"Ihwz5K": {
"defaultMessage": "代表作已取消"
},
Expand Down Expand Up @@ -541,6 +561,10 @@
"defaultMessage": "錢包地址將作為身份識別之一在個人頁公開顯示。",
"description": "src/components/Forms/WalletAuthForm/Select.tsx"
},
"LwFJTy": {
"defaultMessage": "Matters ID 為用戶唯一標識,設置後無法修改。",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"MDNaxs": {
"defaultMessage": "人",
"description": "src/views/Circle/Analytics/FollowerAnalytics/index.tsx"
Expand Down Expand Up @@ -988,10 +1012,18 @@
"kc79d3": {
"defaultMessage": "找你想看的"
},
"kf5NAv": {
"defaultMessage": "可使用英文、數字及下劃線",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"kkZioy": {
"defaultMessage": "確認移出",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
},
"l0/EvT": {
"defaultMessage": "最後一步:设置 Matters ID",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"lIir/P": {
"defaultMessage": "我知道了"
},
Expand Down Expand Up @@ -1224,6 +1256,10 @@
"wbcwKd": {
"defaultMessage": "查看全部"
},
"x7O1/5": {
"defaultMessage": "ID 已被使用,請修改後再試",
"description": "src/components/Dialogs/SetUserNameDialog/Content.tsx"
},
"xMaFCO": {
"defaultMessage": "閱讀",
"description": "src/views/Me/History/HistoryTabs.tsx"
Expand Down
1 change: 1 addition & 0 deletions src/common/enums/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const OPEN_UNIVERSAL_AUTH_DIALOG = 'openUniversalAuthDialog'
export const CLOSE_ACTIVE_DIALOG = 'closeActiveDialog'
export const OPEN_LIKE_COIN_DIALOG = 'openLikeCoinDialog'
export const OPEN_SUBSCRIBE_CIRCLE_DIALOG = 'openSubscribeCircleDialog'
export const OPEN_SET_USER_NAME_DIALOG = 'openSetUserNameDialog'

export enum UNIVERSAL_AUTH_SOURCE {
enter = 'enter',
Expand Down
2 changes: 2 additions & 0 deletions src/common/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ export const MAX_DESCRIPTION_LENGTH = 200
export const MIN_USER_DISPLAY_NAME_LENGTH = 2
export const MAX_USER_DISPLAY_NAME_LENGTH = 20
export const MAX_USER_DESCRIPTION_LENGTH = 140
export const MIN_USER_NAME_LENGTH = 4
export const MAX_USER_NAME_LENGTH = 15
Loading