feat: add interfaces for secondary menu items with various types and functionalities
This commit is contained in:
@@ -57,6 +57,16 @@ export class DeesAppuiBar extends DeesElement {
|
||||
@property({ type: Boolean })
|
||||
accessor showSearch: boolean = false;
|
||||
|
||||
// Activity log toggle
|
||||
@property({ type: Boolean })
|
||||
accessor showActivityLogToggle: boolean = false;
|
||||
|
||||
@property({ type: Number })
|
||||
accessor activityLogCount: number = 0;
|
||||
|
||||
@property({ type: Boolean })
|
||||
accessor activityLogActive: boolean = false;
|
||||
|
||||
// STATE
|
||||
@state()
|
||||
accessor activeMenu: string | null = null;
|
||||
@@ -177,8 +187,8 @@ export class DeesAppuiBar extends DeesElement {
|
||||
public renderAccountSection(): TemplateResult {
|
||||
return html`
|
||||
${this.showSearch ? html`
|
||||
<dees-icon
|
||||
class="search-icon"
|
||||
<dees-icon
|
||||
class="search-icon"
|
||||
.icon=${'lucide:search'}
|
||||
@click=${this.handleSearchClick}
|
||||
></dees-icon>
|
||||
@@ -206,6 +216,18 @@ export class DeesAppuiBar extends DeesElement {
|
||||
></dees-appui-profiledropdown>
|
||||
</div>
|
||||
` : ''}
|
||||
${this.showActivityLogToggle ? html`
|
||||
<div
|
||||
class="activity-toggle ${this.activityLogActive ? 'active' : ''}"
|
||||
@click=${this.handleActivityToggle}
|
||||
title="Activity Log"
|
||||
>
|
||||
<dees-icon .icon=${'lucide:activity'}></dees-icon>
|
||||
${this.activityLogCount > 0 ? html`
|
||||
<span class="activity-badge">${this.activityLogCount > 99 ? '99+' : this.activityLogCount}</span>
|
||||
` : ''}
|
||||
</div>
|
||||
` : ''}
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -304,9 +326,16 @@ export class DeesAppuiBar extends DeesElement {
|
||||
}
|
||||
|
||||
private handleSearchClick() {
|
||||
this.dispatchEvent(new CustomEvent('search-click', {
|
||||
this.dispatchEvent(new CustomEvent('search-click', {
|
||||
bubbles: true,
|
||||
composed: true
|
||||
composed: true
|
||||
}));
|
||||
}
|
||||
|
||||
private handleActivityToggle() {
|
||||
this.dispatchEvent(new CustomEvent('activity-toggle', {
|
||||
bubbles: true,
|
||||
composed: true
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user