From 617386a9db409c29ae4be346feb9209f7db20386 Mon Sep 17 00:00:00 2001 From: alexandrdrvn Date: Mon, 23 Dec 2019 16:04:01 +0200 Subject: [PATCH] fix: fix styles and bug with document root --- .../extension/module/d_vuefront.php | 12 ++-- .../d_pax/components/header/Account.vue | 15 +++-- admin/view/javascript/d_pax/webpack.config.js | 6 +- .../0.284341a53abf6bfaaedc.bundle.js | 1 + ...435fc06.css => 0.284341a53abf6bfaaedc.css} | 2 +- .../0.45a78afa28e85435fc06.bundle.js | 1 - ...e.js => 10.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 11.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 12.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 13.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 14.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 15.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 16.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 17.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 18.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 19.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 2.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 20.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 21.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 22.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 23.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 24.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 25.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 26.284341a53abf6bfaaedc.bundle.js} | 0 ...e.js => 27.284341a53abf6bfaaedc.bundle.js} | 0 ...ndle.js => 284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 3.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 4.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 5.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 6.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 7.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 8.284341a53abf6bfaaedc.bundle.js} | 0 ...le.js => 9.284341a53abf6bfaaedc.bundle.js} | 0 .../view/javascript/d_vuefront/manifest.json | 58 +++++++++---------- 34 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 admin/view/javascript/d_vuefront/0.284341a53abf6bfaaedc.bundle.js rename admin/view/javascript/d_vuefront/{0.45a78afa28e85435fc06.css => 0.284341a53abf6bfaaedc.css} (99%) delete mode 100644 admin/view/javascript/d_vuefront/0.45a78afa28e85435fc06.bundle.js rename admin/view/javascript/d_vuefront/{10.45a78afa28e85435fc06.bundle.js => 10.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{11.45a78afa28e85435fc06.bundle.js => 11.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{12.45a78afa28e85435fc06.bundle.js => 12.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{13.45a78afa28e85435fc06.bundle.js => 13.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{14.45a78afa28e85435fc06.bundle.js => 14.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{15.45a78afa28e85435fc06.bundle.js => 15.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{16.45a78afa28e85435fc06.bundle.js => 16.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{17.45a78afa28e85435fc06.bundle.js => 17.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{18.45a78afa28e85435fc06.bundle.js => 18.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{19.45a78afa28e85435fc06.bundle.js => 19.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{2.45a78afa28e85435fc06.bundle.js => 2.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{20.45a78afa28e85435fc06.bundle.js => 20.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{21.45a78afa28e85435fc06.bundle.js => 21.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{22.45a78afa28e85435fc06.bundle.js => 22.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{23.45a78afa28e85435fc06.bundle.js => 23.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{24.45a78afa28e85435fc06.bundle.js => 24.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{25.45a78afa28e85435fc06.bundle.js => 25.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{26.45a78afa28e85435fc06.bundle.js => 26.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{27.45a78afa28e85435fc06.bundle.js => 27.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{45a78afa28e85435fc06.bundle.js => 284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{3.45a78afa28e85435fc06.bundle.js => 3.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{4.45a78afa28e85435fc06.bundle.js => 4.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{5.45a78afa28e85435fc06.bundle.js => 5.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{6.45a78afa28e85435fc06.bundle.js => 6.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{7.45a78afa28e85435fc06.bundle.js => 7.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{8.45a78afa28e85435fc06.bundle.js => 8.284341a53abf6bfaaedc.bundle.js} (100%) rename admin/view/javascript/d_vuefront/{9.45a78afa28e85435fc06.bundle.js => 9.284341a53abf6bfaaedc.bundle.js} (100%) diff --git a/admin/controller/extension/module/d_vuefront.php b/admin/controller/extension/module/d_vuefront.php index 90eef8b..11903b1 100644 --- a/admin/controller/extension/module/d_vuefront.php +++ b/admin/controller/extension/module/d_vuefront.php @@ -163,6 +163,10 @@ public function vf_turn_on() $catalog_url_info = parse_url($catalog); $catalog_path = $catalog_url_info['path']; + $document_path = $catalog_path; + if(!empty($this->request->server['DOCUMENT_ROOT'])) { + $document_path = str_replace(realpath($this->request->server['DOCUMENT_ROOT']), '', $rootFolder) . '/'; + } if (strpos($_SERVER["SERVER_SOFTWARE"], "Apache") !== false) { @@ -212,12 +216,12 @@ public function vf_turn_on() # VueFront home page RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout) RewriteCond %{QUERY_STRING} !.*(rest_route) -RewriteCond %{DOCUMENT_ROOT}".$catalog_path."vuefront/index.html -f +RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html -f RewriteRule ^$ vuefront/index.html [L] RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout) RewriteCond %{QUERY_STRING} !.*(rest_route) -RewriteCond %{DOCUMENT_ROOT}".$catalog_path."vuefront/index.html !-f +RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html !-f RewriteRule ^$ vuefront/200.html [L] # VueFront page if exists html file @@ -225,7 +229,7 @@ public function vf_turn_on() RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout) RewriteCond %{QUERY_STRING} !.*(rest_route) -RewriteCond %{DOCUMENT_ROOT}".$catalog_path."vuefront/$1.html -f +RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html -f RewriteRule ^([^?]*) vuefront/$1.html [L,QSA] # VueFront page if not exists html file @@ -233,7 +237,7 @@ public function vf_turn_on() RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout) RewriteCond %{QUERY_STRING} !.*(rest_route) -RewriteCond %{DOCUMENT_ROOT}".$catalog_path."vuefront/$1.html !-f +RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html !-f RewriteRule ^([^?]*) vuefront/200.html [L,QSA]"; $content = file_get_contents($rootFolder . '/.htaccess'); diff --git a/admin/view/javascript/d_pax/components/header/Account.vue b/admin/view/javascript/d_pax/components/header/Account.vue index 3663a0a..2023b70 100755 --- a/admin/view/javascript/d_pax/components/header/Account.vue +++ b/admin/view/javascript/d_pax/components/header/Account.vue @@ -1,5 +1,8 @@