From 828d32b0effe3d060152a0a55f2d47c8f12944a4 Mon Sep 17 00:00:00 2001 From: Franzz Date: Sun, 19 Nov 2023 18:10:00 +0100 Subject: [PATCH] Revert changes on MainAppPage: splitting getParams --- build/webpack.common.js | 5 +++-- lib/Spot.php | 40 ++++++++++++++++------------------------ src/masks/index.html | 20 ++++++++++---------- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/build/webpack.common.js b/build/webpack.common.js index 29f3e5a..6ae6fbe 100644 --- a/build/webpack.common.js +++ b/build/webpack.common.js @@ -86,6 +86,9 @@ module.exports = { }, { from: path.resolve(LIB, 'index.php'), to: 'index.php' + }, { + from: path.resolve(SRC, 'images/icons'), + to: 'images/icons' }] }), new SymlinkWebpackPlugin({ origin: '../files/', symlink: 'files' }), @@ -96,8 +99,6 @@ module.exports = { alias: { "@scripts": path.resolve(SRC, "scripts"), 'load-image': 'blueimp-load-image/js/load-image.js', - //'load-image-orientation': 'blueimp-load-image/js/load-image-orientation.js', - //'load-image-scale': 'blueimp-load-image/js/load-image-scale.js', 'load-image-meta': 'blueimp-load-image/js/load-image-meta.js', 'load-image-exif': 'blueimp-load-image/js/load-image-exif.js', 'canvas-to-blob': 'blueimp-canvas-to-blob/js/canvas-to-blob.js', diff --git a/lib/Spot.php b/lib/Spot.php index d55cf31..a942d47 100755 --- a/lib/Spot.php +++ b/lib/Spot.php @@ -162,7 +162,7 @@ class Spot extends Main ); } - public function getAppParams($bInternal=false) { + public function getAppMainPage() { //Cache Page List $asPages = array_diff($this->asMasks, array('email_update', 'email_conf')); @@ -170,35 +170,27 @@ class Spot extends Main $asPages = array_diff($asPages, array('admin', 'upload')); } - $asGlobalVars = array( - 'vars' => array( - 'chunk_size' => self::FEED_CHUNK_SIZE, - 'default_project_codename' => $this->oProject->getProjectCodeName(), - 'projects' => $this->oProject->getProjects(), - 'user' => $this->oUser->getUserInfo() - ), - 'consts' => array( - 'modes' => Project::MODES, - 'clearances' => User::CLEARANCES, - 'default_timezone' => Settings::TIMEZONE - ) - ); - - $asParams = parent::getParams($asGlobalVars, self::MAIN_PAGE, $asPages); - return $bInternal?$asParams:self::getJsonResult(true, '', $asParams); - } - - public function getAppMainPage() - { return parent::getMainPage( + array( + 'vars' => array( + 'chunk_size' => self::FEED_CHUNK_SIZE, + 'default_project_codename' => $this->oProject->getProjectCodeName(), + 'projects' => $this->oProject->getProjects(), + 'user' => $this->oUser->getUserInfo() + ), + 'consts' => array( + 'modes' => Project::MODES, + 'clearances' => User::CLEARANCES, + 'default_timezone' => Settings::TIMEZONE + ) + ), self::MAIN_PAGE, array( 'language' => $this->oLang->getLanguage(), - 'host_url' => $this->asContext['serv_name'], 'filepath_css' => self::addTimestampToFilePath('spot.css'), 'filepath_js' => self::addTimestampToFilePath('../dist/app.js'), - 'params' => json_encode($this->getAppParams(true)) - ) + ), + $asPages ); } diff --git a/src/masks/index.html b/src/masks/index.html index 766036f..e87f33c 100755 --- a/src/masks/index.html +++ b/src/masks/index.html @@ -7,19 +7,19 @@ - - + + - - - - - - + + + + + + - + - + Spotty