diff --git a/src/components/SignalSourceDialog.vue b/src/components/SignalSourceDialog.vue index a4b114c..9f66ab8 100644 --- a/src/components/SignalSourceDialog.vue +++ b/src/components/SignalSourceDialog.vue @@ -399,15 +399,33 @@ export default defineComponent({ }, ]; - if ( - ($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) != - 0 - ) { - signal_source_options.push({ - label: $t.t("weather"), - value: "EwindowType::Weather", - }); - } + const refresh_signal_source_options = () => { + if ( + ($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) == + 0 + ) { + signal_source_options.push({ + label: $t.t("weather"), + value: "EwindowType::Weather", + }); + } else { + const index = signal_source_options.findIndex( + (element) => element && element.value == "EwindowType::Weather" + ); + if (index != -1) { + signal_source_options.splice(index, 1); + } + } + }; + + refresh_signal_source_options(); + + watch( + () => $store.state.device_attribute, + (value) => { + refresh_signal_source_options(); + } + ); const tree_nodes = computed({ get: () => $store.state.signal_source_tree, diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 553169d..0fd651c 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -157,7 +157,7 @@ export default { "select rootfs upgrade file": "Select Rootfs Upgrade File", "network setting": "Network Setting", "output setting": "Output Setting", - "timing task": "Timing Task", + "timing task": " Timing Task", other: "Other", "auto ip": "Auto IP", "ip address": "Ip Address",