make preview useable without client list, to reuse in create link view

This commit is contained in:
Bruno Windels
2020-12-02 15:36:54 +01:00
parent 60b280bbf9
commit 5d40d01360
17 changed files with 165 additions and 66 deletions
+2 -1
View File
@@ -2,7 +2,7 @@ import {xhrRequest} from "./utils/xhr.js";
import {RootViewModel} from "./RootViewModel.js";
import {RootView} from "./RootView.js";
import {Preferences} from "./Preferences.js";
import {guessApplicablePlatforms} from "./client/Platform.js";
import {guessApplicablePlatforms} from "./Platform.js";
export async function main(container) {
const vm = new RootViewModel({
@@ -10,6 +10,7 @@ export async function main(container) {
openLink: url => location.href = url,
platforms: guessApplicablePlatforms(navigator.userAgent),
preferences: new Preferences(window.localStorage),
origin: location.origin,
});
vm.updateHash(location.hash);
window.__rootvm = vm;