Commit dc584944 authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

Fix #109 control links in more

Signed-off-by: 's avatarSascha Pfeiffer <sascha.pfeiffer@psono.com>
parent c35ae8b6
......@@ -220,6 +220,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return deferred.resolve(new_config);
};
......
......@@ -7,5 +7,18 @@
"allow_custom_server": true,
"allow_registration": true,
"allow_lost_password": true,
"authentication_methods": ["AUTHKEY", "LDAP"]
"authentication_methods": ["AUTHKEY", "LDAP"],
"more_links": [{
"href": "https://doc.psono.com/",
"title": "DOCUMENTATION",
"class": "fa-book"
},{
"href": "privacy-policy.html",
"title": "PRIVACY_POLICY",
"class": "fa-user-secret"
},{
"href": "https://www.psono.com",
"title": "ABOUT_US",
"class": "fa-info-circle"
}]
}
\ No newline at end of file
......@@ -136,7 +136,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && saml_provider && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
......@@ -149,22 +149,12 @@
</a>
</li>
</ul>
<h2>{{'MORE' | translate}}</h2>
<ul class="navigations">
<!--<li><a href="https://www.psono.pw/help" target="_blank">Help</a></li>-->
<li>
<a class="navigationitem2" href="https://doc.psono.com/" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-book fa-fw" aria-hidden="true"></i></span>{{'DOCUMENTATION' | translate}}
</a>
</li>
<li>
<a class="navigationitem2" href="privacy-policy.html" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i></span>{{'PRIVACY_POLICY' | translate}}
</a>
</li>
<li>
<a class="navigationitem2" href="https://www.psono.com" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-info-circle fa-fw" aria-hidden="true"></i></span>{{'ABOUT_US' | translate}}
<h2 ng-if="more_links && more_links.length">{{'MORE' | translate}}</h2>
<ul class="navigations" ng-if="more_links">
<li ng-repeat="l in more_links">
<a class="navigationitem2" ng-href="{{ l.href }}" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-fw" ng-class="l.class" aria-hidden="true"></i></span>{{l.title | translate}}
</a>
</li>
</ul>
......@@ -215,7 +205,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && saml_provider && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
......@@ -75,8 +75,15 @@
$scope.offline = false;
});
browserClient.load_config().then(function (config) {
$scope.more_links = config['more_links'];
});
managerStatus.get_status().then(function(status) {
if (typeof(status) === 'undefined') {
return;
}
$scope.server_status.data = status.data;
});
......
......@@ -200,6 +200,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return $q.resolve(new_config);
};
......
......@@ -86,7 +86,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && saml_provider && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
......@@ -215,6 +215,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return deferred.resolve(new_config);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment