diff --git a/Duplicati/Server/Duplicati.Server.Serialization/Serializer.cs b/Duplicati/Server/Duplicati.Server.Serialization/Serializer.cs index 50717046a..7f3283790 100644 --- a/Duplicati/Server/Duplicati.Server.Serialization/Serializer.cs +++ b/Duplicati/Server/Duplicati.Server.Serialization/Serializer.cs @@ -39,15 +39,11 @@ namespace Duplicati.Server.Serialization { JsonSettings = new JsonSerializerSettings { - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy() - }, ReferenceLoopHandling = ReferenceLoopHandling.Ignore, Converters = new JsonConverter[] { new DayOfWeekConcerter(), - new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() }, + new StringEnumConverter(), new SerializableStatusCreator(), new SettingsCreator(), new FilterCreator(), diff --git a/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js b/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js index 1ff35724e..426694dd6 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js @@ -203,16 +203,16 @@ backupApp.service('ServerStatus', function ($rootScope, $timeout, AppService, Ap function handleServerState(response) { var oldEventId = state.lastEventId; var anychanged = - notifyIfChanged(response.data, 'lastEventID', 'lastEventId') | - notifyIfChanged(response.data, 'lastDataUpdateID', 'lastDataUpdateId') | - notifyIfChanged(response.data, 'lastNotificationUpdateID', 'lastNotificationUpdateId') | - notifyIfChanged(response.data, 'activeTask', 'activeTask') | - notifyIfChanged(response.data, 'programState', 'programState') | - notifyIfChanged(response.data, 'estimatedPauseEnd', 'estimatedPauseEnd') | - notifyIfChanged(response.data, 'updaterState', 'updaterState') | - notifyIfChanged(response.data, 'updateDownloadLink', 'updateDownloadLink') | - notifyIfChanged(response.data, 'updatedVersion', 'updatedVersion') | - notifyIfChanged(response.data, 'updateDownloadProgress', 'updateDownloadProgress'); + notifyIfChanged(response.data, 'LastEventID', 'lastEventId') | + notifyIfChanged(response.data, 'LastDataUpdateID', 'lastDataUpdateId') | + notifyIfChanged(response.data, 'LastNotificationUpdateID', 'lastNotificationUpdateId') | + notifyIfChanged(response.data, 'ActiveTask', 'activeTask') | + notifyIfChanged(response.data, 'ProgramState', 'programState') | + notifyIfChanged(response.data, 'EstimatedPauseEnd', 'estimatedPauseEnd') | + notifyIfChanged(response.data, 'UpdaterState', 'updaterState') | + notifyIfChanged(response.data, 'UpdateDownloadLink', 'updateDownloadLink') | + notifyIfChanged(response.data, 'UpdatedVersion', 'updatedVersion') | + notifyIfChanged(response.data, 'UpdateDownloadProgress', 'updateDownloadProgress'); if (!angular.equals(state.proposedSchedule, response.data.ProposedSchedule)) { diff --git a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js index e3a5e10b9..a31819d8a 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js @@ -125,7 +125,7 @@ backupApp.service('SystemInfo', function($rootScope, $timeout, $cookies, AppServ if (reload !== true) { uiLanguage = $cookies.get('ui-locale'); if ((uiLanguage || '').trim().length == 0) { - gettextCatalog.setCurrentLanguage(state.browserLocale.code.replace("-", "_")); + gettextCatalog.setCurrentLanguage(state.BrowserLocale.Code.replace("-", "_")); } else { gettextCatalog.setCurrentLanguage(uiLanguage.replace("-", "_")); } diff --git a/Duplicati/WebserverCore/DuplicatiWebserver.cs b/Duplicati/WebserverCore/DuplicatiWebserver.cs index 840538376..7ab29dd43 100644 --- a/Duplicati/WebserverCore/DuplicatiWebserver.cs +++ b/Duplicati/WebserverCore/DuplicatiWebserver.cs @@ -21,8 +21,8 @@ public class DuplicatiWebserver builder.Host.UseRESTHandlers(); builder.Services.ConfigureHttpJsonOptions(opt => { - opt.SerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; - opt.SerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); + opt.SerializerOptions.PropertyNamingPolicy = null; + opt.SerializerOptions.Converters.Add(new JsonStringEnumConverter()); }); builder.Services.AddControllers() // This app gets launched by a different assembly, so we need to tell it to look in this one diff --git a/Duplicati/WebserverCore/Extensions/ServiceCollectionsExtensions.cs b/Duplicati/WebserverCore/Extensions/ServiceCollectionsExtensions.cs index dcfb5db0e..8bb2fadf6 100644 --- a/Duplicati/WebserverCore/Extensions/ServiceCollectionsExtensions.cs +++ b/Duplicati/WebserverCore/Extensions/ServiceCollectionsExtensions.cs @@ -1,4 +1,3 @@ -using Duplicati.Library.AutoUpdater; using Duplicati.Library.IO; using Duplicati.Library.RestAPI; using Duplicati.Library.RestAPI.Abstractions;