Unverified Commit 9a5225f7 authored by Lemon-miaow's avatar Lemon-miaow
Browse files

fix(panel): passkey 无凭据与用户不存在改用错误码的本地化文案,补齐通用错误码映射,认证来源与日期跟随界面语言

parent 6c3421fe
Loading
Loading
Loading
Loading
+12 −5
Changes for panel/src/components/States.tsx: 12 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -71,17 +71,24 @@ export function NotAuthorized() {
  );
}

export function NotFound() {
export interface NotFoundProps {
  title?: string;
  body?: string;
  linkTo?: string;
  linkLabel?: string;
}

export function NotFound({ title, body, linkTo = "/", linkLabel }: NotFoundProps) {
  const { t } = useTranslation("common");
  return (
    <div className="mx-auto flex max-w-md flex-col items-center justify-center gap-3 py-24 text-center">
      <SearchX className="h-8 w-8 text-muted-foreground" />
      <div>
        <p className="font-medium">{t("not_found_title")}</p>
        <p className="mt-1 text-sm text-muted-foreground">{t("not_found_body")}</p>
        <p className="font-medium">{title ?? t("not_found_title")}</p>
        <p className="mt-1 text-sm text-muted-foreground">{body ?? t("not_found_body")}</p>
      </div>
      <Link to="/" className="text-sm font-medium text-primary hover:underline">
        {t("back_to_dashboard")}
      <Link to={linkTo} className="text-sm font-medium text-primary hover:underline">
        {linkLabel ?? t("back_to_dashboard")}
      </Link>
    </div>
  );
+4 −0
Changes for panel/src/i18n/resources/en-US/admin.json: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -155,6 +155,8 @@
  "users_col_status": "Status",
  "users_col_created": "Created",
  "users_view_detail": "Details",
  "user_not_found_title": "No such user",
  "user_not_found_body": "This account may have been deleted. Find it again from the user list.",
  "users_empty_title": "No Users Found",
  "users_empty_hint": "No users match the current filters.",
  "users_back_to_list": "Back to user list",
@@ -168,6 +170,8 @@
  "users_no_linked": "No Minecraft accounts linked yet.",
  "users_link_add": "Link Account",
  "users_link_source": "Auth Source",
  "users_link_source_mojang": "Mojang",
  "users_link_source_thirdparty": "Third-party Yggdrasil",
  "users_link_confirm": "Link",
  "users_unlink_tooltip": "Unlink this Minecraft account",
  "users_unlink_dlg_title": "Unlink Minecraft Account",
+8 −1
Changes for panel/src/i18n/resources/en-US/errors.json: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -84,5 +84,12 @@
  "network_error": "Can't reach Felis: the network is down, or your Cloudflare Access sign-in expired. Reload the page to sign in again.",
  "upstream_unavailable": "The service is unavailable right now (it may be restarting or upgrading). Try again shortly.",
  "bad_path_param": "The name in this link is not valid. Open it again from the list.",
  "payload_too_large": "That is larger than the entry proxy accepts, so it was not sent."
  "payload_too_large": "That is larger than the entry proxy accepts, so it was not sent.",
  "passkey_no_credential": "The browser returned no passkey. Try again.",
  "not_found": "That no longer exists. It may have been deleted; refresh and try again.",
  "conflict": "Something changed in the meantime. Refresh and try again.",
  "bad_request": "The request was not accepted: {{detail}}",
  "restore_in_progress": "Another backup is still being restored to this server's world. Try again once it finishes.",
  "uploads_full": "The upload store is full. An admin has to delete reviewed submissions before new uploads fit.",
  "unsupported_media_type": "The request was sent in a format the server does not accept. Reload the page and try again."
}
+4 −0
Changes for panel/src/i18n/resources/zh-CN/admin.json: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -155,6 +155,8 @@
  "users_col_status": "状态",
  "users_col_created": "创建时间",
  "users_view_detail": "详情",
  "user_not_found_title": "用户不存在",
  "user_not_found_body": "这个账户可能已被删除,请回到用户列表重新查找。",
  "users_empty_title": "未找到用户",
  "users_empty_hint": "没有匹配当前筛选条件的用户。",
  "users_back_to_list": "返回用户列表",
@@ -168,6 +170,8 @@
  "users_no_linked": "尚未关联任何 Minecraft 账号。",
  "users_link_add": "关联账号",
  "users_link_source": "验证源",
  "users_link_source_mojang": "Mojang",
  "users_link_source_thirdparty": "第三方 Yggdrasil",
  "users_link_confirm": "关联",
  "users_unlink_tooltip": "解除此 Minecraft 账号关联",
  "users_unlink_dlg_title": "解除 Minecraft 关联",
+8 −1
Changes for panel/src/i18n/resources/zh-CN/errors.json: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -84,5 +84,12 @@
  "network_error": "连不上 Felis:网络断开了,或者 Cloudflare Access 的登录已过期。刷新页面可以重新登录。",
  "upstream_unavailable": "服务暂时不可用(可能正在重启或升级),请稍后重试。",
  "bad_path_param": "链接里的名称无效,请从列表重新打开。",
  "payload_too_large": "内容超过了入口允许的大小,没有发送成功。"
  "payload_too_large": "内容超过了入口允许的大小,没有发送成功。",
  "passkey_no_credential": "浏览器没有返回 Passkey,请重试。",
  "not_found": "要找的内容已不存在,可能已被删除,请刷新后重试。",
  "conflict": "期间状态已发生变化,请刷新后重试。",
  "bad_request": "请求未被接受:{{detail}}",
  "restore_in_progress": "这台服务器的世界正在恢复另一份备份,请等它完成后再试。",
  "uploads_full": "上传存储已满,需要管理员删除已审核的提交后才能继续上传。",
  "unsupported_media_type": "请求格式不被服务器接受,请刷新页面后重试。"
}
Loading