mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-18 13:28:12 -04:00
Update ImportExport.razor (#1046)
This commit is contained in:
@@ -91,23 +91,22 @@
|
||||
<Button OnClick="@(() => ShowExportConfirmation(ExportType.Csv))">@Localizer["ExportCsvButton"]</Button>
|
||||
</div>
|
||||
|
||||
@*
|
||||
DEBUG-only raw SQLite export. Stripped from release builds.
|
||||
*@
|
||||
#if DEBUG
|
||||
<div class="flex items-center justify-between p-3 border-2 border-dashed border-yellow-400 dark:border-yellow-600 rounded-lg bg-yellow-50 dark:bg-yellow-900/20">
|
||||
<div class="flex-1 min-w-0 mr-4">
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-white">Export raw SQLite</h4>
|
||||
<span class="px-1.5 py-0.5 text-xs font-medium text-yellow-800 dark:text-yellow-200 bg-yellow-200 dark:bg-yellow-800 rounded">DEBUG</span>
|
||||
</div>
|
||||
<p class="text-xs text-gray-600 dark:text-gray-300">
|
||||
Downloads the unencrypted SQLite vault file as-is. Anyone with the file can read everything.
|
||||
</p>
|
||||
@* DEBUG-only raw SQLite export. *@
|
||||
@if (IsDebugBuild)
|
||||
{
|
||||
<div class="flex items-center justify-between p-3 border-2 border-dashed border-yellow-400 dark:border-yellow-600 rounded-lg bg-yellow-50 dark:bg-yellow-900/20">
|
||||
<div class="flex-1 min-w-0 mr-4">
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-white">Export raw SQLite</h4>
|
||||
<span class="px-1.5 py-0.5 text-xs font-medium text-yellow-800 dark:text-yellow-200 bg-yellow-200 dark:bg-yellow-800 rounded">DEBUG</span>
|
||||
</div>
|
||||
<Button OnClick="@ExportVaultSqlite">Download .sqlite</Button>
|
||||
<p class="text-xs text-gray-600 dark:text-gray-300">
|
||||
Downloads the unencrypted SQLite vault file as-is. Anyone with the file can read everything.
|
||||
</p>
|
||||
</div>
|
||||
#endif
|
||||
<Button OnClick="@ExportVaultSqlite">Download .sqlite</Button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user