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