diff --git a/src/assets/stylesheets/profile.scss b/src/assets/stylesheets/profile.scss index 5ebac8182d8ef8d71b7430849ebb0231eea781c8..8763dce5e2a89b864c87a73110b49358342530e5 100644 --- a/src/assets/stylesheets/profile.scss +++ b/src/assets/stylesheets/profile.scss @@ -11,7 +11,7 @@ display: flex; pointer-events: auto; z-index: 2; - background-color: rgba(255, 255, 255, 0.9); + background-color: rgba(255, 255, 255, 0.95); :local(.logo) { width: 150px; diff --git a/src/hub.js b/src/hub.js index e397164f5ad63a6a3f6f97141f2dd4ab0632c171..923728476dd3febcee1794877f4c3f7dcc1f1dfb 100644 --- a/src/hub.js +++ b/src/hub.js @@ -196,7 +196,6 @@ function mountUI(props = {}) { const disableAutoExitOnConcurrentLoad = qsTruthy("allow_multi"); const forcedVREntryType = qs.get("vr_entry_type"); const enableScreenSharing = qsTruthy("enable_screen_sharing"); - const showProfileEntry = !store.state.activity.hasChangedName; ReactDOM.render( <UIRoot @@ -208,7 +207,6 @@ function mountUI(props = {}) { forcedVREntryType, enableScreenSharing, store, - showProfileEntry, ...props }} />, @@ -298,7 +296,7 @@ document.addEventListener("DOMContentLoaded", () => { window.APP.scene = scene; registerNetworkSchemas(); - remountUI({ hubChannel, linkChannel, enterScene: entryManager.enterScene, exitScene: entryManager.exitScene }); + remountUI({ hubChannel, enterScene: entryManager.enterScene, exitScene: entryManager.exitScene }); pollForSupportAvailability(isSupportAvailable => remountUI({ isSupportAvailable })); diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index e08bad5d3bc4bcbb3b2f28071e01f935793f6729..f8b6f75452f298155e80ae8f4fcac3549582364b 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -74,7 +74,6 @@ class UIRoot extends Component { scene: PropTypes.object, hubChannel: PropTypes.object, hubEntryCode: PropTypes.number, - showProfileEntry: PropTypes.bool, availableVREntryTypes: PropTypes.object, environmentSceneLoaded: PropTypes.bool, roomUnavailableReason: PropTypes.string, @@ -120,11 +119,6 @@ class UIRoot extends Component { showProfileEntry: false }; - constructor(props) { - super(props); - this.state.showProfileEntry = this.props.showProfileEntry; - } - componentDidMount() { this.props.concurrentLoadDetector.addEventListener("concurrentload", this.onConcurrentLoad); this.micLevelMovingAverage = MovingAverage(100); @@ -139,8 +133,6 @@ class UIRoot extends Component { this.props.scene.removeEventListener("exit", this.exit); } - componentDidUpdate(prevProps) {} - onSceneLoaded = () => { this.setState({ sceneLoaded: true }); }; @@ -170,6 +162,12 @@ class UIRoot extends Component { }; handleStartEntry = () => { + const promptForNameAndAvatarBeforeEntry = !this.props.store.state.activity.hasChangedName; + + if (promptForNameAndAvatarBeforeEntry) { + this.setState({ showProfileEntry: true }); + } + if (!this.props.forcedVREntryType) { this.setState({ entryStep: ENTRY_STEPS.device }); } else if (this.props.forcedVREntryType.startsWith("daydream")) {