add explore button next to filter field
This commit is contained in:
parent
9e2cdecb9b
commit
4ffa8c7b4a
6 changed files with 166 additions and 13 deletions
|
@ -125,3 +125,44 @@ limitations under the License.
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_LeftPanel_exploreAndFilterRow {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.mx_SearchBox {
|
||||||
|
flex: 1 1 0;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_LeftPanel_explore {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.mx_AccessibleButton {
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 9px;
|
||||||
|
margin-right: 0;
|
||||||
|
padding: 9px;
|
||||||
|
padding-left: 42px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: $notice-secondary-color;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
cursor: pointer;
|
||||||
|
mask: url('$(res)/img/explore.svg');
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-position: center center;
|
||||||
|
content: "";
|
||||||
|
left: 14px;
|
||||||
|
top: 10px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: $notice-secondary-color;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -14,12 +14,17 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_SearchBox_closeButton {
|
.mx_SearchBox {
|
||||||
cursor: pointer;
|
flex: 1 1 0;
|
||||||
background-image: url('$(res)/img/icons-close.svg');
|
min-width: 0;
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 16px;
|
.mx_SearchBox_closeButton {
|
||||||
height: 16px;
|
cursor: pointer;
|
||||||
background-position: center;
|
background-image: url('$(res)/img/icons-close.svg');
|
||||||
padding: 9px;
|
background-repeat: no-repeat;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background-position: center;
|
||||||
|
padding: 9px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,6 @@ limitations under the License.
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_SearchBox {
|
|
||||||
flex: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hide resize handles next to collapsed / empty sublists */
|
/* hide resize handles next to collapsed / empty sublists */
|
||||||
.mx_RoomList .mx_RoomSubList:not(.mx_RoomSubList_nonEmpty) + .mx_ResizeHandle {
|
.mx_RoomList .mx_RoomSubList:not(.mx_RoomSubList_nonEmpty) + .mx_ResizeHandle {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
97
res/img/explore.svg
Normal file
97
res/img/explore.svg
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="21.124001"
|
||||||
|
height="14.896"
|
||||||
|
viewBox="0 0 21.124001 14.896"
|
||||||
|
version="1.1"
|
||||||
|
id="svg21"
|
||||||
|
sodipodi:docname="explore.svg"
|
||||||
|
inkscape:version="0.92.4 (unknown)">
|
||||||
|
<metadata
|
||||||
|
id="metadata25">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1016"
|
||||||
|
id="namedview23"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0.5"
|
||||||
|
fit-margin-left="0.5"
|
||||||
|
fit-margin-right="0.5"
|
||||||
|
fit-margin-bottom="0.5"
|
||||||
|
inkscape:zoom="3.1891892"
|
||||||
|
inkscape:cx="-23.683763"
|
||||||
|
inkscape:cy="5.4480001"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg21" />
|
||||||
|
<defs
|
||||||
|
id="defs15">
|
||||||
|
<filter
|
||||||
|
id="a"
|
||||||
|
width="1.118"
|
||||||
|
height="1.158"
|
||||||
|
x="-0.059"
|
||||||
|
y="-0.079000004"
|
||||||
|
filterUnits="objectBoundingBox">
|
||||||
|
<feOffset
|
||||||
|
dy="2"
|
||||||
|
in="SourceAlpha"
|
||||||
|
result="shadowOffsetOuter1"
|
||||||
|
id="feOffset2" />
|
||||||
|
<feGaussianBlur
|
||||||
|
in="shadowOffsetOuter1"
|
||||||
|
result="shadowBlurOuter1"
|
||||||
|
stdDeviation="16"
|
||||||
|
id="feGaussianBlur4" />
|
||||||
|
<feColorMatrix
|
||||||
|
in="shadowBlurOuter1"
|
||||||
|
result="shadowMatrixOuter1"
|
||||||
|
values="0 0 0 0 0 0 0 0 0 0.473684211 0 0 0 0 1 0 0 0 0.241258741 0"
|
||||||
|
id="feColorMatrix6" />
|
||||||
|
<feMerge
|
||||||
|
id="feMerge12">
|
||||||
|
<feMergeNode
|
||||||
|
in="shadowMatrixOuter1"
|
||||||
|
id="feMergeNode8" />
|
||||||
|
<feMergeNode
|
||||||
|
in="SourceGraphic"
|
||||||
|
id="feMergeNode10" />
|
||||||
|
</feMerge>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
transform="translate(-91.438,-120.552)"
|
||||||
|
id="g19"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#61708b;stroke-width:1.29999995;stroke-linecap:round;filter:url(#a)">
|
||||||
|
<path
|
||||||
|
d="m 98,122 h 13 m -13,6 h 13 m -13,6 h 13 M 93,122 h 0.5 m -0.5,6 h 0.5 m -0.5,6 h 0.5"
|
||||||
|
id="path17"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
|
@ -218,6 +218,7 @@ const LeftPanel = React.createClass({
|
||||||
const TopLeftMenuButton = sdk.getComponent('structures.TopLeftMenuButton');
|
const TopLeftMenuButton = sdk.getComponent('structures.TopLeftMenuButton');
|
||||||
const SearchBox = sdk.getComponent('structures.SearchBox');
|
const SearchBox = sdk.getComponent('structures.SearchBox');
|
||||||
const CallPreview = sdk.getComponent('voip.CallPreview');
|
const CallPreview = sdk.getComponent('voip.CallPreview');
|
||||||
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
|
||||||
const tagPanelEnabled = SettingsStore.getValue("TagPanel.enableTagPanel");
|
const tagPanelEnabled = SettingsStore.getValue("TagPanel.enableTagPanel");
|
||||||
let tagPanelContainer;
|
let tagPanelContainer;
|
||||||
|
@ -241,6 +242,15 @@ const LeftPanel = React.createClass({
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let exploreButton;
|
||||||
|
if (!this.props.collapsed) {
|
||||||
|
exploreButton = (
|
||||||
|
<div className={classNames("mx_LeftPanel_explore", {"mx_LeftPanel_explore_hidden": this.state.searchFocused})}>
|
||||||
|
<AccessibleButton onClick={() => dis.dispatch({action: 'view_room_directory'})}>{_t("Explore")}</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const searchBox = (<SearchBox
|
const searchBox = (<SearchBox
|
||||||
enableRoomSearchFocus={true}
|
enableRoomSearchFocus={true}
|
||||||
placeholder={ _t('Filter room names') }
|
placeholder={ _t('Filter room names') }
|
||||||
|
@ -259,7 +269,10 @@ const LeftPanel = React.createClass({
|
||||||
<aside className={"mx_LeftPanel dark-panel"} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
|
<aside className={"mx_LeftPanel dark-panel"} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
|
||||||
<TopLeftMenuButton collapsed={ this.props.collapsed } />
|
<TopLeftMenuButton collapsed={ this.props.collapsed } />
|
||||||
{ breadcrumbs }
|
{ breadcrumbs }
|
||||||
{ searchBox }
|
<div className="mx_LeftPanel_exploreAndFilterRow">
|
||||||
|
{ exploreButton }
|
||||||
|
{ searchBox }
|
||||||
|
</div>
|
||||||
<CallPreview ConferenceHandler={VectorConferenceHandler} />
|
<CallPreview ConferenceHandler={VectorConferenceHandler} />
|
||||||
<RoomList
|
<RoomList
|
||||||
ref={this.collectRoomList}
|
ref={this.collectRoomList}
|
||||||
|
|
|
@ -1474,6 +1474,7 @@
|
||||||
"This homeserver does not support communities": "This homeserver does not support communities",
|
"This homeserver does not support communities": "This homeserver does not support communities",
|
||||||
"Failed to load %(groupId)s": "Failed to load %(groupId)s",
|
"Failed to load %(groupId)s": "Failed to load %(groupId)s",
|
||||||
"Filter room names": "Filter room names",
|
"Filter room names": "Filter room names",
|
||||||
|
"Explore": "Explore",
|
||||||
"Failed to reject invitation": "Failed to reject invitation",
|
"Failed to reject invitation": "Failed to reject invitation",
|
||||||
"This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
|
"This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
|
||||||
"Are you sure you want to leave the room '%(roomName)s'?": "Are you sure you want to leave the room '%(roomName)s'?",
|
"Are you sure you want to leave the room '%(roomName)s'?": "Are you sure you want to leave the room '%(roomName)s'?",
|
||||||
|
|
Loading…
Reference in a new issue