Merge branch 'travis/room-list/scrolling-resize' into travis/room-list/css-layout
commit
b31a8d494b
|
@ -15,10 +15,6 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_RoomList2_resizer {
|
|
||||||
cursor: ns-resize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomList.mx_RoomList2 {
|
.mx_RoomList.mx_RoomList2 {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,11 +217,11 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
handles = []; // no handles, we're at a minimum
|
handles = []; // no handles, we're at a minimum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove Math hacks
|
||||||
let nVisible = Math.floor(layout.visibleTiles);
|
let nVisible = Math.floor(layout.visibleTiles);
|
||||||
if (localStorage.getItem("mx_rl_mathfn")) {
|
if (localStorage.getItem("mx_rl_mathfn")) {
|
||||||
nVisible = Math[localStorage.getItem("mx_rl_mathfn")](layout.visibleTiles);
|
nVisible = Math[localStorage.getItem("mx_rl_mathfn")](layout.visibleTiles);
|
||||||
}
|
}
|
||||||
console.log({nVisible})
|
|
||||||
const visibleTiles = tiles.slice(0, nVisible);
|
const visibleTiles = tiles.slice(0, nVisible);
|
||||||
|
|
||||||
// If we're hiding rooms, show a 'show more' button to the user. This button
|
// If we're hiding rooms, show a 'show more' button to the user. This button
|
||||||
|
@ -235,15 +235,12 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
// we +1 to account for the room we're about to hide with our 'show more' button
|
// we +1 to account for the room we're about to hide with our 'show more' button
|
||||||
const numMissing = (tiles.length - visibleTiles.length) + 1;
|
const numMissing = (tiles.length - visibleTiles.length) + 1;
|
||||||
|
|
||||||
// TODO: Copy TBD
|
|
||||||
// TODO: CSS TBD
|
// TODO: CSS TBD
|
||||||
// TODO: Show N more instead of infinity more?
|
// TODO: Make this an actual tile
|
||||||
// TODO: Safely use the same height of a tile, not hardcoded hacks
|
|
||||||
const moreTileHeightPx = `${layout.tileHeight}px`;
|
|
||||||
visibleTiles.splice(visibleTiles.length - 1, 1, (
|
visibleTiles.splice(visibleTiles.length - 1, 1, (
|
||||||
<div
|
<div
|
||||||
onClick={this.onShowAllClick}
|
onClick={this.onShowAllClick}
|
||||||
style={{height: moreTileHeightPx, lineHeight: moreTileHeightPx, backgroundColor: 'transparent', cursor: 'pointer'}}
|
style={{height: moreTileHeightPx, lineHeight: moreTileHeightPx, cursor: 'pointer'}}
|
||||||
key='showall'
|
key='showall'
|
||||||
>
|
>
|
||||||
{_t("Show %(n)s more", {n: numMissing})}
|
{_t("Show %(n)s more", {n: numMissing})}
|
||||||
|
@ -257,7 +254,6 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
axis="y"
|
axis="y"
|
||||||
minConstraints={[-1, minTilesPx]}
|
minConstraints={[-1, minTilesPx]}
|
||||||
maxConstraints={[-1, maxTilesPx]}
|
maxConstraints={[-1, maxTilesPx]}
|
||||||
draggableOpts={{grid: [-1, 1]}}
|
|
||||||
resizeHandles={handles}
|
resizeHandles={handles}
|
||||||
onResize={this.onResize}
|
onResize={this.onResize}
|
||||||
className="mx_RoomSublist2_resizeBox"
|
className="mx_RoomSublist2_resizeBox"
|
||||||
|
|
|
@ -1134,6 +1134,9 @@
|
||||||
"Securely back up your keys to avoid losing them. <a>Learn more.</a>": "Securely back up your keys to avoid losing them. <a>Learn more.</a>",
|
"Securely back up your keys to avoid losing them. <a>Learn more.</a>": "Securely back up your keys to avoid losing them. <a>Learn more.</a>",
|
||||||
"Not now": "Not now",
|
"Not now": "Not now",
|
||||||
"Don't ask me again": "Don't ask me again",
|
"Don't ask me again": "Don't ask me again",
|
||||||
|
"Jump to first unread room.": "Jump to first unread room.",
|
||||||
|
"Jump to first invite.": "Jump to first invite.",
|
||||||
|
"Add room": "Add room",
|
||||||
"Show %(n)s more": "Show %(n)s more",
|
"Show %(n)s more": "Show %(n)s more",
|
||||||
"Options": "Options",
|
"Options": "Options",
|
||||||
"%(count)s unread messages including mentions.|other": "%(count)s unread messages including mentions.",
|
"%(count)s unread messages including mentions.|other": "%(count)s unread messages including mentions.",
|
||||||
|
|
Loading…
Reference in New Issue