mirror of
https://github.com/EthanShoeDev/fressh.git
synced 2026-01-11 06:12:51 +00:00
Better
This commit is contained in:
@@ -151,14 +151,14 @@ function ShellDetail() {
|
||||
style={{ flex: 1 }}
|
||||
logger={{
|
||||
log: console.log,
|
||||
debug: console.log,
|
||||
// debug: console.log,
|
||||
warn: console.warn,
|
||||
error: console.error,
|
||||
}}
|
||||
// xterm options
|
||||
xtermOptions={{
|
||||
theme: {
|
||||
background: 'red',
|
||||
background: theme.colors.background,
|
||||
foreground: theme.colors.textPrimary,
|
||||
},
|
||||
}}
|
||||
|
||||
@@ -19,15 +19,15 @@ export const useSshConnMutation = (opts?: {
|
||||
const security =
|
||||
connectionDetails.security.type === 'password'
|
||||
? {
|
||||
type: 'password' as const,
|
||||
password: connectionDetails.security.password,
|
||||
}
|
||||
type: 'password' as const,
|
||||
password: connectionDetails.security.password,
|
||||
}
|
||||
: {
|
||||
type: 'key' as const,
|
||||
privateKey: await secretsManager.keys.utils
|
||||
.getPrivateKey(connectionDetails.security.keyId)
|
||||
.then((e) => e.value),
|
||||
};
|
||||
type: 'key' as const,
|
||||
privateKey: await secretsManager.keys.utils
|
||||
.getPrivateKey(connectionDetails.security.keyId)
|
||||
.then((e) => e.value),
|
||||
};
|
||||
|
||||
const sshConnection = await connect({
|
||||
host: connectionDetails.host,
|
||||
|
||||
@@ -82,9 +82,9 @@ function makeBetterSecureStore<
|
||||
const unsafedRootManifest: unknown = rawRootManifestString
|
||||
? JSON.parse(rawRootManifestString)
|
||||
: {
|
||||
manifestVersion: rootManifestVersion,
|
||||
manifestChunksIds: [],
|
||||
};
|
||||
manifestVersion: rootManifestVersion,
|
||||
manifestChunksIds: [],
|
||||
};
|
||||
const rootManifest = rootManifestSchema.parse(unsafedRootManifest);
|
||||
const manifestChunks = await Promise.all(
|
||||
rootManifest.manifestChunksIds.map(async (manifestChunkId) => {
|
||||
@@ -409,7 +409,11 @@ async function upsertConnection(params: {
|
||||
priority: number;
|
||||
label?: string;
|
||||
}) {
|
||||
const id = `${params.details.username}-${params.details.host}-${params.details.port}`.replaceAll('.', '_');
|
||||
const id =
|
||||
`${params.details.username}-${params.details.host}-${params.details.port}`.replaceAll(
|
||||
'.',
|
||||
'_',
|
||||
);
|
||||
await betterConnectionStorage.upsertEntry({
|
||||
id,
|
||||
metadata: {
|
||||
|
||||
Reference in New Issue
Block a user