mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 05:38:51 +00:00
feat: enhance public notes functionality with flexible options (#141)
* feat: enhance public notes functionality with flexible options - Make public notes optional to prevent default values causing frontend issues - Add dual editing modes: raw text editing and custom fields (avoid hardcoded schema) - Set raw text mode as default, populate input on edit, submit raw text content always - Add toggle switch: submit raw text when enabled, submit empty & hide controls when disabled - New records default to disabled public notes; auto-expand on edit based on content * chore: auto-fix linting and formatting issues * feat: Add public annotation data structure and utility functions Implemented Zod validation patterns, default values, parsing functions, and utility functions for public notes, and updated related internationalization text. * chore: auto-fix linting and formatting issues * refactor(server): Replace i18n implementation Replace direct use of i18n.t with react-i18next's useTranslation hook to improve internationalization support. * refactor(public-note): Optimize data model and validation logic Removed the pruneEmpty function and simplified the date processing logic, making billingDataMod and planDataMod optional fields. Also optimized the validation logic to handle optional fields. * chore: auto-fix linting and formatting issues * fix zod validation & don't write empty values when parsing * use raw mode if object contains unknown fields * rename some features * chore: Update dependency package versions Upgrade multiple npm dependencies to their latest versions, including react, tailwindcss, and eslint. Ignore lock files. * fix(server): Fix default value when bill amount is undefined Changed undefined values for bill amount to the default value "0" to avoid potential null value errors. --------- Co-authored-by: Guccen <171530509+Chillln@users.noreply.github.com> Co-authored-by: uubulb <uub@suwako.de>
This commit is contained in:
@@ -195,6 +195,7 @@
|
||||
"Preview": "预览",
|
||||
"Option": "选项",
|
||||
"PublicNote": {
|
||||
"Label": "公开备注",
|
||||
"Billing": "账单信息",
|
||||
"Plan": "套餐配置",
|
||||
"StartDate": "开始时间",
|
||||
@@ -222,10 +223,13 @@
|
||||
"CancelNoExpiry": "取消不过期",
|
||||
"Free": "免费",
|
||||
"PayAsYouGo": "按量付费",
|
||||
"DropdownHint": "下拉项需要重新选择才能生效",
|
||||
"CommaSeparated": "以英文逗号分隔多个",
|
||||
"Has": "有",
|
||||
"None": "无"
|
||||
"None": "无",
|
||||
"CustomFields": "自定义字段",
|
||||
"ClearDate": "清除日期",
|
||||
"Clear": "清除",
|
||||
"RawText": "原始文本"
|
||||
},
|
||||
"Validation": {
|
||||
"InvalidDate": "无效的日期格式",
|
||||
@@ -233,7 +237,8 @@
|
||||
"MustBeDayWeekMonthYear": "必须为 Day/Week/Month/Year",
|
||||
"MustBe1Or2": "只能为 1 或 2",
|
||||
"DigitsOnly": "仅允许数字",
|
||||
"InvalidForm": "表单校验失败"
|
||||
"InvalidForm": "表单校验失败",
|
||||
"InvalidJSON": "无效的 JSON"
|
||||
},
|
||||
"AlertRules": {
|
||||
"CoverAllServers": "监控所有服务器",
|
||||
@@ -241,5 +246,13 @@
|
||||
"IgnoreHint": "{{server}}ID: true/false",
|
||||
"IgnoreExample": "例如:{\"1\": true, \"2\": false}"
|
||||
},
|
||||
"Search": "搜索..."
|
||||
"Search": "搜索...",
|
||||
"Format": "格式化",
|
||||
"Formatted": "已格式化",
|
||||
"Copy": "复制",
|
||||
"Paste": "粘贴",
|
||||
"CopiedToClipboard": "已复制到剪贴板",
|
||||
"ClipboardWriteFailed": "无法写入剪贴板",
|
||||
"PastedFromClipboard": "已从剪贴板粘贴",
|
||||
"ClipboardReadFailed": "无法读取剪贴板"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user