Skip to content

Commit c834893

Browse files
committed
feat: integrate bulk inbounds actions, add multi-select to hosts
- Upgraded @remnawave/backend-contract to version 0.3.37. - Added inbounds feature to the dashboard, including new routes and UI components. - Enhanced localization for inbounds in English, Persian, and Russian. - Updated various components to utilize the new GetFullInboundsCommand for improved data handling. - Introduced multi-select functionality for hosts, allowing bulk operations on selected items.
1 parent 9a2aeec commit c834893

File tree

50 files changed

+1367
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1367
-68
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,7 @@ dist
132132
.DS_Store
133133
.vercel
134134
stats.html
135-
fsd-high-level-dependencies.html
135+
fsd-high-level-dependencies.html
136+
137+
wip/**
138+
wip/

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@mantine/nprogress": "^7.17.2",
4646
"@monaco-editor/react": "^4.7.0",
4747
"@paralleldrive/cuid2": "2.2.2",
48-
"@remnawave/backend-contract": "0.3.29",
48+
"@remnawave/backend-contract": "0.3.37",
4949
"@stablelib/base64": "^2.0.1",
5050
"@stablelib/x25519": "^2.0.1",
5151
"@tabler/icons-react": "^3.31.0",

public/locales/en/remnawave.json

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"config": "Xray Config",
66
"home": "Home",
77
"hosts": "Hosts",
8+
"inbounds": "Inbounds",
89
"nodes": "Nodes",
910
"nodes-bandwidth-table": "Nodes bandwidth table",
1011
"nodes-statistics": "Nodes statistics",
@@ -318,7 +319,7 @@
318319
"limit": "Limit",
319320
"reset-day": "Reset day",
320321
"e-g-1-31": "e.g. 1-31",
321-
"notify-percent": "Notify at usage percentage",
322+
"notify-percent": "Notify percentage",
322323
"e-g-50": "e.g. 50",
323324
"select-active-inbounds-for-this-node": "Select active inbounds for this node",
324325
"inbounds": "Inbounds",
@@ -539,5 +540,56 @@
539540
"subscription-settings-description-line-2": "It is recommended to change the values to match your specific needs and circumstances."
540541
}
541542
}
543+
},
544+
"inbounds-page-header": {
545+
"widget": {
546+
"list-of-all-inbounds": "List of all inbounds",
547+
"inbounds": "Inbounds",
548+
"impotant-note": "Impotant note",
549+
"important-note-description-line-1": "All bulk operations require a complete restart of all nodes.",
550+
"important-note-description-line-2": "Please avoid making too many requests in a short period of time.",
551+
"important-note-description-line-3": "After saving changes, it may take up to 30 seconds for them to be applied across all nodes."
552+
}
553+
},
554+
"inbounds-card": {
555+
"widget": {
556+
"nodes": "Nodes",
557+
"enabled-nodes": "Nodes with this inbound enabled",
558+
"disabled-nodes": "Nodes with this inbound disabled",
559+
"remove": "Remove",
560+
"add": "Add",
561+
"cancel": "Cancel",
562+
"users": "Users",
563+
"enabled-users": "Users with this inbound enabled",
564+
"disabled-users": "Users with this inbound disabled",
565+
"show-raw-inbound": "Show raw inbound",
566+
"raw-inbound": "Raw inbound",
567+
"are-you-sure": "Are you sure?",
568+
"add-users-to-inbound-line-1": "Are you sure you want to add this inbound to users?",
569+
"add-users-to-inbound-line-2": "This action will add the inbound to all users.",
570+
"remove-users-from-inbound-line-1": "Are you sure you want to remove this inbound from users?",
571+
"remove-users-from-inbound-line-2": "This action will remove the inbound from all users.",
572+
"add-nodes-to-inbound-line-1": "Are you sure you want to add this inbound to nodes?",
573+
"add-nodes-to-inbound-line-2": "This action will add the inbound to all nodes.",
574+
"remove-nodes-from-inbound-line-1": "Are you sure you want to remove this inbound from nodes?",
575+
"remove-nodes-from-inbound-line-2": "This action will remove the inbound from all nodes."
576+
}
577+
},
578+
"multi-select-hosts": {
579+
"feature": {
580+
"delete-hosts": "Delete hosts",
581+
"are-you-sure-you-want-to-delete-these-hosts": "Are you sure you want to delete these hosts?",
582+
"delete": "Delete",
583+
"cancel": "Cancel",
584+
"set-inbound": "Set inbound",
585+
"inbound": "Inbound",
586+
"set-port": "Set Port",
587+
"port": "Port",
588+
"clear-selection": "Clear selection",
589+
"select-all": "Select all",
590+
"enable": "Enable",
591+
"disable": "Disable",
592+
"set-port-0": "Set port"
593+
}
542594
}
543595
}

public/locales/fa/remnawave.json

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"config": "کانفیگ",
66
"home": "خانه",
77
"hosts": "هاست‌ها",
8+
"inbounds": "Inbounds",
89
"nodes": "نودها",
910
"nodes-bandwidth-table": "جدول مصرف نودها",
1011
"nodes-statistics": "آمار نودها",
@@ -539,5 +540,56 @@
539540
"what-is-subscription-settings": "تنظیمات اشتراک چیست؟"
540541
}
541542
}
543+
},
544+
"inbounds-page-header": {
545+
"widget": {
546+
"list-of-all-inbounds": "List of all inbounds",
547+
"inbounds": "Inbounds",
548+
"impotant-note": "Impotant note",
549+
"important-note-description-line-1": "All bulk operations require a complete restart of all nodes.",
550+
"important-note-description-line-2": "Please avoid making too many requests in a short period of time.",
551+
"important-note-description-line-3": "After saving changes, it may take up to 30 seconds for them to be applied across all nodes."
552+
}
553+
},
554+
"inbounds-card": {
555+
"widget": {
556+
"nodes": "Nodes",
557+
"enabled-nodes": "Nodes with this inbound enabled",
558+
"disabled-nodes": "Nodes with this inbound disabled",
559+
"remove": "Remove",
560+
"add": "Add",
561+
"cancel": "Cancel",
562+
"users": "Users",
563+
"enabled-users": "Users with this inbound enabled",
564+
"disabled-users": "Users with this inbound disabled",
565+
"show-raw-inbound": "Show raw inbound",
566+
"raw-inbound": "Raw inbound",
567+
"are-you-sure": "Are you sure?",
568+
"add-users-to-inbound-line-1": "Are you sure you want to add this inbound to users?",
569+
"add-users-to-inbound-line-2": "This action will add the inbound to all users.",
570+
"remove-users-from-inbound-line-1": "Are you sure you want to remove this inbound from users?",
571+
"remove-users-from-inbound-line-2": "This action will remove the inbound from all users.",
572+
"add-nodes-to-inbound-line-1": "Are you sure you want to add this inbound to nodes?",
573+
"add-nodes-to-inbound-line-2": "This action will add the inbound to all nodes.",
574+
"remove-nodes-from-inbound-line-1": "Are you sure you want to remove this inbound from nodes?",
575+
"remove-nodes-from-inbound-line-2": "This action will remove the inbound from all nodes."
576+
}
577+
},
578+
"multi-select-hosts": {
579+
"feature": {
580+
"delete-hosts": "Delete hosts",
581+
"are-you-sure-you-want-to-delete-these-hosts": "Are you sure you want to delete these hosts?",
582+
"delete": "Delete",
583+
"cancel": "Cancel",
584+
"set-inbound": "Set inbound",
585+
"inbound": "Inbound",
586+
"set-port": "Set Port",
587+
"port": "Port",
588+
"clear-selection": "Clear selection",
589+
"select-all": "Select all",
590+
"enable": "Enable",
591+
"disable": "Disable",
592+
"set-port-0": "Set port"
593+
}
542594
}
543-
}
595+
}

public/locales/ru/remnawave.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"config": "Конфиг",
66
"home": "Главная",
77
"hosts": "Хосты",
8+
"inbounds": "Inbounds",
89
"nodes": "Ноды",
910
"nodes-bandwidth-table": "Использование трафика",
1011
"nodes-statistics": "Статистика нод",
@@ -539,5 +540,56 @@
539540
"what-is-subscription-settings": "Что такое настройки подписки?"
540541
}
541542
}
543+
},
544+
"inbounds-page-header": {
545+
"widget": {
546+
"list-of-all-inbounds": "List of all inbounds",
547+
"inbounds": "Inbounds",
548+
"impotant-note": "Impotant note",
549+
"important-note-description-line-1": "All bulk operations require a complete restart of all nodes.",
550+
"important-note-description-line-2": "Please avoid making too many requests in a short period of time.",
551+
"important-note-description-line-3": "After saving changes, it may take up to 30 seconds for them to be applied across all nodes."
552+
}
553+
},
554+
"inbounds-card": {
555+
"widget": {
556+
"nodes": "Nodes",
557+
"enabled-nodes": "Nodes with this inbound enabled",
558+
"disabled-nodes": "Nodes with this inbound disabled",
559+
"remove": "Remove",
560+
"add": "Add",
561+
"cancel": "Cancel",
562+
"users": "Users",
563+
"enabled-users": "Users with this inbound enabled",
564+
"disabled-users": "Users with this inbound disabled",
565+
"show-raw-inbound": "Show raw inbound",
566+
"raw-inbound": "Raw inbound",
567+
"are-you-sure": "Are you sure?",
568+
"add-users-to-inbound-line-1": "Are you sure you want to add this inbound to users?",
569+
"add-users-to-inbound-line-2": "This action will add the inbound to all users.",
570+
"remove-users-from-inbound-line-1": "Are you sure you want to remove this inbound from users?",
571+
"remove-users-from-inbound-line-2": "This action will remove the inbound from all users.",
572+
"add-nodes-to-inbound-line-1": "Are you sure you want to add this inbound to nodes?",
573+
"add-nodes-to-inbound-line-2": "This action will add the inbound to all nodes.",
574+
"remove-nodes-from-inbound-line-1": "Are you sure you want to remove this inbound from nodes?",
575+
"remove-nodes-from-inbound-line-2": "This action will remove the inbound from all nodes."
576+
}
577+
},
578+
"multi-select-hosts": {
579+
"feature": {
580+
"delete-hosts": "Delete hosts",
581+
"are-you-sure-you-want-to-delete-these-hosts": "Are you sure you want to delete these hosts?",
582+
"delete": "Delete",
583+
"cancel": "Cancel",
584+
"set-inbound": "Set inbound",
585+
"inbound": "Inbound",
586+
"set-port": "Set Port",
587+
"port": "Port",
588+
"clear-selection": "Clear selection",
589+
"select-all": "Select all",
590+
"enable": "Enable",
591+
"disable": "Disable",
592+
"set-port-0": "Set port"
593+
}
542594
}
543595
}

src/app/layouts/dashboard/sidebar/menu-sections.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
PiAirTrafficControlDuotone,
33
PiBarcodeDuotone,
44
PiBookmarksDuotone,
5+
PiBoundingBoxDuotone,
56
PiBracketsCurly,
67
PiComputerTowerDuotone,
78
PiCookie,
@@ -39,6 +40,11 @@ export const useMenuSections = (): MenuItem[] => {
3940
href: ROUTES.DASHBOARD.HOSTS,
4041
icon: PiBookmarksDuotone
4142
},
43+
{
44+
name: t('constants.inbounds'),
45+
href: ROUTES.DASHBOARD.INBOUNDS,
46+
icon: PiBoundingBoxDuotone
47+
},
4248
{
4349
name: t('constants.nodes'),
4450
href: ROUTES.DASHBOARD.NODES,

src/app/router/router.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { NodesBandwidthTablePageConnector } from '@pages/dashboard/nodes-bandwid
1313
import { SubscriptionSettingsConnector } from '@pages/dashboard/subscription-settings/connectors'
1414
import { StatisticNodesConnector } from '@pages/dashboard/statistic-nodes/connectors'
1515
import { ApiTokensPageConnector } from '@pages/dashboard/api-tokens/ui/connectors'
16+
import { InboundsPageConnector } from '@pages/dashboard/inbounds/ui/connectors'
1617
import { ConfigPageConnector } from '@pages/dashboard/config/ui/connectors'
1718
import { HostsPageConnector } from '@pages/dashboard/hosts/ui/connectors'
1819
import { UsersPageConnector } from '@pages/dashboard/users/ui/connectors'
@@ -42,6 +43,7 @@ const router = createBrowserRouter(
4243
<Route element={<Navigate replace to={ROUTES.DASHBOARD.HOME} />} index />
4344
<Route element={<HomePageConnector />} path={ROUTES.DASHBOARD.HOME} />
4445
<Route element={<UsersPageConnector />} path={ROUTES.DASHBOARD.USERS} />
46+
<Route element={<InboundsPageConnector />} path={ROUTES.DASHBOARD.INBOUNDS} />
4547
<Route element={<HostsPageConnector />} path={ROUTES.DASHBOARD.HOSTS} />
4648
<Route element={<NodesPageConnector />} path={ROUTES.DASHBOARD.NODES} />
4749
<Route
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './props.interface'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { GetAllHostsCommand, GetInboundsCommand } from '@remnawave/backend-contract'
2+
3+
export interface IProps {
4+
hosts: GetAllHostsCommand.Response['response'] | undefined
5+
inbounds: GetInboundsCommand.Response['response'] | undefined
6+
selectedHosts: string[]
7+
setSelectedHosts: (hosts: string[]) => void
8+
}

0 commit comments

Comments
 (0)