update UI when hash changes

This commit is contained in:
Bruno Windels
2020-11-30 11:24:08 +01:00
parent 4d15ce40c1
commit f4cd2a5112
7 changed files with 42 additions and 19 deletions
+2
View File
@@ -21,6 +21,8 @@ export class PreviewView extends TemplateView {
return t.div({className: "PreviewView"}, [
t.p(t.img({src: vm => vm.avatarUrl})),
t.p(vm => vm.name),
t.p(vm => vm.identifier),
t.p(["Can preview from ", vm => vm._consentedServers.join(", ")]),
t.p(["loading: ", vm => vm.loading])
]);
}
+5 -1
View File
@@ -15,7 +15,7 @@ limitations under the License.
*/
import {LinkKind} from "../Link.js";
import {ViewModel} from "../ViewModel.js";
import {ViewModel} from "../utils/ViewModel.js";
import {resolveServer} from "./HomeServer.js";
export class PreviewViewModel extends ViewModel {
@@ -56,4 +56,8 @@ export class PreviewViewModel extends ViewModel {
homeserver.mxcUrlThumbnail(profile.avatar_url, 64, 64, "crop") :
null;
}
get identifier() {
return this._link.identifier;
}
}