refactor: rename states to view controllers (#1060)

This commit is contained in:
Mo
2022-06-01 10:15:45 -05:00
committed by GitHub
parent 78f39ec85d
commit 54125cec21
177 changed files with 1518 additions and 1365 deletions

View File

@@ -1,24 +1,25 @@
import { observer } from 'mobx-react-lite'
import { AppState } from '@/UIModels/AppState'
import { WebApplication } from '@/UIModels/Application'
import { ViewControllerManager } from '@/Services/ViewControllerManager'
import { WebApplication } from '@/Application/Application'
import { User as UserType } from '@standardnotes/snjs'
type Props = {
appState: AppState
viewControllerManager: ViewControllerManager
application: WebApplication
}
const User = ({ appState, application }: Props) => {
const { server } = appState.accountMenu
const User = ({ viewControllerManager, application }: Props) => {
const { server } = viewControllerManager.accountMenuController
const user = application.getUser() as UserType
return (
<div className="sk-panel-section">
{appState.sync.errorMessage && (
{viewControllerManager.syncStatusController.errorMessage && (
<div className="sk-notification danger">
<div className="sk-notification-title">Sync Unreachable</div>
<div className="sk-notification-text">
Hmm...we can't seem to sync your account. The reason: {appState.sync.errorMessage}
Hmm...we can't seem to sync your account. The reason:{' '}
{viewControllerManager.syncStatusController.errorMessage}
</div>
<a
className="sk-a info-contrast sk-bold sk-panel-row"