Fixup postinstall message if app link is clicked

This commit is contained in:
Johannes Zellner
2019-09-27 19:43:03 +02:00
parent 57f1751309
commit 2ce5b28048
3 changed files with 42 additions and 20 deletions

View File

@@ -153,20 +153,25 @@
<!-- Modal postinstall -->
<div class="modal fade" id="postInstallModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>First Time Setup</h4>
</div>
<div class="modal-body">
<div ng-bind-html="app.manifest.postInstallMessage | postInstallMessage:app | markdown2html"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>First Time Setup</h4>
</div>
<div class="modal-body">
<div ng-bind-html="app.manifest.postInstallMessage | postInstallMessage:app | markdown2html"></div>
</div>
<div class="modal-footer">
<div class="form-group pull-left" ng-show="postInstallMessage.openApp">
<input type="checkbox" id="appPostInstallConfirmCheckbox" ng-model="postInstallMessage.confirmed">
<label class="control-label" for="appPostInstallConfirmCheckbox">Acknowledge instructions</label>
</div>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<a class="btn btn-success" ng-href="{{ postInstallMessage.confirmed ? ('https://' + app.fqdn) : '' }}" target="_blank" ng-disabled="!postInstallMessage.confirmed" ng-click="postInstallMessage.submit()" ng-show="postInstallMessage.openApp">Open {{ app.manifest.title }}</a>
</div>
</div>
</div>
</div>
<!-- Modal update app -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog">
@@ -267,18 +272,18 @@
<div class="col-md-8">
<div class="app-header-container">
<h1>
<a ng-href="{{ app | applicationLink }}" target="_blank">{{ app.label || app.fqdn }} <sup ng-show="app | appIsInstalledAndHealthy"><i class="fas fa-external-link-alt" style="font-size: 12px;"></i></sup></a>
<a ng-href="{{ app | applicationLink }}" target="_blank" ng-class="{ 'hand': (app | appIsInstalledAndHealthy) }" ng-click="(app | appIsInstalledAndHealthy) && app.pendingPostInstallConfirmation && postInstallMessage.show(true)">{{ app.label || app.fqdn }} <sup ng-show="app | appIsInstalledAndHealthy"><i class="fas fa-external-link-alt" style="font-size: 12px;"></i></sup></a>
<br/>
<span class="text-small">{{ app | installationStateLabel:user }}</span>
</h1>
<div>
<div class="dropdown">
<button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-sm btn-info dropdown-toggle" type="button" data-toggle="dropdown">
Documentation
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li ng-class="{ 'disabled': !app.manifest.postInstallMessage }"><a href="" ng-click="showPostInstall()">First Time Setup</a></li>
<li ng-class="{ 'disabled': !app.manifest.postInstallMessage }"><a href="" ng-click="postInstallMessage.show(false)">First Time Setup</a></li>
<li><a ng-href="{{ app.manifest.documentationUrl }}" target="_blank">Documentation</a></li>
<li role="separator" class="divider"></li>
<li><a ng-href="{{ app.manifest.website }}" target="_blank">Project Website</a></li>