[PE mobile] Edited Slide Settings

This commit is contained in:
SergeyEzhin 2021-01-14 19:09:32 +03:00
parent 923cb7f3f5
commit 586e794792
3 changed files with 13 additions and 13 deletions

View file

@ -9,7 +9,7 @@ import {storePresentationSettings} from './presentationSettings';
import { storeLayout } from './layout'; import { storeLayout } from './layout';
import { storeTransition } from './transition'; import { storeTransition } from './transition';
import { storeTheme } from './theme'; import { storeTheme } from './theme';
import { storeStyle } from './style'; import { storeSlideStyle } from './styleSlide';
import { storePalette } from './palette'; import { storePalette } from './palette';
// import {storeTextSettings} from "./textSettings"; // import {storeTextSettings} from "./textSettings";
// import {storeParagraphSettings} from "./paragraphSettings"; // import {storeParagraphSettings} from "./paragraphSettings";
@ -29,7 +29,7 @@ export const stores = {
storeLayout: new storeLayout(), storeLayout: new storeLayout(),
storeTransition: new storeTransition(), storeTransition: new storeTransition(),
storeTheme: new storeTheme(), storeTheme: new storeTheme(),
storeStyle: new storeStyle(), storeSlideStyle: new storeSlideStyle(),
storePalette: new storePalette() storePalette: new storePalette()
// storeTextSettings: new storeTextSettings(), // storeTextSettings: new storeTextSettings(),
// storeParagraphSettings: new storeParagraphSettings(), // storeParagraphSettings: new storeParagraphSettings(),

View file

@ -1,6 +1,6 @@
import {action, observable} from 'mobx'; import {action, observable} from 'mobx';
export class storeStyle { export class storeSlideStyle {
@observable fillColor = undefined; @observable fillColor = undefined;
@action getFillColor (slideObject) { @action getFillColor (slideObject) {

View file

@ -2,7 +2,7 @@ import React from "react";
import { observer, inject } from "mobx-react"; import { observer, inject } from "mobx-react";
import { Page, Navbar, List, ListItem, NavRight, Link } from "framework7-react"; import { Page, Navbar, List, ListItem, NavRight, Link } from "framework7-react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.js'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx';
const PageFillColor = props => { const PageFillColor = props => {
const { t } = useTranslation(); const { t } = useTranslation();
@ -10,19 +10,19 @@ const PageFillColor = props => {
const storeFocusObjects = props.storeFocusObjects; const storeFocusObjects = props.storeFocusObjects;
const slideObject = storeFocusObjects.slideObject; const slideObject = storeFocusObjects.slideObject;
const storePalette = props.storePalette; const storePalette = props.storePalette;
const storeStyle = props.storeStyle; const storeSlideStyle = props.storeSlideStyle;
const customColors = storePalette.customColors; const customColors = storePalette.customColors;
const fillColor = storeStyle.fillColor ? storeStyle.fillColor : storeStyle.getFillColor(slideObject); const fillColor = storeSlideStyle.fillColor ? storeSlideStyle.fillColor : storeSlideStyle.getFillColor(slideObject);
const changeColor = (color, effectId, effectValue) => { const changeColor = (color, effectId, effectValue) => {
if (color !== 'empty') { if (color !== 'empty') {
if (effectId !== undefined ) { if (effectId !== undefined ) {
const newColor = {color: color, effectId: effectId, effectValue: effectValue}; const newColor = {color: color, effectId: effectId, effectValue: effectValue};
props.onFillColor(newColor); props.onFillColor(newColor);
storeStyle.changeFillColor(newColor); storeSlideStyle.changeFillColor(newColor);
} else { } else {
props.onFillColor(color); props.onFillColor(color);
storeStyle.changeFillColor(color); storeSlideStyle.changeFillColor(color);
} }
} else { } else {
// open custom color menu // open custom color menu
@ -51,7 +51,7 @@ const PageCustomFillColor = props => {
const { t } = useTranslation(); const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true}); const _t = t('View.Edit', {returnObjects: true});
let fillColor = props.storeStyle.fillColor; let fillColor = props.storeSlideStyle.fillColor;
if (typeof fillColor === 'object') { if (typeof fillColor === 'object') {
fillColor = fillColor.color; fillColor = fillColor.color;
@ -60,7 +60,7 @@ const PageCustomFillColor = props => {
const onAddNewColor = (colors, color) => { const onAddNewColor = (colors, color) => {
props.storePalette.changeCustomColors(colors); props.storePalette.changeCustomColors(colors);
props.onFillColor(color); props.onFillColor(color);
props.storeStyle.changeFillColor(color); props.storeSlideStyle.changeFillColor(color);
props.f7router.back(); props.f7router.back();
}; };
@ -72,7 +72,7 @@ const PageCustomFillColor = props => {
) )
}; };
const StyleFillColor = inject("storeStyle", "storePalette", "storeFocusObjects")(observer(PageFillColor)); const StyleFillColor = inject("storeSlideStyle", "storePalette", "storeFocusObjects")(observer(PageFillColor));
const CustomFillColor = inject("storeStyle", "storePalette", "storeFocusObjects")(observer(PageCustomFillColor)); const CustomFillColor = inject("storeSlideStyle", "storePalette", "storeFocusObjects")(observer(PageCustomFillColor));
export {StyleFillColor, CustomFillColor}; export { StyleFillColor, CustomFillColor };