Implement invite button in memberlist

This commit is contained in:
RMidhunSuresh 2023-08-19 23:01:23 +05:30
parent a89a901d5c
commit 68092c5f62
No known key found for this signature in database
3 changed files with 34 additions and 5 deletions

View File

@ -217,6 +217,8 @@ the layout viewport up without resizing it when the keyboard shows */
.LazyListParent { .LazyListParent {
flex: 1; flex: 1;
flex-basis: 0;
margin-top: 15px;
} }
.LoadingView { .LoadingView {

View File

@ -1123,12 +1123,32 @@ button.RoomDetailsView_row::after {
/* Memberlist Panel */ /* Memberlist Panel */
.MemberListView { .MemberListView__list {
padding-left: 16px; padding-left: 16px;
padding-right: 16px; padding-right: 16px;
margin: 0; margin: 0;
} }
.MemberListView {
display: flex;
flex-direction: column;
height: 100%;
}
.MemberListView__invite-container {
display: flex;
justify-content: center;
align-items: center;
}
.MemberListView__invite-btn {
width: 80%;
height: 32px;
display: flex;
justify-content: center;
align-items: center;
}
.MemberTileView { .MemberTileView {
margin-bottom: 8px; margin-bottom: 8px;
list-style: none; list-style: none;

View File

@ -16,13 +16,20 @@ limitations under the License.
import {LazyListView} from "../../general/LazyListView"; import {LazyListView} from "../../general/LazyListView";
import {MemberTileView} from "./MemberTileView.js"; import {MemberTileView} from "./MemberTileView.js";
import {TemplateView} from "../../general/TemplateView";
export class MemberListView extends LazyListView { export class MemberListView extends TemplateView {
constructor(vm) { render(t, vm) {
super({ const list = new LazyListView({
list: vm.memberTileViewModels, list: vm.memberTileViewModels,
className: "MemberListView", className: "MemberListView__list",
itemHeight: 40 itemHeight: 40
}, tileViewModel => new MemberTileView(tileViewModel)); }, tileViewModel => new MemberTileView(tileViewModel));
return t.div({ className: "MemberListView" }, [
t.div({ className: "MemberListView__invite-container" }, [
t.button({ className: "MemberListView__invite-btn button-action primary" }, vm.i18n`Invite to this room`),
]),
t.view(list),
]);
} }
} }