dashboard: only show postinstall if notes are not just empty

This commit is contained in:
Johannes Zellner
2024-06-27 16:20:19 +02:00
parent 581a294af1
commit f7b14b2ee8

View File

@@ -148,14 +148,14 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
placeholder: 'Add admin notes here...',
edit: function () {
$scope.info.notes.content = $scope.app.notes || $scope.app.manifest.postInstallMessage;
$scope.info.notes.content = $scope.app.notes === null ? $scope.app.manifest.postInstallMessage : $scope.app.notes;
$scope.info.notes.editing = true;
setTimeout(function () { document.getElementById('adminNotesTextarea').focus(); }, 1);
},
dismiss: function () {
$scope.info.notes.content = $scope.app.notes || $scope.app.manifest.postInstallMessage;
$scope.info.notes.content = $scope.app.notes === null ? $scope.app.manifest.postInstallMessage : $scope.app.notes;
$scope.info.notes.editing = false;
},
@@ -175,7 +175,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
refreshApp($scope.app.id, function (error) {
if (error) return Client.error(error);
$scope.info.notes.content = $scope.app.notes || $scope.app.manifest.postInstallMessage;
$scope.info.notes.content = $scope.app.notes === null ? $scope.app.manifest.postInstallMessage : $scope.app.notes;
$scope.info.notes.busySave = false;
$scope.info.notes.editing = false;
});
@@ -185,7 +185,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
$scope.info.hasOldChecklist = !!Object.keys($scope.app.checklist).find((k) => { return $scope.app.checklist[k].acknowledged; });
$scope.info.notes.content = $scope.app.notes || $scope.app.manifest.postInstallMessage;
$scope.info.notes.content = $scope.app.notes === null ? $scope.app.manifest.postInstallMessage : $scope.app.notes;
$scope.info.notes.editing = false;
$scope.info.notes.busy = false;
},