Download backup on link

This commit is contained in:
Fedor Indutny 2024-08-08 12:22:48 -07:00 committed by GitHub
parent ec36ae7f26
commit 5c350a0e3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 67 additions and 2 deletions

View file

@ -2,7 +2,15 @@
// SPDX-License-Identifier: AGPL-3.0-only
import * as RemoteConfig from '../RemoteConfig';
import { Environment, getEnvironment } from '../environment';
import { isStaging } from './version';
export function isBackupEnabled(): boolean {
if (getEnvironment() === Environment.Staging) {
return true;
}
if (isStaging(window.getVersion())) {
return true;
}
return Boolean(RemoteConfig.isEnabled('desktop.backup.credentialFetch'));
}