feat: Add error_message placeholder for uptime notifications

- Add support for the `${error_message}` placeholder in uptime service notifications
This commit is contained in:
Tola Leng
2025-08-12 22:26:51 +07:00
parent 37bc86e9d8
commit d4636d5436
2 changed files with 22 additions and 0 deletions
@@ -221,6 +221,23 @@ export const PlaceholdersTabContent: React.FC<PlaceholdersTabContentProps> = ({
</FormItem>
)}
/>
<FormField
control={control}
name="error_message_placeholder"
render={({ field }) => (
<FormItem>
<FormLabel>Error Message Placeholder</FormLabel>
<FormControl>
<Input placeholder="${error_message}" {...field} />
</FormControl>
<FormDescription className="text-xs">
Used for error details when service is down
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
</div>
</CardContent>
</Card>
@@ -283,6 +300,10 @@ export const PlaceholdersTabContent: React.FC<PlaceholdersTabContentProps> = ({
<code className="text-xs">${"{time}"}</code>
<p className="text-xs text-muted-foreground mt-1">Current date and time</p>
</div>
<div className="bg-muted/30 p-2 rounded">
<code className="text-xs">${"{error_message}"}</code>
<p className="text-xs text-muted-foreground mt-1">Error details when service is down</p>
</div>
</div>
</div>
</CardContent>