From cd26b3e77a7f858c0309edb704a3bbc3bca10716 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Mon, 4 May 2026 11:48:55 +0200 Subject: [PATCH] Update ImportExport.razor (#1046) --- .../Settings/ImportExport/ImportExport.razor | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor b/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor index 47790e5b8..0b35fa698 100644 --- a/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor +++ b/apps/server/AliasVault.Client/Main/Pages/Settings/ImportExport/ImportExport.razor @@ -91,23 +91,22 @@ -@* - DEBUG-only raw SQLite export. Stripped from release builds. -*@ -#if DEBUG -
-
-
-

Export raw SQLite

- DEBUG -
-

- Downloads the unencrypted SQLite vault file as-is. Anyone with the file can read everything. -

+@* DEBUG-only raw SQLite export. *@ +@if (IsDebugBuild) +{ +
+
+
+

Export raw SQLite

+ DEBUG
- +

+ Downloads the unencrypted SQLite vault file as-is. Anyone with the file can read everything. +

-#endif + +
+}
@@ -130,6 +129,13 @@ OnClose="@CloseExportPasswordModal" /> @code { + // Assign debug static flag for Razor markup check. +#if DEBUG + private static readonly bool IsDebugBuild = true; +#else + private static readonly bool IsDebugBuild = false; +#endif + private string _username = string.Empty; private bool _showPasswordConfirmation; private string _passwordError = string.Empty; @@ -313,8 +319,7 @@ } } -#if DEBUG - // DEBUG-only: downloads the in-memory SQLite vault in unencrypted form. + // Always defined so the markup binding compiles, only invoked when IsDebugBuild is true. private async Task ExportVaultSqlite() { GlobalLoadingSpinner.Show("Exporting SQLite vault..."); @@ -334,7 +339,6 @@ GlobalLoadingSpinner.Hide(); } } -#endif private async Task ExportVaultAvux() {