Use alternative border radius when previewing a space
This commit is contained in:
parent
7d2dd5cc68
commit
9caf2ce268
@ -22,6 +22,10 @@
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.PreviewView .mxSpace .avatar {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.PreviewView .defaultAvatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
|
@ -51,7 +51,7 @@ class LoadedPreviewView extends TemplateView {
|
||||
return t.div({className: "defaultAvatar"});
|
||||
}
|
||||
});
|
||||
return t.div([
|
||||
return t.div({className: vm.isSpaceRoom ? "mxSpace" : undefined}, [
|
||||
t.div({className: "avatarContainer"}, avatar),
|
||||
t.h1(vm => vm.name),
|
||||
t.p({className: {identifier: true, hidden: vm => !vm.identifier}}, vm => vm.identifier),
|
||||
|
@ -34,6 +34,7 @@ export class PreviewViewModel extends ViewModel {
|
||||
this.topic = null;
|
||||
this.domain = null;
|
||||
this.failed = false;
|
||||
this.isSpaceRoom = false;
|
||||
}
|
||||
|
||||
async load() {
|
||||
@ -110,6 +111,7 @@ export class PreviewViewModel extends ViewModel {
|
||||
this.memberCount = publicRoom?.num_joined_members;
|
||||
this.topic = publicRoom?.topic;
|
||||
this.identifier = publicRoom?.canonical_alias || link.identifier;
|
||||
this.isSpaceRoom = publicRoom?.room_type === "m.space";
|
||||
if (this.identifier === this.name) {
|
||||
this.identifier = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user