feat: ui improvement

This commit is contained in:
arielherself 2023-11-27 12:56:21 +08:00
parent 0816a62333
commit 6eea996afb
3 changed files with 12 additions and 7 deletions

View File

@ -6,6 +6,7 @@
<component name="ChangeListManager">
<list default="true" id="3c7078e7-6f30-4d92-9696-11496f9e6dff" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/handshake.js" beforeDir="false" afterPath="$PROJECT_DIR$/api/handshake.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/App.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/App.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -81,7 +82,7 @@
<workItem from="1700822693197" duration="9493000" />
<workItem from="1701004587189" duration="3578000" />
<workItem from="1701042611758" duration="10222000" />
<workItem from="1701056208994" duration="4080000" />
<workItem from="1701056208994" duration="4693000" />
</task>
<servers />
</component>

View File

@ -1,6 +1,10 @@
const __DEBUG__=1,
__APP_VERSION__='v0.1.1a',
__APP_INTRO__='We can display a real-looking polyline when you select locations on the map!';
__APP_VERSION__='v0.1.2a',
__APP_INTRO__=`
<b>Relocating Support</b><br>
Can't find where you are from? We now memorize the last location you visited. Tap the "Relocate" button to find your way home.<br><br>
<i>This update also include several stability and UI improvements.</i>
`;
export default function handler(req,res){
res.status(200).json({

View File

@ -69,11 +69,11 @@ export default function App() {
}[state],
display: 'flex',
width: version !== '' ? '60%' : 'auto',
height: version !== '' ? '60%' : 'auto',
height: 'auto',
maxWidth: '50vw',
}}
>
<Sheet sx={{display: 'flex',marginTop: version!==''?'10%':0, flexDirection: 'column'}}>
<Sheet sx={{display: 'flex',marginTop: version!==''?'5%':0, flexDirection: 'column'}}>
<Alert style={{display: version !== '' ? 'none' : 'flex'}}
variant="soft"
color="warning"
@ -109,11 +109,11 @@ export default function App() {
in
nanoMap {version}</DialogTitle>
<DialogContent style={{display: version !== '' ? 'flex' : 'none'}}
sx={{margin: 'auto'}}>
sx={{margin: 'auto', maxWidth: '80%'}}>
<div dangerouslySetInnerHTML={{__html: intro}}/>
</DialogContent>
</Sheet>
<Sheet onClick={()=>setFeatureOpen(false)} sx={{display: version!==''?'flex':'none', position: 'absolute', bottom: '10%', left: '50%', transform: 'translateX(-50%)', width: '100%'}}>
<Sheet onClick={()=>setFeatureOpen(false)} sx={{display: version!==''?'flex':'none', bottom: '10%', width: '100%'}}>
<Button size="lg" sx={{width: '50%', maxWidth: '20vw', display: 'flex', margin: 'auto'}}>Done</Button>
</Sheet>
</ModalDialog>