Skip to content

Commit

Permalink
chore: enable iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sekiju committed Jan 15, 2025
1 parent a46fd85 commit 0679b7f
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 27 deletions.
12 changes: 6 additions & 6 deletions apps/common/mobile/lib/view/Draw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,

return (
<React.Fragment>
<Sheet className='draw-sheet draw-sheet--color-picker' swipeToClose onSheetClosed={() => f7.sheet.open('.draw-sheet--settings')}>
<Sheet className='draw-sheet draw-sheet--color-picker' backdrop swipeToClose onSheetClosed={() => f7.sheet.open('.draw-sheet--settings')}>
<div className='draw-sheet-label'><span>{_t.textCustomColor}</span></div>
<WheelColorPicker
initialColor={settings.color}
Expand All @@ -26,7 +26,7 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,
}}
/>
</Sheet>
<Sheet className="draw-sheet draw-sheet--settings" swipeToClose style={{ height: 'auto' }}>
<Sheet className="draw-sheet draw-sheet--settings" backdrop swipeToClose style={{ height: 'auto' }}>
<div id='swipe-handler' className='swipe-container'>
<Icon icon='icon icon-swipe'/>
</div>
Expand All @@ -52,14 +52,14 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,
</div>
<div className='draw-sheet-label'><span>{_t.textLineSize}</span></div>
<div className='draw-sheet-item'>
{Device.android ? (
{/*{Device.android ? (*/}
<Range
min={0.5} max={10} step={0.5} value={settings.lineSize}
onRangeChange={(value) => setSettings({ lineSize: value })}
/>
) : (
<input className='line-size-range--ios' type='range' min={0.5} max={10} step={0.5} value={settings.lineSize} onChange={(e) => setSettings({ lineSize: parseInt(e.target.value) })} />
)}
{/*) : (*/}
{/* <input className='line-size-range--ios' type='range' min={0.5} max={10} step={0.5} value={settings.lineSize} onChange={(e) => setSettings({ lineSize: parseInt(e.target.value) })} />*/}
{/* )}*/}
</div>
<div className='draw-sheet-label'><span>{_t.textOpacity}</span></div>
<div className='draw-sheet-item'>
Expand Down
4 changes: 2 additions & 2 deletions apps/common/mobile/resources/less/draw.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

.device-ios & {
top: 100vh;
margin-top: calc(-1 * (var(--height) + env(keyboard-inset-top)));
margin-top: calc(-1 * (var(--height) + env(keyboard-inset-top, 0px)));
}

.draw-toolbar {
Expand Down Expand Up @@ -153,7 +153,7 @@
appearance: none;
width: 100%;
height: 24px;
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQzIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMzQzIDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMCAxMkMwIDEwLjg4NjEgMC44ODU3NSA5Ljk3NDE4IDEuOTk5MTUgOS45NDE3MkwzMzEuMDA1IDAuMzQ5NzA2QzMzNy41NzIgMC4xNTgyNCAzNDMgNS40Mjk5MiAzNDMgMTJDMzQzIDE4LjU3MDEgMzM3LjU3MiAyMy44NDE4IDMzMS4wMDUgMjMuNjUwM0wxLjk5OTE1IDE0LjA1ODNDMC44ODU3NTQgMTQuMDI1OCAwIDEzLjExMzkgMCAxMloiIGZpbGw9IiNBRUFFQjIiLz4KPC9zdmc+Cg==);
background: url(data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDM0MyAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAgMTJDMCAxMC44ODYxIDAuODg1NzUgOS45NzQxOCAxLjk5OTE1IDkuOTQxNzJMMzMxLjAwNSAwLjM0OTcwNkMzMzcuNTcyIDAuMTU4MjQgMzQzIDUuNDI5OTIgMzQzIDEyQzM0MyAxOC41NzAxIDMzNy41NzIgMjMuODQxOCAzMzEuMDA1IDIzLjY1MDNMMS45OTkxNSAxNC4wNTgzQzAuODg1NzU0IDE0LjAyNTggMCAxMy4xMTM5IDAgMTJaIiBmaWxsPSIjQUVBRUIyIi8+Cjwvc3ZnPgo=);
background-size: 100% 24px;
background-repeat: no-repeat;
}
Expand Down
14 changes: 6 additions & 8 deletions apps/documenteditor/mobile/src/view/add/AddOther.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,12 @@ const AddOther = props => {
<Icon slot="media" icon="icon-footnote"></Icon>
</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>
)}
<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>
)
};
Expand Down
4 changes: 4 additions & 0 deletions apps/presentationeditor/mobile/src/less/app-ios.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
background: @background-tertiary;
}
}

.back-reader-mode {
margin-left: 10px;
}
}

14 changes: 6 additions & 8 deletions apps/presentationeditor/mobile/src/view/add/AddOther.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@ const AddOther = props => {
<Icon slot="media" icon="icon-link"></Icon>
</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>
)}
<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>
)
};
Expand Down
4 changes: 4 additions & 0 deletions apps/spreadsheeteditor/mobile/src/less/app-ios.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@
overflow: hidden;
}
}

.back-reader-mode {
margin-left: 10px;
}
}
2 changes: 1 addition & 1 deletion apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ToolbarView = props => {
return (
<Fragment>
<NavLeft>
{props.isDrawMode && <Link icon='icon-close' onClick={() => Common.Notifications.trigger('draw:stop')}/>}
{props.isDrawMode && <Link text={Device.ios ? t("Toolbar.textOk") : ''} icon={Device.android ? 'icon-close' : null} className='back-reader-mode' onClick={() => Common.Notifications.trigger('draw:stop')}/>}
{(!props.isDrawMode && props.isShowBack && !isVersionHistoryMode) && <Link className={`btn-doc-back${(props.disabledControls || isOpenModal) && ' disabled'}`} icon='icon-return' onClick={() => Common.Notifications.trigger('goback')}></Link>}
{isVersionHistoryMode ? <a href="#" className='btn-close-history' onClick={(e) => {
e.preventDefault();
Expand Down
2 changes: 0 additions & 2 deletions apps/spreadsheeteditor/mobile/src/view/add/AddOther.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ const AddOther = inject("storeFocusObjects", "storeAppOptions")(observer(props =
}}>
<Icon slot="media" icon="icon-link"></Icon>
</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>
)
}));
Expand Down

0 comments on commit 0679b7f

Please sign in to comment.