diff --git a/apps/common/mobile/resources/less/about.less b/apps/common/mobile/resources/less/about.less index 6b71c1c41..7b5e3f1e8 100644 --- a/apps/common/mobile/resources/less/about.less +++ b/apps/common/mobile/resources/less/about.less @@ -3,11 +3,11 @@ .about { .page-content { - text-align: center; + text-align: center /*rtl:ignore*/; } .content-block:first-child { - margin: 15px 0; + margin: 15px 0 /*rtl:append20px*/; } .content-block { diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index a6c00d4b4..3921ef9bb 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -118,13 +118,13 @@ } } - .list:first-child { - li:first-child { - a { - border-radius: 0; - } - } - } + // .list:first-child { + // li:first-child { + // a { + // border-radius: 0; + // } + // } + // } .list:last-child { li:last-child { diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index d694fac4a..f86d8a78e 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -103,10 +103,10 @@ } .add-popup { - .view{ - .block-title{ - margin-bottom: 0; - margin-top: 8px; + .view { + .block-title { + // margin-bottom: 0; + // margin-top: 8px; } .add-image, .inputs-list { ul:after { @@ -116,7 +116,7 @@ } } - .coauth__sheet{ + .coauth__sheet { max-height: 65%; } diff --git a/apps/common/mobile/resources/less/common-rtl.less b/apps/common/mobile/resources/less/common-rtl.less new file mode 100644 index 000000000..57f77664f --- /dev/null +++ b/apps/common/mobile/resources/less/common-rtl.less @@ -0,0 +1,220 @@ +[dir="rtl"].device-android { + + .app-layout { + .searchbar input { + padding-right: 24px; + padding-left: 36px; + background-position: right; + } + } + + .wrap-comment, .comment-list{ + .comment-header .initials { + margin-right: 0; + margin-left: 10px; + } + } + + .actions-modal { + .actions-button-text { + text-align: right; + } + } + + .navigation-sheet { + &__title { + padding-left: 0; + padding-right: 16px; + } + } +} + +[dir="rtl"].device-ios .app-layout{ + + .subnavbar,.navbar .left a + a { + margin-right: 0; + } + + .subnavbar,.navbar .right a + a { + margin-right: 0; + } + + .tab-buttons { + .tab-link:first-child { + border-radius: 0px 5px 5px 0px; + } + + .tab-link:last-child { + border-radius: 5px 0px 0px 5px; + } + } + + .popover { + li:last-child, li:first-child { + .segmented a:first-child { + border-radius: 0 var(--f7-button-border-radius) var(--f7-button-border-radius) 0; + } + .segmented a:last-child { + border-radius: var(--f7-button-border-radius) 0 0 var(--f7-button-border-radius); + } + } + } + + .list { + .item-inner { + .item-after .segmented { + margin-left: 0px; + margin-right: 10px; + } + } + } + + .searchbar-inner__right .buttons-row a.next { + margin-left: 0; + margin-right: 15px; + } + + .searchbar-inner__left { + margin-right: 0; + margin-left: 10px; + } + + .navbar .searchbar-input-wrap { + margin-left: 10px; + margin-right: 0; + } + + .comment-list .item-content .item-inner .comment-header { + padding-left: 16px; + } +} + +[dir="rtl"] { + .comment-list .item-content .item-inner{ + padding-left: 0; + .comment-header { + .right { + justify-content: space-between; + .comment-resolve { + margin-right: 0px; + margin-left: 10px; + } + } + + .name { + text-align: right; + } + } + } + + .comment-quote { + border-right: 1px solid var(--text-secondary); + border-left: 0; + padding-left: 16px; + padding-right: 10px; + } + + .comment-text, .reply-text { + padding-right: 0; + padding-left: 15px; + } + + // .comment-list .item-content .item-inner .comment-header { + // padding-left: 16px; + // } + + #add-comment-dialog .dialog .dialog-inner .wrap-comment .name, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .name, #add-reply-dialog .dialog .dialog-inner .wrap-comment .name, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .name, #add-comment-dialog .dialog .dialog-inner .wrap-comment .comment-date, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .comment-date, #add-reply-dialog .dialog .dialog-inner .wrap-comment .comment-date, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .comment-date, #add-comment-dialog .dialog .dialog-inner .wrap-comment .reply-date, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .reply-date, #add-reply-dialog .dialog .dialog-inner .wrap-comment .reply-date, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .reply-date { + text-align: right; + } + + #view-comment-popover .page .page-content { + padding: 16px 0 60px 16px; + } + + .wrap-comment { + padding: 16px 16px 0 24px; + } + + .shapes { + .thumb { + transform: scaleX(-1); + } + } + + .settings-popup, + #settings-popover{ + .link { + display: inline; + } + } + + #edit-table-style { + ul { + padding-right: 0; + } + } + + .color-schemes-menu { + .item-title{ + margin-right: 20px; + } + } + + .list [slot="root-start"] { + padding: 15px 15px 0 0px; + } + + .numbers, .bullets, .multilevels { + .item-content { + padding-right: 0; + } + } + + .dataview .active::after { + left: -5px; + right: unset; + } + + .popup .list .range-number, .popover .list .range-number, .sheet-modal .list .range-number { + text-align: left; + } + + .popup .list .inner-range-title, .popover .list .inner-range-title, .sheet-modal .list .inner-range-title { + padding-left: 0; + padding-right: 15px; + } + + #color-picker .right-block { + margin-left: 0px; + margin-right: 20px; + } + + .page-review .toolbar #btn-reject-change { + margin-left: 0; + margin-right: 20px; + } + + .list li.no-indicator .item-link .item-inner { + padding-right: 0; + } +} + +@media (max-width: 550px) { + .device-ios[dir=rtl] .app-layout { + .searchbar-expandable.searchbar-enabled .searchbar-inner__right { + margin-right: 10px; + margin-left: 0; + } + + .navbar .searchbar-input-wrap { + margin-left: 0; + } + } + + .device-android[dir=rtl] .app-layout { + .searchbar-expandable.searchbar-enabled .searchbar-inner__left { + margin-right: 0; + margin-left: 33px; + } + } +} diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 742ca2401..1bd52dcfd 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -72,8 +72,10 @@ padding: 15px 0 0 15px; } - [slot="inner-end"] { + .range-number { color: @text-normal; + min-width: 60px; + text-align: right; } } .page-content { @@ -186,6 +188,7 @@ .row.list .item-content { padding-left: 0; + padding-right: 0; min-height: 68px; .item-inner{ padding: 0; @@ -197,7 +200,7 @@ } .popover { - .page { + .page .list { ul { background-color: var(--f7-list-bg-color); li:first-child, li:last-child { diff --git a/apps/common/mobile/resources/less/common.rtl.less b/apps/common/mobile/resources/less/common.rtl.less new file mode 100644 index 000000000..3b1173096 --- /dev/null +++ b/apps/common/mobile/resources/less/common.rtl.less @@ -0,0 +1,204 @@ +.device-ios[dir=rtl] { + .app-layout { + .subnavbar,.navbar .left a + a { + margin-right: 0; + } + + .subnavbar,.navbar .right a + a { + margin-right: 0; + } + + .tab-buttons { + .tab-link:last-child { + border-radius: 5px 0 0 5px; + } + .tab-link:first-child { + border-radius: 0 5px 5px 0; + } + } + + .popover { + li:last-child, li:first-child { + .segmented a:first-child { + border-radius: 0 var(--f7-button-border-radius) var(--f7-button-border-radius) 0; + } + .segmented a:last-child { + border-radius: var(--f7-button-border-radius) 0 0 var(--f7-button-border-radius); + } + } + } + + .list .item-inner .item-after .segmented { + margin-right: 10px; + margin-left: 0; + } + + #editor-navbar.navbar .right a + a, #editor-navbar.navbar .left a + a { + margin-right: 0; + } + + .searchbar-inner__right .buttons-row a.next { + margin-left: 0; + margin-right: 15px; + } + + .searchbar-inner__left { + margin-right: 0; + margin-left: 10px; + } + + .navbar .searchbar-input-wrap { + margin-left: 10px; + margin-right: 0; + } + } + + .comment-list .item-content .item-inner .comment-header { + padding-left: 16px; + } +} + +.device-android[dir=rtl] { + .app-layout { + .searchbar input { + padding-right: 24px; + padding-left: 36px; + background-position: right; + } + } + + .wrap-comment, .comment-list{ + .comment-header .initials { + margin-right: 0; + margin-left: 10px; + } + } + + .actions-modal { + .actions-button-text { + text-align: right; + } + } + + .comment-list .item-content .item-inner .comment-header { + padding-left: 0; + } + + .navigation-sheet { + &__title { + padding-left: 0; + padding-right: 16px; + } + } +} + +[dir=rtl] { + .color-schemes-menu .item-title { + margin-right: 20px; + } + + .popup .list .range-number, .popover .list .range-number, .sheet-modal .list .range-number { + text-align: left; + } + + .popup .list .inner-range-title, .popover .list .inner-range-title, .sheet-modal .list .inner-range-title { + padding-left: 0; + padding-right: 15px; + } + + #color-picker .right-block { + margin-right: 20px; + } + + .page-review .toolbar #btn-reject-change { + margin-left: 0; + margin-right: 20px; + } + + .list li.no-indicator .item-link .item-inner { + padding-right: 0; + padding-left: 15px; + } + + .numbers, .bullets, .multilevels { + .item-content { + padding-right: 0; + } + } + + .settings-popup, #settings-popover{ + .link { + display: inline; + } + } + + .comment-list { + .item-content .item-inner { + padding-left: 0; + .comment-header { + padding-right: 0; + .right { + justify-content: space-between; + .comment-resolve { + margin-right: 0px; + margin-left: 10px; + } + } + + .name { + text-align: right; + } + } + } + + .comment-quote { + border-right: 1px solid var(--text-secondary); + border-left: 0; + padding-left: 16px; + padding-right: 10px; + } + + .comment-text, .reply-text { + padding-right: 0; + padding-left: 15px; + } + } + + #add-comment-dialog .dialog .dialog-inner .wrap-comment .name, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .name, #add-reply-dialog .dialog .dialog-inner .wrap-comment .name, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .name, #add-comment-dialog .dialog .dialog-inner .wrap-comment .comment-date, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .comment-date, #add-reply-dialog .dialog .dialog-inner .wrap-comment .comment-date, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .comment-date, #add-comment-dialog .dialog .dialog-inner .wrap-comment .reply-date, #edit-comment-dialog .dialog .dialog-inner .wrap-comment .reply-date, #add-reply-dialog .dialog .dialog-inner .wrap-comment .reply-date, #edit-reply-dialog .dialog .dialog-inner .wrap-comment .reply-date { + text-align: right; + } + + #view-comment-popover .page .page-content { + padding: 16px 0 60px 16px; + } + + .wrap-comment { + padding: 16px 16px 0 24px; + } + + .inline-labels .item-label + .item-input-wrap, .inline-label .item-label + .item-input-wrap, .inline-labels .item-floating-label + .item-input-wrap, .inline-label .item-floating-label + .item-input-wrap { + margin-right: 0; + } +} + +@media (max-width: 550px) { + .device-ios[dir=rtl] { + .app-layout { + .searchbar-expandable.searchbar-enabled .searchbar-inner__right { + margin-right: 10px; + margin-left: 0; + } + .navbar .searchbar-input-wrap { + margin-left: 0; + } + } + } + .device-android[dir=rtl] { + .app-layout { + .searchbar-expandable.searchbar-enabled .searchbar-inner__left { + margin-right: 0; + margin-left: 33px; + } + } + } +} \ No newline at end of file diff --git a/apps/common/mobile/resources/less/icons.less b/apps/common/mobile/resources/less/icons.less index 26b236ec4..1521fdcca 100644 --- a/apps/common/mobile/resources/less/icons.less +++ b/apps/common/mobile/resources/less/icons.less @@ -48,4 +48,34 @@ i.icon { height: 22px; .encoded-svg-background(''); } + + // Numbers + + &.icon-numbers-1 { + .encoded-svg-background(''); + } + + &.icon-numbers-2 { + .encoded-svg-background(''); + } + + &.icon-numbers-3 { + .encoded-svg-background(''); + } + + &.icon-numbers-4 { + .encoded-svg-background(''); + } + + &.icon-numbers-5 { + .encoded-svg-background(''); + } + + &.icon-numbers-6 { + .encoded-svg-background(''); + } + + &.icon-numbers-7 { + .encoded-svg-background(''); + } } diff --git a/apps/common/mobile/resources/less/icons.rtl.less b/apps/common/mobile/resources/less/icons.rtl.less new file mode 100644 index 000000000..8407cf0b2 --- /dev/null +++ b/apps/common/mobile/resources/less/icons.rtl.less @@ -0,0 +1,53 @@ +[dir="rtl"] { + // Common rtl-icons + i.icon { + &.icon-next, &.icon-prev, &.icon-text-align-right, &.icon-text-align-left, + &.icon-table-add-column-left, &.icon-table-add-column-right, &.icon-table-remove-column, + &.icon-table-borders-left, &.icon-table-borders-right, &.icon-numbers-3, &.icon-numbers-7 { + transform: scaleX(-1); + } + + &.icon-numbers-1 { + .encoded-svg-background(''); + } + + &.icon-numbers-2 { + .encoded-svg-background(''); + } + + &.icon-numbers-4 { + .encoded-svg-background(''); + } + + &.icon-numbers-5 { + .encoded-svg-background(''); + } + + &.icon-numbers-6 { + .encoded-svg-background(''); + } + } + + // [PE] rtl-icons + i.icon { + &.icon-align-left, &.icon-align-right { + transform: scaleX(-1); + } + } + + // [SSE] rtl-icons + + i.icon { + &.icon-text-orientation-horizontal { + .encoded-svg-mask(''); + } + + &.icon-text-orientation-anglecount { + .encoded-svg-mask(''); + } + + &.icon-text-orientation-angleclock { + .encoded-svg-mask(''); + } + } +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index b2dc4c174..964d969d6 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -597,6 +597,10 @@ "textLoading": "Loading...", "textLocation": "Location", "textMacrosSettings": "Macros Settings", + "textDirection": "Direction", + "textLeftToRight": "Left To Right", + "textRightToLeft": "Right To Left", + "textRestartApplication": "Please restart the application for the changes to take effect", "textMargins": "Margins", "textMarginsH": "Top and bottom margins are too high for a given page height", "textMarginsW": "Left and right margins are too wide for a given page width", diff --git a/apps/documenteditor/mobile/src/app.js b/apps/documenteditor/mobile/src/app.js index cc9445153..15f74d1bb 100644 --- a/apps/documenteditor/mobile/src/app.js +++ b/apps/documenteditor/mobile/src/app.js @@ -15,19 +15,27 @@ window.jQuery = jQuery; window.$ = jQuery; // Import Framework7 Styles -import 'framework7/framework7-bundle.css'; + +const htmlElem = document.querySelector('html'); +const direction = LocalStorage.getItem('mode-direction'); + +direction === 'rtl' ? htmlElem.setAttribute('dir', 'rtl') : htmlElem.setAttribute('dir', 'ltr'); + +import(`framework7/framework7-bundle${direction === 'rtl' ? '-rtl' : ''}.css`); // Import Icons and App Custom Styles // import '../css/icons.css'; -import './less/app.less'; +import('./less/app.less'); // Import App Component + import App from './view/app'; import { I18nextProvider } from 'react-i18next'; import i18n from './lib/i18n'; import { Provider } from 'mobx-react' import { stores } from './store/mainStore' +import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; // Init F7 React Plugin Framework7.use(Framework7React) diff --git a/apps/documenteditor/mobile/src/controller/settings/ApplicationSettings.jsx b/apps/documenteditor/mobile/src/controller/settings/ApplicationSettings.jsx index 98f516d09..a57ec57e1 100644 --- a/apps/documenteditor/mobile/src/controller/settings/ApplicationSettings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/ApplicationSettings.jsx @@ -63,6 +63,10 @@ class ApplicationSettingsController extends Component { LocalStorage.setItem("de-mobile-macros-mode", value); } + changeDirection(value) { + LocalStorage.setItem('mode-direction', value); + } + render() { return ( ) } diff --git a/apps/documenteditor/mobile/src/index_dev.html b/apps/documenteditor/mobile/src/index_dev.html index f3fd1bd00..939932bab 100644 --- a/apps/documenteditor/mobile/src/index_dev.html +++ b/apps/documenteditor/mobile/src/index_dev.html @@ -20,7 +20,6 @@ <% } else { %> <% } %> - diff --git a/apps/documenteditor/mobile/src/less/app.less b/apps/documenteditor/mobile/src/less/app.less index 38489b157..8f9fb566d 100644 --- a/apps/documenteditor/mobile/src/less/app.less +++ b/apps/documenteditor/mobile/src/less/app.less @@ -2,6 +2,7 @@ @import '../../../../common/mobile/resources/less/_mixins.less'; @import '../../../../common/mobile/resources/less/colors-table.less'; @import '../../../../common/mobile/resources/less/colors-table-dark.less'; +@import './app.rtl.less'; @brandColor: var(--brand-word); diff --git a/apps/documenteditor/mobile/src/less/app.rtl.less b/apps/documenteditor/mobile/src/less/app.rtl.less new file mode 100644 index 000000000..5103b8a76 --- /dev/null +++ b/apps/documenteditor/mobile/src/less/app.rtl.less @@ -0,0 +1,2 @@ +@import '../../../../common/mobile/resources/less/common.rtl.less'; +@import '../../../../common/mobile/resources/less/icons.rtl.less'; diff --git a/apps/documenteditor/mobile/src/store/applicationSettings.js b/apps/documenteditor/mobile/src/store/applicationSettings.js index 952686eb2..16649d877 100644 --- a/apps/documenteditor/mobile/src/store/applicationSettings.js +++ b/apps/documenteditor/mobile/src/store/applicationSettings.js @@ -19,6 +19,8 @@ export class storeApplicationSettings { changeDisplayComments: action, changeDisplayResolved: action, changeMacrosSettings: action, + directionMode: observable, + changeDirectionMode: action, changeMacrosRequest: action }) } @@ -30,6 +32,13 @@ export class storeApplicationSettings { isComments = false; isResolvedComments = false; macrosMode = 0; + + directionMode = LocalStorage.getItem('mode-direction') || 'ltr'; + + changeDirectionMode(value) { + this.directionMode = value; + } + macrosRequest = 0; changeUnitMeasurement(value) { diff --git a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx index f905a9eb3..297c8550f 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx @@ -275,7 +275,7 @@ const PageChartBorder = props => { onRangeChanged={(value) => {props.onBorderSize(borderSizeTransform.sizeByIndex(value))}} > -
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
@@ -435,7 +435,7 @@ const PageWrap = props => { onRangeChanged={(value) => {props.onWrapDistance(value)}} >
-
+
{stateDistance + ' ' + metricText}
diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index e6ba1a45d..3978e10f2 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -205,7 +205,7 @@ const PageStyle = props => { onRangeChanged={(value) => {props.onBorderSize(borderSizeTransform.sizeByIndex(value))}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
@@ -229,7 +229,7 @@ const PageStyle = props => { onRangeChanged={(value) => {props.onOpacity(value)}} >
-
+
{stateOpacity + ' %'}
diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index c479c158c..56b058e62 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -55,7 +55,7 @@ const PageTableOptions = props => { onRangeChanged={(value) => {props.onCellMargins(value)}} >
-
+
{stateDistance + ' ' + metricText}
@@ -160,7 +160,7 @@ const PageWrap = props => { onRangeChanged={(value) => {props.onWrapDistance(value)}} >
-
+
{stateDistance + ' ' + metricText}
@@ -434,7 +434,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro onRangeChanged={(value) => {storeTableSettings.updateCellBorderWidth(borderSizeTransform.sizeByIndex(value));}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index 3de276cb8..653bcb67d 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditText.jsx @@ -236,24 +236,29 @@ const PageNumbers = observer( props => { props.getIconsBulletsAndNumbers($$('.item-number'), 1); }, []); - return( + return ( - - {numberArrays.map(number => ( - { - storeTextSettings.resetNumbers(number.subtype); - props.onNumber(number.subtype); - }}> -
- -
-
- ))} -
+ {numberArrays.map((numbers, index) => ( + + {numbers.map((number) => ( + { + storeTextSettings.resetNumbers(number.type); + props.onNumber(number.type); + }}> + {number.thumb.length < 1 ? + + + : + + } + + ))} + + ))}
- ) + ); }); const PageMultiLevel = observer( props => { diff --git a/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx b/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx index 351c1af5e..03ecb2f8b 100644 --- a/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/ApplicationSettings.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from "react"; import { observer, inject } from "mobx-react"; -import { Page, Navbar, List, ListItem, BlockTitle, Toggle } from "framework7-react"; +import { Page, Navbar, List, ListItem, BlockTitle, Toggle, f7 } from "framework7-react"; import { useTranslation } from "react-i18next"; import { Themes } from '../../../../../common/mobile/lib/controller/Themes.js'; @@ -99,6 +99,10 @@ const PageApplicationSettings = props => { + + + + {_isShowMacros && { ); }; +const PageDirection = props => { + const { t } = useTranslation(); + const _t = t("Settings", { returnObjects: true }); + const store = props.storeApplicationSettings; + const directionMode = store.directionMode; + + const changeDirection = value => { + store.changeDirectionMode(value); + props.changeDirection(value); + + f7.dialog.create({ + title: _t.notcriticalErrorTitle, + text: t('Settings.textRestartApplication'), + buttons: [ + { + text: _t.textOk + } + ] + }).open(); + }; + + return ( + + + + changeDirection('ltr')}> + changeDirection('rtl')}> + + + ); +} + const PageMacrosSettings = props => { const { t } = useTranslation(); const _t = t("Settings", { returnObjects: true }); @@ -138,5 +174,6 @@ const PageMacrosSettings = props => { const ApplicationSettings = inject("storeApplicationSettings", "storeAppOptions", "storeReview")(observer(PageApplicationSettings)); const MacrosSettings = inject("storeApplicationSettings")(observer(PageMacrosSettings)); +const Direction = inject("storeApplicationSettings")(observer(PageDirection)); -export {ApplicationSettings, MacrosSettings}; \ No newline at end of file +export {ApplicationSettings, MacrosSettings, Direction}; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index e22481bfa..2a6ece70f 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -10,7 +10,7 @@ import DocumentInfoController from "../../controller/settings/DocumentInfo"; import { DownloadController } from "../../controller/settings/Download"; import ApplicationSettingsController from "../../controller/settings/ApplicationSettings"; import { DocumentFormats, DocumentMargins, DocumentColorSchemes } from "./DocumentSettings"; -import { MacrosSettings } from "./ApplicationSettings"; +import { MacrosSettings, Direction } from "./ApplicationSettings"; import About from '../../../../../common/mobile/lib/view/About'; import NavigationController from '../../controller/settings/Navigation'; @@ -61,6 +61,13 @@ const routes = [ { path: '/navigation/', component: NavigationController + }, + + // Direction + + { + path: '/direction/', + component: Direction } ]; diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index d45efa3e9..6d6459902 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -474,7 +474,11 @@ "txtScheme6": "Concourse", "txtScheme7": "Equity", "txtScheme8": "Flow", - "txtScheme9": "Foundry" + "txtScheme9": "Foundry", + "textOk": "Ok", + "textRTL": "RTL", + "textRestartApplication": "Please restart the application for the changes to take effect", + "notcriticalErrorTitle": "Warning" } } } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/app.js b/apps/presentationeditor/mobile/src/app.js index 49a9db3fb..f1b43f913 100644 --- a/apps/presentationeditor/mobile/src/app.js +++ b/apps/presentationeditor/mobile/src/app.js @@ -14,11 +14,14 @@ import jQuery from 'jquery'; window.jQuery = jQuery; window.$ = jQuery; -// Import Framework7 Styles -import 'framework7/framework7-bundle.css'; +// Import Framework7 or Framework7-RTL Styles +let direction = LocalStorage.getItem('mode-direction'); + +direction === 'rtl' ? $$('html').attr('dir', 'rtl') : $$('html').removeAttr('dir') +import(`framework7/framework7-bundle${direction === 'rtl' ? '-rtl' : ''}.css`) // Import App Custom Styles -import './less/app.less'; +import('./less/app.less'); // Import App Component import App from './page/app'; @@ -27,6 +30,7 @@ import i18n from './lib/i18n.js'; import { Provider } from 'mobx-react' import { stores } from './store/mainStore' +import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; // Init F7 React Plugin Framework7.use(Framework7React) diff --git a/apps/presentationeditor/mobile/src/less/app-rtl.less b/apps/presentationeditor/mobile/src/less/app-rtl.less new file mode 100644 index 000000000..c6b088922 --- /dev/null +++ b/apps/presentationeditor/mobile/src/less/app-rtl.less @@ -0,0 +1,19 @@ +@import '../../../../common/mobile/resources/less/common-rtl.less'; +@import '../../../../common/mobile/\/resources/less/icons.rtl.less'; + +[dir="rtl"] { + .slide-theme .item-theme.active:before { + left: -5px; + right: unset; + } + + .slide-layout { + .item-inner:before { + left: 11px; + right: unset; + } + .row img { + transform: scaleX(-1); + } + } +} \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/less/app.less b/apps/presentationeditor/mobile/src/less/app.less index ded0ee9f0..52f98b332 100644 --- a/apps/presentationeditor/mobile/src/less/app.less +++ b/apps/presentationeditor/mobile/src/less/app.less @@ -2,6 +2,7 @@ @import '../../../../common/mobile/resources/less/_mixins.less'; @import '../../../../common/mobile/resources/less/colors-table.less'; @import '../../../../common/mobile/resources/less/colors-table-dark.less'; +@import './app-rtl.less'; @brandColor: var(--brand-slide); diff --git a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx index 1857e4292..83d1bb389 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -285,7 +285,7 @@ const PageChartBorder = props => { onRangeChanged={(value) => {props.onBorderSize(borderSizeTransform.sizeByIndex(value))}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
diff --git a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx index bd41e6a97..9190e8ce1 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx @@ -162,7 +162,7 @@ const PageStyle = props => { onRangeChanged={(value) => {props.onBorderSize(borderSizeTransform.sizeByIndex(value))}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
@@ -186,7 +186,7 @@ const PageStyle = props => { onRangeChanged={(value) => {props.onOpacity(value)}} >
-
+
{stateOpacity + ' %'}
@@ -281,7 +281,7 @@ const PageStyleNoFill = props => { onRangeChanged={(value) => {props.onBorderSize(borderSizeTransform.sizeByIndex(value))}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index 6a0b6ca39..3f4c7b2cd 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -297,7 +297,7 @@ const PageTransition = props => { onRangeChanged={(value) => {props.onDelay(value)}} >
-
+
{stateRange + ' ' + _t.textSec}
diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index 95dd24122..cb73c5d26 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -280,7 +280,7 @@ const TabBorder = inject("storeFocusObjects", "storeTableSettings")(observer(pro onRangeChanged={(value) => {storeTableSettings.updateCellBorderWidth(borderSizeTransform.sizeByIndex(value));}} >
-
+
{stateTextBorderSize + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)}
@@ -539,7 +539,7 @@ const EditTable = props => { onRangeChanged={(value) => {props.onOptionMargin(value)}} >
-
+
{stateDistance + ' ' + metricText}
diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index 541fd9a02..f58a36cd3 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -564,22 +564,27 @@ const PageNumbers = observer(props => { return ( - - {numberArrays.map( number => ( - { - storeTextSettings.resetNumbers(number.subtype); - props.onNumber(number.subtype); - }}> -
- -
-
- ))} -
+ {numberArrays.map((numbers, index) => ( + + {numbers.map((number) => ( + { + storeTextSettings.resetNumbers(number.type); + props.onNumber(number.type); + }}> + {number.thumb.length < 1 ? + + + : + + } + + ))} + + ))}
- ) + ); }); const PageBulletsAndNumbers = props => { diff --git a/apps/presentationeditor/mobile/src/view/settings/ApplicationSettings.jsx b/apps/presentationeditor/mobile/src/view/settings/ApplicationSettings.jsx index 2007144e9..df847774b 100644 --- a/apps/presentationeditor/mobile/src/view/settings/ApplicationSettings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/ApplicationSettings.jsx @@ -1,8 +1,9 @@ import React, {Fragment, useState} from "react"; import { observer, inject } from "mobx-react"; -import { Page, Navbar, List, ListItem, BlockTitle, Toggle } from "framework7-react"; +import {f7, Page, Navbar, List, ListItem, BlockTitle, Toggle } from "framework7-react"; import { useTranslation } from "react-i18next"; import { Themes } from '../../../../../common/mobile/lib/controller/Themes.js'; +import { LocalStorage } from "../../../../../common/mobile/utils/LocalStorage.js"; const PageApplicationSettings = props => { const { t } = useTranslation(); @@ -51,6 +52,7 @@ const PageApplicationSettings = props => { + } {/* {_isShowMacros && */} @@ -64,6 +66,38 @@ const PageApplicationSettings = props => { ); }; +const RTLSetting = () => { + const { t } = useTranslation(); + const _t = t("View.Settings", { returnObjects: true }); + + let direction = LocalStorage.getItem('mode-direction'); + const [isRTLMode, setRTLMode] = useState(direction === 'rtl' ? true : false); + + const switchRTLMode = rtl => { + LocalStorage.setItem("mode-direction", rtl ? 'rtl' : 'ltr'); + + f7.dialog.create({ + title: t('View.Settings.notcriticalErrorTitle'), + text: t('View.Settings.textRestartApplication'), + buttons: [ + { + text: t('View.Settings.textOk') + } + ] + }).open(); + } + + return ( + + + {switchRTLMode(!toggle), setRTLMode(!toggle)}}> + + + + ) +} + const PageMacrosSettings = props => { const { t } = useTranslation(); const _t = t("View.Settings", { returnObjects: true }); diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 28f851bee..7d19d74b2 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -682,7 +682,11 @@ "txtSemicolon": "Semicolon", "txtSpace": "Space", "txtTab": "Tab", - "warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?" + "warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?", + "textLeftToRight": "Left To Right", + "textRightToLeft": "Right To Left", + "textDirection": "Direction", + "textRestartApplication": "Please restart the application for the changes to take effect" } } } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/app.js b/apps/spreadsheeteditor/mobile/src/app.js index 923799f29..7763b36a8 100644 --- a/apps/spreadsheeteditor/mobile/src/app.js +++ b/apps/spreadsheeteditor/mobile/src/app.js @@ -15,10 +15,17 @@ window.jQuery = jQuery; window.$ = jQuery; // Import Framework7 Styles -import 'framework7/framework7-bundle.css'; + +const htmlElem = document.querySelector('html'); +const direction = LocalStorage.getItem('mode-direction'); + +direction === 'rtl' ? htmlElem.setAttribute('dir', 'rtl') : htmlElem.setAttribute('dir', 'ltr'); + +import(`framework7/framework7-bundle${direction === 'rtl' ? '-rtl' : ''}.css`); // Import App Custom Styles -import './less/app.less'; + +import('./less/app.less'); import '../../../../../sdkjs/cell/css/main-mobile.css' // Import App Component @@ -28,6 +35,7 @@ import i18n from './lib/i18n.js'; import { Provider } from 'mobx-react'; import { stores } from './store/mainStore'; +import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; // Init F7 React Plugin Framework7.use(Framework7React); diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx index 30fc9aeb1..1db802bf4 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx @@ -88,6 +88,10 @@ class ApplicationSettingsController extends Component { Common.Notifications.trigger('changeRegSettings'); } + changeDirection(value) { + LocalStorage.setItem('mode-direction', value); + } + render() { return ( ) } diff --git a/apps/spreadsheeteditor/mobile/src/less/app.less b/apps/spreadsheeteditor/mobile/src/less/app.less index 6285cf3a8..8dc8c6a6e 100644 --- a/apps/spreadsheeteditor/mobile/src/less/app.less +++ b/apps/spreadsheeteditor/mobile/src/less/app.less @@ -3,6 +3,7 @@ @import '../../../../common/mobile/resources/less/_mixins.less'; @import '../../../../common/mobile/resources/less/colors-table.less'; @import '../../../../common/mobile/resources/less/colors-table-dark.less'; +@import './app.rtl.less'; // @themeColor: #40865c; @brandColor: var(--brand-cell); diff --git a/apps/spreadsheeteditor/mobile/src/less/app.rtl.less b/apps/spreadsheeteditor/mobile/src/less/app.rtl.less new file mode 100644 index 000000000..5103b8a76 --- /dev/null +++ b/apps/spreadsheeteditor/mobile/src/less/app.rtl.less @@ -0,0 +1,2 @@ +@import '../../../../common/mobile/resources/less/common.rtl.less'; +@import '../../../../common/mobile/resources/less/icons.rtl.less'; diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-common.less b/apps/spreadsheeteditor/mobile/src/less/icons-common.less index 392f464ef..b81569a9e 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-common.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-common.less @@ -78,9 +78,9 @@ } } -// Formats - i.icon { + // Formats + &.icon-format-xlsx { width: 22px; height: 22px; @@ -106,4 +106,37 @@ i.icon { height: 22px; .encoded-svg-background(''); } + + // Text orientation + + &.icon-text-orientation-horizontal { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + &.icon-text-orientation-anglecount { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + &.icon-text-orientation-angleclock { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + &.icon-text-orientation-vertical { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + &.icon-text-orientation-rotateup { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + &.icon-text-orientation-rotatedown { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } } diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less index 0bddf695a..90d210542 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less @@ -381,37 +381,6 @@ height: 24px; .encoded-svg-mask(''); } - // Text orientation - &.icon-text-orientation-horizontal { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-anglecount { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-angleclock { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-vertical { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-rotateup { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-rotatedown { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } } .tab-link-active { diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index 39773e019..d69f5fd41 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -329,37 +329,6 @@ height: 24px; .encoded-svg-background(''); } - // Text orientation - &.icon-text-orientation-horizontal { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-anglecount { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-angleclock { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-vertical { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-rotateup { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } - &.icon-text-orientation-rotatedown { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } &.icon-plus { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js b/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js index 0abd39934..fdf83b3b3 100644 --- a/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js +++ b/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js @@ -24,10 +24,13 @@ export class storeApplicationSettings { changeDisplayComments: action, changeDisplayResolved: action, changeRefStyle: action, - changeFormulaLang: action + changeFormulaLang: action, + directionMode: observable, + changeDirectionMode: action }); } - + + directionMode = LocalStorage.getItem('mode-direction') || 'ltr'; unitMeasurement = Common.Utils.Metric.getCurrentMetric(); macrosMode = 0; macrosRequest = 0; @@ -39,6 +42,10 @@ export class storeApplicationSettings { isComments = true; isResolvedComments = true; + changeDirectionMode(value) { + this.directionMode = value; + } + getFormulaLanguages() { const dataLang = [ { value: 'en', displayValue: 'English', exampleValue: ' SUM; MIN; MAX; COUNT' }, diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/ApplicationSettings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/ApplicationSettings.jsx index 30a319d05..9a245d186 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/ApplicationSettings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/ApplicationSettings.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from "react"; import { observer, inject } from "mobx-react"; -import { Page, Navbar, List, ListItem, BlockTitle, Toggle, Icon } from "framework7-react"; +import { Page, Navbar, List, ListItem, BlockTitle, Toggle, Icon, f7 } from "framework7-react"; import { useTranslation } from "react-i18next"; import { Themes } from '../../../../../common/mobile/lib/controller/Themes.js'; @@ -97,6 +97,10 @@ const PageApplicationSettings = props => { + + + + {/* } */} {/* {_isShowMacros && */} @@ -109,6 +113,38 @@ const PageApplicationSettings = props => { ); }; +const PageDirection = props => { + const { t } = useTranslation(); + const _t = t("View.Settings", { returnObjects: true }); + const store = props.storeApplicationSettings; + const directionMode = store.directionMode; + + const changeDirection = value => { + store.changeDirectionMode(value); + props.changeDirection(value); + + f7.dialog.create({ + title: _t.notcriticalErrorTitle, + text: t('View.Settings.textRestartApplication'), + buttons: [ + { + text: _t.textOk + } + ] + }).open(); + }; + + return ( + + + + changeDirection('ltr')}> + changeDirection('rtl')}> + + + ); +} + const PageRegionalSettings = props => { const { t } = useTranslation(); const _t = t("View.Settings", { returnObjects: true }); @@ -194,10 +230,12 @@ const ApplicationSettings = inject("storeApplicationSettings", "storeAppOptions" const MacrosSettings = inject("storeApplicationSettings")(observer(PageMacrosSettings)); const RegionalSettings = inject("storeApplicationSettings")(observer(PageRegionalSettings)); const FormulaLanguage = inject("storeApplicationSettings")(observer(PageFormulaLanguage)); +const Direction = inject("storeApplicationSettings")(observer(PageDirection)); export { ApplicationSettings, MacrosSettings, RegionalSettings, - FormulaLanguage + FormulaLanguage, + Direction }; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index 01386fbfd..69780dd76 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -12,6 +12,7 @@ import {SpreadsheetColorSchemes, SpreadsheetFormats, SpreadsheetMargins} from '. import {MacrosSettings, RegionalSettings, FormulaLanguage} from './ApplicationSettings.jsx'; // import SpreadsheetAbout from './SpreadsheetAbout.jsx'; import About from '../../../../../common/mobile/lib/view/About'; +import { Direction } from '../../../../../spreadsheeteditor/mobile/src/view/settings/ApplicationSettings'; const routes = [ { @@ -61,6 +62,10 @@ const routes = [ { path: '/about/', component: About + }, + { + path: '/direction/', + component: Direction } ]; diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index 25a403832..d47c5e65d 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -98,14 +98,14 @@ module.exports = { } }), 'css-loader', - { - loader: 'postcss-loader', - options: { - config: { - path: path.resolve(__dirname, '..'), - } - }, - }, + { + loader: 'postcss-loader', + options: { + postcssOptions: { + path: path.resolve(__dirname, '..'), + } + } + }, ], }, { @@ -117,27 +117,27 @@ module.exports = { publicPath: '../' } }), - 'css-loader?url=false', - { - loader: 'postcss-loader', - options: { - config: { - path: path.resolve(__dirname, '..'), - } - }, - }, - { - loader: "less-loader", - options: { - lessOptions: { - javascriptEnabled: true, - globalVars: { - "common-image-path": env === 'production' ? `../../../${editor}/mobile/resources/img` : '../../common/mobile/resources/img', - "app-image-path": env === 'production' ? '../resources/img' : './resources/img', - } + 'css-loader?url=false', + { + loader: 'postcss-loader', + options: { + postcssOptions: { + path: path.resolve(__dirname, '..'), + } + } + }, + { + loader: "less-loader", + options: { + lessOptions: { + javascriptEnabled: true, + globalVars: { + "common-image-path": env === 'production' ? `../../../${editor}/mobile/resources/img` : '../../common/mobile/resources/img', + "app-image-path": env === 'production' ? '../resources/img' : './resources/img', } } - }, + } + }, ], }, { @@ -198,6 +198,10 @@ module.exports = { new MiniCssExtractPlugin({ filename: 'css/[name].css', }), + // new WebpackRTLPlugin({ + // filename: 'css/[name].rtl.css', + // diffOnly: true + // }), new HtmlWebpackPlugin({ filename: `../../../apps/${editor}/mobile/index.html`, template: `../../apps/${editor}/mobile/src/index_dev.html`, diff --git a/vendor/framework7-react/package.json b/vendor/framework7-react/package.json index 7e389cd75..81c6f09ed 100644 --- a/vendor/framework7-react/package.json +++ b/vendor/framework7-react/package.json @@ -33,6 +33,7 @@ "framework7-react": "^6.0.4", "i18next": "^19.8.4", "i18next-fetch-backend": "^3.0.0", + "postcss": "^8.4.12", "prop-types": "^15.7.2", "react": "^17.0.1", "react-dom": "^17.0.1", @@ -65,7 +66,7 @@ "mobx": "^6.1.8", "mobx-react": "^7.1.0", "ora": "^4.1.1", - "postcss-loader": "^3.0.0", + "postcss-loader": "^5.3.0", "postcss-preset-env": "^6.7.0", "rimraf": "^3.0.2", "style-loader": "^1.3.0", diff --git a/vendor/framework7-react/postcss.config.js b/vendor/framework7-react/postcss.config.js index f88a19cc8..a8baa9d42 100644 --- a/vendor/framework7-react/postcss.config.js +++ b/vendor/framework7-react/postcss.config.js @@ -1,5 +1,6 @@ + module.exports = (ctx) => ({ plugins: { - 'postcss-preset-env': {}, + 'postcss-preset-env': {} }, });