dashboard: make app update section a bit more explicit

This commit is contained in:
Johannes Zellner
2024-07-11 17:51:20 +02:00
parent d98ec77abf
commit 19100c7999
3 changed files with 17 additions and 10 deletions

View File

@@ -1570,27 +1570,34 @@
</div>
<div ng-show="app.appStoreId" class="row">
<div class="col-md-6" style="line-height: 34px;">
<div class="col-md-8" style="line-height: 34px;">
<span class="text-success" ng-show="app.enableAutomaticUpdate">{{ 'app.updates.auto.enabled' | tr }}</span>
<span class="text-danger" ng-hide="app.enableAutomaticUpdate">{{ 'app.updates.auto.disabled' | tr }}</span>
</div>
<div class="col-md-6 text-right">
<div class="col-md-4 text-right">
<button class="btn btn-primary" uib-tooltip="{{ app.appStoreId ? '' : 'Not available for custom apps' }}" ng-class="{ 'btn-danger': app.enableAutomaticUpdate }" ng-click="updates.toggleAutomaticUpdates()" ng-disabled="updates.busyAutomaticUpdates || !app.appStoreId"><i class="fa fa-circle-notch fa-spin" ng-show="updates.busyAutomaticUpdates"></i> {{ app.enableAutomaticUpdate ? ('app.updates.auto.disableAction' | tr) : ('app.updates.auto.enableAction' | tr) }} </button>
</div>
</div>
<hr ng-show="app.appStoreId"/>
<br/>
<div class="row" ng-show="app.appStoreId">
<div class="row" ng-show="app.appStoreId && !(config.update[app.id].manifest.version && config.update[app.id].manifest.version !== app.manifest.version)">
<div class="col-md-6" style="line-height: 34px;">
<span class="text-success" ng-show="!updates.busyCheck && !(config.update[app.id].manifest.version && config.update[app.id].manifest.version !== app.manifest.version)">{{ 'app.updates.noUpdates' | tr }}</span>
<span class="text-success">{{ 'app.updates.noUpdates' | tr }}</span>
</div>
<div class="col-md-6 text-right">
<button type="button" class="btn" ng-class="config.update[app.id].unstable ? 'btn-danger' : 'btn-success'" ng-click="updates.askUpdate()" ng-disabled="app.error || app.runState === 'stopped'" ng-hide="!(config.update[app.id].manifest.version && config.update[app.id].manifest.version !== app.manifest.version && app.installationState !== 'pending_update') || app.taskId" tooltip-enable="app.error || app.taskId || app.runState === 'stopped'" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is not running' }}">{{ 'app.updateDialog.updateAction' | tr }}</button>
<button class="btn btn-default btn-outline" ng-click="updates.check()" ng-disabled="updates.busyCheck"><i class="fas fa-sync-alt fa-spin" ng-show="updates.busyCheck"></i><i class="fas fa-sync-alt" ng-hide="updates.busyCheck"></i> {{ 'settings.updates.checkForUpdatesAction' | tr }}</button>
</div>
</div>
<div class="row" ng-show="app.appStoreId && config.update[app.id].manifest.version && config.update[app.id].manifest.version !== app.manifest.version && app.installationState !== 'pending_update' && !app.taskId">
<div class="col-md-6" style="line-height: 34px;">
<span class="text-success">Update is available</span>
</div>
<div class="col-md-6 text-right">
<button type="button" class="btn" ng-class="config.update[app.id].unstable ? 'btn-danger' : 'btn-success'" ng-click="updates.askUpdate()" ng-disabled="app.error || app.runState === 'stopped'" tooltip-enable="app.error || app.taskId || app.runState === 'stopped'" uib-tooltip="{{ app.error ? 'App is in error state' : 'App is not running' }}">{{ 'app.updateDialog.updateAction' | tr }}</button>
</div>
</div>
</div>
<div class="card" ng-show="view === 'backups'">