|
|
@ -28,6 +28,7 @@ export default class ChatTopbar { |
|
|
|
subtitle: HTMLDivElement; |
|
|
|
subtitle: HTMLDivElement; |
|
|
|
chatUtils: HTMLDivElement; |
|
|
|
chatUtils: HTMLDivElement; |
|
|
|
btnJoin: HTMLButtonElement; |
|
|
|
btnJoin: HTMLButtonElement; |
|
|
|
|
|
|
|
btnPinned: HTMLButtonElement; |
|
|
|
btnMute: HTMLButtonElement; |
|
|
|
btnMute: HTMLButtonElement; |
|
|
|
btnSearch: HTMLButtonElement; |
|
|
|
btnSearch: HTMLButtonElement; |
|
|
|
btnMore: HTMLButtonElement; |
|
|
|
btnMore: HTMLButtonElement; |
|
|
@ -94,6 +95,7 @@ export default class ChatTopbar { |
|
|
|
this.btnJoin = Button('btn-primary chat-join hide'); |
|
|
|
this.btnJoin = Button('btn-primary chat-join hide'); |
|
|
|
this.btnJoin.append('SUBSCRIBE'); |
|
|
|
this.btnJoin.append('SUBSCRIBE'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.btnPinned = ButtonIcon('pinlist'); |
|
|
|
this.btnMute = ButtonIcon('mute'); |
|
|
|
this.btnMute = ButtonIcon('mute'); |
|
|
|
this.btnSearch = ButtonIcon('search'); |
|
|
|
this.btnSearch = ButtonIcon('search'); |
|
|
|
const menuButtons: (ButtonMenuItemOptions & {verify: () => boolean})[] = [{ |
|
|
|
const menuButtons: (ButtonMenuItemOptions & {verify: () => boolean})[] = [{ |
|
|
@ -103,6 +105,11 @@ export default class ChatTopbar { |
|
|
|
new ChatSearch(this, this.chat); |
|
|
|
new ChatSearch(this, this.chat); |
|
|
|
}, |
|
|
|
}, |
|
|
|
verify: () => mediaSizes.isMobile |
|
|
|
verify: () => mediaSizes.isMobile |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
icon: 'pinlist', |
|
|
|
|
|
|
|
text: 'Pinned Messages', |
|
|
|
|
|
|
|
onClick: () => {}, |
|
|
|
|
|
|
|
verify: () => mediaSizes.isMobile |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
icon: 'mute', |
|
|
|
icon: 'mute', |
|
|
|
text: 'Mute', |
|
|
|
text: 'Mute', |
|
|
@ -117,6 +124,20 @@ export default class ChatTopbar { |
|
|
|
this.appMessagesManager.mutePeer(this.peerID); |
|
|
|
this.appMessagesManager.mutePeer(this.peerID); |
|
|
|
}, |
|
|
|
}, |
|
|
|
verify: () => rootScope.myID != this.peerID && this.appMessagesManager.isPeerMuted(this.peerID) |
|
|
|
verify: () => rootScope.myID != this.peerID && this.appMessagesManager.isPeerMuted(this.peerID) |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
icon: 'select', |
|
|
|
|
|
|
|
text: 'Select Messages', |
|
|
|
|
|
|
|
onClick: () => { |
|
|
|
|
|
|
|
this.chat.selection.toggleSelection(true, true); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
verify: () => !this.chat.selection.isSelecting |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
icon: 'select', |
|
|
|
|
|
|
|
text: 'Clear Selection', |
|
|
|
|
|
|
|
onClick: () => { |
|
|
|
|
|
|
|
this.chat.selection.cancelSelection(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
verify: () => this.chat.selection.isSelecting |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
icon: 'delete danger', |
|
|
|
icon: 'delete danger', |
|
|
|
text: 'Delete and Leave', |
|
|
|
text: 'Delete and Leave', |
|
|
@ -130,7 +151,7 @@ export default class ChatTopbar { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.chatUtils.append(this.chatAudio.divAndCaption.container, this.btnJoin, this.btnMute, this.btnSearch, this.btnMore); |
|
|
|
this.chatUtils.append(this.chatAudio.divAndCaption.container, this.btnJoin, this.btnPinned, this.btnMute, this.btnSearch, this.btnMore); |
|
|
|
|
|
|
|
|
|
|
|
this.container.append(this.btnBack, this.chatInfo, this.chatUtils); |
|
|
|
this.container.append(this.btnBack, this.chatInfo, this.chatUtils); |
|
|
|
|
|
|
|
|
|
|
|