rename Brawl -> Root

one of the last occurrences of brawl
This commit is contained in:
Bruno Windels 2020-10-09 09:59:59 +02:00
parent c9bb18b87e
commit 41c1c9a6c3
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ import {LoginViewModel} from "./LoginViewModel.js";
import {SessionPickerViewModel} from "./SessionPickerViewModel.js";
import {ViewModel} from "./ViewModel.js";
export class BrawlViewModel extends ViewModel {
export class RootViewModel extends ViewModel {
constructor(options) {
super(options);
const {createSessionContainer, sessionInfoStorage, storageFactory} = options;

View File

@ -21,10 +21,10 @@ import {xhrRequest} from "./matrix/net/request/xhr.js";
import {SessionContainer} from "./matrix/SessionContainer.js";
import {StorageFactory} from "./matrix/storage/idb/StorageFactory.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 {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 {History} from "./ui/web/dom/History.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);
urlRouter.attach();
const vm = new BrawlViewModel({
const vm = new RootViewModel({
createSessionContainer: () => {
return new SessionContainer({
random: Math.random,
@ -145,7 +145,7 @@ export async function main(container, paths, legacyExtras) {
window.__brawlViewModel = vm;
await vm.load();
// TODO: replace with platform.createAndMountRootView(vm, container);
const view = new BrawlView(vm);
const view = new RootView(vm);
container.appendChild(view.mount());
} catch(err) {
console.error(`${err.message}:\n${err.stack}`);

View File

@ -22,7 +22,7 @@ import {TemplateView} from "./general/TemplateView.js";
import {StaticView} from "./general/StaticView.js";
import {SwitchView} from "./general/SwitchView.js";
export class BrawlView {
export class RootView {
constructor(vm) {
this._vm = vm;
this._switcher = null;