diff --git a/lib/routes/configure.js b/lib/routes/configure.js index ff2ee8b..0af3e2e 100644 --- a/lib/routes/configure.js +++ b/lib/routes/configure.js @@ -44,6 +44,17 @@ module.exports = (app, auth) => { const metadataUrl = req.body.metadataUrl; const metaDataResponseObj = Object.assign(ResponseObj, {defaultMetadataUrl: metadataUrl}); + let storedMetadataUrls = Storage.get('metadataUrls') || {}, + profileName = req.body.profileName; + + if (profileName === '') { + profileName = metadataUrl; + } + + if (profileName && storedMetadataUrls[metadataUrl] && storedMetadataUrls[metadataUrl] !== profileName) { + storedMetadataUrls[metadataUrl] = profileName; + Storage.set(storedMetadataUrls); + } app.set('metadataUrl', metadataUrl); const xmlReq = https.get(metadataUrl, (xmlRes) => { @@ -101,8 +112,7 @@ module.exports = (app, auth) => { let metadataUrls = Storage.get('metadataUrls') || {}; if (!metadataUrls.hasOwnProperty(metadataUrl)) { - metadataUrls[metadataUrl] = metadataUrl - + metadataUrls[metadataUrl] = profileName || metadataUrl; Storage.set('metadataUrls', metadataUrls); } diff --git a/public/css/app.css b/public/css/app.css index 263b86b..f755590 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -74,3 +74,9 @@ summary { .login-button { margin-left: auto; } + +div.profile { + width: 80%; + height: 2.5em; + line-height: 2.5em; +} diff --git a/views/configure.jsx b/views/configure.jsx index b13332a..4c8b1af 100644 --- a/views/configure.jsx +++ b/views/configure.jsx @@ -66,9 +66,12 @@ class Configure extends React.Component { return (