forked from mystiq/hydrogen-web
rename Brawl -> Root
one of the last occurrences of brawl
This commit is contained in:
parent
c9bb18b87e
commit
41c1c9a6c3
3 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ import {LoginViewModel} from "./LoginViewModel.js";
|
||||||
import {SessionPickerViewModel} from "./SessionPickerViewModel.js";
|
import {SessionPickerViewModel} from "./SessionPickerViewModel.js";
|
||||||
import {ViewModel} from "./ViewModel.js";
|
import {ViewModel} from "./ViewModel.js";
|
||||||
|
|
||||||
export class BrawlViewModel extends ViewModel {
|
export class RootViewModel extends ViewModel {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
super(options);
|
super(options);
|
||||||
const {createSessionContainer, sessionInfoStorage, storageFactory} = options;
|
const {createSessionContainer, sessionInfoStorage, storageFactory} = options;
|
|
@ -21,10 +21,10 @@ import {xhrRequest} from "./matrix/net/request/xhr.js";
|
||||||
import {SessionContainer} from "./matrix/SessionContainer.js";
|
import {SessionContainer} from "./matrix/SessionContainer.js";
|
||||||
import {StorageFactory} from "./matrix/storage/idb/StorageFactory.js";
|
import {StorageFactory} from "./matrix/storage/idb/StorageFactory.js";
|
||||||
import {SessionInfoStorage} from "./matrix/sessioninfo/localstorage/SessionInfoStorage.js";
|
import {SessionInfoStorage} from "./matrix/sessioninfo/localstorage/SessionInfoStorage.js";
|
||||||
import {BrawlViewModel} from "./domain/BrawlViewModel.js";
|
import {RootViewModel} from "./domain/RootViewModel.js";
|
||||||
import {createNavigation} from "./domain/navigation/index.js";
|
import {createNavigation} from "./domain/navigation/index.js";
|
||||||
import {URLRouter} from "./domain/navigation/URLRouter.js";
|
import {URLRouter} from "./domain/navigation/URLRouter.js";
|
||||||
import {BrawlView} from "./ui/web/BrawlView.js";
|
import {RootView} from "./ui/web/RootView.js";
|
||||||
import {Clock} from "./ui/web/dom/Clock.js";
|
import {Clock} from "./ui/web/dom/Clock.js";
|
||||||
import {History} from "./ui/web/dom/History.js";
|
import {History} from "./ui/web/dom/History.js";
|
||||||
import {OnlineStatus} from "./ui/web/dom/OnlineStatus.js";
|
import {OnlineStatus} from "./ui/web/dom/OnlineStatus.js";
|
||||||
|
@ -122,7 +122,7 @@ export async function main(container, paths, legacyExtras) {
|
||||||
const urlRouter = new URLRouter(new History(), navigation);
|
const urlRouter = new URLRouter(new History(), navigation);
|
||||||
urlRouter.attach();
|
urlRouter.attach();
|
||||||
|
|
||||||
const vm = new BrawlViewModel({
|
const vm = new RootViewModel({
|
||||||
createSessionContainer: () => {
|
createSessionContainer: () => {
|
||||||
return new SessionContainer({
|
return new SessionContainer({
|
||||||
random: Math.random,
|
random: Math.random,
|
||||||
|
@ -145,7 +145,7 @@ export async function main(container, paths, legacyExtras) {
|
||||||
window.__brawlViewModel = vm;
|
window.__brawlViewModel = vm;
|
||||||
await vm.load();
|
await vm.load();
|
||||||
// TODO: replace with platform.createAndMountRootView(vm, container);
|
// TODO: replace with platform.createAndMountRootView(vm, container);
|
||||||
const view = new BrawlView(vm);
|
const view = new RootView(vm);
|
||||||
container.appendChild(view.mount());
|
container.appendChild(view.mount());
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error(`${err.message}:\n${err.stack}`);
|
console.error(`${err.message}:\n${err.stack}`);
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {TemplateView} from "./general/TemplateView.js";
|
||||||
import {StaticView} from "./general/StaticView.js";
|
import {StaticView} from "./general/StaticView.js";
|
||||||
import {SwitchView} from "./general/SwitchView.js";
|
import {SwitchView} from "./general/SwitchView.js";
|
||||||
|
|
||||||
export class BrawlView {
|
export class RootView {
|
||||||
constructor(vm) {
|
constructor(vm) {
|
||||||
this._vm = vm;
|
this._vm = vm;
|
||||||
this._switcher = null;
|
this._switcher = null;
|
Loading…
Reference in a new issue