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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user