Compare commits

..

6 Commits

Author SHA1 Message Date
Eduard Gert
650496f670 Include all settings in put request to prevent overwrite (#405)
Some checks failed
build and push / build_n_push (push) Has been cancelled
2024-07-31 18:48:59 +02:00
Tom Hubrecht
121778c4a6 Fix package-lock.json (#401) 2024-07-12 10:35:31 +02:00
juliaroesschen
d4102c5d04 fix typo in route update modal (#397)
Some checks failed
build and push / build_n_push (push) Has been cancelled
2024-07-04 15:05:57 +02:00
pascal-fischer
e78c35bdbe Fix DNS modal to allow one char domains (#393)
* update regex to allow one char domains in DNS routing modal

* update regex
2024-07-04 10:50:37 +02:00
juliaroesschen
6ebee98695 Fix typo in Network Routes dialogue (#395) 2024-07-04 10:48:49 +02:00
juliaroesschen
f4b28d5f40 Fix typo in routes modal 2024-06-28 11:38:39 +02:00
7 changed files with 13 additions and 21 deletions

8
package-lock.json generated
View File

@@ -48,7 +48,7 @@
"framer-motion": "^10.16.4",
"ip-cidr": "^3.1.0",
"lodash": "^4.17.21",
"lucide-react": "^0.287.0",
"lucide-react": "^0.383.0",
"next": "13.5.5",
"next-themes": "^0.2.1",
"punycode": "^2.3.1",
@@ -5351,9 +5351,9 @@
}
},
"node_modules/lucide-react": {
"version": "0.287.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.287.0.tgz",
"integrity": "sha512-auxP2bTGiMoELzX+6ItTeNzLmhGd/O+PHBsrXV2YwPXYCxarIFJhiMOSzFT9a1GWeYPSZtnWdLr79IVXr/5JqQ==",
"version": "0.383.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.383.0.tgz",
"integrity": "sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==",
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
}

View File

@@ -488,7 +488,7 @@ export function RouteModalContent({
<div>
<HelpText>
Assign a peer group with Linux machines to be used as
{exitNode ? " exit nodes." : "routing peers."}
{exitNode ? " exit nodes." : " routing peers."}
</HelpText>
<PeerGroupSelector
max={1}
@@ -577,9 +577,9 @@ export function RouteModalContent({
<div className={cn("flex justify-between")}>
<div>
<Label>Metrics</Label>
<Label>Metric</Label>
<HelpText className={"max-w-[200px]"}>
Lower metrics indicating higher priority routes.
A lower metric indicates a higher priority route.
</HelpText>
</div>

View File

@@ -396,9 +396,9 @@ function RouteUpdateModalContent({ onSuccess, route, cell }: ModalProps) {
)}
<div className={cn("flex justify-between")}>
<div>
<Label>Metrics</Label>
<Label>Metric</Label>
<HelpText className={"max-w-[200px]"}>
Lower metrics indicating higher priority routes.
A lower metric indicates a higher priority route.
</HelpText>
</div>

View File

@@ -99,6 +99,7 @@ export default function AuthenticationTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
peer_login_expiration_enabled: loginExpiration,
peer_login_expiration: loginExpiration ? expiration : 86400,
extra: {

View File

@@ -108,10 +108,8 @@ export default function GroupsTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
groups_propagation_enabled: groupsPropagation,
peer_login_expiration_enabled:
account.settings.peer_login_expiration_enabled,
peer_login_expiration: account.settings.peer_login_expiration,
jwt_groups_enabled: jwtGroupSync,
jwt_groups_claim_name: isEmpty(jwtGroupsClaimName)
? undefined

View File

@@ -33,15 +33,8 @@ export default function PermissionsTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
regular_users_view_blocked: userViewBlocked,
groups_propagation_enabled:
account.settings?.groups_propagation_enabled,
peer_login_expiration_enabled:
account.settings?.peer_login_expiration_enabled,
peer_login_expiration: account.settings?.peer_login_expiration,
jwt_groups_enabled: account.settings?.jwt_groups_enabled,
jwt_groups_claim_name: account.settings?.jwt_groups_claim_name,
jwt_allow_groups: account.settings?.jwt_allow_groups,
},
})
.then(() => {

View File

@@ -42,7 +42,7 @@ export const sleep = (ms: number) => {
export const validator = {
isValidDomain: (domain: string) => {
const unicodeDomain =
/^(?!.*\s)(\.?[a-zA-Z0-9\u00A1-\uFFFF](?!.*\s$)(?!.*\.$)(?:(?!-)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-)\.){0,126}(?!-)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-))$/u;
/^(?!.*\.\.)(?!.*\.$)(?!.*\s)(?:(?!-)(?!.*--)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-)\.)+(?!-)(?!.*--)[a-zA-Z0-9\u00A1-\uFFFF-]{2,63}$/u;
try {
const minMaxChars = [1, 255];
const isValidDomainLength =