Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix(ui): restore inner padding on form popups (#3673)

Chu Quang Vinheebc1d86436e
diff --git a/frontend/src/assets/theme/tdesign-overrides.less b/frontend/src/assets/theme/tdesign-overrides.less
index 75f635267..76cd951e6 100644
--- a/frontend/src/assets/theme/tdesign-overrides.less
+++ b/frontend/src/assets/theme/tdesign-overrides.less
@@ -31,6 +31,19 @@
overscroll-behavior: contain;
}
+// The skin's padding:0 suits menus, whose items bring their own spacing. A popup
+// that holds a form (invite, create user, change password) has no such inner
+// padding, so add `wk-popover--form` next to `wk-popover` to give it the frame
+// back, and let a tall form scroll instead of being clipped.
+.wk-popover.wk-popover--form .t-popup__content {
+ padding: 14px 16px;
+ min-width: 300px;
+ max-width: min(392px, calc(100vw - 24px));
+ max-height: min(480px, calc(100vh - 96px));
+ overflow-y: auto;
+ overscroll-behavior: contain;
+}
+
// A quiet option surface, with the brand accent reserved for the small check.
.t-select-option.t-is-selected:not(.t-is-disabled),
.t-select-option.t-is-selected:not(.t-is-disabled):hover {
diff --git a/frontend/src/views/settings/TenantMembers.vue b/frontend/src/views/settings/TenantMembers.vue
index 3ab5fb337..d2a4334de 100644
--- a/frontend/src/views/settings/TenantMembers.vue
+++ b/frontend/src/views/settings/TenantMembers.vue
@@ -198,7 +198,7 @@
</t-input>
</div>
<t-popup v-if="canManage" v-model="invitePopupVisible" trigger="click" placement="bottom-end"
- destroy-on-close overlay-class-name="wk-popover member-invite-popup-overlay">
+ destroy-on-close overlay-class-name="wk-popover wk-popover--form member-invite-popup-overlay">
<t-button theme="primary" variant="outline" shape="square" size="small" class="members-list-add-btn"
:title="$t('tenantMember.add.button')" :aria-label="$t('tenantMember.add.button')">
<template #icon><t-icon name="user-add" /></template>
@@ -247,7 +247,7 @@
popup so the two flows live side-by-side: "I know who"
(email input) vs "I don't" (one link, group chat). -->
<t-popup v-if="canManage" v-model="shareLinkPopupVisible" trigger="click" placement="bottom-end"
- destroy-on-close overlay-class-name="wk-popover member-invite-popup-overlay">
+ destroy-on-close overlay-class-name="wk-popover wk-popover--form member-invite-popup-overlay">
<t-button theme="default" variant="outline" shape="square" size="small" class="members-list-add-btn"
:title="$t('tenantInvitation.shareLink.button')"
:aria-label="$t('tenantInvitation.shareLink.button')">
diff --git a/frontend/src/views/settings/UserProfile.vue b/frontend/src/views/settings/UserProfile.vue
index 94464a8de..6f314c0ea 100644
--- a/frontend/src/views/settings/UserProfile.vue
+++ b/frontend/src/views/settings/UserProfile.vue
@@ -87,7 +87,7 @@
trigger="click"
placement="bottom-end"
destroy-on-close
- overlay-class-name="wk-popover user-profile-password-popup-overlay"
+ overlay-class-name="wk-popover wk-popover--form user-profile-password-popup-overlay"
>
<t-button
theme="default"
diff --git a/frontend/src/views/system/CreateUserDialog.vue b/frontend/src/views/system/CreateUserDialog.vue
index 24250b0f6..1b4e0f2c2 100644
--- a/frontend/src/views/system/CreateUserDialog.vue
+++ b/frontend/src/views/system/CreateUserDialog.vue
@@ -15,7 +15,7 @@
-->
<template>
<t-popup :visible="visible" trigger="click" placement="left-top" :destroy-on-close="!locked"
- overlay-class-name="wk-popover system-admin-action-popup-overlay" @visible-change="onVisibleChange">
+ overlay-class-name="wk-popover wk-popover--form system-admin-action-popup-overlay" @visible-change="onVisibleChange">
<span class="system-admin-action-popup-anchor">
<slot />
</span>
diff --git a/frontend/src/views/system/ResetPasswordDialog.vue b/frontend/src/views/system/ResetPasswordDialog.vue
index 2deae7b4a..878730c4e 100644
--- a/frontend/src/views/system/ResetPasswordDialog.vue
+++ b/frontend/src/views/system/ResetPasswordDialog.vue
@@ -8,7 +8,7 @@
-->
<template>
<t-popup :visible="visible && active" trigger="click" placement="left-top" destroy-on-close
- overlay-class-name="wk-popover system-admin-action-popup-overlay" @visible-change="onVisibleChange">
+ overlay-class-name="wk-popover wk-popover--form system-admin-action-popup-overlay" @visible-change="onVisibleChange">
<span class="system-admin-action-popup-anchor">
<slot />
</span>