fix translation
This commit is contained in:
@@ -160,7 +160,7 @@ export function SystemAlertGlobal({
|
||||
function AlertContent({ data }: { data: AlertData }) {
|
||||
const { key } = data
|
||||
|
||||
const singleDescription = data.alert?.singleDesc
|
||||
const singleDescription = data.alert.singleDesc?.()
|
||||
|
||||
const [checked, setChecked] = useState(data.checked || false)
|
||||
const [min, setMin] = useState(data.min || 10)
|
||||
|
||||
@@ -303,7 +303,7 @@ export const alertInfo: Record<string, AlertInfo> = {
|
||||
icon: ServerIcon,
|
||||
desc: () => t`Triggers when status switches between up and down`,
|
||||
/** "for x minutes" is appended to desc when only one value */
|
||||
singleDesc: t`System` + " " + t`Down`,
|
||||
singleDesc: () => t`System` + " " + t`Down`,
|
||||
},
|
||||
CPU: {
|
||||
name: () => t`CPU Usage`,
|
||||
|
||||
2
beszel/site/src/types.d.ts
vendored
2
beszel/site/src/types.d.ts
vendored
@@ -202,5 +202,5 @@ interface AlertInfo {
|
||||
desc: () => string
|
||||
max?: number
|
||||
/** Single value description (when there's only one value, like status) */
|
||||
singleDesc?: string
|
||||
singleDesc?: () => string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user