chore: show current vault in template note if using exclusive mode
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
VaultLockServiceEvent,
|
||||
} from '@standardnotes/services'
|
||||
import {
|
||||
DecryptedItemInterface,
|
||||
ExclusionaryOptions,
|
||||
VaultDisplayOptions,
|
||||
VaultDisplayOptionsPersistable,
|
||||
@@ -103,6 +104,19 @@ export class VaultDisplayService
|
||||
return this.options.isInExclusiveDisplayMode()
|
||||
}
|
||||
|
||||
getItemVault(item: DecryptedItemInterface): VaultListingInterface | undefined {
|
||||
if (this.application.items.isTemplateItem(item)) {
|
||||
if (this.exclusivelyShownVault) {
|
||||
return this.exclusivelyShownVault
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
const vault = this.application.vaults.getItemVault(item)
|
||||
return vault
|
||||
}
|
||||
|
||||
changeToMultipleVaultDisplayMode(): void {
|
||||
const vaults = this.application.vaults.getVaults()
|
||||
const lockedVaults = this.application.vaultLocks.getLockedvaults()
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { VaultDisplayOptions, VaultListingInterface } from '@standardnotes/models'
|
||||
import { DecryptedItemInterface, VaultDisplayOptions, VaultListingInterface } from '@standardnotes/models'
|
||||
import { AbstractUIServiceInterface } from '../Abstract/AbstractUIServiceInterface'
|
||||
|
||||
export interface VaultDisplayServiceInterface extends AbstractUIServiceInterface {
|
||||
exclusivelyShownVault?: VaultListingInterface
|
||||
|
||||
getItemVault(item: DecryptedItemInterface): VaultListingInterface | undefined
|
||||
|
||||
getOptions(): VaultDisplayOptions
|
||||
|
||||
isVaultDisabledOrLocked(vault: VaultListingInterface): boolean
|
||||
|
||||
Reference in New Issue
Block a user