[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 { storeTransition } from './transition';
import { storeTheme } from './theme';
import { storeStyle } from './style';
import { storeSlideStyle } from './styleSlide';
import { storePalette } from './palette';
// import {storeTextSettings} from "./textSettings";
// import {storeParagraphSettings} from "./paragraphSettings";
@ -29,7 +29,7 @@ export const stores = {
storeLayout: new storeLayout(),
storeTransition: new storeTransition(),
storeTheme: new storeTheme(),
storeStyle: new storeStyle(),
storeSlideStyle: new storeSlideStyle(),
storePalette: new storePalette()
// storeTextSettings: new storeTextSettings(),
// storeParagraphSettings: new storeParagraphSettings(),

View file

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

View file

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