diff --git a/dashboard/src/js/client.js b/dashboard/src/js/client.js index f61b92b6f..1009db9ab 100644 --- a/dashboard/src/js/client.js +++ b/dashboard/src/js/client.js @@ -3703,7 +3703,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout } else if (data.label) { return `Label ${appName('of', app)} was set to ${data.label}`; } else if (data.tags) { - return `Tags ${appName('of', app)} were set to ${data.tags.join(', ')}`; + return `Tags ${appName('of', app)} was set to ${data.tags.join(', ')}`; } else if (data.icon) { return 'Icon ' + appName('of', app) + ' was changed'; } else if (data.memoryLimit) { @@ -3721,9 +3721,9 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout return appName('', app, 'App') + ' was taken out of repair mode'; } } else if ('enableBackup' in data) { - return 'Automatic backups ' + appName('of', app) + ' were ' + (data.enableBackup ? 'enabled' : 'disabled'); + return 'Automatic backups ' + appName('of', app) + ' was ' + (data.enableBackup ? 'enabled' : 'disabled'); } else if ('enableAutomaticUpdate' in data) { - return 'Automatic updates ' + appName('of', app) + ' were ' + (data.enableAutomaticUpdate ? 'enabled' : 'disabled'); + return 'Automatic updates ' + appName('of', app) + ' was ' + (data.enableAutomaticUpdate ? 'enabled' : 'disabled'); } else if ('reverseProxyConfig' in data) { return 'Reverse proxy configuration ' + appName('of', app) + ' was updated'; } else if ('upstreamUri' in data) { diff --git a/dashboard/src/translation/en.json b/dashboard/src/translation/en.json index a7f275ee4..7f1c685be 100644 --- a/dashboard/src/translation/en.json +++ b/dashboard/src/translation/en.json @@ -1592,18 +1592,18 @@ "packageVersion": "Package Version", "lastUpdated": "Last Updated", "checkForUpdatesAction": "Check for Updates", - "customAppUpdateInfo": "Updates are not available for custom apps", + "customAppUpdateInfo": "Auto-update is not available for custom apps", "updateAvailableAction": "Update Available", "repository": "Package Repository", "installedAt": "Installed At" }, "auto": { "title": "Automatic Updates", - "description": "Cloudron periodically checks the App Store for updates. If you disable automatic updates, be sure to manually apply the updates.", + "description": "Cloudron periodically checks the App Store for updates.", "enabled": "Automatic Updates is currently enabled.", "disabled": "Automatic Updates is currently disabled.", - "disableAction": "Disable", - "enableAction": "Enable" + "disableAction": "Disable Auto-update", + "enableAction": "Enable Auto-update" }, "noUpdates": "No new updates available" }, diff --git a/dashboard/src/translation/nl.json b/dashboard/src/translation/nl.json index f639ed95f..42cb6f846 100644 --- a/dashboard/src/translation/nl.json +++ b/dashboard/src/translation/nl.json @@ -1047,8 +1047,8 @@ "title": "Automatische updates", "enabled": "Automatische updates zijn momenteel ingeschakeld.", "disabled": "Automatische updates zijn momenteel uitgeschakeld.", - "disableAction": "Automatische updates uitschakelen", - "enableAction": "Automatische updates inschakelen", + "disableAction": "Uitschakelen", + "enableAction": "Inschakelen", "description": "Cloudron controleert de App Store periodiek op updates. Als je dit uitschakelt zorg er dan voor dat je updates handmatig installeert." }, "noUpdates": "Geen nieuwe updates beschikbaar" @@ -1870,7 +1870,8 @@ "es": "Spaans", "ru": "Russisch", "pt": "Portugees", - "da": "Deens" + "da": "Deens", + "id": "Indonesisch" }, "passwordResetEmail": { "subject": "[<%= cloudron %>] Wachtwoord herstellen", diff --git a/dashboard/src/views/app.html b/dashboard/src/views/app.html index e8da4856f..72d919856 100644 --- a/dashboard/src/views/app.html +++ b/dashboard/src/views/app.html @@ -1557,45 +1557,26 @@

-
-
- {{ 'app.updates.info.customAppUpdateInfo' | tr }} -
-
- -
+
-

{{ 'app.updates.auto.description' | tr }}

-
-
- -
-
- {{ 'app.updates.auto.enabled' | tr }} - {{ 'app.updates.auto.disabled' | tr }} -
-
- +

+ + {{ 'app.updates.auto.enabled' | tr }} + {{ 'app.updates.auto.disabled' | tr }} + {{ 'app.updates.info.customAppUpdateInfo' | tr }} +


-
-
- {{ 'app.updates.noUpdates' | tr }} -
-
- -
-
- -
-
- Update is available -
-
- +
+
+ + + + +
diff --git a/dashboard/src/views/app.js b/dashboard/src/views/app.js index 962e9c7b3..4fccfd44a 100644 --- a/dashboard/src/views/app.js +++ b/dashboard/src/views/app.js @@ -1287,21 +1287,27 @@ angular.module('Application').controller('AppController', ['$scope', '$location' busyUpdate: false, busyAutomaticUpdates: false, skipBackup: false, + enableAutomaticUpdate: true, show: function () { $scope.updates.skipBackup = false; + $scope.updates.enableAutomaticUpdate = $scope.app.enableAutomaticUpdate; }, toggleAutomaticUpdates: function () { $scope.updates.busyAutomaticUpdates = true; - Client.configureApp($scope.app.id, 'automatic_update', { enable: !$scope.app.enableAutomaticUpdate }, function (error) { + Client.configureApp($scope.app.id, 'automatic_update', { enable: !$scope.updates.enableAutomaticUpdate }, function (error) { if (error) return Client.error(error); refreshApp($scope.app.id, function (error) { if (error) console.error(error); - $scope.updates.busyAutomaticUpdates = false; + $timeout(function () { + console.log($scope.updates.enableAutomaticUpdate, $scope.app.enableAutomaticUpdate); + $scope.updates.enableAutomaticUpdate = $scope.app.enableAutomaticUpdate; + $scope.updates.busyAutomaticUpdates = false; + }, 2000); }); }); },