style(mobile): fix top-right corner style

This commit is contained in:
Zeke Zhang 2025-04-10 22:45:17 +08:00
parent 5852901b19
commit 9ab6f7a956
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@
import { HighlightOutlined } from '@ant-design/icons'; import { HighlightOutlined } from '@ant-design/icons';
import { Button, Tooltip } from 'antd'; import { Button, Tooltip } from 'antd';
import React from 'react'; import React, { FC } from 'react';
import { useHotkeys } from 'react-hotkeys-hook'; import { useHotkeys } from 'react-hotkeys-hook';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDesignable } from '..'; import { useDesignable } from '..';
@ -24,7 +24,7 @@ const unDesignableStyle = {
backgroundColor: 'transparent', backgroundColor: 'transparent',
}; };
export const DesignableSwitch = () => { export const DesignableSwitch: FC<{ style?: React.CSSProperties }> = (props) => {
const { designable, setDesignable } = useDesignable(); const { designable, setDesignable } = useDesignable();
const { t } = useTranslation(); const { t } = useTranslation();
const { token } = useToken(); const { token } = useToken();
@ -46,7 +46,7 @@ export const DesignableSwitch = () => {
icon={<HighlightOutlined style={{ color: token.colorTextHeaderMenu }} />} icon={<HighlightOutlined style={{ color: token.colorTextHeaderMenu }} />}
title={t('UI Editor')} title={t('UI Editor')}
// subtitle={'Ctrl+Shift+U'} // subtitle={'Ctrl+Shift+U'}
style={style} style={{ ...style, ...props.style }}
onClick={() => { onClick={() => {
setDesignable(!designable); setDesignable(!designable);
}} }}

View File

@ -98,8 +98,8 @@ export const DesktopModeHeader: FC = () => {
<Button style={{ color: 'white' }} href={app.getHref('/admin')}> <Button style={{ color: 'white' }} href={app.getHref('/admin')}>
{t('Back')} {t('Back')}
</Button> </Button>
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center', lineHeight: 1 }}>
{allowConfigUI ? <DesignableSwitch /> : null} {allowConfigUI ? <DesignableSwitch style={{ fontSize: 16 }} /> : null}
<Button <Button
onClick={() => { onClick={() => {
setSize({ width: 768, height: 667 }); setSize({ width: 768, height: 667 });