diff --git a/dashboard/src/js/client.js b/dashboard/src/js/client.js index d9dc91490..6ea8bb883 100644 --- a/dashboard/src/js/client.js +++ b/dashboard/src/js/client.js @@ -826,8 +826,16 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; + Client.prototype.hasCloudronBackground = function (callback) { + get('/api/v1/branding/cloudron_background', null, function (error, data, status) { + console.log('hasCloudronBackground...') + if (error && error.statusCode !== 404) callback(error); + else if (error) callback(null, false); + else callback(null, status === 200); + }); + }; + Client.prototype.changeCloudronBackground = function (background, callback) { - // Blob type if object var fd = new FormData(); if (background) fd.append('background', background); @@ -839,6 +847,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout post('/api/v1/branding/cloudron_background', fd, config, function (error, data, status) { if (error) return callback(error); if (status !== 202) return callback(new ClientError(status, data)); + callback(null); }); }; diff --git a/dashboard/src/theme.scss b/dashboard/src/theme.scss index febdfdc73..e60654042 100644 --- a/dashboard/src/theme.scss +++ b/dashboard/src/theme.scss @@ -1745,8 +1745,8 @@ footer { .branding-background { position: relative; cursor: pointer; - width: 64px; - height: 64px; + width: 256px; + max-height: 256px; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; diff --git a/dashboard/src/views/branding.html b/dashboard/src/views/branding.html index 950ee47da..db2cfac44 100644 --- a/dashboard/src/views/branding.html +++ b/dashboard/src/views/branding.html @@ -55,12 +55,13 @@