diff --git a/assets/js/components/Config/DeviceCard.vue b/assets/js/components/Config/DeviceCard.vue
index 2f436c7f2..b78282def 100644
--- a/assets/js/components/Config/DeviceCard.vue
+++ b/assets/js/components/Config/DeviceCard.vue
@@ -4,24 +4,23 @@
- {{ name }}
-
@@ -40,6 +39,7 @@ export default {
name: "DeviceCard",
props: {
name: String,
+ title: String,
editable: Boolean,
error: Boolean,
},
@@ -49,8 +49,20 @@ export default {
tooltip: null,
};
},
+ computed: {
+ tooltipTitle() {
+ if (!this.name) {
+ return "";
+ }
+ let title = `${this.$t("config.main.name")}: ${this.name}`;
+ if (!this.editable) {
+ title += `${this.$t("config.main.yaml")}
`;
+ }
+ return `${title}
`;
+ },
+ },
watch: {
- editable() {
+ tooltipTitle() {
this.initTooltip();
},
},
@@ -58,6 +70,12 @@ export default {
this.initTooltip();
},
methods: {
+ edit() {
+ if (this.editable) {
+ this.tooltip?.hide();
+ this.$emit("edit");
+ }
+ },
initTooltip() {
this.$nextTick(() => {
this.tooltip?.dispose();
@@ -85,4 +103,7 @@ export default {
margin-left: -1.5rem;
margin-right: -1.5rem;
}
+button:disabled {
+ pointer-events: auto;
+}
diff --git a/assets/js/views/Config.vue b/assets/js/views/Config.vue
index 53bcdade4..d3bb90ad6 100644
--- a/assets/js/views/Config.vue
+++ b/assets/js/views/Config.vue
@@ -40,7 +40,8 @@
{{ $t("config.section.grid") }} 🧪