add info dialog for apps

This commit is contained in:
Johannes Zellner
2020-06-10 18:00:50 +02:00
parent 886c668107
commit 429f45a09a
3 changed files with 47 additions and 1 deletions

View File

@@ -30,6 +30,35 @@
</div>
</div>
<!-- Modal app info -->
<div class="modal fade" id="appInfoModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<img ng-src="{{appInfo.app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-info-icon" style="padding-right: 10px;"/>
<h4 style="margin-top: 0;">
{{ appInfo.app.manifest.title }}
<br/>
<span class="text-small text-muted">Package <a ng-href="/#/appstore/{{appInfo.app.manifest.id}}?version={{appInfo.app.manifest.version}}">v{{ appInfo.app.manifest.version }}</a></span>
<br/>
<span class="text-small text-muted" ng-show="appInfo.app.upstreamVersion">App v{{ appInfo.app.upstreamVersion }}</a></span>
</h5>
</div>
<div class="modal-body">
<p ng-show="appInfo.app.manifest.documentationUrl">Please see the <a target="_blank" ng-href="{{appInfo.app.manifest.documentationUrl}}">documentation</a> for helpful information and common topics for this app.</p>
<p>If you need further help, refer to the <a target="_blank" ng-href="{{ appInfo.app.manifest.forumUrl || 'https://forum.cloudron.io' }}">forum section</a>.</p>
<p>The logs can be viewed and downloaded <a ng-href="{{ '/logs.html?appId=' + app.id }}" target="_blank">here</a>.</p>
<h4 ng-show="appInfo.app.manifest.postInstallMessage" style="padding-top: 20px;">First Time Setup</h4>
<div ng-bind-html="appInfo.app.manifest.postInstallMessage | postInstallMessage:appInfo.app | markdown2html"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script>
function imageErrorHandler(elem) {
'use strict';
@@ -104,6 +133,7 @@
</div>
<div class="grid-item-actions" ng-show="user.isAtLeastAdmin">
<a ng-href="" class="hand" ng-click="appInfo.show(app)"><i class="fas fa-info-circle"></i></a>
<a ng-href="#/app/{{ app.id}}/display"><i class="fas fa-cogs"></i></a>
</div>