mirror of
https://github.com/bitwarden/clients.git
synced 2026-01-31 14:23:38 +08:00
* delete bit drawer Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: remove stale drawer export from components barrel file The drawer directory was deleted but the export statement in index.ts was not removed, causing import errors. Co-authored-by: Will Martin <willmartian@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Will Martin <willmartian@users.noreply.github.com>
21 lines
499 B
TypeScript
21 lines
499 B
TypeScript
import { Portal } from "@angular/cdk/portal";
|
|
import { Injectable, signal } from "@angular/core";
|
|
|
|
@Injectable({ providedIn: "root" })
|
|
export class DrawerService {
|
|
private readonly _portal = signal<Portal<unknown> | undefined>(undefined);
|
|
|
|
/** The portal to display */
|
|
portal = this._portal.asReadonly();
|
|
|
|
open(portal: Portal<unknown>) {
|
|
this._portal.set(portal);
|
|
}
|
|
|
|
close(portal: Portal<unknown>) {
|
|
if (portal === this.portal()) {
|
|
this._portal.set(undefined);
|
|
}
|
|
}
|
|
}
|