Skip to content

Commit a0786c7

Browse files
committed
chore: update version to 2.3.0 and add HWID settings to subscription and external squads tabs
1 parent 2c33b94 commit a0786c7

File tree

12 files changed

+469
-19
lines changed

12 files changed

+469
-19
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@remnawave/frontend",
33
"private": false,
44
"type": "module",
5-
"version": "2.2.6",
5+
"version": "2.3.0",
66
"license": "AGPL-3.0-only",
77
"author": "REMNAWAVE <github.com/remnawave>",
88
"homepage": "https://github.com/remnawave",
@@ -59,7 +59,7 @@
5959
"@monaco-editor/react": "^4.7.0",
6060
"@noble/post-quantum": "^0.5.2",
6161
"@paralleldrive/cuid2": "2.2.2",
62-
"@remnawave/backend-contract": "2.2.37",
62+
"@remnawave/backend-contract": "2.3.0",
6363
"@simplewebauthn/browser": "^13.2.2",
6464
"@stablelib/base64": "^2.0.1",
6565
"@stablelib/x25519": "^2.0.1",

public/locales/en/remnawave.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,5 +1796,27 @@
17961796
"widget": {
17971797
"response-headers": "Headers"
17981798
}
1799+
},
1800+
"subscription-hwid-settings": {
1801+
"widget": {
1802+
"hwid-card-description": "Carefully review documentation before enabling HWID feature. Not all client applications support this feature.",
1803+
"hwid-settings": "HWID Settings",
1804+
"hwid-limit": "HWID Limit",
1805+
"fallback-device-limit-description": "Enter the maximum number of devices that can be used with a subscription",
1806+
"fallback-device-limit": "Fallback Device Limit",
1807+
"max-devices-announce-description": "Enter message that will be displayed when the user has reached the maximum number of devices",
1808+
"max-devices-announce": "Max Devices Announce",
1809+
"max-200-characters": "Max. 200 characters",
1810+
"documentation": "Documentation"
1811+
}
1812+
},
1813+
"external-squads-hwid-settings": {
1814+
"tab": {
1815+
"widget": {
1816+
"hwid-settings-override": "HWID Settings Override",
1817+
"override-hwid-description": "Override HWID device limit settings for this external squad. When disabled, global subscription settings will be used.",
1818+
"enable-hwid-override": "Enable HWID Override"
1819+
}
1820+
}
17991821
}
1800-
}
1822+
}

src/features/ui/dashboard/users/bulk-all-user-actions-tabs/bulk-all-user-actions-tabs.update.tab.feature.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export const BulkAllUserActionsUpdateTabFeature = (props: IProps) => {
287287
<Checkbox
288288
checked={form.getValues().hwidDeviceLimit === null}
289289
disabled={form.getValues().hwidDeviceLimit === 0}
290-
label="Use HWID_FALLBACK_DEVICE_LIMIT"
290+
label="Use Fallback Device Limit"
291291
mb="xs"
292292
mt="xs"
293293
onChange={(event) => {

src/features/ui/dashboard/users/bulk-user-actions-tabs/bulk-user-actions.update.tab.feature.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export const BulkUserActionsUpdateTabFeature = (props: IProps) => {
331331
<Checkbox
332332
checked={form.getValues().fields.hwidDeviceLimit === null}
333333
disabled={form.getValues().fields.hwidDeviceLimit === 0}
334-
label="Use HWID_FALLBACK_DEVICE_LIMIT"
334+
label="Use Fallback Device Limit"
335335
mb="xs"
336336
mt="xs"
337337
onChange={(event) => {

src/features/ui/dashboard/users/get-hwid-user-devices/get-hwid-user-devices.feature.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,14 @@ export function GetHwidUserDevicesFeature(props: IProps) {
338338
<Accordion.Panel>
339339
<Text c="dimmed" size="sm">
340340
{t('get-hwid-user-devices.feature.important-note-line-1')}{' '}
341-
<Code fw={500}>HWID_DEVICE_LIMIT_ENABLED=true</Code>{' '}
341+
<Code fw={500}>Enabled HWID Device Limit</Code>{' '}
342342
{t('get-hwid-user-devices.feature.important-note-line-2')}
343343
<br />
344344
{t('get-hwid-user-devices.feature.important-note-line-3')}
345345
<br />
346346
<br />
347347
{t('get-hwid-user-devices.feature.important-note-line-4')}{' '}
348-
<Code>HWID_FALLBACK_DEVICE_LIMIT</Code>{' '}
348+
<Code>Fallback Device Limit</Code>{' '}
349349
{t('get-hwid-user-devices.feature.important-note-line-5')}
350350
<br />
351351
<br />

src/shared/ui/forms/users/forms-components/device-tag-settings-card.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ export function DeviceTagSettingsCard<
6363
<>
6464
<Text c="dimmed" size="0.75rem">
6565
{t('create-user-modal.widget.hwid-user-limit-line-1')}{' '}
66-
<Code>HWID_DEVICE_LIMIT_ENABLED</Code>{' '}
67-
{t('create-user-modal.widget.hwid-user-limit-line-2')}{' '}
68-
<Code>true</Code>.{' '}
66+
<Code>HWID Device Limit Enabled</Code>{' '}
6967
<Anchor
7068
href="https://docs.rw/docs/features/hwid-device-limit"
7169
target="_blank"
@@ -97,7 +95,7 @@ export function DeviceTagSettingsCard<
9795
hideControls
9896
key={form.key('hwidDeviceLimit')}
9997
leftSection={<TbDevices2 size="16px" />}
100-
placeholder="HWID_FALLBACK_DEVICE_LIMIT in use"
98+
placeholder="Fallback Device Limit in use"
10199
{...form.getInputProps('hwidDeviceLimit')}
102100
/>
103101
</Stack>

src/widgets/dashboard/external-squads/external-squads-drawer/external-squads.drawer.widget.tsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313
Tooltip,
1414
Transition
1515
} from '@mantine/core'
16+
import { PiCheck, PiCopy, PiIdentificationBadge, PiListChecks, PiUsers } from 'react-icons/pi'
1617
import { TbFolder, TbPrescription, TbSettings, TbWebhook } from 'react-icons/tb'
17-
import { PiCheck, PiCopy, PiListChecks, PiUsers } from 'react-icons/pi'
1818
import { useTranslation } from 'react-i18next'
1919
import { memo, useState } from 'react'
2020

@@ -25,6 +25,7 @@ import { formatInt } from '@shared/utils/misc'
2525

2626
import {
2727
ExternalSquadsHostOverridesTabWidget,
28+
ExternalSquadsHwidSettingsTabWidget,
2829
ExternalSquadsSettingsTabWidget,
2930
ExternalSquadsTemplatesTabWidget
3031
} from './tabs'
@@ -35,7 +36,8 @@ const TAB_TYPE = {
3536
settings: 'settings',
3637
templates: 'templates',
3738
hosts: 'hosts',
38-
responseHeaders: 'responseHeaders'
39+
responseHeaders: 'responseHeaders',
40+
hwidSettings: 'hwidSettings'
3941
} as const
4042

4143
type TabType = (typeof TAB_TYPE)[keyof typeof TAB_TYPE]
@@ -184,6 +186,12 @@ export const ExternalSquadsDrawer = memo(() => {
184186
>
185187
{t('external-squads-response-headers.widget.response-headers')}
186188
</Tabs.Tab>
189+
<Tabs.Tab
190+
leftSection={<PiIdentificationBadge size={px('1.2rem')} />}
191+
value={TAB_TYPE.hwidSettings}
192+
>
193+
HWID
194+
</Tabs.Tab>
187195
</Tabs.List>
188196

189197
<Tabs.Panel pt="xl" value={TAB_TYPE.templates}>
@@ -257,6 +265,24 @@ export const ExternalSquadsDrawer = memo(() => {
257265
)}
258266
</Transition>
259267
</Tabs.Panel>
268+
269+
<Tabs.Panel pt="xl" value={TAB_TYPE.hwidSettings}>
270+
<Transition
271+
duration={200}
272+
mounted={activeTab === TAB_TYPE.hwidSettings}
273+
timingFunction="linear"
274+
transition="fade"
275+
>
276+
{(styles) => (
277+
<Stack gap="lg" style={styles}>
278+
<ExternalSquadsHwidSettingsTabWidget
279+
externalSquad={externalSquad}
280+
isOpen={isOpen}
281+
/>
282+
</Stack>
283+
)}
284+
</Transition>
285+
</Tabs.Panel>
260286
</Tabs>
261287
</Stack>
262288
)

0 commit comments

Comments
 (0)