diff --git a/src/domain/BrawlViewModel.js b/src/domain/RootViewModel.js similarity index 99% rename from src/domain/BrawlViewModel.js rename to src/domain/RootViewModel.js index dde9bc44..94a71292 100644 --- a/src/domain/BrawlViewModel.js +++ b/src/domain/RootViewModel.js @@ -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; diff --git a/src/main.js b/src/main.js index 13bab3ef..6b302c34 100644 --- a/src/main.js +++ b/src/main.js @@ -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}`); diff --git a/src/ui/web/BrawlView.js b/src/ui/web/RootView.js similarity index 99% rename from src/ui/web/BrawlView.js rename to src/ui/web/RootView.js index 21ae539c..d7f0be47 100644 --- a/src/ui/web/BrawlView.js +++ b/src/ui/web/RootView.js @@ -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;