fix(gui): color and layout, disable file export

main
spacemeowx2 2023-03-09 19:33:32 +08:00
parent 85a3241b66
commit fb14cf5d71
4 changed files with 15 additions and 13 deletions

View File

@ -44,7 +44,7 @@ async fn open_splatnet(app: tauri::AppHandle, gtoken: String) -> Option<()> {
) )
.title("Splatnet3") .title("Splatnet3")
.center() .center()
.inner_size(1040.0, 960.0) .inner_size(400.0, 700.0)
.initialization_script(&format!( .initialization_script(&format!(
r##" r##"
const gtoken = "_gtoken={gtoken}"; const gtoken = "_gtoken={gtoken}";

View File

@ -84,12 +84,12 @@
"fullscreen": false, "fullscreen": false,
"resizable": true, "resizable": true,
"title": "s3si.ts", "title": "s3si.ts",
"width": 400, "width": 500,
"height": 400, "height": 600,
"minWidth": 320, "minWidth": 400,
"minHeight": 400, "minHeight": 500,
"visible": false "visible": false
} }
] ]
} }
} }

View File

@ -30,7 +30,7 @@ export const RunPanel: React.FC<RunPanelProps> = () => {
}) })
const { state } = result; const { state } = result;
const newState = await run(state, { const newState = await run(state, {
exporter: "stat.ink,file", exporter: "stat.ink",
monitor: false, monitor: false,
withSummary: false, withSummary: false,
skipMode: exportBattle === false ? 'vs' : exportCoop === false ? 'coop' : undefined, skipMode: exportBattle === false ? 'vs' : exportCoop === false ? 'coop' : undefined,
@ -85,7 +85,7 @@ export const LogPanel: React.FC<LogPanelProps> = ({ className }) => {
} }
}, [renderedLogs]) }, [renderedLogs])
return <div ref={div} className={`bg-neutral overflow-auto rounded p-4 ${className}`}> return <div ref={div} className={`bg-neutral text-neutral-content overflow-auto rounded p-4 ${className}`}>
{renderedLogs.length === 0 && <pre><code>{t('欢迎! 请点击"导出"按钮开始使用.')}</code></pre>} {renderedLogs.length === 0 && <pre><code>{t('欢迎! 请点击"导出"按钮开始使用.')}</code></pre>}
{renderedLogs.map((line, i) => <pre key={i}><code>{line}</code></pre>)} {renderedLogs.map((line, i) => <pre key={i}><code>{line}</code></pre>)}
</div> </div>

View File

@ -37,13 +37,15 @@ export const Home: React.FC = () => {
return <div className='flex p-2 w-full h-full gap-2'> return <div className='flex p-2 w-full h-full gap-2'>
<div className='max-w-full md:max-w-sm flex-auto'> <div className='max-w-full h-full md:max-w-sm flex-auto'>
<div className='flex flex-col gap-2'> <div className='flex flex-col gap-2 h-full'>
<LogPanel className='sm:hidden max-h-[10rem]' /> <LogPanel className='sm:hidden flex-auto' />
<RunPanel /> <RunPanel />
<Link to='/settings' className='btn'>{t('设置')}</Link> <Link to='/settings' className='btn'>{t('设置')}</Link>
<a className='btn' href={STAT_INK} target='_blank' rel='noreferrer'>{t('前往 stat.ink')}</a> <div className='flex gap-2 flex-auto-all'>
<button className='btn' onClick={onOpenSplatnet3}>{t('打开鱿鱼圈3')}</button> <button className='btn' onClick={onOpenSplatnet3}>{t('打开鱿鱼圈3')}</button>
<a className='btn' href={STAT_INK} target='_blank' rel='noreferrer'>{t('前往 stat.ink')}</a>
</div>
</div> </div>
</div> </div>
<LogPanel className='hidden sm:block flex-1' /> <LogPanel className='hidden sm:block flex-1' />