Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2386545814 | |||
| 2059152dd3 | |||
| 32d2c260ab | |||
| 384c7873aa |
@@ -671,6 +671,7 @@ function restore(app, callback) {
|
|||||||
|
|
||||||
// note that configure is called after an infra update as well
|
// note that configure is called after an infra update as well
|
||||||
function configure(app, callback) {
|
function configure(app, callback) {
|
||||||
|
// oldConfig can be null during an infra update
|
||||||
var locationChanged = app.oldConfig ? app.oldConfig.location !== app.location : true;
|
var locationChanged = app.oldConfig ? app.oldConfig.location !== app.location : true;
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
|
|||||||
+2
-13
@@ -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
|
// Main login form username and password
|
||||||
function loginForm(req, res) {
|
function loginForm(req, res) {
|
||||||
if (typeof req.session.returnTo !== 'string') return sendErrorPageOrRedirect(req, res, 'Invalid login request. No returnTo provided.');
|
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) {
|
settings.getCloudronName(function (error, name) {
|
||||||
if (error) return sendError(req, res, 'Internal Error');
|
if (error) return sendErrorPageOrRedirect(req, res, 'Internal Error');
|
||||||
|
|
||||||
cloudronName = name;
|
cloudronName = name;
|
||||||
|
|
||||||
clientdb.get(u.query.client_id, function (error, result) {
|
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
|
// Handle our different types of oauth clients
|
||||||
var appId = result.appId;
|
var appId = result.appId;
|
||||||
|
|||||||
@@ -195,8 +195,8 @@ html {
|
|||||||
|
|
||||||
.appstore-item-badge-testing {
|
.appstore-item-badge-testing {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 15px;
|
right: 0;
|
||||||
top: 15px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.appstore-item-content-testing {
|
.appstore-item-content-testing {
|
||||||
@@ -330,6 +330,10 @@ html {
|
|||||||
background-color: #5CB85C;
|
background-color: #5CB85C;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-warning {
|
||||||
|
background-color: #EFBD48;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-danger {
|
.badge-danger {
|
||||||
background-color: $brand-danger;
|
background-color: $brand-danger;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,9 @@
|
|||||||
<div class="col-md-10" ng-show="ready && apps.length">
|
<div class="col-md-10" ng-show="ready && apps.length">
|
||||||
<div class="row-no-margin">
|
<div class="row-no-margin">
|
||||||
<div class="col-sm-1 appstore-item" ng-repeat="app in apps">
|
<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-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">
|
<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"/>
|
<img ng-src="{{app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-icon"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user