chore: remove the option to trigger transition from the UI (#2489)
This commit is contained in:
@@ -80,8 +80,6 @@ import {
|
||||
GenerateUuid,
|
||||
CreateDecryptedBackupFile,
|
||||
CreateEncryptedBackupFile,
|
||||
GetTransitionStatus,
|
||||
StartTransition,
|
||||
WebSocketsService,
|
||||
} from '@standardnotes/services'
|
||||
import {
|
||||
@@ -1140,14 +1138,6 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
|
||||
return this.dependencies.get<SetHost>(TYPES.SetHost)
|
||||
}
|
||||
|
||||
get getTransitionStatus(): GetTransitionStatus {
|
||||
return this.dependencies.get<GetTransitionStatus>(TYPES.GetTransitionStatus)
|
||||
}
|
||||
|
||||
get startTransition(): StartTransition {
|
||||
return this.dependencies.get<StartTransition>(TYPES.StartTransition)
|
||||
}
|
||||
|
||||
public get legacyApi(): LegacyApiService {
|
||||
return this.dependencies.get<LegacyApiService>(TYPES.LegacyApiService)
|
||||
}
|
||||
|
||||
@@ -140,8 +140,6 @@ import {
|
||||
CreateDecryptedBackupFile,
|
||||
CreateEncryptedBackupFile,
|
||||
SyncLocalVaultsWithRemoteSharedVaults,
|
||||
GetTransitionStatus,
|
||||
StartTransition,
|
||||
WebSocketsService,
|
||||
} from '@standardnotes/services'
|
||||
import { ItemManager } from '../../Services/Items/ItemManager'
|
||||
@@ -155,7 +153,6 @@ import {
|
||||
AuthenticatorApiService,
|
||||
AuthenticatorServer,
|
||||
HttpService,
|
||||
HttpServiceInterface,
|
||||
RevisionApiService,
|
||||
RevisionServer,
|
||||
SharedVaultInvitesServer,
|
||||
@@ -1027,14 +1024,6 @@ export class Dependencies {
|
||||
)
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.GetTransitionStatus, () => {
|
||||
return new GetTransitionStatus(this.get<HttpServiceInterface>(TYPES.HttpService))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.StartTransition, () => {
|
||||
return new StartTransition(this.get<HttpServiceInterface>(TYPES.HttpService))
|
||||
})
|
||||
|
||||
this.factory.set(TYPES.ListRevisions, () => {
|
||||
return new ListRevisions(this.get<RevisionManager>(TYPES.RevisionManager))
|
||||
})
|
||||
|
||||
@@ -171,8 +171,6 @@ export const TYPES = {
|
||||
AuthorizeVaultDeletion: Symbol.for('AuthorizeVaultDeletion'),
|
||||
CreateDecryptedBackupFile: Symbol.for('CreateDecryptedBackupFile'),
|
||||
CreateEncryptedBackupFile: Symbol.for('CreateEncryptedBackupFile'),
|
||||
GetTransitionStatus: Symbol.for('GetTransitionStatus'),
|
||||
StartTransition: Symbol.for('StartTransition'),
|
||||
|
||||
// Mappers
|
||||
SessionStorageMapper: Symbol.for('SessionStorageMapper'),
|
||||
|
||||
@@ -245,8 +245,6 @@ export async function awaitFunctionInvokation(object, functionName) {
|
||||
})
|
||||
}
|
||||
|
||||
export const ServerTransitionDelay = 1.5
|
||||
|
||||
/**
|
||||
* Signing out of an application deinits it.
|
||||
* A new one must be created.
|
||||
@@ -254,7 +252,6 @@ export const ServerTransitionDelay = 1.5
|
||||
export async function signOutApplicationAndReturnNew(application) {
|
||||
const isRealCrypto = application.crypto instanceof SNWebCrypto
|
||||
await application.user.signOut()
|
||||
await sleep(ServerTransitionDelay, 'transition triggered during sign out')
|
||||
if (isRealCrypto) {
|
||||
return createInitAppWithRealCrypto()
|
||||
} else {
|
||||
@@ -265,7 +262,6 @@ export async function signOutApplicationAndReturnNew(application) {
|
||||
export async function signOutAndBackIn(application, email, password) {
|
||||
const isRealCrypto = application.crypto instanceof SNWebCrypto
|
||||
await application.user.signOut()
|
||||
await sleep(ServerTransitionDelay, 'transition triggered during sign out')
|
||||
const newApplication = isRealCrypto ? await createInitAppWithRealCrypto() : await createInitAppWithFakeCrypto()
|
||||
await this.loginToApplication({
|
||||
application: newApplication,
|
||||
|
||||
Reference in New Issue
Block a user