Introduce the sso marker for postInstallMessage
The marker is "=== sso ===" The part before the marker is shown if sso i disabled, the remaining part is shown when sso is enabled. If no marker is found, the whole text is shown
This commit is contained in:
@@ -235,6 +235,21 @@ app.filter('markdown2html', function () {
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('postInstallMessage', function () {
|
||||
var SSO_MARKER = '=== sso ===';
|
||||
|
||||
return function (text, app) {
|
||||
if (!app) return text;
|
||||
|
||||
var parts = text.split(SSO_MARKER);
|
||||
if (parts.length === 1) return text;
|
||||
|
||||
if (app.sso) return parts[1];
|
||||
else return parts[0];
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// keep this in sync with eventlog.js
|
||||
var ACTION_ACTIVATE = 'cloudron.activate';
|
||||
var ACTION_APP_CONFIGURE = 'app.configure';
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="app-postinstall-message">
|
||||
<div ng-bind-html="appPostInstall.message | markdown2html"></div>
|
||||
<div ng-bind-html="appPostInstall.message | postInstallMessage:appPostInstall.app | markdown2html"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
<div class="collapse" id="postInstallMessage" data-toggle="false">
|
||||
<div class="appstore-install-description">
|
||||
<div ng-bind-html="appInstall.app.manifest.postInstallMessage | markdown2html"></div>
|
||||
<div ng-bind-html="appInstall.app.manifest.postInstallMessage | postInstallMessage:appInstall.app | markdown2html"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user