mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 13:48:55 +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:
+14
-17
@@ -1,30 +1,27 @@
|
||||
import { createRoot } from "react-dom/client"
|
||||
import { RouterProvider, createBrowserRouter } from "react-router-dom"
|
||||
|
||||
import "./index.css"
|
||||
import "./lib/i18n"
|
||||
|
||||
import { TerminalPage } from "./components/terminal"
|
||||
import ErrorPage from "./error-page"
|
||||
import { AuthProvider } from "./hooks/useAuth"
|
||||
import { NotificationProvider } from "./hooks/useNotfication"
|
||||
import { ServerProvider } from "./hooks/useServer"
|
||||
|
||||
import Root from "./routes/root"
|
||||
import ErrorPage from "./error-page"
|
||||
|
||||
import ProtectedRoute from "./routes/protect"
|
||||
import CronPage from "./routes/cron"
|
||||
import LoginPage from "./routes/login"
|
||||
import ServerPage from "./routes/server"
|
||||
import ServicePage from "./routes/service"
|
||||
import { TerminalPage } from "./components/terminal"
|
||||
import DDNSPage from "./routes/ddns"
|
||||
import NATPage from "./routes/nat"
|
||||
import NotificationGroupPage from "./routes/notification-group"
|
||||
import ServerGroupPage from "./routes/server-group"
|
||||
import "./index.css"
|
||||
import "./lib/i18n"
|
||||
import AlertRulePage from "./routes/alert-rule"
|
||||
import CronPage from "./routes/cron"
|
||||
import DDNSPage from "./routes/ddns"
|
||||
import LoginPage from "./routes/login"
|
||||
import NATPage from "./routes/nat"
|
||||
import NotificationPage from "./routes/notification"
|
||||
import NotificationGroupPage from "./routes/notification-group"
|
||||
import OnlineUserPage from "./routes/online-user"
|
||||
import ProfilePage from "./routes/profile"
|
||||
import ProtectedRoute from "./routes/protect"
|
||||
import Root from "./routes/root"
|
||||
import ServerPage from "./routes/server"
|
||||
import ServerGroupPage from "./routes/server-group"
|
||||
import ServicePage from "./routes/service"
|
||||
import SettingsPage from "./routes/settings"
|
||||
import UserPage from "./routes/user"
|
||||
import WAFPage from "./routes/waf"
|
||||
|
||||
Reference in New Issue
Block a user