fix: bound layout via 100vw/100vh root so settings form is scrollable (not clipped); robust addProvider via ref

This commit is contained in:
Hermes Agent committed 2026-09-19 16:12:51 +02:00
1 parent 0827a285e1
commit a26a1fd81e
2 files changed
+5 -4

No files matched your search

+4 -3
View File
@@ -29,7 +29,7 @@ const MIN_WINDOW_SIZE = { width: 320, height: 200 }
// very high — actual clamp is done by main via clampWindowSize (bounds*zoom).
// Full plugin version shown in the footer status bar. Keep in sync with package.json "version".
const PLUGIN_VERSION = '0.1.1'
const PLUGIN_VERSION = '0.1.2'
const fieldStyle = {
display: 'flex',
@@ -99,7 +99,8 @@ function SettingsPanel (props: { settings: Settings, setSettings: (s: Settings)
function addProvider () {
const p = createApinexProvider()
setSettings({ ...settings, providers: [...settings.providers, p], activeProviderId: p.id })
const prev = settingsRef.current
setSettings({ ...prev, providers: [...prev.providers, p], activeProviderId: p.id })
}
function deleteActive () {
@@ -518,7 +519,7 @@ function Plugin () {
const isMaximized = isMaxToggled
return (
<div className="plugin-root" style={{ position: 'relative', width: '100%', height: '100%' }}>
<div className="plugin-root" style={{ position: 'relative', width: '100vw', height: '100vh' }}>
<style>{'html,body{height:100%;overflow:hidden}'}</style>
<Container space="medium" style={{ height: '100%', display: 'flex', flexDirection: 'column', padding: 0 }}>
{/* Header — navigation bar */}