mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
chore: disable drawing for iOS
This commit is contained in:
@ -6,7 +6,7 @@ import { LocalStorage } from '../../utils/LocalStorage.mjs';
|
||||
|
||||
const DEFAULT_TOOL_SETTINGS = { color: '#3D8A44', opacity: 100, lineSize: 1 }
|
||||
const DEFAULT_ANDROID_COLORS = ['#FF0000', '#FFC000', '#FFFF00', '#92D050', '#00B050', '#00B0F0', '#0070C0', '#002060', '#C00000']
|
||||
const DEFAULT_IOS_COLORS = []
|
||||
const DEFAULT_IOS_COLORS = ['#FFFC54', '#72F54A', '#74F9FD', '#EB51F7', '#A900F9', '#FF0303', '#EF8B3A', '#D3D3D4', '#000000']
|
||||
|
||||
export const DrawController = inject('storeAppOptions')(observer(({ storeAppOptions }) => {
|
||||
const [currentTool, setCurrentTool] = useState(null);
|
||||
|
||||
@ -87,7 +87,7 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,
|
||||
<SvgIcon symbolId={IconClearAll.id} className='icon icon-svg'/>
|
||||
</Button>
|
||||
<div className='draw-toolbar-divider'/>
|
||||
<Button type='button' fill={currentTool === 'scroll'} onClick={() => setTool('scroll')}>
|
||||
<Button type='button' fill={currentTool === 'scroll'} onClick={() => setTool('scroll')} tabIndex='-1'>
|
||||
<SvgIcon symbolId={IconScroll.id} className='icon icon-svg'/>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -89,7 +89,14 @@
|
||||
|
||||
#drawbar.navbar {
|
||||
--height: calc(44px + var(--f7-safe-area-bottom));
|
||||
height: var(--height);
|
||||
--f7-navbar-border-color: @draw-toolbar-border;
|
||||
--f7-navbar-bg-color: @draw-toolbar-background;
|
||||
|
||||
.device-android & {
|
||||
body.theme-type-light & {
|
||||
--f7-navbar-bg-color: #fff;
|
||||
}
|
||||
top: unset;
|
||||
bottom: env(keyboard-inset-top);
|
||||
}
|
||||
@ -99,10 +106,6 @@
|
||||
margin-top: calc(-1 * (var(--height) + env(keyboard-inset-top)));
|
||||
}
|
||||
|
||||
height: var(--height);
|
||||
--f7-toolbar-border-color: @draw-toolbar-border;
|
||||
--f7-toolbar-bg-color: @draw-toolbar-background;
|
||||
|
||||
.draw-toolbar {
|
||||
padding-inline: 10px;
|
||||
display: flex;
|
||||
|
||||
@ -18,6 +18,7 @@ import {storeToolbarSettings} from "./toolbar";
|
||||
import { storeNavigation } from './navigation';
|
||||
import { storeThemes } from '../../../../common/mobile/lib/store/themes';
|
||||
import { storeVersionHistory } from '../../../../common/mobile/lib/store/versionHistory';
|
||||
import { storePalette } from "./palette";
|
||||
|
||||
export const stores = {
|
||||
storeAppOptions: new storeAppOptions(),
|
||||
@ -33,6 +34,7 @@ export const stores = {
|
||||
storeTableSettings: new storeTableSettings(),
|
||||
storeDocumentInfo: new storeDocumentInfo(),
|
||||
storeApplicationSettings: new storeApplicationSettings(),
|
||||
storePalette: new storePalette(),
|
||||
storeReview: new storeReview(),
|
||||
storeComments: new storeComments(),
|
||||
storeToolbarSettings: new storeToolbarSettings(),
|
||||
|
||||
16
apps/documenteditor/mobile/src/store/palette.js
Normal file
16
apps/documenteditor/mobile/src/store/palette.js
Normal file
@ -0,0 +1,16 @@
|
||||
import {action, makeObservable, observable} from 'mobx';
|
||||
|
||||
export class storePalette {
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
customColors: observable,
|
||||
changeCustomColors: action
|
||||
});
|
||||
}
|
||||
|
||||
customColors = [];
|
||||
|
||||
changeCustomColors (colors) {
|
||||
this.customColors = colors;
|
||||
}
|
||||
}
|
||||
@ -200,11 +200,11 @@ const AddOther = props => {
|
||||
<Icon slot="media" icon="icon-sectionbreak"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{!isHeader &&
|
||||
{!isHeader &&
|
||||
<ListItem title={_t.textTableContents} link="/add-table-contents/">
|
||||
<Icon slot="media" icon="icon-table-contents"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
}
|
||||
{(isShape || isChart) || (isText && disabledAddFootnote) ? null :
|
||||
<ListItem key='footnote' title={_t.textFootnote} link={'/add-footnote/'} routeProps={{
|
||||
getFootnoteProps: props.getFootnoteProps,
|
||||
@ -216,12 +216,14 @@ const AddOther = props => {
|
||||
<Icon slot="media" icon="icon-footnote"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
<ListItem key='drawing' title={_t.textDrawing} onClick={() => {
|
||||
props.closeModal();
|
||||
Common.Notifications.trigger('draw:start');
|
||||
}}>
|
||||
<SvgIcon slot='media' symbolId={IconDraw.id} className='icon icon-svg'/>
|
||||
</ListItem>
|
||||
{!Device.ios && (
|
||||
<ListItem key='drawing' title={_t.textDrawing} onClick={() => {
|
||||
props.closeModal();
|
||||
Common.Notifications.trigger('draw:start');
|
||||
}}>
|
||||
<SvgIcon slot='media' symbolId={IconDraw.id} className='icon icon-svg'/>
|
||||
</ListItem>
|
||||
)}
|
||||
</List>
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user