more preview polish

This commit is contained in:
Bruno Windels
2020-12-03 17:42:46 +01:00
parent 7f460caf6b
commit bc8540c3f5
3 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class LoadingPreviewView extends TemplateView {
render(t, vm) {
return t.div({className: "PreviewView"}, [
t.div({className: "avatarContainer"}, t.div({className: "avatar loading"}, t.div({className: "spinner"}))),
t.h1(vm => vm.identifier),
t.h1(vm => vm.name),
t.p({className: "identifier placeholder"}),
t.div({className: {memberCount: true, loading: true, hidden: !vm.hasMemberCount}}, t.p({className: "placeholder"})),
t.p({className: {topic: true, loading: true, hidden: !vm.hasTopic}}, [
+2 -2
View File
@@ -27,9 +27,9 @@ export class PreviewViewModel extends ViewModel {
this._link = link;
this._consentedServers = consentedServers;
this.loading = false;
this.name = null;
this.name = this._link.identifier;
this.avatarUrl = null;
this.identifier = this._link.identifier;
this.identifier = null;
this.memberCount = null;
this.topic = null;
this.previewDomain = null;