Skip to content

Commit 189f84b

Browse files
committed
feat: integrate ML-DSA65 key generation and update dependencies in KeypairGeneratorWidget
1 parent 01235a7 commit 189f84b

File tree

5 files changed

+311
-124
lines changed

5 files changed

+311
-124
lines changed

package-lock.json

Lines changed: 60 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
"@mantine/nprogress": "^8.3.3",
5858
"@mantine/spotlight": "^8.3.3",
5959
"@monaco-editor/react": "^4.7.0",
60+
"@noble/post-quantum": "^0.5.2",
6061
"@paralleldrive/cuid2": "2.2.2",
61-
"@remnawave/backend-contract": "2.1.64",
62+
"@remnawave/backend-contract": "2.1.65",
6263
"@stablelib/base64": "^2.0.1",
6364
"@stablelib/x25519": "^2.0.1",
6465
"@tabler/icons-react": "^3.35.0",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { ActionIcon, CopyButton, Textarea } from '@mantine/core'
2+
import { PiCheck, PiCopy } from 'react-icons/pi'
3+
4+
export const CopyableAreaShared = ({
5+
label,
6+
value
7+
}: {
8+
label?: string
9+
value: number | string
10+
}) => {
11+
return (
12+
<CopyButton timeout={2000} value={value.toString()}>
13+
{({ copied, copy }) => (
14+
<Textarea
15+
label={label}
16+
onClick={copy}
17+
readOnly
18+
rightSection={
19+
<ActionIcon
20+
color={copied ? 'teal' : 'gray'}
21+
onClick={copy}
22+
variant="subtle"
23+
>
24+
{copied ? <PiCheck size="16px" /> : <PiCopy size="16px" />}
25+
</ActionIcon>
26+
}
27+
styles={{
28+
input: {
29+
cursor: 'copy',
30+
fontFamily: 'monospace'
31+
}
32+
}}
33+
value={value.toString()}
34+
/>
35+
)}
36+
</CopyButton>
37+
)
38+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.tab {
2+
position: relative;
3+
border: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
4+
background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
5+
6+
@mixin hover {
7+
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-5));
8+
}
9+
10+
@mixin smaller-than 370px {
11+
border-radius: 8px;
12+
margin: 4px;
13+
}
14+
15+
@mixin larger-than 370px {
16+
&:first-of-type {
17+
border-radius: 8px 0 0 8px;
18+
19+
@mixin rtl {
20+
border-radius: 0 8px 8px 0;
21+
}
22+
}
23+
24+
&:last-of-type {
25+
border-radius: 0 8px 8px 0;
26+
27+
@mixin rtl {
28+
border-radius: 8px 0 0 8px;
29+
}
30+
}
31+
32+
& + & {
33+
border-left-width: 0;
34+
35+
@mixin rtl {
36+
border-right-width: 0;
37+
border-left-width: 1px;
38+
}
39+
}
40+
}
41+
42+
&[data-active] {
43+
z-index: 1;
44+
background-color: transparent;
45+
border: 2px solid var(--mantine-color-cyan-filled);
46+
47+
@mixin hover {
48+
background-color: var(--mantine-color-cyan-outline-hover);
49+
}
50+
}
51+
}
52+
53+
.tabLabel {
54+
color: var(--mantine-color-white);
55+
font-weight: 500;
56+
}

0 commit comments

Comments
 (0)