mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-17 02:31:18 +01:00
Merge pull request #856 from LarveyOfficial/dashName
✨ Dash Integration: Ability to re-name widget for multiple instances
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
"description": "Displays the graphs of an external Dash. Instance inside Homarr.",
|
||||
"settings": {
|
||||
"title": "Settings for Dash. widget",
|
||||
"dashName": {
|
||||
"label": "Dash. Name"
|
||||
},
|
||||
"url": {
|
||||
"label": "Dash. URL"
|
||||
},
|
||||
|
||||
@@ -13,6 +13,10 @@ const definition = defineWidget({
|
||||
id: 'dashdot',
|
||||
icon: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/dashdot.png',
|
||||
options: {
|
||||
dashName: {
|
||||
type: 'text',
|
||||
defaultValue: 'Dash.',
|
||||
},
|
||||
url: {
|
||||
type: 'text',
|
||||
defaultValue: '',
|
||||
@@ -177,11 +181,11 @@ function DashDotTile({ widget }: DashDotTileProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const { graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
|
||||
const { dashName, graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
|
||||
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Title order={3}>{t('card.title')}</Title>
|
||||
<Title order={3}>{dashName || t('card.title')}</Title>
|
||||
{!info && <p>{t('card.errors.noInformation')}</p>}
|
||||
{info && (
|
||||
<div className={classes.graphsContainer}>
|
||||
|
||||
Reference in New Issue
Block a user