From 75f01aca9a3a472626040f74e6646cf43e48884c Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 29 Jul 2022 22:25:44 +0300 Subject: [PATCH 1/5] [common] Add sharing settings --- .../mobile/lib/controller/SharingSettings.jsx | 18 +++++++++++++++ .../mobile/lib/view/SharingSettings.jsx | 22 +++++++++++++++++++ apps/common/mobile/resources/less/common.less | 7 ++++-- apps/common/mobile/resources/less/icons.less | 6 +++++ apps/documenteditor/mobile/locale/en.json | 4 +++- .../mobile/src/view/settings/Settings.jsx | 11 ++++++++++ apps/presentationeditor/mobile/locale/en.json | 4 +++- .../mobile/src/view/settings/Settings.jsx | 11 ++++++++++ apps/spreadsheeteditor/mobile/locale/en.json | 4 +++- .../mobile/src/view/settings/Settings.jsx | 11 ++++++++++ 10 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 apps/common/mobile/lib/controller/SharingSettings.jsx create mode 100644 apps/common/mobile/lib/view/SharingSettings.jsx diff --git a/apps/common/mobile/lib/controller/SharingSettings.jsx b/apps/common/mobile/lib/controller/SharingSettings.jsx new file mode 100644 index 0000000000..fc9bc048f2 --- /dev/null +++ b/apps/common/mobile/lib/controller/SharingSettings.jsx @@ -0,0 +1,18 @@ +import React, { Component } from 'react' +import {observer, inject} from "mobx-react" +import { withTranslation } from 'react-i18next'; +import SharingSettings from '../view/SharingSettings'; + +class SharingSettingsController extends Component { + constructor(props){ + super(props); + } + + render() { + return ( + + ) + } +} + +export default SharingSettingsController; \ No newline at end of file diff --git a/apps/common/mobile/lib/view/SharingSettings.jsx b/apps/common/mobile/lib/view/SharingSettings.jsx new file mode 100644 index 0000000000..22f60e4b8b --- /dev/null +++ b/apps/common/mobile/lib/view/SharingSettings.jsx @@ -0,0 +1,22 @@ +import React, { Component, useEffect } from 'react'; +import { observer, inject } from "mobx-react"; +import { f7, Popover, List, ListItem, Navbar, NavRight, Sheet, BlockTitle, Page, View, Icon, Link } from 'framework7-react'; +import { useTranslation } from 'react-i18next'; +import { Device } from "../../utils/device"; + +const SharingSettings = props => { + const { t } = useTranslation(); + const _t = t('Common.Collaboration', {returnObjects: true}); + const url = 'https://nct.onlyoffice.com/Products/Files/Share.aspx?fileid=142278'; + + return ( + + +
+ +
+
+ ) +} + +export default SharingSettings; \ 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 12338a90c2..eee9be647d 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -1138,8 +1138,11 @@ input[type="number"]::-webkit-inner-spin-button { } } - - +// Sharing Settings + +.sharing-placeholder { + height: 100%; +} diff --git a/apps/common/mobile/resources/less/icons.less b/apps/common/mobile/resources/less/icons.less index 3ef58ee338..6efda00ebd 100644 --- a/apps/common/mobile/resources/less/icons.less +++ b/apps/common/mobile/resources/less/icons.less @@ -83,4 +83,10 @@ i.icon { &.icon-numbers-7 { .encoded-svg-background(''); } + + &.icon-sharing-settings { + width: 24px; + height: 24px; + .encoded-svg-mask('') + } } diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 2aa15d6ce8..e86719772a 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -163,7 +163,9 @@ "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUnderline": "Underline", "textUsers": "Users", - "textWidow": "Widow control" + "textWidow": "Widow control", + "textWidow": "Widow control", + "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { "textNoFill": "No Fill" diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 2a6ece70f8..0b2ec8bbe7 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -13,6 +13,7 @@ import { DocumentFormats, DocumentMargins, DocumentColorSchemes } from "./Docume import { MacrosSettings, Direction } from "./ApplicationSettings"; import About from '../../../../../common/mobile/lib/view/About'; import NavigationController from '../../controller/settings/Navigation'; +import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; const routes = [ { @@ -68,6 +69,13 @@ const routes = [ { path: '/direction/', component: Direction + }, + + // Sharing Settings + + { + path: '/sharing-settings/', + component: SharingSettingsController } ]; @@ -174,6 +182,9 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props => + + + {_canDownload && diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index a46331db46..309ed1b831 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -32,7 +32,9 @@ "textReopen": "Reopen", "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", - "textUsers": "Users" + "textUsers": "Users", + "textWidow": "Widow control", + "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { "textNoFill": "No Fill" diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index d0fe47f00d..b42dad38d1 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -12,6 +12,7 @@ import PresentationSettingsController from "../../controller/settings/Presentati import { PresentationColorSchemes } from "./PresentationSettings"; // import PresentationAboutController from '../../controller/settings/PresentationAbout'; import About from '../../../../../common/mobile/lib/view/About'; +import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; const routes = [ { @@ -45,6 +46,13 @@ const routes = [ { path: '/about/', component: About + }, + + // Sharing Settings + + { + path: '/sharing-settings/', + component: SharingSettingsController } /*{ path: '/presentation-settings/', @@ -178,6 +186,9 @@ const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer( + + + {_canDownload && diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index ec179db309..6b8e9d1c55 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -32,7 +32,9 @@ "textReopen": "Reopen", "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", - "textUsers": "Users" + "textUsers": "Users", + "textWidow": "Widow control", + "textSharingSettings": "Sharing Settings" }, "ThemeColorPalette": { "textCustomColors": "Custom Colors", diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index 1387892889..cbf2d33945 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -13,6 +13,7 @@ import {MacrosSettings, RegionalSettings, FormulaLanguage} from './ApplicationSe // import SpreadsheetAbout from './SpreadsheetAbout.jsx'; import About from '../../../../../common/mobile/lib/view/About'; import { Direction } from '../../../../../spreadsheeteditor/mobile/src/view/settings/ApplicationSettings'; +import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; const routes = [ { @@ -66,6 +67,13 @@ const routes = [ { path: '/direction/', component: Direction + }, + + // Sharing Settings + + { + path: '/sharing-settings/', + component: SharingSettingsController } ]; @@ -188,6 +196,9 @@ const SettingsList = inject("storeAppOptions")(observer(props => { + + + {_canDownload && From 6edc78adc3ab2f341c20947d941cfa8217faaf76 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 1 Aug 2022 15:18:11 +0300 Subject: [PATCH 2/5] [common] Removed sharing settings controller --- .../mobile/lib/controller/SharingSettings.jsx | 18 ------------------ .../mobile/src/view/settings/Settings.jsx | 4 ++-- .../mobile/src/view/settings/Settings.jsx | 4 ++-- .../mobile/src/view/settings/Settings.jsx | 4 ++-- 4 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 apps/common/mobile/lib/controller/SharingSettings.jsx diff --git a/apps/common/mobile/lib/controller/SharingSettings.jsx b/apps/common/mobile/lib/controller/SharingSettings.jsx deleted file mode 100644 index fc9bc048f2..0000000000 --- a/apps/common/mobile/lib/controller/SharingSettings.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React, { Component } from 'react' -import {observer, inject} from "mobx-react" -import { withTranslation } from 'react-i18next'; -import SharingSettings from '../view/SharingSettings'; - -class SharingSettingsController extends Component { - constructor(props){ - super(props); - } - - render() { - return ( - - ) - } -} - -export default SharingSettingsController; \ 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 0b2ec8bbe7..9129b00867 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -13,7 +13,7 @@ import { DocumentFormats, DocumentMargins, DocumentColorSchemes } from "./Docume import { MacrosSettings, Direction } from "./ApplicationSettings"; import About from '../../../../../common/mobile/lib/view/About'; import NavigationController from '../../controller/settings/Navigation'; -import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; +import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; const routes = [ { @@ -75,7 +75,7 @@ const routes = [ { path: '/sharing-settings/', - component: SharingSettingsController + component: SharingSettings } ]; diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index b42dad38d1..2f26153835 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -12,7 +12,7 @@ import PresentationSettingsController from "../../controller/settings/Presentati import { PresentationColorSchemes } from "./PresentationSettings"; // import PresentationAboutController from '../../controller/settings/PresentationAbout'; import About from '../../../../../common/mobile/lib/view/About'; -import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; +import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; const routes = [ { @@ -52,7 +52,7 @@ const routes = [ { path: '/sharing-settings/', - component: SharingSettingsController + component: SharingSettings } /*{ path: '/presentation-settings/', diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index cbf2d33945..ea36d7edda 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -13,7 +13,7 @@ import {MacrosSettings, RegionalSettings, FormulaLanguage} from './ApplicationSe // import SpreadsheetAbout from './SpreadsheetAbout.jsx'; import About from '../../../../../common/mobile/lib/view/About'; import { Direction } from '../../../../../spreadsheeteditor/mobile/src/view/settings/ApplicationSettings'; -import SharingSettingsController from "../../../../../common/mobile/lib/controller/SharingSettings"; +import SharingSettings from "../../../../../common/mobile/lib/view/SharingSettings"; const routes = [ { @@ -73,7 +73,7 @@ const routes = [ { path: '/sharing-settings/', - component: SharingSettingsController + component: SharingSettings } ]; From bd011121c65edc84954eb4870a6490fc7952fbe0 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 2 Aug 2022 02:04:53 +0300 Subject: [PATCH 3/5] Correct translation --- apps/documenteditor/mobile/locale/en.json | 3 +-- apps/presentationeditor/mobile/locale/en.json | 2 +- apps/spreadsheeteditor/mobile/locale/en.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index e86719772a..8d08272d15 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -163,8 +163,7 @@ "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUnderline": "Underline", "textUsers": "Users", - "textWidow": "Widow control", - "textWidow": "Widow control", + "textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 309ed1b831..890a9e3704 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -33,7 +33,7 @@ "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUsers": "Users", - "textWidow": "Widow control", + "textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 6b8e9d1c55..44edc6190d 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -33,7 +33,7 @@ "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUsers": "Users", - "textWidow": "Widow control", + "textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "ThemeColorPalette": { From e6ee9e9ba7538fe3a20059b323a69a5d5b0fcc7d Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 2 Aug 2022 12:20:58 +0300 Subject: [PATCH 4/5] Removed unused translation --- apps/documenteditor/mobile/locale/en.json | 3 ++- apps/presentationeditor/mobile/locale/en.json | 3 ++- apps/spreadsheeteditor/mobile/locale/en.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 8d08272d15..fb5487f5ba 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -163,7 +163,8 @@ "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUnderline": "Underline", "textUsers": "Users", - "textWindow": "Window control", + "del_textWidow": "Widow control", + "del_textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 890a9e3704..bb8a1a0191 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -33,7 +33,8 @@ "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUsers": "Users", - "textWindow": "Window control", + "del_textWidow": "Widow control", + "del_textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "HighlightColorPalette": { diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 44edc6190d..e095377d13 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -33,7 +33,8 @@ "textResolve": "Resolve", "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUsers": "Users", - "textWindow": "Window control", + "del_textWidow": "Widow control", + "del_textWindow": "Window control", "textSharingSettings": "Sharing Settings" }, "ThemeColorPalette": { From 62fc23f32f7852400f6cca17fa2967071f1d8305 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 2 Aug 2022 18:32:46 +0300 Subject: [PATCH 5/5] [DE mobile] Correct translation --- apps/documenteditor/mobile/locale/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index fb5487f5ba..cd25adc852 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -163,7 +163,7 @@ "textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", "textUnderline": "Underline", "textUsers": "Users", - "del_textWidow": "Widow control", + "textWidow": "Widow control", "del_textWindow": "Window control", "textSharingSettings": "Sharing Settings" },