Append random query to ensure the avatar is refetched

This commit is contained in:
Johannes Zellner
2017-01-28 19:10:51 -08:00
parent eff9de3ded
commit e14b59af5d
5 changed files with 20 additions and 5 deletions

View File

@@ -34,6 +34,10 @@
app.controller('Controller', ['$scope', '$http', function ($scope, $http) {
$scope.errorMessage = '';
$scope.statusOk = false;
$scope.avatarUrl = '/api/v1/cloudron/avatar?' + Math.random();
var favicon = $('#favicon');
if (favicon) favicon.attr('href', $scope.avatarUrl);
// try to fetch the cloudron status
$http.get('/api/v1/cloudron/status').success(function(data, status) {
@@ -58,7 +62,7 @@
<div class="wrapper">
<div class="content">
<img src="/api/v1/cloudron/avatar" onerror="this.src = '/img/logo_inverted_192.png'"/>
<img ng-src="avatarUrl" onerror="this.src = '/img/logo_inverted_192.png'"/>
<h1> Cloudron </h1>
<div ng-show="errorCode == 0">