Skip to content

Commit

Permalink
Merge branch 'x0sina-master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gozarman committed Jul 20, 2024
2 parents 2452eb9 + 8bb2510 commit 6b4425b
Show file tree
Hide file tree
Showing 23 changed files with 352 additions and 205 deletions.
1 change: 1 addition & 0 deletions app/dashboard/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_BASE_API=
6 changes: 6 additions & 0 deletions app/dashboard/build/assets/index.14386dcd.css

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions app/dashboard/build/assets/index.59de2328.css

This file was deleted.

14 changes: 0 additions & 14 deletions app/dashboard/build/assets/index.71322f3d.js

This file was deleted.

14 changes: 14 additions & 0 deletions app/dashboard/build/assets/index.d40a313c.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions app/dashboard/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@
<link
rel="apple-touch-icon"
sizes="180x180"
href="/dashboard/favicon/apple-touch-icon.png"
href="/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/dashboard/favicon/favicon-32x32.png"
href="/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/dashboard/favicon/favicon-16x16.png"
href="/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="/dashboard/favicon/site.webmanifest" />
<link rel="manifest" href="/favicon/site.webmanifest" />
<link
rel="mask-icon"
href="/dashboard/favicon/safari-pinned-tab.svg"
href="/favicon/safari-pinned-tab.svg"
color="#5bbad5"
/>
<link rel="shortcut icon" href="/dashboard/favicon/favicon.ico" />
<link rel="shortcut icon" href="/favicon/favicon.ico" />
<meta name="apple-mobile-web-app-title" content="Marzban" />
<meta name="application-name" content="Marzban" />
<meta name="msapplication-TileColor" content="#2b5797" />
<meta name="msapplication-config" content="/favicon/browserconfig.xml" />
<meta name="theme-color" content="#3B81F6" />
<script type="module" crossorigin src="/dashboard/assets/index.71322f3d.js"></script>
<link rel="modulepreload" crossorigin href="/dashboard/assets/vendor.8aa8dc93.js">
<link rel="stylesheet" href="/dashboard/assets/index.59de2328.css">
<script type="module" crossorigin src="/assets/index.d40a313c.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vendor.667f5e84.js">
<link rel="stylesheet" href="/assets/index.14386dcd.css">
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/build/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"userDialog.revokeSubscription": "Revoke Subscription",
"revoke": "Revoke",
"userDialog.total": "Total: ",
"userDialog.onHold" : "On Hold",
"userDialog.onHoldExpireDuration":"Expire Duration",
"hostsDialog.title": "Using this setting, you are able to assign specific address for each inbound.",
"hostsDialog.desc": "Use these variables to make it dynamic",
"hostsDialog.username": "The username of the user",
Expand Down Expand Up @@ -131,6 +133,7 @@
"nodes.editNode": "Update Node",
"nodes.reconnect": "Reconnect",
"nodes.reconnecting": "Reconnecting...",
"nodes.usageCoefficient": "Usage Ratio",
"deleteNode.title": "Delete Node",
"deleteNode.prompt": "Are you sure you want to delete the <b>{{name}}</b> node?",
"deleteNode.deleteSuccess": "Node {{name}} removed successfully",
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/build/locales/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
"userDialog.startDate": "تاریخ شروع",
"userDialog.endDate": "تاریخ پایان",
"userDialog.total": "مجموع: ",
"userDialog.onHold" : "در انتظار",
"userDialog.onHoldExpireDuration":"مدت انقضا",
"hostsDialog.title": "با انتخاب این تنظیمات، می‌توانید برای هر ورودی یک آدرس منحصر به فرد انتخاب کنید.",
"hostsDialog.desc": "برای ساخت نوشته پویا، از این متغیرها استفاده کنید",
"hostsDialog.username": "نام کاربری کاربر",
Expand Down Expand Up @@ -130,6 +132,7 @@
"nodes.show-certificate": "نمایش دادن گواهی",
"nodes.hide-certificate": "مخفی کردن گواهی",
"nodes.reconnecting": "درحال اتصال مجدد...",
"nodes.usageCoefficient": "ضریب گره",
"deleteNode.title": "حذف گره",
"deleteNode.prompt": "از حذف گره <b>{{name}}</b> مطمئن هستید؟",
"deleteNode.deleteSuccess": "گره {{name}} با موفقیت حذف شد",
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/build/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"userDialog.revokeSubscription": "Отозвать подписку",
"revoke": "Отозвать",
"userDialog.total": "Всего: ",
"userDialog.onHold": "В режиме ожидания",
"userDialog.onHoldExpireDuration":"Продолжительность срока действия",
"hostsDialog.title": "Используя эту настройку, Вы можете настроить свои inbound.",
"hostsDialog.desc": "Используйте эти переменные, чтобы сделать его динамическим",
"hostsDialog.username": "Имя пользователя",
Expand Down Expand Up @@ -127,6 +129,7 @@
"nodes.show-certificate": "Показать сертификат",
"nodes.hide-certificate": "Скрыть сертификат",
"nodes.reconnecting": "Переподключение...",
"nodes.usageCoefficient": "Коэффициент использования",
"deleteNode.title": "Удалить узел",
"deleteNode.prompt": "Вы уверены, что хотите удалить узел <b>{{name}}</b>?",
"deleteNode.deleteSuccess": "Узел {{name}} успешно удалён",
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/build/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
"userDialog.startDate": "开始日期",
"userDialog.endDate": "结束日期",
"userDialog.total": "总共:",
"userDialog.onHold" : "保持",
"userDialog.onHoldExpireDuration":"过期时间",
"hostsDialog.title": "使用此设置,您可以为每个入站分配特定的地址。",
"hostsDialog.desc": "使用这些变量使其可以动态替换",
"hostsDialog.username": "用户的用户名",
Expand Down Expand Up @@ -120,6 +122,7 @@
"nodes.show-certificate": "如何证书",
"nodes.hide-certificate": "隐藏证书",
"nodes.reconnecting": "重连中...",
"nodes.usageCoefficient": "使用系数",
"deleteNode.title": "删除节点",
"deleteNode.prompt": "您确实要删除 <b>{{name}}</b> 节点吗?",
"deleteNode.deleteSuccess": "节点 {{name}} 删除成功",
Expand Down
6 changes: 5 additions & 1 deletion app/dashboard/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"userDialog.revokeSubscription": "Revoke Subscription",
"revoke": "Revoke",
"userDialog.total": "Total: ",
"userDialog.onHold" : "On Hold",
"userDialog.onHoldExpireDuration":"Expire Duration",
"hostsDialog.title": "Using this setting, you are able to assign specific address for each inbound.",
"hostsDialog.desc": "Use these variables to make it dynamic",
"hostsDialog.username": "The username of the user",
Expand Down Expand Up @@ -131,6 +133,7 @@
"nodes.editNode": "Update Node",
"nodes.reconnect": "Reconnect",
"nodes.reconnecting": "Reconnecting...",
"nodes.usageCoefficient": "Usage Ratio",
"deleteNode.title": "Delete Node",
"deleteNode.prompt": "Are you sure you want to delete the <b>{{name}}</b> node?",
"deleteNode.deleteSuccess": "Node {{name}} removed successfully",
Expand Down Expand Up @@ -170,5 +173,6 @@
"core.logs": "Logs",
"core.configuration": "Configuration",
"core.generalErrorMessage": "Something went wrong, please check the configuration",
"core.successMessage": "Core settings updated successfully"
"core.successMessage": "Core settings updated successfully",
"on_hold": "On Hold"
}
8 changes: 6 additions & 2 deletions app/dashboard/public/locales/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
"userDialog.startDate": "تاریخ شروع",
"userDialog.endDate": "تاریخ پایان",
"userDialog.total": "مجموع: ",
"userDialog.onHold": "در انتظار",
"userDialog.onHoldExpireDuration": "مدت انقضا",
"hostsDialog.title": "با انتخاب این تنظیمات، می‌توانید برای هر ورودی یک آدرس منحصر به فرد انتخاب کنید.",
"hostsDialog.desc": "برای ساخت نوشته پویا، از این متغیرها استفاده کنید",
"hostsDialog.username": "نام کاربری کاربر",
Expand Down Expand Up @@ -106,7 +108,7 @@
"hostsDialog.host.wildcard": "از <badge>*</badge> برای ساخت عبارت تصادفی استفاده کنید (برای نام‌های wildcard کار می‌کند)",
"hostsDialog.sockopt": "Sockopt",
"hostsDialog.muxEnable": "فعالسازی MUX",
"hostsDialog.randomUserAgent":"استفاده از User Agent تصادفی",
"hostsDialog.randomUserAgent": "استفاده از User Agent تصادفی",
"hostsDialog.allowinsecure": "Allow Insecure",
"hostsDialog.fragment": "الگو فرگمنت",
"hostsDialog.fragment.info": "length,interval,packet (e.g. 10-100,100-200,tlshello)",
Expand All @@ -130,6 +132,7 @@
"nodes.show-certificate": "نمایش دادن گواهی",
"nodes.hide-certificate": "مخفی کردن گواهی",
"nodes.reconnecting": "درحال اتصال مجدد...",
"nodes.usageCoefficient": "ضریب گره",
"deleteNode.title": "حذف گره",
"deleteNode.prompt": "از حذف گره <b>{{name}}</b> مطمئن هستید؟",
"deleteNode.deleteSuccess": "گره {{name}} با موفقیت حذف شد",
Expand Down Expand Up @@ -165,5 +168,6 @@
"core.logs": "گزارش",
"core.configuration": "پیکربندی",
"core.generalErrorMessage": "مشکلی پیش آمده، لطفا پیکربندی را بررسی کنید",
"core.successMessage": "تنظیمات هسته با موفقیت ثبت شد"
"core.successMessage": "تنظیمات هسته با موفقیت ثبت شد",
"on_hold": "در انتظار اتصال"
}
3 changes: 3 additions & 0 deletions app/dashboard/public/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"userDialog.revokeSubscription": "Отозвать подписку",
"revoke": "Отозвать",
"userDialog.total": "Всего: ",
"userDialog.onHold": "В режиме ожидания",
"userDialog.onHoldExpireDuration":"Продолжительность срока действия",
"hostsDialog.title": "Используя эту настройку, Вы можете настроить свои inbound.",
"hostsDialog.desc": "Используйте эти переменные, чтобы сделать его динамическим",
"hostsDialog.username": "Имя пользователя",
Expand Down Expand Up @@ -127,6 +129,7 @@
"nodes.show-certificate": "Показать сертификат",
"nodes.hide-certificate": "Скрыть сертификат",
"nodes.reconnecting": "Переподключение...",
"nodes.usageCoefficient": "Коэффициент использования",
"deleteNode.title": "Удалить узел",
"deleteNode.prompt": "Вы уверены, что хотите удалить узел <b>{{name}}</b>?",
"deleteNode.deleteSuccess": "Узел {{name}} успешно удалён",
Expand Down
3 changes: 3 additions & 0 deletions app/dashboard/public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
"userDialog.startDate": "开始日期",
"userDialog.endDate": "结束日期",
"userDialog.total": "总共:",
"userDialog.onHold" : "保持",
"userDialog.onHoldExpireDuration":"过期时间",
"hostsDialog.title": "使用此设置,您可以为每个入站分配特定的地址。",
"hostsDialog.desc": "使用这些变量使其可以动态替换",
"hostsDialog.username": "用户的用户名",
Expand Down Expand Up @@ -120,6 +122,7 @@
"nodes.show-certificate": "如何证书",
"nodes.hide-certificate": "隐藏证书",
"nodes.reconnecting": "重连中...",
"nodes.usageCoefficient": "使用系数",
"deleteNode.title": "删除节点",
"deleteNode.prompt": "您确实要删除 <b>{{name}}</b> 节点吗?",
"deleteNode.deleteSuccess": "节点 {{name}} 删除成功",
Expand Down
30 changes: 15 additions & 15 deletions app/dashboard/src/components/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {
chakra,
FormControl,
FormErrorMessage,
FormLabel,
Input as ChakraInput,
InputGroup,
InputLeftAddon,
InputProps as ChakraInputProps,
InputRightAddon,
InputRightElement,
NumberDecrementStepper,
NumberIncrementStepper,
NumberInput,
NumberInputField,
NumberInputStepper
chakra,
Input as ChakraInput,
InputProps as ChakraInputProps,
FormControl,
FormErrorMessage,
FormLabel,
InputGroup,
InputLeftAddon,
InputRightAddon,
InputRightElement,
NumberDecrementStepper,
NumberIncrementStepper,
NumberInput,
NumberInputField,
NumberInputStepper,
} from "@chakra-ui/react";
import { XMarkIcon } from "@heroicons/react/24/outline";
import classNames from "classnames";
Expand Down
19 changes: 15 additions & 4 deletions app/dashboard/src/components/NodesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ const NodeForm: NodeFormType = ({
/>
</HStack>
</HStack>
<HStack alignItems="flex-start">
<Box w="50%">
<HStack alignItems="flex-start" w="100%">
<Box w="100%">
<CustomInput
label={t("nodes.nodeAddress")}
size="sm"
Expand All @@ -480,7 +480,9 @@ const NodeForm: NodeFormType = ({
error={form.formState?.errors?.address?.message}
/>
</Box>
<Box w="25%">
</HStack>
<HStack alignItems="flex-start" w="100%">
<Box>
<CustomInput
label={t("nodes.nodePort")}
size="sm"
Expand All @@ -489,7 +491,7 @@ const NodeForm: NodeFormType = ({
error={form.formState?.errors?.port?.message}
/>
</Box>
<Box w="25%">
<Box>
<CustomInput
label={t("nodes.nodeAPIPort")}
size="sm"
Expand All @@ -498,6 +500,15 @@ const NodeForm: NodeFormType = ({
error={form.formState?.errors?.api_port?.message}
/>
</Box>
<Box>
<CustomInput
label={t("nodes.usageCoefficient")}
size="sm"
placeholder="1"
{...form.register("usage_coefficient")}
error={form.formState?.errors?.usage_coefficient?.message}
/>
</Box>
</HStack>
{addAsHost && (
<FormControl py={1}>
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/src/components/StatusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const StatusBadge: FC<UserStatusProps> = ({
fontWeight="medium"
letterSpacing="tighter"
>
{userStatus}
{t(userStatus)}
{extraText && `: ${extraText}`}
</Text>
)}
Expand Down
Loading

0 comments on commit 6b4425b

Please sign in to comment.