diff --git a/.gitignore b/.gitignore index 44aa37e47..ff15a1953 100644 --- a/.gitignore +++ b/.gitignore @@ -88,6 +88,7 @@ database.sql VERSION REVISION .php_cs.cache +manifest.json /tests/_log/* /tests/_temp/* diff --git a/assets/src/css/style.css b/assets/src/css/style.css index d5f53d2b1..b52dc110c 100644 --- a/assets/src/css/style.css +++ b/assets/src/css/style.css @@ -880,3 +880,8 @@ input.small-width { max-width: 20px; max-height: 20px; } + +.logo-image { + max-width: 100px; + max-height: 100px; +} diff --git a/assets/src/img/logo.png b/assets/src/img/logo.png index 01fb6bc8e..52e392234 100644 Binary files a/assets/src/img/logo.png and b/assets/src/img/logo.png differ diff --git a/assets/src/img/osm_loading.gif b/assets/src/img/osm_loading.gif deleted file mode 100644 index 57f462b79..000000000 Binary files a/assets/src/img/osm_loading.gif and /dev/null differ diff --git a/assets/src/js/functions/init.js b/assets/src/js/functions/init.js index 866f52574..6a0559fd0 100644 --- a/assets/src/js/functions/init.js +++ b/assets/src/js/functions/init.js @@ -30,7 +30,7 @@ function init() { // Aggiunta nell'URL del nome tab su cui tornare dopo il submit // Blocco del pulsante di submit dopo il primo submit $('form').on("submit", function(e) { - if ($(this).parsley().validate() && e.result) { + if ($(this).parsley().validate() && (e.result == undefined || e.result)) { $(this).submit(function () { return false; }); diff --git a/include/bottom.php b/include/bottom.php index f475caf20..dfdf953d6 100644 --- a/include/bottom.php +++ b/include/bottom.php @@ -81,10 +81,10 @@ if (Auth::check()) { '; - echo ' - '; } +echo ' + '; echo ' '; diff --git a/include/init/configuration.php b/include/init/configuration.php index dd2d13b9c..005457e6f 100644 --- a/include/init/configuration.php +++ b/include/init/configuration.php @@ -162,6 +162,30 @@ $db_name = \'|database|\'; } // Continua con l'esecuzione delle operazioni previste else { + // Creazione manifest.json + $manifest = '{ + "dir" : "ltr", + "lang" : "it-IT", + "name" : "OpenSTAManager", + "scope" : "'.ROOTDIR.'", + "display" : "fullscreen", + "start_url" : "'.ROOTDIR.'", + "short_name" : "OSM", + "theme_color" : "transparent", + "description" : "OpenSTAManager", + "orientation" : "any", + "background_color" : "transparent", + "generated" : "true", + "icons" : [ + { + "src": "assets/dist/img/logo.png", + "type": "image/png", + "sizes": "512x512" + } + ] +}'; + file_put_contents('manifest.json', $manifest); + redirect(ROOTDIR.'/index.php'); exit(); } @@ -286,7 +310,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) { echo '
- '.tr('OSM Logo').' + '.tr('OSM Logo').'

'.tr('OpenSTAManager').'

diff --git a/include/init/init.php b/include/init/init.php index ad4c3535a..e83fac3c2 100644 --- a/include/init/init.php +++ b/include/init/init.php @@ -105,7 +105,7 @@ $img = App::getPaths()['img']; echo '
- '.tr('OSM Logo').' + '.tr('OSM Logo').'

'.tr('OpenSTAManager').'

diff --git a/include/top.php b/include/top.php index 2b9f52438..cbe54e74d 100644 --- a/include/top.php +++ b/include/top.php @@ -18,9 +18,14 @@ echo ' - + '; +if (file_exists(DOCROOT.'/manifest.json')){ + echo ' + '; +} + // CSS foreach (App::getAssets()['css'] as $style) { echo ' diff --git a/index.php b/index.php index 696ad2a99..ee371b956 100644 --- a/index.php +++ b/index.php @@ -129,7 +129,7 @@ if (!empty(flash()->getMessage('error'))) { echo '