feat: add onboarding with oldmarr import (#1606)
This commit is contained in:
@@ -25,6 +25,10 @@ export function encryptSecret(text: string): `${string}.${string}` {
|
||||
}
|
||||
|
||||
export function decryptSecret(value: `${string}.${string}`) {
|
||||
return decryptSecretWithKey(value, key);
|
||||
}
|
||||
|
||||
export function decryptSecretWithKey(value: `${string}.${string}`, key: Buffer) {
|
||||
const [data, dataIv] = value.split(".") as [string, string];
|
||||
const initializationVector = Buffer.from(dataIv, "hex");
|
||||
const encryptedText = Buffer.from(data, "hex");
|
||||
|
||||
@@ -8,3 +8,4 @@ export * from "./url";
|
||||
export * from "./number";
|
||||
export * from "./error";
|
||||
export * from "./fetch-with-timeout";
|
||||
export * from "./theme";
|
||||
|
||||
5
packages/common/src/theme.ts
Normal file
5
packages/common/src/theme.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { DefaultMantineColor, MantineColorShade } from "@mantine/core";
|
||||
import { DEFAULT_THEME } from "@mantine/core";
|
||||
|
||||
export const getMantineColor = (color: DefaultMantineColor, shade: MantineColorShade) =>
|
||||
DEFAULT_THEME.colors[color]?.[shade] ?? "#fff";
|
||||
Reference in New Issue
Block a user