Skip to content

Commit 73e47be

Browse files
committed
feat(useVaultStore): add isTemplateFolder function
1 parent cfe47e7 commit 73e47be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

resources/js/stores/vault.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export const useVaultStore = defineStore('vault', () => {
2121
templates_node_id.value = data.templates_node_id;
2222
}
2323

24+
function isTemplateFolder(nodeId: number): boolean {
25+
return templates_node_id.value === nodeId;
26+
}
27+
2428
function addCollaborator(collaborator: VaultCollaborator): void {
2529
collaborators.value.push(collaborator);
2630
}
@@ -51,6 +55,7 @@ export const useVaultStore = defineStore('vault', () => {
5155
collaborators,
5256
setVault,
5357
updateVault,
58+
isTemplateFolder,
5459
addCollaborator,
5560
updateCollaborator,
5661
removeCollaborator,

0 commit comments

Comments
 (0)