From cc60ecdd5494d0ea0724cf70024b6c12eb8000af Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 2 Mar 2022 13:09:22 +0300 Subject: [PATCH] Fix regSettings and refactoring --- apps/common/mobile/resources/img/about/logo-white_s.svg | 6 ++++++ apps/common/mobile/resources/img/about/logo_s.svg | 6 ++++++ apps/common/mobile/resources/less/about.less | 8 ++++---- apps/common/mobile/resources/less/common.less | 2 +- apps/common/mobile/resources/less/ios/icons.less | 6 +++--- apps/common/mobile/resources/less/material/icons.less | 4 ++-- vendor/framework7-react/build/webpack.config.js | 3 +-- 7 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 apps/common/mobile/resources/img/about/logo-white_s.svg create mode 100644 apps/common/mobile/resources/img/about/logo_s.svg diff --git a/apps/common/mobile/resources/img/about/logo-white_s.svg b/apps/common/mobile/resources/img/about/logo-white_s.svg new file mode 100644 index 000000000..ae110aed0 --- /dev/null +++ b/apps/common/mobile/resources/img/about/logo-white_s.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/apps/common/mobile/resources/img/about/logo_s.svg b/apps/common/mobile/resources/img/about/logo_s.svg new file mode 100644 index 000000000..04df9911d --- /dev/null +++ b/apps/common/mobile/resources/img/about/logo_s.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/apps/common/mobile/resources/less/about.less b/apps/common/mobile/resources/less/about.less index 8299cd565..6b71c1c41 100644 --- a/apps/common/mobile/resources/less/about.less +++ b/apps/common/mobile/resources/less/about.less @@ -1,5 +1,5 @@ // @text-normal: #000; -// @common-image-about-path - defined in webpack config +// @common-image-path - defined in webpack config .about { .page-content { @@ -49,18 +49,18 @@ display: inline-block; width: 100%; height: 55px; - background: ~"url(@{common-image-about-path}/logo_s.svg) no-repeat center"; + background: ~"url(@{common-image-path}/about/logo_s.svg) no-repeat center"; } .theme-type-dark { .about .logo { - background: ~"url(@{common-image-about-path}/logo-white_s.svg) no-repeat center"; + background: ~"url(@{common-image-path}/about/logo-white_s.svg) no-repeat center"; } } } .theme-type-dark { .about .logo { - background: ~"url(@{common-image-about-path}/logo-white_s.svg) no-repeat center"; + background: ~"url(@{common-image-path}/about/logo-white_s.svg) no-repeat center"; } } \ No newline at end of file diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 68b136f60..2563c3470 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -555,7 +555,7 @@ input[type="number"]::-webkit-inner-spin-button { .icon.lang-flag { background-size: 48px auto; - background-image: url(../img/controls/flags@2x.png); + background-image: ~'url(@{common-image-path}/controls/flags@2x.png)'; } .icon.lang-flag { diff --git a/apps/common/mobile/resources/less/ios/icons.less b/apps/common/mobile/resources/less/ios/icons.less index 0456b303c..ae34c3505 100644 --- a/apps/common/mobile/resources/less/ios/icons.less +++ b/apps/common/mobile/resources/less/ios/icons.less @@ -1,10 +1,10 @@ -// @common-image-header-path - defined in webpack config +// @common-image-path - defined in webpack config .device-ios { .theme-type-dark { i.icon { &.icon-logo { - background: ~"url(@{common-image-header-path}/logo-android.svg)" no-repeat center; + background: ~"url(@{common-image-path}/header/logo-android.svg)" no-repeat center; } } } @@ -15,7 +15,7 @@ &.icon-logo { width: 100px; height: 14px; - background: ~"url(@{common-image-header-path}/logo-ios.svg)" no-repeat center; + background: ~"url(@{common-image-path}/header/logo-ios.svg)" no-repeat center; } &.icon-prev { width: 22px; diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index 6768ae033..2a34e8c73 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -1,4 +1,4 @@ -// @common-image-header-path - defined in webpack config +// @common-image-path - defined in webpack config .device-android { i.icon { @@ -8,7 +8,7 @@ &.icon-logo { width: 100px; height: 14px; - background: ~"url(@{common-image-header-path}/logo-android.svg) no-repeat center"; + background: ~"url(@{common-image-path}/header/logo-android.svg) no-repeat center"; } &.icon-prev { width: 20px; diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index 7780894ce..09257fa73 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -132,8 +132,7 @@ module.exports = { lessOptions: { javascriptEnabled: true, globalVars: { - "common-image-header-path": env === 'production' ? `../../../${editor}/mobile/resources/img/header` : '../../common/mobile/resources/img/header', - "common-image-about-path": env === 'production' ? `../../../${editor}/mobile/resources/img/about` : '../../common/main/resources/img/about', + "common-image-path": env === 'production' ? `../../../${editor}/mobile/resources/img` : '../../common/mobile/resources/img', "app-image-path": env === 'production' ? '../resources/img' : './resources/img', } }