forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add search option in the header in mobile view
- Loading branch information
1 parent
eec16a2
commit d5943a2
Showing
10 changed files
with
270 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,98 @@ | ||
<template name="headerRoom"> | ||
<header class="rc-header rc-header--room" > | ||
<div class="rc-header__wrap"> | ||
|
||
<div class="rc-header__block rc-header--burger"> | ||
{{> burger}} | ||
</div> | ||
|
||
{{#if isDiscussion}} | ||
<div class="rc-header__block rc-header__block--action js-open-parent-channel rc-tooltip rc-tooltip--down rc-tooltip--start" aria-label={{_ "Back_to_room"}}> | ||
<span class="rc-header__first-icon">{{> icon block="rc-header__icon rc-header__icon" icon="back"}}</span> | ||
{{#if openSearchPage}} | ||
<header class="contextual-bar__header contextual-bar__header--empty"> | ||
<button class ="js-close-search" aria-label="{{_ "Close"}}" style="font-size: 1.2em;"> | ||
{{> icon icon="back"}} | ||
</button> | ||
<div class="contextual-bar__header-data"> | ||
{{> icon block="contextual-bar__header-icon" icon=icon}} | ||
<h1 class="contextual-bar__header-title">Search Messages</h1> | ||
</div> | ||
{{/if}} | ||
</header> | ||
{{else}} | ||
<header class="rc-header rc-header--room" > | ||
<div class="rc-header__wrap"> | ||
|
||
{{#if isToggleFavoriteButtonVisible}} | ||
<div class="rc-header__block rc-header__favorite rc-header__block--action"> | ||
<button aria-label="{{toggleFavoriteButtonIconLabel}}" type="button" class="rc-header__toggle-favorite rc-header__first-icon js-favorite"> | ||
{{> icon block="rc-header__icon" icon=toggleFavoriteButtonIcon}} | ||
</button> | ||
<div class="rc-header__block rc-header--burger"> | ||
{{> burger}} | ||
</div> | ||
{{/if}} | ||
|
||
<!-- TODO: fix it style and helper --> | ||
{{#if tokenAccessChannel}} | ||
<i class="icon-tokenpass" aria-label="{{_ "Tokenpass_Channel_Label"}}"></i> | ||
{{/if}} | ||
{{#if isDiscussion}} | ||
<div class="rc-header__block rc-header__block--action js-open-parent-channel rc-tooltip rc-tooltip--down rc-tooltip--start" aria-label={{_ "Back_to_room"}}> | ||
<span class="rc-header__first-icon">{{> icon block="rc-header__icon rc-header__icon" icon="back"}}</span> | ||
</div> | ||
{{/if}} | ||
|
||
<div class="rc-header__content rc-header__block"> | ||
{{#if isDirect}} | ||
<div class="rc-header__block"> | ||
<div class="rc-header__image"> | ||
{{> avatar username=avatarBackground}} | ||
{{#if isToggleFavoriteButtonVisible}} | ||
<div class="rc-header__block rc-header__favorite rc-header__block--action"> | ||
<button aria-label="{{toggleFavoriteButtonIconLabel}}" type="button" class="rc-header__toggle-favorite rc-header__first-icon js-favorite"> | ||
{{> icon block="rc-header__icon" icon=toggleFavoriteButtonIcon}} | ||
</button> | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
<div class="rc-header__data"> | ||
{{#unless secondaryName}} | ||
<div class="rc-header__name">{{> icon block="rc-header__icon" icon=roomIcon}}{{roomName}}</div> | ||
{{else}} | ||
<div class="rc-header__name">{{roomName}} <div class="rc-header__username">@{{secondaryName}}</div></div> | ||
{{/unless}} | ||
<!-- TODO: fix it style and helper --> | ||
{{#if tokenAccessChannel}} | ||
<i class="icon-tokenpass" aria-label="{{_ "Tokenpass_Channel_Label"}}"></i> | ||
{{/if}} | ||
|
||
<div class="rc-header__content rc-header__block"> | ||
{{#if isDirect}} | ||
<span class="rc-header__status"> | ||
<div class="rc-header__status-bullet rc-header__status-bullet--{{userStatus}}" title="{{_ userStatus}}"></div> | ||
<div class="rc-header__visual-status">{{userStatusText}}</div> | ||
</span> | ||
{{else}} | ||
{{#if roomTopic}}<span class="rc-header__topic">{{{roomTopic}}}</span>{{/if}} | ||
<div class="rc-header__block"> | ||
<div class="rc-header__image"> | ||
{{> avatar username=avatarBackground}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
<div class="rc-header__data"> | ||
{{#unless secondaryName}} | ||
<div class="rc-header__name">{{> icon block="rc-header__icon" icon=roomIcon}}{{roomName}}</div> | ||
{{else}} | ||
<div class="rc-header__name">{{roomName}} <div class="rc-header__username">@{{secondaryName}}</div></div> | ||
{{/unless}} | ||
|
||
{{#if isDirect}} | ||
<span class="rc-header__status"> | ||
<div class="rc-header__status-bullet rc-header__status-bullet--{{userStatus}}" title="{{_ userStatus}}"></div> | ||
<div class="rc-header__visual-status">{{userStatusText}}</div> | ||
</span> | ||
{{else}} | ||
{{#if roomTopic}}<span class="rc-header__topic">{{{roomTopic}}}</span>{{/if}} | ||
{{/if}} | ||
</div> | ||
|
||
{{#if sentimentSmile}} | ||
<span class="sentiment">{{sentimentSmile}}</span> | ||
{{/if}} | ||
{{#if isTranslated}} | ||
<i class="icon-language" aria-label="{{_ "Translated"}}"></i> | ||
{{/if}} | ||
</div> | ||
|
||
{{#if sentimentSmile}} | ||
<span class="sentiment">{{sentimentSmile}}</span> | ||
{{#if isSection}} | ||
<span class="rc-header__block">{{_ sectionName}}</span> | ||
{{/if}} | ||
{{#if isTranslated}} | ||
<i class="icon-language" aria-label="{{_ "Translated"}}"></i> | ||
{{/if}} | ||
</div> | ||
|
||
{{#if isSection}} | ||
<span class="rc-header__block">{{_ sectionName}}</span> | ||
{{/if}} | ||
{{#if encryptionState}} | ||
<div class="rc-header__block rc-header__block-action rc-header__encryption"> | ||
<div class="rc-room-actions"> | ||
<button aria-label="{{_ 'E2E_Enabled'}}" class="rc-tooltip rc-tooltip--down rc-room-actions__action tab-button rc-header__toggle-encryption js-toggle-encryption {{encryptionState}}">{{> icon icon="key"}}</button> | ||
{{#if encryptionState}} | ||
<div class="rc-header__block rc-header__block-action rc-header__encryption"> | ||
<div class="rc-room-actions"> | ||
<button aria-label="{{_ 'E2E_Enabled'}}" class="rc-tooltip rc-tooltip--down rc-room-actions__action tab-button rc-header__toggle-encryption js-toggle-encryption {{encryptionState}}">{{> icon icon="key"}}</button> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{#if showSearchButton}} | ||
{{#with getSearchButton}} | ||
<div class="rc-header__block rc-header__search-button"> | ||
<button type="button" class="js-open-search rc-header__search-button__action"> | ||
{{> icon block="rc-header__icon rc-header__search-button__action__icon" icon=icon}} | ||
</button> | ||
</div> | ||
{{/with}} | ||
{{/if}} | ||
{{#if Template.contentBlock}} | ||
{{> Template.contentBlock}} | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
{{#if Template.contentBlock}} | ||
{{> Template.contentBlock}} | ||
{{/if}} | ||
</div> | ||
</header> | ||
</header> | ||
{{/if}} | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.