Compare commits

...

4 Commits

Author SHA1 Message Date
Girish Ramakrishnan 2386545814 Add a note why oldConfig can be null 2015-08-17 10:05:07 -07:00
Johannes Zellner 2059152dd3 remove obsolete sendError() function 2015-08-17 14:55:56 +02:00
Johannes Zellner 32d2c260ab Move appstore badges out of the way for the app titles 2015-08-17 11:50:31 +02:00
Johannes Zellner 384c7873aa Correctly mark apps pending for approval
Fixes #339
2015-08-17 11:50:08 +02:00
4 changed files with 11 additions and 16 deletions
+1
View File
@@ -671,6 +671,7 @@ function restore(app, callback) {
// note that configure is called after an infra update as well
function configure(app, callback) {
// oldConfig can be null during an infra update
var locationChanged = app.oldConfig ? app.oldConfig.location !== app.location : true;
async.series([
+2 -13
View File
@@ -171,17 +171,6 @@ function sendErrorPageOrRedirect(req, res, message) {
}
}
function sendError(req, res, message) {
assert.strictEqual(typeof req, 'object');
assert.strictEqual(typeof res, 'object');
assert.strictEqual(typeof message, 'string');
res.render('error', {
adminOrigin: config.adminOrigin(),
message: message
});
}
// Main login form username and password
function loginForm(req, res) {
if (typeof req.session.returnTo !== 'string') return sendErrorPageOrRedirect(req, res, 'Invalid login request. No returnTo provided.');
@@ -203,12 +192,12 @@ function loginForm(req, res) {
}
settings.getCloudronName(function (error, name) {
if (error) return sendError(req, res, 'Internal Error');
if (error) return sendErrorPageOrRedirect(req, res, 'Internal Error');
cloudronName = name;
clientdb.get(u.query.client_id, function (error, result) {
if (error) return sendError(req, res, 'Unknown OAuth client');
if (error) return sendErrorPageOrRedirect(req, res, 'Unknown OAuth client');
// Handle our different types of oauth clients
var appId = result.appId;
+6 -2
View File
@@ -195,8 +195,8 @@ html {
.appstore-item-badge-testing {
position: absolute;
right: 15px;
top: 15px;
right: 0;
top: 2px;
}
.appstore-item-content-testing {
@@ -330,6 +330,10 @@ html {
background-color: #5CB85C;
}
.badge-warning {
background-color: #EFBD48;
}
.badge-danger {
background-color: $brand-danger;
}
+2 -1
View File
@@ -147,8 +147,9 @@
<div class="col-md-10" ng-show="ready && apps.length">
<div class="row-no-margin">
<div class="col-sm-1 appstore-item" ng-repeat="app in apps">
<div class="appstore-item-content highlight" ng-click="showInstall(app)" ng-class="{ 'appstore-item-content-testing': app.publishState === 'testing' }">
<div class="appstore-item-content highlight" ng-click="showInstall(app)" ng-class="{ 'appstore-item-content-testing': (app.publishState === 'testing' || app.publishState === 'pending_approval') }">
<span class="badge badge-danger appstore-item-badge-testing" ng-show="app.publishState === 'testing'">Testing</span>
<span class="badge badge-warning appstore-item-badge-testing" ng-show="app.publishState === 'pending_approval'">Pending Approval</span>
<div class="appstore-item-content-icon col-same-height">
<img ng-src="{{app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-icon"/>
</div>