diff --git a/src/components/Header/LanguageMenu.tsx b/src/components/Header/LanguageMenu.tsx index 48fcd8f0ef..46b6153d76 100644 --- a/src/components/Header/LanguageMenu.tsx +++ b/src/components/Header/LanguageMenu.tsx @@ -30,7 +30,8 @@ const LangMap: Record = { }; const TranslationProgress = ({ lang }: { lang: string }) => { - const percent = i18nProgress[lang].percent; + const progressData = i18nProgress[lang as keyof typeof i18nProgress]; + const percent = progressData?.percent ?? 0; if (typeof percent === 'number' && percent < 100) { return ( { closeOnEscape={false} opened={opened} onClose={handleClose} - styles={{ body: { paddingTop: '18px' } }} + classNames={{ + body: 'plugin-editor-drawer__body', + }} {...(mode === 'add' && { title: t('form.plugins.addPlugin') })} {...(mode === 'edit' && { title: t('form.plugins.editPlugin') })} {...(mode === 'view' && { title: t('form.plugins.viewPlugin') })} > - - {name} - - -
- - +
+ {name} + +
+ + - {mode !== 'view' && ( - - { - onSave({ name, config: JSON.parse(config) }); - handleClose(); - })} - > - {mode === 'add' && t('form.btn.add')} - {mode === 'edit' && t('form.btn.save')} - - - )} -
+ {mode !== 'view' && ( + + { + onSave({ name, config: JSON.parse(config) }); + handleClose(); + })} + > + {mode === 'add' && t('form.btn.add')} + {mode === 'edit' && t('form.btn.save')} + + + )} + +
); }; diff --git a/src/styles/global.css b/src/styles/global.css index 2e63b257ef..340225ca59 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -50,3 +50,30 @@ color: var(--mantine-color-gray-5) !important; } } + +.plugin-editor-drawer__body { + padding-top: 18px; + max-height: calc(100vh - 80px); + overflow-y: auto; +} + +.plugin-editor-drawer__content { + min-height: 0; + display: flex; + flex-direction: column; + gap: var(--mantine-spacing-xs); +} + +.plugin-editor-drawer__form { + min-height: 0; +} + +.plugin-editor-drawer__actions { + position: sticky; + bottom: 0; + margin-top: var(--mantine-spacing-xs); + padding-top: var(--mantine-spacing-xs); + background: var(--mantine-color-body); + border-top: 1px solid var(--mantine-color-gray-2); + z-index: 2; +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 799fdf323d..09887546c7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -91,7 +91,7 @@ export default defineConfig({ semicolons: false, }), i18nProgress({ - langs: ['en', 'es', 'de', 'zh'], + langs: ['en', 'es', 'de', 'zh', 'tr'], baseLang: 'en', getTranslationDir: (lang) => `./src/locales/${lang}`, }),