(feat): improve secure storage
This commit is contained in:
parent
9011768a2e
commit
cda0c48454
7 changed files with 71 additions and 31 deletions
|
|
@ -36,6 +36,13 @@ if (verbose) {
|
|||
app.commandLine.appendSwitch("log-level", "0");
|
||||
}
|
||||
|
||||
if (
|
||||
process.platform === "linux" &&
|
||||
!app.commandLine.hasSwitch("password-store")
|
||||
) {
|
||||
app.commandLine.appendSwitch("password-store", "gnome-libsecret");
|
||||
}
|
||||
|
||||
if (
|
||||
process.platform === "linux" &&
|
||||
process.env.XDG_SESSION_TYPE === "wayland" &&
|
||||
|
|
|
|||
|
|
@ -34,10 +34,6 @@ function validateValue(value: unknown): asserts value is string {
|
|||
}
|
||||
|
||||
export function getSecureStorageStatus(): DesktopSecureStorageStatus {
|
||||
if (!safeStorage.isEncryptionAvailable()) {
|
||||
return { available: false, backend: null };
|
||||
}
|
||||
|
||||
const backend =
|
||||
process.platform === "linux"
|
||||
? safeStorage.getSelectedStorageBackend()
|
||||
|
|
@ -48,7 +44,9 @@ export function getSecureStorageStatus(): DesktopSecureStorageStatus {
|
|||
: null;
|
||||
|
||||
return {
|
||||
available: process.platform !== "linux" || backend !== "basic_text",
|
||||
available:
|
||||
safeStorage.isEncryptionAvailable() &&
|
||||
(process.platform !== "linux" || backend !== "basic_text"),
|
||||
backend,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue