diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx
index 5bfdd48011..7284631c2e 100644
--- a/apps/documenteditor/mobile/src/view/add/Add.jsx
+++ b/apps/documenteditor/mobile/src/view/add/Add.jsx
@@ -15,7 +15,6 @@ const routes = [
{
path: '/adding-page/',
component: AddingPage,
- keepAlive: true
},
// Image
{
diff --git a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx
index 09151c44ef..e66c79fe4c 100644
--- a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx
+++ b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx
@@ -49,9 +49,11 @@ const AddLayoutContent = ({ tabs }) => {
)
};
-const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(props => {
+const AddingPage = inject("storeFocusObjects", "storeTableSettings", "storeApplicationSettings")(observer(props => {
const mainContext = useContext(MainContext);
const showPanels = mainContext.showPanels;
+ const storeApplicationSettings = props.storeApplicationSettings;
+ const directionMode = storeApplicationSettings.directionMode;
const storeFocusObjects = props.storeFocusObjects;
const storeTableSettings = props.storeTableSettings;
const { t } = useTranslation();
@@ -65,6 +67,12 @@ const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(pr
f7.tab.show('#add-other', false);
}, []);
+ useEffect(() => {
+ if(directionMode === 'rtl') {
+ tabs.reverse();
+ }
+ }, [directionMode])
+
let needDisable = false,
canAddTable = true,
canAddImage = true,
diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx
index 219acdd181..fdf6f193ae 100644
--- a/apps/presentationeditor/mobile/src/view/add/Add.jsx
+++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx
@@ -15,7 +15,6 @@ const routes = [
{
path: '/adding-page/',
component: AddingPage,
- keepAlive: true
},
// Image
{
diff --git a/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx
index 27215a97db..44ec47d308 100644
--- a/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx
+++ b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx
@@ -1,6 +1,7 @@
import React, { useContext, useEffect } from 'react';
import { Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab, f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
+import { observer, inject } from "mobx-react";
import { Device } from '../../../../../common/mobile/utils/device';
import AddSlideController from "../../controller/add/AddSlide";
import AddShapeController from "../../controller/add/AddShape";
@@ -39,10 +40,12 @@ const AddLayoutContent = ({ tabs }) => {
)
};
-const AddingPage = () => {
+const AddingPage = inject("storeApplicationSettings")(observer(props => {
const { t } = useTranslation();
const _t = t('View.Add', {returnObjects: true});
const api = Common.EditorApi.get();
+ const storeApplicationSettings = props.storeApplicationSettings;
+ const directionMode = storeApplicationSettings.directionMode;
const countPages = api.getCountPages();
const mainContext = useContext(MainContext);
const showPanels = mainContext.showPanels;
@@ -51,6 +54,12 @@ const AddingPage = () => {
useEffect(() => {
f7.tab.show('#add-other', false);
}, []);
+
+ useEffect(() => {
+ if(directionMode === 'rtl') {
+ tabs.reverse();
+ }
+ }, [directionMode])
if (!showPanels && countPages) {
tabs.push({
@@ -105,6 +114,6 @@ const AddingPage = () => {
)
-};
+}));
export default AddingPage;
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx
index 3d506e7578..dfcc6b8ae5 100644
--- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx
+++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx
@@ -16,7 +16,6 @@ const routes = [
{
path: '/adding-page/',
component: AddingPage,
- keepAlive: true
},
// Functions
{
diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx
index f31e2f8811..c83d3ce284 100644
--- a/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx
+++ b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx
@@ -1,5 +1,6 @@
-import React, { useContext } from 'react';
+import React, { useContext, useEffect } from 'react';
import { Page, Navbar, NavTitle, NavRight, Link, Icon, Tabs, Tab, f7 } from 'framework7-react';
+import { observer, inject } from "mobx-react";
import { useTranslation } from 'react-i18next';
import { AddChartController } from "../../controller/add/AddChart";
import { AddFunctionController } from "../../controller/add/AddFunction";
@@ -43,15 +44,23 @@ const AddLayoutContent = ({ tabs }) => {
)
};
-const AddingPage = () => {
+const AddingPage = inject("storeApplicationSettings")(observer(props => {
const { t } = useTranslation();
const _t = t('View.Add', {returnObjects: true});
const mainContext = useContext(MainContext);
const addingContext = useContext(AddingContext);
+ const storeApplicationSettings = props.storeApplicationSettings;
+ const directionMode = storeApplicationSettings.directionMode;
// const wsLock = mainContext.wsLock;
const wsProps = mainContext.wsProps;
const showPanels = addingContext.showPanels;
const tabs = [];
+
+ useEffect(() => {
+ if(directionMode === 'rtl') {
+ tabs.reverse();
+ }
+ }, [directionMode])
if(!wsProps.Objects) {
if(!showPanels) {
@@ -125,6 +134,6 @@ const AddingPage = () => {
)
-};
+}));
export default AddingPage;
\ No newline at end of file