fix(dev): refresh Backend Status URL after save in debug panel

activeBackendUrl was a computed with no reactive deps, so it stayed stale
until the panel remounted. Use a ref and update it in syncBackendState().
This commit is contained in:
Jose Olarte III
2026-06-03 17:53:54 +08:00
parent 227ae85bb7
commit 00abd5277f

View File

@@ -305,9 +305,7 @@ const backendUrlDraft = ref("");
const testModeEnabled = ref(NotificationDebugService.isTestModeEnabled());
const fcmToken = ref<string | null>(NotificationDebugService.getFcmToken());
const activeBackendUrl = computed(() =>
NotificationDebugService.getActiveBackendUrl(),
);
const activeBackendUrl = ref(NotificationDebugService.getActiveBackendUrl());
const truncatedFcmToken = computed(() => {
const t = fcmToken.value?.trim() ?? "";
@@ -384,6 +382,7 @@ function syncBackendState(): void {
NotificationDebugService.getBackendUrlOverride() ?? "";
testModeEnabled.value = NotificationDebugService.isTestModeEnabled();
fcmToken.value = NotificationDebugService.getFcmToken();
activeBackendUrl.value = NotificationDebugService.getActiveBackendUrl();
}
function onSaveBackendUrl(): void {