Refactor VPN configuration handling to remove device limit management
- Updated the VPN configuration commands and handlers to eliminate the device limit parameter, simplifying the configuration process. - Adjusted related API documentation to reflect the removal of device limit management, clarifying that this setting is now handled directly in the 3x-ui by node administrators. - Enhanced the overall codebase by removing unnecessary device limit references across various components, ensuring a cleaner and more maintainable code structure.
This commit is contained in:
@@ -1849,8 +1849,6 @@ export interface components {
|
||||
/** Format: uuid */
|
||||
inboundId: string;
|
||||
label: null | string;
|
||||
/** Format: int32 */
|
||||
deviceLimit: null | number | string;
|
||||
};
|
||||
CreateRoleCommand: {
|
||||
name: string;
|
||||
@@ -1867,8 +1865,6 @@ export interface components {
|
||||
};
|
||||
EditConfigBody: {
|
||||
label: null | string;
|
||||
/** Format: int32 */
|
||||
deviceLimit: null | number | string;
|
||||
};
|
||||
GetMyConfigsResult: {
|
||||
configs: components["schemas"]["VpnConfigDto"][];
|
||||
@@ -2071,8 +2067,6 @@ export interface components {
|
||||
label: null | string;
|
||||
protocol: components["schemas"]["VpnProtocol"];
|
||||
location: string;
|
||||
/** Format: int32 */
|
||||
deviceLimit: number | string;
|
||||
/** Format: int64 */
|
||||
usedUpBytes: number | string;
|
||||
/** Format: int64 */
|
||||
|
||||
@@ -51,7 +51,6 @@ export type VpnConfigDto = {
|
||||
label: string | null
|
||||
protocol: VpnProtocol
|
||||
location: string
|
||||
deviceLimit: number
|
||||
usedUpBytes: number
|
||||
usedDownBytes: number
|
||||
expiresAt: string | null
|
||||
|
||||
@@ -11,6 +11,7 @@ const resources = {
|
||||
light: 'Светлая',
|
||||
dark: 'Тёмная',
|
||||
system: 'Системная',
|
||||
unlimited: 'Без лимита',
|
||||
|
||||
auth: {
|
||||
loginTitle: 'Вход',
|
||||
@@ -31,6 +32,8 @@ const resources = {
|
||||
passwordHint: 'Не менее 8 символов, минимум одна заглавная буква и одна цифра.',
|
||||
or: 'или',
|
||||
telegramBotNotConfigured: 'Telegram-бот не настроен администратором.',
|
||||
telegramQrHint:
|
||||
'Перейдите по ссылке или отсканируйте QR-код — откроется бот в Telegram. Если открываете его впервые, нажмите «Старт».',
|
||||
waitingForConfirmation: 'Ожидание подтверждения в Telegram…',
|
||||
telegramLoginRejected: 'Вход отклонён в Telegram.',
|
||||
telegramLoginExpired: 'Время ожидания истекло, попробуйте снова.',
|
||||
@@ -71,8 +74,6 @@ const resources = {
|
||||
selectLocation: 'Выберите локацию',
|
||||
location: 'Локация',
|
||||
label: 'Метка (необязательно)',
|
||||
deviceLimitLabel: 'Лимит устройств (необязательно)',
|
||||
deviceLimitPlaceholder: 'Без лимита',
|
||||
noInboundsNotice: 'Пока нет доступных локаций для создания конфига. Обратитесь к администратору — необходимо, чтобы он добавил сервер.',
|
||||
created: 'Конфиг создан.',
|
||||
quotaExceeded: 'Достигнут лимит конфигов для вашей роли.',
|
||||
@@ -87,10 +88,6 @@ const resources = {
|
||||
subscriptionLink: 'Ссылка-подписка (для клиента):',
|
||||
aggregatedSubscription: 'Общая подписка',
|
||||
aggregatedSubscriptionHint: 'Одна ссылка/QR со всеми активными конфигами — удобно добавить один раз в клиент.',
|
||||
deviceLimit: '{{count}} устройство',
|
||||
deviceLimit_few: '{{count}} устройства',
|
||||
deviceLimit_many: '{{count}} устройств',
|
||||
deviceLimitUnlimited: 'Без лимита устройств',
|
||||
status: {
|
||||
Active: 'Активен',
|
||||
Disabled: 'Отключён',
|
||||
@@ -283,6 +280,7 @@ const resources = {
|
||||
light: 'Light',
|
||||
dark: 'Dark',
|
||||
system: 'System',
|
||||
unlimited: 'Unlimited',
|
||||
|
||||
auth: {
|
||||
loginTitle: 'Log in',
|
||||
@@ -303,6 +301,8 @@ const resources = {
|
||||
passwordHint: 'At least 8 characters, with one uppercase letter and one digit.',
|
||||
or: 'or',
|
||||
telegramBotNotConfigured: 'The Telegram bot has not been configured by the administrator.',
|
||||
telegramQrHint:
|
||||
'Follow the link or scan the QR code — it opens the bot in Telegram. If this is your first time, tap "Start".',
|
||||
waitingForConfirmation: 'Waiting for confirmation in Telegram…',
|
||||
telegramLoginRejected: 'Login was rejected in Telegram.',
|
||||
telegramLoginExpired: 'The request expired, please try again.',
|
||||
@@ -343,8 +343,6 @@ const resources = {
|
||||
selectLocation: 'Select location',
|
||||
location: 'Location',
|
||||
label: 'Label (optional)',
|
||||
deviceLimitLabel: 'Device limit (optional)',
|
||||
deviceLimitPlaceholder: 'Unlimited',
|
||||
noInboundsNotice: 'No locations are available for creating a config yet. Please contact the administrator — a server needs to be added.',
|
||||
created: 'Config created.',
|
||||
quotaExceeded: 'Config quota reached for your role.',
|
||||
@@ -359,9 +357,6 @@ const resources = {
|
||||
subscriptionLink: 'Subscription link (for the client app):',
|
||||
aggregatedSubscription: 'Aggregated subscription',
|
||||
aggregatedSubscriptionHint: 'One link/QR with all active configs — add it once to your client.',
|
||||
deviceLimit: '{{count}} device',
|
||||
deviceLimit_other: '{{count}} devices',
|
||||
deviceLimitUnlimited: 'No device limit',
|
||||
status: {
|
||||
Active: 'Active',
|
||||
Disabled: 'Disabled',
|
||||
|
||||
@@ -5,7 +5,7 @@ import { cn } from '@/shared/lib/cn'
|
||||
export const Dialog = DialogPrimitive.Root
|
||||
export const DialogTrigger = DialogPrimitive.Trigger
|
||||
|
||||
export function DialogContent({ className, children, ...props }: DialogPrimitive.DialogContentProps) {
|
||||
export function DialogContent({ className, children, style, ...props }: DialogPrimitive.DialogContentProps) {
|
||||
return (
|
||||
<DialogPrimitive.Portal>
|
||||
<DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60" />
|
||||
@@ -14,6 +14,12 @@ export function DialogContent({ className, children, ...props }: DialogPrimitive
|
||||
'fixed left-1/2 top-1/2 z-50 w-[calc(100vw-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-6 shadow-lg',
|
||||
className,
|
||||
)}
|
||||
// Пока открыт вложенный Select/Popover, Radix ставит body { pointer-events: none },
|
||||
// из-за чего клик мимо попапа, но всё ещё в области диалога, проваливается сквозь
|
||||
// DialogContent на DialogOverlay (у него свой pointer-events: auto) — а Overlay
|
||||
// всегда закрывает диалог. Возвращаем контенту явный auto, чтобы клики по его
|
||||
// области не проваливались; попап при этом закрывается своей собственной логикой.
|
||||
style={{ pointerEvents: 'auto', ...style }}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user