nextcloud/core/src/services/ContactsMenuService.ts
Kent Delante 9f3da00aac feat: provide api to register actions in contacts menu
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-08-19 09:17:44 +08:00

28 lines
561 B
TypeScript

/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { IContactsMenuAction } from '../types/contactsMenuAction.ts'
export default class ContactsMenuService {
private _actions: IContactsMenuAction[]
constructor() {
this._actions = []
}
get actions(): IContactsMenuAction[] {
return this._actions
}
/*
* Register an action for the contacts menu
* Actions use NcButton
*/
addAction(action: IContactsMenuAction): void {
this._actions.push(action)
}
}