diff --git a/docs/logos/openbis-favicon-transparent.png b/docs/logos/openbis-favicon-transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..fe713173d1119882ebdefe49cb1aae98396da327 Binary files /dev/null and b/docs/logos/openbis-favicon-transparent.png differ diff --git a/ui-admin/index.html b/ui-admin/index.html index 4d9ad717531a8c28974fa57279c42a3d0f66e2c7..1352563f9eeb4115673d0282f6c453d622f18c61 100644 --- a/ui-admin/index.html +++ b/ui-admin/index.html @@ -3,7 +3,11 @@ <head> <title>openBIS Admin</title> <meta charset="utf-8" /> - <link rel="shortcut icon" href="<%= require('@src/img/favicon.ico') %>" /> + <link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png"> + <link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png"> + <link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png"> + <link rel="manifest" href="manifest/site.webmanifest"> + <style> html { font-size: 16px; diff --git a/ui-admin/package.json b/ui-admin/package.json index caed5e74b6a530a01a88042e92d92495b82dcd84..134257eaabd5fba3d3eb582ded04601b7de65780 100644 --- a/ui-admin/package.json +++ b/ui-admin/package.json @@ -41,6 +41,7 @@ "babel-jest": "^29.3.1", "babel-loader": "^9.1.0", "babel-plugin-transform-amd-to-commonjs": "^1.6.0", + "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.7", diff --git a/ui-admin/src/img/favicon.ico b/ui-admin/src/img/favicon.ico deleted file mode 100644 index 5d077385c909f1be1f4d7a98b193ed1c7bca72d1..0000000000000000000000000000000000000000 Binary files a/ui-admin/src/img/favicon.ico and /dev/null differ diff --git a/ui-admin/src/js/components/login/Login.jsx b/ui-admin/src/js/components/login/Login.jsx index eaf1888dd3d444ef6091ced57f9b01e17c9f6ba7..5dca8d7bcfc045390523abd5be67974d916cf41b 100644 --- a/ui-admin/src/js/components/login/Login.jsx +++ b/ui-admin/src/js/components/login/Login.jsx @@ -18,6 +18,8 @@ import openbis from '@src/js/services/openbis.js' import messages from '@src/js/common/messages.js' import logger from '@src/js/common/logger.js' +import Logo from '@src/resources/img/openbis-logo-transparent.png' + const styles = theme => ({ card: { marginTop: '10%', @@ -25,6 +27,10 @@ const styles = theme => ({ width: '30em', margin: '0 auto' }, + logo: { + display: 'flex', + justifyContent: 'center' + }, header: { marginBottom: theme.spacing(1) }, @@ -212,6 +218,9 @@ class WithLogin extends React.Component { <form> <Card classes={{ root: classes.card }}> <Container square={true}> + <div className={classes.logo}> + <img src={Logo} width='200' height='89' /> + </div> <Typography variant='h6' classes={{ root: classes.header }}> Login </Typography> diff --git a/ui-admin/src/resources/img/android-chrome-192x192.png b/ui-admin/src/resources/img/android-chrome-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..9aef78560a168f796c5eab75b9c4ce90b3c1982a Binary files /dev/null and b/ui-admin/src/resources/img/android-chrome-192x192.png differ diff --git a/ui-admin/src/resources/img/android-chrome-512x512.png b/ui-admin/src/resources/img/android-chrome-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..0b3deb1eccccf2d2beb1f54c4cf08d5cc7b4a315 Binary files /dev/null and b/ui-admin/src/resources/img/android-chrome-512x512.png differ diff --git a/ui-admin/src/resources/img/apple-touch-icon.png b/ui-admin/src/resources/img/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7be921d8d2d788e708c7eeb999235d76552d7477 Binary files /dev/null and b/ui-admin/src/resources/img/apple-touch-icon.png differ diff --git a/ui-admin/src/resources/img/favicon-16x16.png b/ui-admin/src/resources/img/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..7eb83e01f159c0e9fe7461d29c7247434f09d173 Binary files /dev/null and b/ui-admin/src/resources/img/favicon-16x16.png differ diff --git a/ui-admin/src/resources/img/favicon-32x32.png b/ui-admin/src/resources/img/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..5a491d52936732e7860c5f38cee403c7544e3231 Binary files /dev/null and b/ui-admin/src/resources/img/favicon-32x32.png differ diff --git a/ui-admin/src/resources/img/favicon.ico b/ui-admin/src/resources/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ffcca176c4d277b422b5b684653f14121e10dbc8 Binary files /dev/null and b/ui-admin/src/resources/img/favicon.ico differ diff --git a/ui-admin/src/resources/img/openbis-logo-transparent.png b/ui-admin/src/resources/img/openbis-logo-transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..ef957be5357ad53a53ae26968538476337db7712 Binary files /dev/null and b/ui-admin/src/resources/img/openbis-logo-transparent.png differ diff --git a/ui-admin/src/resources/manifest/site.webmanifest b/ui-admin/src/resources/manifest/site.webmanifest new file mode 100644 index 0000000000000000000000000000000000000000..9641ebbd5eafb351406f92cf5e532cc6da5668eb --- /dev/null +++ b/ui-admin/src/resources/manifest/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "openBIS Admin UI", + "short_name": "Admin UI", + "icons": [ + { + "src": "img/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "img/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/ui-admin/webpack.config.dev.js b/ui-admin/webpack.config.dev.js index e6b0fe40324cb5afeb1d13415fad33db011babb8..ee809179fc3dd64e048f19c7b189500622b01a8f 100644 --- a/ui-admin/webpack.config.dev.js +++ b/ui-admin/webpack.config.dev.js @@ -1,6 +1,7 @@ /* eslint-disable */ const Webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') +const CopyWebpackPlugin = require('copy-webpack-plugin') const path = require('path') module.exports = { @@ -25,9 +26,12 @@ module.exports = { devMiddleware: { publicPath: '/admin/' }, - static: { - directory: './src/js' - } + static: [ + { + directory: './src/resources', + publicPath: '/admin' + } + ] }, devtool: 'source-map', @@ -47,7 +51,7 @@ module.exports = { }, { test: /\.(png|svg|jpg|jpeg|gif|ico)$/i, - type: 'asset', + type: 'asset' }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, diff --git a/ui-admin/webpack.config.js b/ui-admin/webpack.config.js index 4529c14a4726edc1ec68470d91bc362ecd4d008b..9dfc3316f8eb7173af608b7359122f18176218c4 100644 --- a/ui-admin/webpack.config.js +++ b/ui-admin/webpack.config.js @@ -1,6 +1,7 @@ /* eslint-disable */ const Webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') +const CopyWebpackPlugin = require('copy-webpack-plugin') const path = require('path') module.exports = { @@ -26,7 +27,7 @@ module.exports = { }, { test: /\.(png|svg|jpg|jpeg|gif|ico)$/i, - type: 'asset', + type: 'asset' }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, @@ -61,6 +62,9 @@ module.exports = { }), new Webpack.ProvidePlugin({ process: 'process/browser' + }), + new CopyWebpackPlugin({ + patterns: [{ from: 'src/resources' }] }) ] } diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js index f978ee6b65a4407c82b10886b38d3f3e208a574f..03dd417dae32cdbe5dc7bee36a56c33c1cd42cdf 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js @@ -14,10 +14,24 @@ var loadJSResorce = function(pathToResource, onLoad) { var setFavicons = function(img) { var head = document.getElementsByTagName('head')[0]; - var iconLink= document.createElement('link'); - iconLink.setAttribute('rel', 'icon'); - iconLink.setAttribute('href', img); - head.appendChild(iconLink); + + if(_.isString(img)){ + var iconLink= document.createElement('link'); + iconLink.setAttribute('rel', 'icon'); + iconLink.setAttribute('href', img); + head.appendChild(iconLink); + }else if(_.isObject(img)){ + Object.keys(img).forEach(function(linkKey){ + var linkDefinition = img[linkKey] + var linkElement = document.createElement('link'); + if(_.isObject(linkDefinition)){ + Object.keys(linkDefinition).forEach(function(attributeName){ + linkElement.setAttribute(attributeName, linkDefinition[attributeName]); + }) + head.appendChild(linkElement); + } + }) + } }; var setHelp = function(url) { @@ -42,7 +56,12 @@ var onLoadInstanceProfileResorceFunc = function() { //<PROFILE_PLACEHOLDER> loadJSResorce("./etc/InstanceProfile.js", onLoadInstanceProfileResorceFunc); -setFavicons("./img/favicon.ico"); +setFavicons({ + appleTouchIcon : { href : "./img/apple-touch-icon.png", rel: "apple-touch-icon", sizes: "180x180" }, + favicon32 : { href : "./img/favicon-32x32.png", rel: "icon", type: "image/png", sizes: "32x32" }, + favicon16 : { href : "./img/favicon-16x16.png", rel: "icon", type: "image/png", sizes: "16x16" }, + manifest : { href : "./site.webmanifest", rel: "manifest" } +}); //</PROFILE_PLACEHOLDER> var PLUGINS_CONFIGURATION = { diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-192x192.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..9aef78560a168f796c5eab75b9c4ce90b3c1982a Binary files /dev/null and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-192x192.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-512x512.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..0b3deb1eccccf2d2beb1f54c4cf08d5cc7b4a315 Binary files /dev/null and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/android-chrome-512x512.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/apple-touch-icon.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7be921d8d2d788e708c7eeb999235d76552d7477 Binary files /dev/null and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/apple-touch-icon.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-16x16.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..7eb83e01f159c0e9fe7461d29c7247434f09d173 Binary files /dev/null and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-16x16.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-32x32.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..5a491d52936732e7860c5f38cee403c7544e3231 Binary files /dev/null and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon-32x32.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon.ico b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon.ico index 5d077385c909f1be1f4d7a98b193ed1c7bca72d1..ffcca176c4d277b422b5b684653f14121e10dbc8 100644 Binary files a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon.ico and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/favicon.ico differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png index e89004935f1b99500cec7ba5ab8c790481a9e5a9..ef957be5357ad53a53ae26968538476337db7712 100644 Binary files a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png and b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png differ diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/site.webmanifest b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/site.webmanifest new file mode 100644 index 0000000000000000000000000000000000000000..8e64f8db93758a6f8a99e9146009977ac020d5c7 --- /dev/null +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "openBIS ELN UI", + "short_name": "ELN UI", + "icons": [ + { + "src": "img/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "img/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +}