Merge pull request #933 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
7342def284
|
@ -196,6 +196,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
&::before, &::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
li {
|
li {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, V
|
||||||
import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx';
|
import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import {Device} from '../../../../../common/mobile/utils/device';
|
import {Device} from '../../../../../common/mobile/utils/device';
|
||||||
|
import { element } from 'prop-types';
|
||||||
|
|
||||||
const EditSlide = props => {
|
const EditSlide = props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -45,8 +46,6 @@ const PageTheme = props => {
|
||||||
const storeSlideSettings = props.storeSlideSettings;
|
const storeSlideSettings = props.storeSlideSettings;
|
||||||
const arrayThemes = storeSlideSettings.arrayThemes;
|
const arrayThemes = storeSlideSettings.arrayThemes;
|
||||||
const slideThemeIndex = storeSlideSettings.slideThemeIndex;
|
const slideThemeIndex = storeSlideSettings.slideThemeIndex;
|
||||||
const defaultThemes = arrayThemes[0];
|
|
||||||
const docThemes = arrayThemes[1];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page className="slide-theme">
|
<Page className="slide-theme">
|
||||||
|
@ -59,32 +58,21 @@ const PageTheme = props => {
|
||||||
</NavRight>
|
</NavRight>
|
||||||
}
|
}
|
||||||
</Navbar>
|
</Navbar>
|
||||||
{arrayThemes.length ? (
|
{arrayThemes.length && (
|
||||||
<List className="slide-theme__list">
|
<List className="slide-theme__list">
|
||||||
{defaultThemes.map((elem, index) => {
|
{arrayThemes.map(theme => {
|
||||||
return (
|
return (
|
||||||
<ListItem key={elem.Index} className={elem.Index === slideThemeIndex ? "item-theme active" : "item-theme"}
|
<ListItem key={theme.themeId} className={theme.themeId === slideThemeIndex ? "item-theme active" : "item-theme"}
|
||||||
style={{backgroundPosition: "0 " + index * -40 + "px"}}
|
style={{backgroundPosition: `0 -${theme.offsety}px`, backgroundImage: theme.imageUrl && `url(${theme.imageUrl})`}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
storeSlideSettings.changeSlideThemeIndex(elem.Index);
|
storeSlideSettings.changeSlideThemeIndex(theme.themeId);
|
||||||
props.onThemeClick(elem.Index);
|
props.onThemeClick(theme.themeId);
|
||||||
}}>
|
|
||||||
</ListItem>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{docThemes.map((elem, index) => {
|
|
||||||
return (
|
|
||||||
<ListItem key={elem.Index} className={elem.Index === slideThemeIndex ? "item-theme active" : "item-theme"}
|
|
||||||
style={{backgroundPosition: "0 -0px", backgroundImage: "url(" + elem.ThemeInfo.Thumbnail + ")"}}
|
|
||||||
onClick={() => {
|
|
||||||
storeSlideSettings.changeSlideThemeIndex(elem.Index);
|
|
||||||
props.onThemeClick(elem.Index);
|
|
||||||
}}>
|
}}>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
) : null}
|
)}
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -95,7 +83,7 @@ const PageLayout = props => {
|
||||||
const storeFocusObjects = props.storeFocusObjects;
|
const storeFocusObjects = props.storeFocusObjects;
|
||||||
const storeSlideSettings = props.storeSlideSettings;
|
const storeSlideSettings = props.storeSlideSettings;
|
||||||
storeSlideSettings.changeSlideLayoutIndex(storeFocusObjects.slideObject.get_LayoutIndex());
|
storeSlideSettings.changeSlideLayoutIndex(storeFocusObjects.slideObject.get_LayoutIndex());
|
||||||
const arrayLayouts = storeSlideSettings.arrayLayouts;
|
const arrayLayouts = storeSlideSettings.slideLayouts;
|
||||||
const slideLayoutIndex = storeSlideSettings.slideLayoutIndex;
|
const slideLayoutIndex = storeSlideSettings.slideLayoutIndex;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -109,21 +97,25 @@ const PageLayout = props => {
|
||||||
</NavRight>
|
</NavRight>
|
||||||
}
|
}
|
||||||
</Navbar>
|
</Navbar>
|
||||||
{arrayLayouts.length ? (
|
{arrayLayouts.length &&
|
||||||
<List className="slide-layout__list">
|
arrayLayouts.map((layouts, index) => {
|
||||||
{arrayLayouts.map((elem, index) => {
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index} className={slideLayoutIndex === index ? "active" : ""}
|
<List className="slide-layout__list" key={index}>
|
||||||
|
{layouts.map(layout => {
|
||||||
|
return (
|
||||||
|
<ListItem key={layout.type} className={slideLayoutIndex === layout.type ? "active" : ""}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
storeSlideSettings.changeSlideLayoutIndex(index);
|
storeSlideSettings.changeSlideLayoutIndex(layout.type);
|
||||||
props.onLayoutClick(index);
|
props.onLayoutClick(layout.type);
|
||||||
}}>
|
}}>
|
||||||
<img src={elem.Image} style={{width: elem.Width, height: elem.Height}} alt=""/>
|
<img src={layout.image} style={{width: layout.width, height: layout.height}} alt=""/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</List>
|
</List>
|
||||||
) : null}
|
);
|
||||||
|
})
|
||||||
|
}
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue