Add local JSON account import and export
This commit is contained in:
@@ -7,5 +7,7 @@ namespace Wino.Core.Domain.Interfaces;
|
||||
public interface IWinoAccountDataSyncService
|
||||
{
|
||||
Task<WinoAccountSyncExportResult> ExportAsync(WinoAccountSyncSelection selection, CancellationToken cancellationToken = default);
|
||||
Task<WinoAccountSyncFileExportResult> ExportToJsonAsync(WinoAccountSyncSelection selection, CancellationToken cancellationToken = default);
|
||||
Task<WinoAccountSyncImportResult> ImportAsync(WinoAccountSyncSelection selection, CancellationToken cancellationToken = default);
|
||||
Task<WinoAccountSyncImportResult> ImportFromJsonAsync(string jsonContent, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public sealed class WinoAccountSyncFileExportResult
|
||||
{
|
||||
public string JsonContent { get; init; } = string.Empty;
|
||||
public WinoAccountSyncExportResult ExportResult { get; init; } = new();
|
||||
}
|
||||
@@ -1339,9 +1339,10 @@
|
||||
"WelcomeWindow_GetStartedButton": "Get started by adding an account",
|
||||
"WelcomeWindow_GetStartedDescription": "Add your Outlook, Gmail, or IMAP account to get started with Wino Mail.",
|
||||
"WelcomeWindow_ImportFromWinoAccount": "Import from your Wino Account",
|
||||
"WelcomeWindow_ImportInProgress": "Importing your synchronized preferences and accounts...",
|
||||
"WelcomeWindow_ImportNoAccountsFound": "No synced accounts were found in your Wino Account. If preferences were available, they were restored. Use Get started to add an account manually.",
|
||||
"WelcomeWindow_ImportDuplicateAccountsSkipped": "{0} synced accounts are already available on this device. Use Get started to add another account manually if needed.",
|
||||
"WelcomeWindow_ImportFromJsonFile": "Import from a JSON file",
|
||||
"WelcomeWindow_ImportInProgress": "Importing preferences and accounts...",
|
||||
"WelcomeWindow_ImportNoAccountsFound": "No accounts were found to import. If preferences were available, they were restored. Use Get started to add an account manually.",
|
||||
"WelcomeWindow_ImportDuplicateAccountsSkipped": "{0} imported accounts are already available on this device. Use Get started to add another account manually if needed.",
|
||||
"WelcomeWindow_SetupTitle": "Set up your account",
|
||||
"WelcomeWindow_SetupSubtitle": "Choose your email provider to get started",
|
||||
"WelcomeWindow_AddAccountButton": "Add account",
|
||||
@@ -1400,13 +1401,13 @@
|
||||
"WinoAccount_Management_StatusLabel": "Status: {0}",
|
||||
"WinoAccount_Management_NoRemoteSettings": "There is no synchronized data stored for this account yet.",
|
||||
"WinoAccount_Management_ExportSucceeded": "Your selected Wino data was exported successfully.",
|
||||
"WinoAccount_Management_ExportPreferencesSucceeded": "Your preferences were exported to your Wino Account.",
|
||||
"WinoAccount_Management_ExportAccountsSucceeded": "Exported {0} account details to your Wino Account.",
|
||||
"WinoAccount_Management_ExportPreferencesSucceeded": "Your preferences were exported.",
|
||||
"WinoAccount_Management_ExportAccountsSucceeded": "Exported {0} account details.",
|
||||
"WinoAccount_Management_ImportSucceeded": "Imported synchronized data from your Wino Account.",
|
||||
"WinoAccount_Management_ImportPreferencesSucceeded": "Applied {0} synchronized preferences.",
|
||||
"WinoAccount_Management_ImportPreferencesSucceeded": "Applied {0} preferences.",
|
||||
"WinoAccount_Management_ImportAccountsSucceeded": "Imported {0} accounts.",
|
||||
"WinoAccount_Management_ImportDuplicateAccountsSkipped": "Skipped {0} accounts that already exist on this device.",
|
||||
"WinoAccount_Management_ImportPartial": "Applied {0} synchronized preferences. {1} preferences could not be restored.",
|
||||
"WinoAccount_Management_ImportPartial": "Applied {0} preferences. {1} preferences could not be restored.",
|
||||
"WinoAccount_Management_ImportReloginReminder": "Passwords, tokens, and other sensitive information were not imported. Sign in again for each account on this device before using it.",
|
||||
"WinoAccount_Management_SerializeFailed": "Wino could not serialize your current preferences.",
|
||||
"WinoAccount_Management_EmptyExport": "There are no preference values to export.",
|
||||
@@ -1418,6 +1419,12 @@
|
||||
"WinoAccount_Management_ExportDialog_AccountsDisclaimer": "Passwords, tokens, and other sensitive information are not synced.",
|
||||
"WinoAccount_Management_ExportDialog_AccountsRelogin": "Imported accounts on another PC will still need you to sign in again before they can be used.",
|
||||
"WinoAccount_Management_ExportDialog_InProgress": "Exporting your selected Wino data...",
|
||||
"WinoAccount_Management_LocalDataSectionTitle": "Transfer with a JSON file",
|
||||
"WinoAccount_Management_LocalDataSectionDescription": "Import from or export to a local JSON file. Passwords, tokens, and other sensitive information are not included.",
|
||||
"WinoAccount_Management_LocalDataImportAction": "Import JSON",
|
||||
"WinoAccount_Management_LocalDataExportAction": "Export JSON",
|
||||
"WinoAccount_Management_LocalDataSaved": "Saved your exported Wino data to {0}.",
|
||||
"WinoAccount_Management_LocalDataInvalidFile": "The selected JSON file doesn't contain a valid Wino export.",
|
||||
"WinoAccount_Management_LoadFailed": "Wino could not load the latest Wino Account information.",
|
||||
"WinoAccount_Management_ActionFailed": "The Wino Account request could not be completed.",
|
||||
"WinoAccount_SettingsSection_Title": "Wino Account",
|
||||
|
||||
Reference in New Issue
Block a user